Skip to content

Releases: DeFiCh/ain

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 [email protected], 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.

v2.2.1

22 Nov 00:12
c7c15ea
Compare
Choose a tag to compare

Note: This version has been deprecated. A higher version has been released. Please use one of the higher versions to upgrade. The following information is purely historical.

Optional Update

What’s Changed

  • Fixes help RPC
  • Fixes Insufficient balance error that was caused due to stricter auto auth selection introduced in the previous version - has been reverted temporarily.
  • Improves validation performance by minor optimizations to vaults by removing the need to iterate on each block.

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.

Testnet Info

The following are informational updates that apply only for development on testnet:

  • Testnet has been rolled back to block height (686700 - rounded to the closest block before invalid txs due to 2.2.0 release) along with the v2.2.1.
  • Blockhash of testnet 686700: 9702ef0886e7995ea32b909b5e72615a73f28d29129e8694bf67b945fc2340da

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:

$ defi-cli -testnet invalidateblock $(defi-cli -testnet getblockhash 686700)
$ defi-cli -testnet reconsiderblock 9702ef0886e7995ea32b909b5e72615a73f28d29129e8694bf67b945fc2340da
$ defi-cli -testnet clearbanned

v2.2.0

14 Nov 15:19
f764e16
Compare
Choose a tag to compare

Note: This version has been deprecated. A higher version has been released. Please use one of the higher versions to upgrade. The following information is purely historical.

Pre-upgrade Emergency Release

What’s Changed

This is a mandatory update for the upcoming Fort Canning chain upgrade. It contains a key fix that upgrades the protocol over the previous v2.x.x releases that were originally intended node for the next network upgrade . v2.2.0 (this) now effectively replaces all v2.x before it and is the required node.

Fort Canning upgrade is set for block 1367000 (approx. ETA Monday, 15 Nov 2021) on mainnet.

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

Key Focus - v2.2.0

  • 2.2.0 disables the following RPCs for fort canning network upgrade due, until a later release to enable similar/same features:
    • updatemasternode
    • setforcedrewardaddress
    • remforcedrewardaddress

