v2.7.0 - Fort Canning Road
Mandatory Upgrade
This is a mandatory update for the upcoming Fort Canning Road chain upgrade. It contains a key fixes that upgrades the protocol.
Fort Canning Road upgrade is set for block 1786000 (approx. ETA April 11, 2022 UTC) on mainnet.
Update of mainnet node to v2.7.0
before the chain upgrade block is REQUIRED.
Upgrade Notes
- For nodes that are running
>= v2.6.1 and <= v2.6.2
, this is a drop in upgrade. No reindex or fresh sync needed. - For nodes that are being restored from recent snapshot, as with all updates before:
-rescan
for the wallet txs and additionally-spv_resync
for users who hold BTC. If either isn't used, they may not be shown in the wallet until rescanned/resynced. - For other nodes, one of the following is required: a fresh sync, the most recent backup from 2.6.x or latest snapshot.
What’s Changed
Key Focus
- Implementation of
DFIP2203
: DeFiCh/dfips#127 - Generic loan payback. The blockchain now has the capability for enabling any loans in a vault to be payed back with any other token through DFI. The mechanism will use oracles to determine token prices if enabled and relying on
dToken->DUSD->DFI
swaps for interest paybacks. Note this is not enabled, and may or may not be enabled per token or globally. This is dependent on the governance direction taken and voted on by the community as seen fit.
Notables
- Expanding the DEX fee capability to be applied per pool, as well as per token to apply to all pools with a token.
- New account change logging category:
accountchange
- Changes to logging to reduce noise of masternode staking logs. Please see #648. (Thanks @chrizog).
Internals:
- LevelDB upstream update.
- Boost upstream update allowing successful builds on newer platforms.
RPC Changes
Beyond, new additions, changes are expected to be backward compatible.
-
Existing:
getpoolpair
/listpoolpairs
:- New fields:
dexFeeInPctTokenA
,dexFeeOutPctTokenA
,dexFeeInPctTokenB
,dexFeeOutPctTokenB
- New fields:
paybackloan
loans
field introduced which is an array of structured objects that specify the loan that is payed back and the token amounts used for payback. See help for more info.
listaccounthistory
- Now supports
txn
- Now supports
getburninfo
- New fields:
paybackfees
,paybacktokens
similar todfipaybackfee
anddfipaybacktokens
but for non DFI payback.
- New fields:
-
New:
futureswap
withdrawfutureswap
getfutureswapblock
listpendingfutureswaps
getpendingfutureswaps
🚀 Features
- DFI2203 Futures @Bushstar (#1155)
- Expand dex fee capability (#1118) @bvbfan (#1153)
- Generic DFI payback capability @Mixa84 (#1111)
- Update LevelDB @prasannavl (#1150)
- Add log category: accountchange @Jouzo (#1144)
- DUSD contributes to the 50% minimum required collateral @Jouzo (#1128)
- Add txn-no as a pagination token into listaccounthistory rpc @chanakasameera (#1110)
🐛 Bug Fixes
- Fix loan payback tokens amounts @bvbfan (#1178)
- Fix loan payback amounts @bvbfan (#1171)
- Invert DFIP2203 token flag. Fix bug in attrs to refund disabled token. @Bushstar (#1168)
- Update dockerignore @prasannavl (#1167)
- Fix lints @prasannavl (#1165)
- Vault history for new loan payback message @bvbfan (#1162)
- Fix accounting of payback burn and swap to DFI if payback token is different than native loan token or DFI. @Mixa84 (#1159)
- Update boost to v1.74 @prasannavl (#1143)
- log: Adjust masternode staking output to fix issue #648 @chrizog (#1006)
- Use tie for comparator @prasannavl (#1149)
- Fix number of totalAuctions in getloaninfo RPC @Jouzo (#1124)
- Add safety asserts on invalid values, full spectrum tests @prasannavl (#1086)
🧰 Maintenance
- DFIP2203 minted category and txn numbering @Bushstar (#1177)
- Update Boost to 1.75 @Bushstar (#1154)
- DFIP2203 updates @Bushstar (#1163)
- Protocol upgrade @prasannavl (#1160)
- 2.7.0-alpha version, protocol and FCR fork block @Bushstar (#1152)
How to run?
Download and untar the relevant version to your operating system, run bin/defid
or bin/defid.exe
to start a DeFi Blockchain daemon. The client (CLI) can be found at bin/defi-cli
or bin/defi-cli.exe
.
DeFi App (GUI) users
If you are running the desktop DeFi App, you do not have to manually update the underlying node as the app will handle it. Check https://github.com/DeFiCh/app/releases for the latest releases.
Testnet Info
The following are informational updates that apply only for development on testnet:
- Testnet has been rolled back to
893700
prior to this release. - Reference blockhash of testnet 893700:
ea1733c8b127c80b37236bbe6244670428228e5592d08ff307893425852dc113
- Note: Same upgrade notes as mainnet apply to testnet. Please reindex / restore as necessary.
Note: Certain test related infrastructure components (like defiscan.live) could take a while to reflect this change, due to the re-indexing constraints on the specific applications.
Testnet rollback tips (if needed):
$ defi-cli -testnet invalidateblock $(defi-cli -testnet getblockhash 893700)
$ defi-cli -testnet clearbanned
$ defi-cli -testnet reconsiderblock ea1733c8b127c80b37236bbe6244670428228e5592d08ff307893425852dc113