Skip to content

Releases: DeFiCh/ain

v2.8.0 - Fort Canning Crunch

27 May 10:39
7c431fe
Compare
Choose a tag to compare

Mandatory Upgrade

This is a mandatory update for the upcoming Fort Canning Crunch chain upgrade. It contains a key new features that upgrades the protocol.
Fort Canning Crunch upgrade is set for block 1936000 (approx. ETA June 2, 2022) on mainnet.

Update of mainnet node to v2.8.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.
  • Note: For nodes on 2.7.0, please see the release notes of 2.7.1 for details on the statistics being reset. If you have updated as a drop-in replacement and depend on the statistics, please ensure to resync the chain from the given blocks.

What’s Changed

Key Focus

  • Full support for token splits. The major highlight of this upgrade is to introduce token splits, auto rebalancing of the pool, vaults, auctions and user accounts. This is fully automatic and no user action is needed.
    • On token split-block:
      • Tokens in wallet: Will auto split
      • Tokens in vaults: Will auto split
      • Tokens in auctions and bids: Will auto split
      • Tokens in future swap: Will be refunded back to the wallets and auto split. DUSD will just be refunded
      • Tokens in pool pairs: Will auto migrate to new pool and be issued newer tokens.
        • Note: These number of LP tokens issued will be based on the newer pool ratio, but will retain the same values.

Notables

  • Internal token system has been partially moved to attributes, as the first part of a multi-release journey.
  • The token split block will be an computation heavy block and could take anywhere between a few seconds to minutes based on the hardware of the system. Currently, it's yet to be optimised for speed, but scales out linearly based on the number of cores. Further optimisations are expected over time to improve this.

API Changes

  • listgovs: Now takes one of the additional parameters: all/live/attrs/govs/<attribute-prefix> to filter easily.
  • [Deprecated] setloantoken - Usage will be superseded by attributes system.
  • [Deprecated] setcollateraltoken - Usage will be superseded by attributes system.
  • listcollateraltokens:
    • [Deprecated field] activateAfterBlock - Usage has been superseded by attributes system.

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

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.

v2.7.1

20 May 16:00
5de8a22
Compare
Choose a tag to compare

Recommended Upgrade

This is an optional, but recommended upgrade. Due to a bug on getgovheight TX, there was an accidental deletion of attributes from the node index on block 1896000. This resulted in statistical information being reset entirely. This update fixes the stats again.

Impact on the older nodes:

  • The consensus is still correct, and old nodes can continue to function, as is - if statistical info is not a concern.
  • getburninfo information that's based on attributes will be reset. Eg: DFI payback
  • listgovs => All of v0/live/economy/ information will reset and appear to have started from 0 from block 1896000.

Upgrade Notes

  • If node is above block 1896000, an invalidation to a block before this and reconsideration back to the tip is required to fix the stats again. Otherwise, it will still continue to display incorrect information.
  • Eg: After upgrade:
    • defi-cli invalidateblock c72d93b9897bbbebed505d8b23293fbcae5be5a767c6fbc4d67d25510d1b4066 followed by
    • defi-cli reconsiderblock c72d93b9897bbbebed505d8b23293fbcae5be5a767c6fbc4d67d25510d1b4066
      Will fix the stats information again.
  • Fresh sync or any snapshots below 1896000 should work as expected without any intervention.

Key highlights

🚀 Features

