Skip to content

v2.2.0 - Sapling/Zcash Fix

Compare
Choose a tag to compare
@nlevo nlevo released this 09 Apr 02:05
1804dad

*MANDATORY UPDATE FOR EVERYONE (requires -reindex or ANON bootstrap)

The main purpose of this update to fix Zcash Sprout vulnerability.

IMPORTANT NOTES:

  • COIN BURN of Z-addresses. Move all your funds from private (zc) addresses to regular (t) addresses before the deadline (block 48,500). More details below.
  • BACKUP your wallet.dat or wallet private keys before updating!
  • REINDEX - this update requires reindexing (./anond -reindex). This can take approximately. 4-8 hours. If you don't want to wait for reindexing, you can download ANON bootstrap from https://assets.anonfork.io/anon-bootstrap.zip. This archive has 2 folders: "blocks" and "chainstate".
  • MASTERNODE OWNERS - This update changes protocol to 180008. Anytime protocol changes you must rebroadcast/restart your masternode (start-alias or start-all from your wallet, make sure your wallet on the new protocol too).
  • FETCH ZCASH PARAMS - this update requires sapling keys. You will need to re-fetch params key.
./anonutil/fetch-params.sh

Windows users: Navigate to https://assets.anonfork.io/trusted-setup/ and download all 5 files to %appdata%\Roaming\ZcashParams folder.

  • COMPILING - this update changes a lot of libraries. In order to minimize compiling issues, I suggest deleting old ones. The easiest way would be to usegit clean -fdx, this will delete all build products and libraries, but be careful because it also removes all untracked files.

If you have issues syncing with masternodes after the update, you may want to delete the following cache files:
mncached.dat, governance.dat, mncache.dat, mnpayments.dat, netfulfilled.dat. These files are located in the same folder as anon.conf and wallet.dat. (Note: You need to stop anon node first (./anon-cli stop) before deleting.)

1. Fix Zcash vulnerability

  • Sprout Groth16 circuit, new shielded transaction type -3. Starting from block 48,502.
  • Added Groth16 specific tests.
  • Z-transaction creation time reduced by 56%.

2. BURN COINS - z-addresses only (zc prefix)

In order to be sure that Zcash vulnarability was never and will never be exploited the ANON foundation decided to perform a coin burn for all z-addresses that use old Sprout system.

  • All coins that are stored on z-address (address that start with zc prefix) will be burned on block 48,500.
  • In order to preserve your coins, you MUST move them to a t-address (An prefix) before block 48,499.
  • Starting from block 48,502 the new shielded transaction type -3will be activated and you can resume using z-addresses and shield coinbase.
  • DO NOT ATTEMP TO SHIELD COINBASE REWARDS (Miner and masternode rewards) - between blocks [48,490-48,501]. Since shilelding coinbase sends funds to a z-address and you may not have time to move your coins to a t-address.
  • All unshielded (coinbase) masternode or miners rewards will not get burned, since they are stored on regular t-address (An - prefix)

3. Fix ZMQ CVE-2019-6250 vulnerability.

4. Extend RPC (getblock & getblockchaininfo)

  • RPC command "getblock xxx" & "getblockchaininfo" now return an additional filed "valuePools", which displays the total amount of coins in the private (sprout/sapling) pool.
"valuePools": [
    {
      "id": "sprout",
      "monitored": true,
      "chainValue": 539649.84286449,
      "chainValueZat": 53964984286449,
      "valueDelta": 0.00000000,
      "valueDeltaZat": 0
    }

5. Fix and update ~ 150 tests.

To run tests:

  • G-tests ./zcash-gtest (Unix or Windows Subsystem for Linux) or ./zcash-gtest.exe (Win)
  • RPC-tests. qa/pull-tester/rpc-tests.sh (Unix or Windows Subsystem for Linux)

6. Minor changes and fixes

  • Fix RPC gettxoutsetinfo, now it displays the correct total amount of coins in circulation.
  • Fix a bug when a wallet tries to spend burnt coins.
  • Update OpenSSL to 1.1.0j.
  • Update Boost to 1.66.
  • Add Libsnark.
  • Update secp256k1.
  • Update HTTP server.