Weekly Dev Update #38
THORChain Weekly Dev Update for Week 07–14 Apr 2020; THORChain Fees and Rewards; Bitcoin Support ; THORChain Byzantine Module
Summary
The team refactored parts of the THORChain Fees and Rewards logic, as well as beginning to support Ethereum and Bitcoin. Bifrost has been completely refactored with better abstraction.
Asgard Wallet is being prepared for Mainnet, and the @thorchain/byzantine-module
has been published to NPM.
THORChain Fees and Rewards
This is an integral part of the protocol and ensures that liquidity providers and nodes are paid every block. It is carefully designed to ensure correct economic incentivisation, as well as being as simple as possible.
THORNode
Bugfixes found in testing, as well as a small refactor of the of Fee and Reward flow to remove redundant code.
- [bugfix] Binance stuck patch
- [bugfix] drop empty blocks
- RESOLVE: REMOVE: Redundant Poolshare code
- REFACTOR: SubtractGas in VaultData
- [refactor] remove chain specific references
- [infra] ensure CI checks linting
- [feature] make sure any node ips being added are ‘caught up’
- [infra] Update testnet scripts
Ethereum
Ethereum support is on track, with the block scanner being added to the Bifröst. Initial logic is to process only ETH.ETH
transactions and only after 1 confirmation. Re-org and double-spend resilience logic will be added later.
- [eth support] add support for eth addresses
- Eth client connection
- Eth block scanner
- [refactor] switch eth to use new block scanner
Bitcoin
Bitcoin is more tricky, since the network needs to become aware of UTXOs and ensure consensus over which UTXOs to spend. Each time a vault spends, it will consolidate all UTXOs known to it, up until a cut-off point.
- Resolve “Update common address package to support BTC”
- Resolve “Create block scanner for BTC block client”
- Add BTC signer
- Resolve “[ADD] define a UTXO struct”
- Resolve “[ADD] How to manage UTXO in thorchain”
- Resolve “Connect bitcoin client to block scanner”
Bifrost
The Bifröst module was completely re-written to be better-abstracted and support the multi-chain environment.
- [feature] Include maximum amount of gas in txout item
- [refactor] use on chain gas, instead of in memory
- [refactor] add new common blockscanner
- [Refactor] Switch binance observations to use new blockscanner
- [refactor] move txn filtering out of the chain implementation and into the observer package
- [refactor] refactor the block scanner storage
- [refactor] Fetch block height within common block scanner
- [version] init txout store v2
- [feature] fetch binance gas fees from RPC node
- [refactor] supplemental funcs for common blockscanner
- [feature] Support multi-chain observations
- [feature] Event stream by chain
THORChain TSS
Work continues to integrate TSS blame — this will ensure a malicous actor who intentionally halts a TSS session can be blamed and churned out.
Midgard
Work continues to mature the code base and respond to iterative requests from the front-end team.
BEPSwap Client
Transaction page UX tweaks, as well as integration of the new Byzantine Module. All work has been merged into master
and this is the primary branch.
- Resolve “Wallet address isn’t truncated properly”
- Resolve “Improve UX of tx history page”
- Resolve “Tx view pagination UX improvement”
- Resolve “BUG: Pool list is not updated after creating a new pool”
- Use `Byzantine` module
- Resolve “BUG: Pool price incorrect on swap detail page.”
- Merge latest `development` into `master` to be ready for testnet
- Remove deprecated `asgardex-common`
- Merge master with latest development (04–13–20)
Asgard Wallet
The Asgard Wallet has completed the React/Antd refactor and is now being prepared for mainnet release.
- AntD & mobile navbar
- Complete migrate receive funds screen, and fixes for navigation. Related to #172, #173
- Feature/multi network ui. Related to #179, #180, #181, #183, #184
THORChain Byzantine Module
The THORChain Byzantine Module has now been published and will be integrated in both BEPSwap and Asgard Wallet:
https://www.npmjs.com/package/@thorchain/byzantine-module
Bounty Program
Enquire with the team about bounties for THORChain development.
Audit
Code Review: Complete
Economic Review: Completed most of THORChain's economic architecture
TSS Audit: kickoff
Next Milestones
The updated testnet is in the final stages of testing. Chaosnet is expected once testnet has been fully-validated in several environments. There currently isn’t any known blockers to Chaosnet release.
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