🐛 Bug Fixes

  • test: Prevent wallet resubmitting TX after rollback @Bushstar (#1239)
  • Test/payback v2 multiple error @hidiego (#1183)
  • Add -isysroot to macOS native compile flags @Jouzo (#1203)
  • Update test cases to remove deprecatedHeight usage. @shohamc1 (#1204)
  • Fix typos @hidiego (#1212)
  • Revert "Fix dex loan token burns" @prasannavl (#1193)

🧰 Maintenance

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.

v2.7.0 - Fort Canning Road

01 Apr 14:13
3f7f6ec
Compare
Choose a tag to compare

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
    • 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
    • getburninfo
      • New fields: paybackfees, paybacktokens similar to dfipaybackfee and dfipaybacktokens but for non DFI payback.
  • New:

    • futureswap
    • withdrawfutureswap
    • getfutureswapblock
    • listpendingfutureswaps
    • getpendingfutureswaps

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

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

v2.6.2

10 Mar 14:29
aaf88f5
Compare
Choose a tag to compare

Recommended Upgrade

This is a minor update, that primarily focuses on fixing nodes that result in crashes due a segfault in SPV under certain specific conditions, when it's turned on. Contains a few other minor additional fixes and features.

Upgrade Notes

  • For nodes that are running >= v2.6.1, 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.

What’s Changed

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

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 835530 prior to this release.
  • Reference blockhash of testnet 835531: 542cc9c5490b46a228aa8c0878deba3b2c3f5a3e70b6d90bfab1171b153b8d66
  • 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 835530)
$ defi-cli -testnet clearbanned
$ defi-cli -testnet reconsiderblock 542cc9c5490b46a228aa8c0878deba3b2c3f5a3e70b6d90bfab1171b153b8d66

v2.6.1

31 Jan 10:47
cf8e454
Compare
Choose a tag to compare

Mandatory Upgrade

This is a mandatory update for the upcoming Fort Canning Hill chain upgrade. It contains a key fixes that upgrades the protocol.
Fort Canning Hill upgrade is set for block 1604999 (approx. ETA Feb 7, 2022 UTC) on mainnet.

Update of mainnet node to v2.6.1 before the chain upgrade block is REQUIRED.

Upgrade Notes

  • For nodes that are running <= v2.5.0, 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 nodes that had already upgraded to the 2.6.0 prior to 2.6.1 release, one of the following is required: a fresh sync, the most recent backup from 2.5.0, latest snapshot.

What’s Changed

v2.6.1

  • The prior 2.6.0 release was retracted due to a mismatch in calculation between 2.5.0 and 2.6.0 that in rare conditions, caused the new nodes to reject valid blocks on 2.5.0 mainnet before the Fort Canning Hill Network upgrade. This is fixed in 2.6.1 and is the required node for Fort Canning Hill upgrade. The mismatch was due to a hidden bug in how 2.5.0 calculates interestPerBlock. 2.6.1 nodes now addresses this condition recreating the calculation exactly as 2.5.0 pre-upgrade.

v2.6.0

Key Focus

  • Loans - Existing Payback
    • Issues with partial payback of loans from the previous versions are now fixed, and should work as expected after the upgrade block.
    • For extremely small loans, before FCH, the min interest per. block is 1 fi per. block (min. unit) and is calculated every block. After FCH, these smaller loans will accumulate the last 1 fi over multiple blocks until payback or fully matures.
      • interestPerBlock will continue to be at 1 fi precision, as that's still the min. unit. However, this will be the interest as per the block in which positions are closed.
      • New realizedInterestPerBlock will show higher precision interest rate that's used to accrue interest rate internally. Note the minimum unit of transactions on the blockchain still continues to be 1 fi precision. It only affects accumulation, so users aren't charged 1 fi every block.
  • Loans - Payback Capability with DFI
    • After FCH upgrade block, payback of loans with DFI instead of the dTokens at a set additional oracle fee, can be enabled. Currently, due to protocol serialisation requiring breaking changes, its capability is limited only to DUSD dToken. The internal capability is expected to be made generic and be expanded to all dTokens in the next planned upgrade. Note: however, this is just the capability. The activation and deactivation is designed to be toggled through on-chain gov.
    • When DFI payback is used, the whole amount is burned (loan token value + loan interest value + % fees).
    • New getburninfo API categories: dfipaybackfee and dfipaybacktokens
  • Loans - Withdrawal
    • From FCH, 50% DFI requirement in vault is now relaxed to 50% of the vault's active min. loan. ratio as DFI. Rest can be withdrawn freely - withdrawing other collateral tokens before DFI to maintain 50% DFI is no longer required.
  • Bi-directional DEX fees
    • DEX now has the ability to charge a % fee on both the maker and taker, if enabled.
    • This is designed to be activated, disabled and changed on the fly per pool pair through on-chain governance.
    • New getburninfo API categories: dexfeetokens
  • Built-in Supplementary Contracts
    • A new built-in system for all supplementary smart contracts (eg. DFIP related smart contracts) with the following new RPCs:
      • listsmartcontracts
      • executesmartcontract
    • dBTC-DFI swap (DFIP2201) is implemented via. this layer.
      • These contracts are designed to be activated or disabled through on-chain governance.
      • dBTC Swap: executesmartcontract dbtcdfiswap 1@BTC to swap dBTC to DFI if the contract is activated.

RPC Changes

  • Existing:
    • getburninfo adds the following additional fields:
      • dexfeetokens
      • dfipaybackfee
      • dfipaybacktokens
    • getinterest adds the following field after FCH block:
      • realizedInterestPerBlock
  • New:
    • listsmartcontracts
    • executesmartcontracts

🚀 Features

🐛 Bug Fixes

🧰 Maintenance

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 upgrade block for FCH is set to 828900
  • Reference blockhash of testnet 827500: 1f8ae3e7881bfaf45414798824eb8c415be512cf29aea4c5316828887400db36
  • 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 827500)
$ defi-cli -testnet clearbanned
$ defi-cli -testnet reconsiderblock 1f8ae3e7881bfaf45414798824eb8c415be512cf29aea4c5316828887400db36

v2.5.0

03 Jan 22:08
7630137
Compare
Choose a tag to compare

Recommended Update

What’s Changed

  • Protocol version has been bumped to 70023 due to the changes in the supported TX set.
  • Fixes the case where unsupported TXs (say, now invalid ICX TX submitted from a 2.3.x node) caused the valid nodes to rollback excessively, which resulted in stalls in the blockchain when all miners end up in rollbacks at the same time due to the invalid DfTx. This provides better handling of unsupported TXs. Invalid TXs will no longer cause rollbacks.
  • Adds an additional checkpoint at 1505965 (f7474c805de4f05673df2103bd5d8b8dea09b0d22f808ee957a9ceefc0720609).

🐛 Bug Fixes

🧰 Maintenance

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.

v2.4.0

02 Jan 18:10
6a0f659
Compare
Choose a tag to compare

Emergency Update

What’s Changed

  • ICX / Atomic Swap - a feature that has been in experimental mode has been disabled with immediate effect temporarily. It's expected to be re-enabled in a later future update.
  • Fort Canning Park height set to 1503143
  • Hash of 1503143: c85a2bdb6014cc57da0d6d85a0d28f5b189050af93b43a1a17c2f5268e9daf30 of chain running 2.4.0.
  • Hash of 1503240: 061f56655a33ee562758f4eb83203f8071e57f571bd32c7a016cf8fb88743ca5

🐛 Bug Fixes

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.

Issues

Please report any issues to engineering@defichain.com, or reach out to is via Telegram or Reddit.

v2.3.2

27 Dec 23:21
3e56d57
Compare
Choose a tag to compare

Optional Update

What’s Changed

  • This is an optional update with a many minor fixes and a few new features.
  • testpoolswap now adds support for compositeswap. Adds a path args, which continues to default to direct to retain compatibility, while the a new option auto that automatically use composite swap if there is not direct path available. See help testpoolswap for more details.
  • * is now accepted for address arg for placeauctionbid and paybackloan to use indicate auto address selection, with sufficient funds.
  • This update also fixes the testnet fresh sync failure due to blocks with mining height discrepancies.
  • Fixed discrepancies in getloaninfo RPC.
  • Fixed getmasternodeblocks depth filter.

Details

  • Enable composite swap for testpoolswap @mambisi (#954)
  • Add start BTC height and record limit to spv_listanchors @Bushstar (#921)
  • Adds possibility to use "*" to auto-select address in placeauctionbid and paybackloan @Jouzo (#937)
  • Fix getmasternodeblocks depth filtering @hidiego (#946)
  • Rework mempool accounts view @bvbfan (#904)
  • Factor out usage of height field in CBlockIndex and CBlockHeader @Bushstar (#987)
  • Fix boost 1.77 compilation @bvbfan (#997)
  • Fix wrong number of openVaults and openAuctions in getloaninfo @Jouzo (#986)

Full changelog: v2.3.1...v2.3.2

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.

v2.3.1

09 Dec 13:09
Compare
Choose a tag to compare

Recommended Update

What’s Changed

This is a recommended update with key fixes for Fort Canning Museum. But isn't mandatory to be a part of the network (however, without this update, the node may be keen to discover other forks).

  • This fixes a condition where pre-Fort Canning Museum loans, had a discrepancy in the internal interest rate calculation which caused it to be off by 1 fi (DeFiChain satoshis). This in turn made miners more prone to generate valid forks. Note: The main chain continued to remain valid and is still the longest chain.
  • A reindex is required if you're node is on or after blockheight 1430640 during the time of the upgrade. Any pre-Fort Canning Museum snapshots of the indexes are still valid.

Network snapshots (optional, for convenience)

Details

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.

v2.3.0 - Fort Canning Museum

07 Dec 22:21
c5ac94e
Compare
Choose a tag to compare

Note: This version while not yet deprecated, is discouraged. A higher version has been released. Please use one of the higher versions to upgrade.

Emergency Update

What’s Changed

  • This fixes a critical condition due to which certain auctions can stall the blockchain due to a few sats of left over loans, with no collateral after payback.

🚀 Features

🐛 Bug Fixes

  • Add latest hotfix changes into master @Bushstar (#960)
  • Erase vault history loan scheme records @bvbfan (#931)
  • Fix updateloantoken arguments parsing and description @Jouzo (#895)

🧰 Maintenance

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.