KC Chng (CEO) — Some Company Updates
Code Review and DigixDAO ETC Proposal
There would be a couple more redeployments and refactoring of our contracts internally on the Kovan testnet prior to submission to smart contract auditors for review. In the meantime, we are currently sourcing for 1 to 2 Ethereum Smart Contract auditors to review our code. In lieu of time needed to request and negotiate for the availability of appropriate Ethereum Smart Contract auditor/s, we will simultaneously take the time to begin a refund proposal of the ETC within DigixDAO. The audit process, as highlighted in our roadmap, could take upwards of 45 working days, and depending on any major bugs or issues found, could either be shorter or longer than estimated. We will keep everyone posted as we move along. As the code is being reviewed, we will also be making optimizations to our front end and UI concurrently.
A bit of background as to why there is ETC in DigixDAO, the Ethereum chain underwent a “hard fork” on July 20th 2016 (at block 1,920,000), which unintentionally caused a “chain split”, and spawned the alternative parallel chain “Ethereum Classic”. As a result of this split, all balances existing before the hard fork remained on both chains, and as of March 2016, the DigixDAO balance consists of 465,134 of Classic Ether (ETC)
The ETC Withdrawal proposal V1.0 will be released this Wednesday for comment.
Chris Hitchcott will speak on Digix’s tech stack (which includes Truffle, an Ethereum Development Framework by Consensys). Andrew Keys will also present a keynote special on Consensys and the Enterprise Ethereum Alliance. This will be live-streamed at the SGInnovate offices where we are working out of. For those in Singapore, please sign up for the event at https://www.meetup.com/Ethereum-Singapore/events/238207544/
Anthony Eufemio (CTO)
I have added functionality for assets to be added to different collections via a Doubly Linked List. This is required for the asset system user experience which will allow us to list assets for specified use cases. This includes listing the custodian delivery queue, listing of assets that have been minted and are part of the gold token pool, listing of assets that have failed the quarterly audit checks, listing of assets that are in the customer redemption queue, as well as every user’s owned assets.
I have refactored the contracts so that moving them from one list to another depending on their status is done atomically which takes a significant amount of time as certain considerations have to be made including gas utilization (i.e. preventing gas exhaustion type attacks for non-atomic operations), preventing race conditions, and other security related precautions. We’ve also changed the primary identifier for Assets from an unsigned integer into an address type to allow users to directly interact with each asset as if there were individual contracts with its own ABI without having to go through the AssetUserInterface.
We’ve also been moving some of our infrastructure services out of DigitalOcean and into Microsoft Azure under the Microsoft BizSpark Plus program. As Azure newbies we’re trying to learn the how to properly configure our Azure instances for best performance and security, as well as writing automation tools for provisioning new hosts as needed.
Chris Hitchcott (Digix Core Dev)
This week I’ve been working mostly on implementing the UI for Vendor and Custodian “backoffice” system for registering, accepting and redeeming PoA assets. The associated Smart Contracts were created by Anthony, and I deployed them to Kovan for UI testing. The UI uses the Spectrum environment, which allowed for a developer-friendly easy experience even with the (somewhat) complicated workflow. The “Digix Assets” dapplet is a standalone module that inherits all the benefits of Spectrum’s existing infrastructure.
One of the interesting patterns implemented by Anthony in the Proof of Asset (PoA) smart contract system is that of a “Doubly Linked List” — it allows for infinite recursion of a collection by recording their neighbour IDs. In terms of creating a UI, it means calling a contract method to get the next or previous item in a given list, then calling the next item to get the next item, and so on. By leveraging the existing web3-redux implementation and combining it with the react component architecture, this allowed me to create a generic “DLL Paginator” component (which is now part of Spectrum core), that can be re-used throughout the Digix suite. It handles the logic for fetching items (based on passed async methods), and showing UI for pagination.
I also took advantage of Spectrum’s transaction signing system, which allowed me to register specific UI components to display users alongside account-specific components for signing transactions (e.g. a password input for encrypted keystores, QR code for cold storage, or message for hardware wallets), and passing generic data to it via web3-redux.
The whole point of creating this UI is to make it super easy for each party (be it vendor, custodian or auditor) in the PoA system to be able to make transactions securely and conveniently. I’m told that one of the pain-points during the beta version was having to educate these users on how to interact with the contracts — hopefully having a simple and straightforward interface like the one created will help make it more intuitive.
I also put together a little video update showcasing the process:
Also, shoutout to Tim from the Truffle team for having us up on http://truffleframework.com/. I cannot recommend Truffle enough, and it’s been solidly deploying (and importing via npm) the Digix contract system to Kovan (and will continue to do so for mainnet).
Weekly dev commits
- 1c2d24f — [feature] expose is_owner() function in ACOwned
- 2dd73ca — [maint] bump version, redeploy
- 0c7923b — Merge branch ‘master’ of github.com:DigixGlobal/core2-storage-library-contracts
- e8c4b52 — [feature] AssetCustodianInterface getter functions
- fce0e9a — [maint] bump version to 0.0.4
- a0eb101 — [maint] deploy to kovan
- 3e853a2 — [maint] update readme to include asset interface documentation
- d659318 — [feature] Asset storage payment days
- 61f1579 — [feature] Custodian interface
- c17c363 — [maint] bump verison
- 380d0b3 — [maint] re-deploy to kovan
- aadf0e6 — [maint] update @digix/truffle-lightwallet-provider
- 3123af2 — [hotfix] Fix custodian queue asset listing
- 43015b4 — [wip] intermittent issues with contracts not being deployed.
- fce9d6d — [maint] remove superfluous List library (use DoublyLinkedList)
- 319fb94 — [feature] change asset ID to address type
- 2c24dbf — [feature] use updated cacp that exposes is_owner()
- 0592138 — [maint] rebuild
- b411da5 — [maint] fix build
- a20acf1 — [maint] use new version
- c4bf186 — [maint] use new version
- 7294eae — [maint] update deps
- 7fb7812 — [wip] custodian ui, butter-up all existing transaction modal UI
- 0b0107d — [wip] custom signing UI; beautiful transactions!
- 1516a5a — [wip] implement new getDefaultAddress, for nicer DX
- a1ce59b — [bugfix] pass required props to assetList children
- 7598ee2 — [wip] weights dropdown
- e70192c — [wip] use updated contracts, modularised interfaces, UI enhancements
- 32f5b83 — [wip] misc cleanup for release
- d074948 — [wip] [minor] add react key in dll list, cleanup
- 14af6f2 — [wip] implement double-linked-list paginator for assets
- 8fc2a2e — [wip] refactor keystoreModal process; use session model, fix modal scrolling
- acf631f — [wip] new/all toggle UI
- 93feee7 — [wip] DefaultAddressSelector — don’t show the list if there are no addresses
- 39d36ee — [maint] update version of asset contracts
- 9414956 — [wip] prefix session store
- 258d27d — [wip] major ORM update; session defaultAddress, addresses now fk, not many, (Default)AddressSelector
- 591a470 — [maint] subprovider back to application/json
- 682347f — [bugifx] resolve syncronous actions in keystoreModal
- 0059917 — [wip] delete asset transactions
- 970e513 — [wip] txData UI tweak
- 6f89ce6 — [feature] transaction modal onClose event
- 733a264 — [wip] IPFS image upload & viewing
- 47b49af — [wip] misc stringUtils; (parseBigNumber format, parseHex)
- 2f4b71f — [wip] use gram weight instead of nanograms in UI
- 536c85e — [wip] basic pagination for assets interface
- b52b481 — [wip] import v3 wallets
- 3e26101 — Merge branch ‘refactor’ into feature/keystore-import
- f31859f — [wip] use generic signing modal for digix assets
- 56a6ab3 — [wip] use generic signing modal with tokens
- 5469769 — [feature] generic transaction signing modal
- 89da6eb — [feature] add pollingInterval
- 1d7a4da — [bugfix] manually check for bigNumber
- b809484 — [maint] clean up console.log
- 52e27de — [feature] add getDefaultAddress for decorating from field
- a87e834 — [bugfix] render error.message if it’s available, rather than [object Object]
- 2e37e4e — [bugfix] multiple scrolling modals
- 7556119 — [bugfix] trigger onClose on success
- a9526da — [feature] initiallyOpen; child passed setError, setLoading