For Fort Canning

  • Native protocol support for decentralised loans. Includes all the foundational blocks for loans, auctions, bids and to bring stock tokens on to the ecosystem. This introduces a new set of protocols and RPCs to interact with the chain. For more information, please read the wiki here.
  • Composite swap. Automatically swaps across up-to 3 pool pairs. Example: Directly swap between dBTC to dETH in one atomic step (Tx) through the underlying DFI-BTC and DFI-ETH pools. (#676)
  • Improved on-chain mechanics for oracle pricing and fault tolerance with dedicated support for fixed time interval pricing.

Other noteworthy improvements:

  • #704: getmasternodeblocks RPC now correctly returns blocks minted by all subnodes.
  • #686: spv_refundhtlcall RPC - Gets all HTLC contracts stored in wallet and creates refunds transactions for all that have expired.
  • #722: Anchoring cost has now been reduced to BTC dust (minimum possible).
  • #752: Tx fees, which were being burnt after Eunos upgrade will now be included in block rewards again from Fort Canning.

Breaking RPC Changes (from 1.8.4)

  • #815: listpoolpairs and getpoolpair RPCs now include additional field: rewardLoanPct.
  • #711: listaccounthistory RPC now only includes a record if the transaction is trusted (confirmation > 0).

Full Changelog: v1.8.4...v2.2.0

v2.2.0 Specific Info

  • Disable updatemasternode, and reward address change @prasannavl (#901)
  • Update failing tests for recent changes @Bushstar (#902)
  • Use mocktime in deposittovault tests @hidiego (#896)

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:

  • No new rollback necessary for v2.2.0 if you've already rolled back to the right hash with 2.0.0.
  • Testnet has been rolled back to the testnet specific Fort Canning block height (686200) along with the v2.0.0
  • Blockhash of testnet 686200: 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364

Testnet rollback tips:

$ defi-cli -testnet invalidateblock $(defi-cli -testnet getblockhash 686200)
$ defi-cli -testnet reconsiderblock 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364
$ defi-cli -testnet clearbanned

Issues

Please report any issues to [email protected], or reach out to is via Telegram or Reddit.

v2.1.0 - Fort Canning

09 Nov 17:43
a0359e9
Compare
Choose a tag to compare

Note: This version has been deprecated. A higher version has been released. Please use one of the higher versions to upgrade. The following information is purely historical.

Mandatory Upgrade

What’s Changed

This is a mandatory update for the upcoming Fort Canning chain upgrade. It contains a key fix that upgrades the protocol over the previous v2.0.0 that was originally intended node for the next network upgrade . v2.1.0 (this) now effectively replaces v2.0.0 and is the required node.

Fort Canning upgrade is set for block 1367000 (approx. ETA Monday, 15 Nov 2021) on mainnet.

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

Key Focus

v2.1.0

  • This fixes a bug due to which DUSD loans became unpayable on testnet. This was a result of a missing specialised short-circuit for DUSD, while converting interest and over bids to DFI to be burnt or added back to the vaults over the respective pools (#885).

  • Previous getgov API has now been restored. In v2.0.0, getgov encountered a breaking change. From gathered feedback, we recognised other projects relied heavily on this API and such this change has been reverted. listgov can be used to pull the new information with the activation heights that getgov added in v2.0.0, which led to the original change. While this unfortunately means, those who have already adopted to the newer API from v2.0.0 will have to revert these changes, we believe this restoration is the optimal choice for most projects to retain compatibility. (#871)

For Fort Canning

  • Native protocol support for decentralised loans. Includes all the foundational blocks for loans, auctions, bids and to bring stock tokens on to the ecosystem. This introduces a new set of protocols and RPCs to interact with the chain. For more information, please read the wiki here.
  • Composite swap. Automatically swaps across up-to 3 pool pairs. Example: Directly swap between dBTC to dETH in one atomic step (Tx) through the underlying DFI-BTC and DFI-ETH pools. (#676)
  • Improved on-chain mechanics for oracle pricing and fault tolerance with dedicated support for fixed time interval pricing.
  • updatemasternode RPC that currently enables updating a masternode's operator address. (#687)
  • setforcedrewardaddress RPC that enables providing a dedicated address for masternode rewards. (#642)

Other noteworthy improvements:

  • #704: getmasternodeblocks RPC now correctly returns blocks minted by all subnodes.
  • #686: spv_refundhtlcall RPC - Gets all HTLC contracts stored in wallet and creates refunds transactions for all that have expired.
  • #722: Anchoring cost has now been reduced to BTC dust (minimum possible).
  • #752: Tx fees, which were being burnt after Eunos upgrade will now be included in block rewards again from Fort Canning.

Breaking RPC Changes (from 1.8.4)

  • #815: listpoolpairs and getpoolpair RPCs now include additional field: rewardLoanPct.
  • #711: listaccounthistory RPC now only includes a record if the transaction is trusted (confirmation > 0).

Full Changelog: v1.8.4...v2.1.0

v2.1.0 Specific Info

🐛 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:

  • No new rollback necessary for v2.1.0 if you've already rolled back to the right hash with 2.0.0.
  • Testnet has been rolled back to the testnet specific Fort Canning block height (686200) along with the v2.0.0
  • Blockhash of testnet 686200: 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364

Testnet rollback tips:

$ defi-cli -testnet invalidateblock $(defi-cli -testnet getblockhash 686200)
$ defi-cli -testnet reconsiderblock 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364
$ defi-cli -testnet clearbanned

v2.0.0 - Fort Canning

02 Nov 20:36
526e711
Compare
Choose a tag to compare

Note: This version has been deprecated. A higher version has been released. Please use one of the higher versions to upgrade. The following information is purely historical.

Mandatory Update

What’s Changed

This is a mandatory update for the upcoming Fort Canning chain upgrade. It contains key features and fixes.
Fort Canning upgrade is set for block 1367000 (approx. ETA Monday, 15 Nov 2021) on mainnet.

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

Key Focus

  • Native protocol support for decentralised loans. Includes all the foundational blocks for loans, auctions, bids and to bring stock tokens on to the ecosystem. This introduces a new set of protocols and RPCs to interact with the chain. For more information, please read the wiki here.
  • Composite swap. Automatically swaps across up-to 3 pool pairs. Example: Directly swap between dBTC to dETH in one atomic step (Tx) through the underlying DFI-BTC and DFI-ETH pools. (#676)
  • Improved on-chain mechanics for oracle pricing and fault tolerance with dedicated support for fixed time interval pricing.
  • updatemasternode RPC that currently enables updating a masternode's operator address. (#687)
  • setforcedrewardaddress RPC that enables providing a dedicated address for masternode rewards. (#642)

Other noteworthy improvements:

  • #704: getmasternodeblocks RPC now correctly returns blocks minted by all subnodes.
  • #686: spv_refundhtlcall RPC - Gets all HTLC contracts stored in wallet and creates refunds transactions for all that have expired.
  • #722: Anchoring cost has now been reduced to BTC dust (minimum possible).
  • #752: Tx fees, which were being burnt after Eunos upgrade will now be included in block rewards again from Fort Canning.

Breaking RPC Changes (from 1.8.4)

  • #815: getgov now returns an array instead of an object to account for multiple values with activation heights.
  • #815: listpoolpairs and getpoolpair RPCs now include additional field: rewardLoanPct.
  • #711: listaccounthistory RPC now only includes a record if the transaction is trusted (confirmation > 0).

Full Changelog: v1.8.4...v2.0.0

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 the testnet specific Fort Canning block height (686200) along with the release.
  • Blockhash of testnet 686200: 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364

Testnet rollback tips:

$ defi-cli -testnet invalidateblock $(defi-cli getblockhash 686200)
$ defi-cli -testnet reconsiderblock 527ae58ed2a644e907d03a176779b5945a2682c1ef90d7563037cdf65e6a2364
$ defi-cli -testnet clearbanned

Issues

Please report any issues to [email protected], or reach out to is via Telegram or Reddit.