Weekly Dev Update #48
THORChain Weekly Dev Update for Week 16–22 June 2020; Internal Audit, Testnet 3.5, Unbond Memo, Bundled Witness Transactions.
Summary
Internal Audit
The team spent the week going over every line of code in the main THORNode repo as they move towards a Gold Master release for Chaosnet. There is not anticipated to be any final business logic feature changes to THORChain as they move to stabilise the code base.
Testnet 3.5
The team re-deployed a new testnet during the week which fixed some issues found in the previous week. A new testnet involves a new THORNode binary, updated Midgard and a refreshed frontend client. Users will notice subtle changes to make the client stable.
Unbond Memo
New logic has been added to allow a node operator in the pending queue to leave the system, or reduce the amount of bond they have. This will facilitate a Node Operator to take profits from their rewards whilst they are in standby, or take some of their bond and stake it to pursue better yield.
Bundled Witness Transactions
Logic has been added for the Bifrost to bundle multiple witness transactions together, reducing the amount of bandwidth on the system.
THORNode
Bugfixes from testnets, as well as some quality and feature inclusions from testing.
Internal Audit
- [audit] managers
- [audit] memo package
- [audit] keeper package
- [audit] is/has func prefix should always return bool
- [audit] types package
- [audit] common package
- Resolve “[CLEANUP] internal code audit, code cleanup(handlers-1)”
- Resolve “[CLEANUP] internal code audit , code cleanup(handlers)”
- Resolve “[CLEANUP] internal code audit , code clean up(keeper)”
- Resolve “[CLEANUP] Internal code audit, code cleanup(types)”
- 515-issue some code clean up during internal code audit
- [bugfix] panic when tss is frozen
- [bugfix] re-enable outbound memos
- [bugfix] pubkey mgr refreshes signer pks
- [bugfix] fix bifrost pubkey manager
- [bugfix] fix leave memo to collect node address
- [bugfix] mark outbound as done more accurately
- [bugfix] each ragnarok iteration takes as much time as needed
- [bugfix] continue after adding to swap queue, instead of returning immediately
- [bugfix] change tss timeouts based on new benchmarking
- [bugfix] Ready node status blocks refund bond requests
- Add validator helper functions
- Enable telemetry prometheus metrics
- Fix keys creation without seed phrase
- Resolve “Update to use new TSS external ip configuration”
- [feature] add new unbound memo
- 523-issue update memo, unit tests
- [feature] bundle observations into a single observation
- [config] update constants
- [feature] observation flexibility
- 516-issue clean up msgs , update unit tests
- [feature] add API endpoint for tx in voter
- 510-issue if the emit asset is not enough to pay fee, unstake shall continue
- [feature] add API endpoint to count number of pending outbound transactions
Midgard
Bugfixes and feature requests as required for the clients.
- Resolve “FEATURE: Fast sync”
- Resolve “FEATURE: add resume to blockscanner”
- Resolve “Move logic of GetPriceInRune to usecase”
- Resolve “FIX: add transaction status”
- Resolve “FEATURE: Proxy THORNode /constants endpoint”
- Resolve “Update assetEarned and runeEarned”
- Resolve “Update events to new DB schema”
- Fix test build
TSS
The team have pushed initial work to build out a GG20 TSS Proof-of-Concept that could improve reliability, scalability and solve for node-account blame, as well as encrypting key generation output.
Clients
BEPSwap Client
Numerous UI/UX tweaks based on community feedback
ASGARDEX Client
Work continues on the flagship ASGARDEX product, now with keystore support using the new ASGARDEX-Crypto library.
- Add `HeaderCurrency` component
- Resolve “Add business logic for pricing”
- Add AssetSelect component
- Improve price handling & others
- Resolve: Use `Option<T>` from `fp-ts`
- Resolve “Fix: Pool data are loaded twice at start”
- Save / load keystore
- Feature/asset menu
- Add SwapModal component
- Use i18n in header + footer
- Check keystore at start
- Add tests for `services/wallet/util.ts`
- Resolve “Calculate `blocks left` for deepest pending pool “
THORNode Infra
The team have prepared an initial set of charts to deploy the following for a THORNode:
THORNode services:
- thor-daemon: THORNode daemon
- thor-api: THORNode API
- bepswap: BEPSwap UI frontend
- bifrost: Bifrost service
- midgard: Midgard service
External services:
- binance-daemon: Binance fullnode daemon
- bitcoin-daemon: Bitcoin fullnode daemon
- ethereum-daemon: Ethereum fullnode daemon
Tools
- elastic: ELK stack, deperecated. Use elastic-operator chart
- elastic-operator: ELK stack using operator for logs management
- prometheus: Prometheus stack for metrics
https://gitlab.com/thorchain/devops/helm-charts
Community Work
The community are building out:
- THORNode telegram bot: https://github.com/block42-blockchain-company/thornode-telegram-bot
- THORChain community explorer: thorchain.community
- THORChain arbitrage bots: https://gitlab.com/thorchain/trade-bots
In addition, the team are also talking with a mobile wallet provider and hace commissioned a team to build a blockchain explorer.
Audits
The team have received the final of the Kudelski audit, with no major issues found.
Kudelski reported:
• 1 security issue of medium severity [PATCHED]
• 2 security issues of low severity [PATCHED, NOT-RELEVANT]
• 1 observation related to general code safety [NOTED]
Gauntlet are preparing their final THORChain report.
Next Milestones
The testnet 4 is being prepared and will be made public soon. Chaosnet is expected once testnet has been fully-validated in several environments.
Community
To keep up to date, please monitor community channels, particularly Telegram and Twitter:
- Twitter: https://twitter.com/thorchain_org
- Telegram Community: https://t.me/thorchain_org
- Telegram Announcements: https://t.me/thorchain
- Reddit: https://reddit.com/r/thorchain
- Github: https://github.com/thorchain
- Medium: https://medium.com/thorchain