Weekly Dev Update #28
THORChain Weekly Dev Update for Week 28 Jan–03 Feb 2020
Overview
The team are deep in testing and validation. The bulk of the work has been to address issues arisen from full THORChain build-up-and-tear-down cycles. This work is necessary to ensure the code is robust and resilient.
THORNode
The THORNode team have worked to update the Bifrost and Metrics modules to V2, added more event types for better coverage, and implemented a blame feature for TSS. Blame will allow nodes to identify an aborting node on a KeyGen and “blame” them. The blamed node is then labelled and churned out. This addresses a possible attack vector the team found in testing.
- Update thorclient
- 322-issue the highest version that has majority
- 319-issue add logic to subsidize pool with slashed bond (RUNE)
- [ADD] Bifrost v2 config, types, pkg components
- [ADD] Signer v2
- [ADD] Update metrics to v2
- Move binance to chainclients
- ADD Gas event
- [Add] Retry churn on failure
- [ADD]: Observer accepts arbitrary chain
- [ADD] Collect TSS blame
- Resolve “Implement TSS Keysign blame”
- Resolve “Implement TSS Blame”
Refactoring is ongoing. It’s important to keep the codebase as light as possible to minimise the complexity surface.
- Refactor docker builds
- [refactor] merge pubkey managers
- [Refactor] save txout items to kvstore instead of memory
- [refactor] update the migration curve
Some focus on linting to make the code readable and clean.
Bugfixes to address issues found in testing.
- [bugfix] emit both inbound and outbound txns if both apply
- [bugfix] fix account num and seq fetching
- [bugfix] Mocknet patches
- [bugfix] ensure swap evt pool is always non-rune asset
- Resolve “[FIX] investigate and fix migrate tx”
- 330-issue if node account sending out fund using `yggdrasil-` , however the to…
- [bugfix] select asgard vault with most amount of coins to send from
- [bugfix] add rune in leave msg to bond
- [bugfix] Broadcast err check
- [bugfix] improve defense against double spending
- Resolve “[FIX] slash node account if it send the same txout item many times”
- ensure pools have an asset
- [infra] restart midgard on crash
- testnet automation with churning
- Config cleanup
- [infra] generate also include mnemonic phrase
- change gitlab aws deploy healthcheck endpoint to use thor-api instead of midgard
- testnet automation with churning
Midgard
Work on Midgard was completed to update it to the new event types supported by THORNode, as well as feedback from the frontend team.
- Add: Feature/events/tx/:id proxied endpoint
- Prevent BinanceClient to fetch data for every request
- Added: Extented tests, notes, extra test output.
- Resolve “FEATURE: Add event type `ADD`”
- Fail on db connection error
- Resolve “Midgard reward event json implementation does’t match the one implemented in Thornode latest version”
- Resolve “Clean binance client source code”
- Resolve “CHANGE: Slip to Basis Points”
- Complete Block Reward event handler
- [lint] stricter linting rules
- Fixes: buyTxAverage, buyFeeAverage, Standardised sell methods, Expaned tests
- Fixes/Number of methods.
- Resolve “ISSUE: Appears as though output is not being validated 100% correctly against swagger file”
- Fix/error handling
- Fix for buyAssetCount and added and extended lots of other tests.
- Fixes/ Number of test updates
- Fixed: poolROI and poolROI12
- fix get pool
BEPSwap
The frontend team are getting closer to a polished product. Work is also ongoing to refactor to React Hook and Typescript to reduce code complexity.
- unit tests for stringHelper
- Resolve “Fix: show no data status in the pool stake detail page”
- Resolve “Update: Export PrivateModal for password input as an independent component”
- Migrate sources of `redux/wallet/*` to TypeScript
- Migrate `SwapSend` to TypeScript
- Migrate sources of `redux/midgard/*` to TypeScript
- Fix `pool` state
Asgard Wallet
The Asgard Wallet team have implemented the first 0.1 client, supporting Binance Chain assetx. The Asgard Wallet should be available for public testing soon and the team are excited to release it. It will allow THORChain to be censorship resistant in future.
Audit
Code Review: 2/3 Review Complete
Economic Review: Commenced
TSS Audit: Commenced
Next Milestones
The updated testnet is in the final stages of testing.
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