Fantom Technical Update | 25th May 2020
Since the last technical update, the team has been working on a variety of different tasks, including unit tests for governance smart contracts, creating a backend and smart contract Oracle for price feeds, improvements to fLend, writing changes in Prometheus to assist in the monitoring and generation of analytics for the live and testnet networks, and the implementation of our CTO Quan Nguyen’s paper on “Fast Stochastic Peer Selection in Proof-of-Stake Protocols”.
We have also made improvements to the Fantom Explorer, including adding a list of smart contracts, being able to verify contract bytecode, and displaying the original uncompiled contract source code.
The team is also in the process of adding bridge integration, pin lock, redelegation, and partial undelegation functionalities into the PWA wallet.
Go-lachesis
- Added scripts and configs for alert manager: https://github.com/Fantom-foundation/go-lachesis/pull/485/commits/c45f6cfe3b782cc7183fc5c8014581333ead8c72
- Added in test and fix scripts and configs for grafana: https://github.com/Fantom-foundation/go-lachesis/pull/485/commits/176e795a8edec1c3959d047aa834aaa39bd98a1d
- Added metrics. Prepare configs and scripts for grafana: https://github.com/Fantom-foundation/go-lachesis/pull/485/commits/02ce4df491098a32b23d730bd9d5ff0eb9da99f0
- Added metrics for stakers: https://github.com/Fantom-foundation/go-lachesis/pull/485/commits/047b2a3d11f1e275a04e409ad59902d461ca7352
- Added in Grafana dashboard. Additional metrics in code: https://github.com/Fantom-foundation/go-lachesis/pull/485/commits/bee918b90437f732c59b6c23a75af6b147180366
Fantom-SFC Governance
- Create proposal test: https://github.com/devintegral5/fantom-sfc/commit/6571245e1c7e0e404115723ead9aec27a16742f3
- Partial tests for `vote` and `increase proposal deposit` were added: https://github.com/devintegral5/fantom-sfc/commit/940d2cc889e680bb2d422c802d14e38af3027483
- Tests on vote and increase proposal deposit: https://github.com/devintegral5/fantom-sfc/commit/c518ccaa00d8c6432c2344f7d2bc06e7fe73b317
- Added tests on handle deadlines, increase proposal deposit, vote: https://github.com/devintegral5/fantom-sfc/commit/327cc311ca7a57acf0011f17c4f60549c9b8a47f
- Test on cancel vote with incorrect choices; format fixes: https://github.com/devintegral5/fantom-sfc/commit/bba9ae480725c76cf6a51566f8c149b3d15e28c5
- Added in “Least-Resistance Consensus” (based on Fantom’s governance document https://github.com/Fantom-foundation/FIPs/blob/master/FIPS/governance.pdf ): https://github.com/devintegral4/fantom-sfc/commit/306af4411c086d6ac2b231624e75569911911ef8
- Implemented “Fast Stochastic peer selection” (implementation is slightly incorrect, will be fixed): https://github.com/Fantom-foundation/go-lachesis/pull/487. This should make selecting peers take `O(1)` time.
Oracle
- Attempted to create config based api: https://github.com/Fantom-foundation/oracle-backend/commit/12e2ff724c5e1b49a11090b738f6f83acf2e0520
- Added basic Oracle logic: https://github.com/Fantom-foundation/oracle-backend/commit/a132949b47839cf3078e752cc9a31dd71e689a9c
- Added transaction handler: https://github.com/Fantom-foundation/oracle-backend/commit/28e32070b0be032f93ab2bc823b351acab0feb76
- Added event listener and transaction handler: https://github.com/Fantom-foundation/oracle-backend/commit/71216bfb6f69bbc1f5eaf9cb38c5c7495ab4838a
- Resolved problems with events: https://github.com/Fantom-foundation/oracle-backend/commit/858df232c4d3512ecfa4a017874e2bea6741bd79
- Resolved problems with web3transaction: https://github.com/Fantom-foundation/oracle-backend/commit/5982cb28db98478b0ca844d41a45b3b6bfaf42cf
- Added errorHandler for a future use: https://github.com/Fantom-foundation/oracle-backend/commit/d2ee29e1cb3869d6cbdbe743cf258db51c64db69
- Fixed median err: https://github.com/Fantom-foundation/oracle-backend/commit/8f516c397e02600b260d7d0a1c2f16257b4608a3
- Replaced error handler to an oracle app folder: https://github.com/Fantom-foundation/oracle-backend/commit/6dafe62ddc30dc394959331c8448e83eea8e9cdf
- Created Solidity Oracle smart contract: https://github.com/devintegral4/oracle_contract/commit/7986bc64be23035160b38be83014bc5eaea67405
- Fixed errors: https://github.com/devintegral4/oracle_contract/commit/7e8e35443032e932b41d2fbc3a7fcee9d621e5ca
fLend
- Use SafeMath for calculations: https://github.com/Fantom-foundation/flend/commit/ae6079e3617b5316518ae8ab6103a095d81ce2ee
- Use rational values for percent options: https://github.com/Fantom-foundation/flend/commit/c7b5f487ad07b58d1a56e3032c950961fe072312
- Rename functions to usual names: https://github.com/Fantom-foundation/flend/commit/b7526bbeeb0ac33bbd8879bcbb0347868275c1d3
- Tests and fixes: https://github.com/Fantom-foundation/flend/commit/6b886300dc7081e9d05ac69fa0b1a8743c795771, https://github.com/Fantom-foundation/flend/commit/5559b92c9b88d2e89dfbdb57294bdd7e04b152bf, https://github.com/Fantom-foundation/flend/commit/9abf2aa64251efc3269b16292966b73b6a72179a, https://github.com/Fantom-foundation/flend/commit/108d1d880c8cfd766d0398f7b2b768bfc062c1b2
- Add functions apply epoch rewards for fUSD deposits: https://github.com/Fantom-foundation/flend/commit/703b53192d2b4587a890fb312ed8d55278f78c5c
- Fix epoch rewards code: https://github.com/Fantom-foundation/flend/commit/dd3cadc6a815cd693d0cedf74453fbb522ab73c2
- Use more safety math method for calc: https://github.com/Fantom-foundation/flend/commit/9311cdea35001744fdd48b67e8d60bac3343f8b8
Fantom-UI
- Created Contract list: https://github.com/Fantom-foundation/fantom-ui/commit/2d0016d8e8d1d2fc10e6f3f0e318c8350dfd2239
- Added new columns to contract list table: https://github.com/Fantom-foundation/fantom-ui/commit/c4c84417b1da00a7c918cf3f694c5963cf75a547
- Added “downtime” column to validator list table: https://github.com/Fantom-foundation/fantom-ui/commit/b09f6a524835c8202fc2bb93a7e34565477864fd
Fantom-Metamask
- Added in three options for currency: USD, EUR, and CZK. Added in optional decimal places: https://github.com/Fantom-foundation/fantom-metamask/commit/4fe3264f0f222ac22fa5990439449f42335274ce
- WIP: Create dashboard view: https://github.com/Fantom-foundation/fantom-metamask/commit/f18a412328fa5d90529e15e01a0aef2cb9b23e99
- Created ability to edit wallet: https://github.com/Fantom-foundation/fantom-metamask/commit/f2ee8671ce99676c4ce848c0cc5c86905af1a658
- Created settings view: https://github.com/Fantom-foundation/fantom-metamask/commit/4e1e7cdee53b27470ade4adefdfd14365ce2e1a3
- Created ability to remove wallet: https://github.com/Fantom-foundation/fantom-metamask/commit/65890f816be3a4be883c52b2325ea09c5aa9c394
- WIP: Created bnbridge exchange vue plugin: https://github.com/Fantom-foundation/fantom-metamask/commit/10c3941f26d6f7fe27dfbd15d71220935bcab1c0
Fantom-api-graphql
- Added in SOL compiler path configuration option: https://github.com/Fantom-foundation/fantom-api-graphql/commit/47d8294a2e4b42bb2a0b6beebfefdd13f1037fcf
- Added contract validation in GrapgQL structure: https://github.com/Fantom-foundation/fantom-api-graphql/commit/f4e72707919248afe7ca2ddfbe835ea7ab0d0378
- Added contract validation using invoked SOL compiler: https://github.com/Fantom-foundation/fantom-api-graphql/commit/72518f090ea8b456d24c43b0519f37bc3aa004c2
- Compare contract byte code without IPFS metadata: https://github.com/Fantom-foundation/fantom-api-graphql/commit/306855461b56993a3b574b6f242422e080f76002
- Added claimed and stashed rewards to the account total amount: https://github.com/Fantom-foundation/fantom-api-graphql/commit/95430f7dae1a63728f97a8d0c7fca2af79f3eb93
- Added API peers configuration support: https://github.com/Fantom-foundation/fantom-api-graphql/commit/be851f1adfea678ae03deece337fb075be97b45e