Most important things to test on Hush dev
branch:
- z2z, can be tested with
-z2zheight
param - Block time changing from 150s to 75s
Both of the above will happen at Block 340K on mainnet, but we can test things out by making a chain fork with the above CLI option.
The way the z2z transition code works is to forcibly make the mempool empty of all transactions, starting 10 blocks before the transition height.
To test things, we will need to set a block height via -z2zheight
and then we should
actually see it create a chain fork 10 blocks before that height, as it will not allow
anything except mining transactions. If Hush mainnet blocks happen to be empty, we could
see the chainfork less than 10 blocks before. Once we hit the test height T
, any
transaction with a transparent output on Hush mainnet will cause a chainfork of our
dev
branch, which is the desired behavior.
- Test that only mining transactions are allowed during this 10 block transition
Once the test height T
has been reached, we then need to make test transactions:
- t=>t
- z=>t
- t=>(t,z)
- z=>(t,z)
Since all of these have transparent outputs, they should all fail at the RPC level, i.e. the RPC's should give an error, versus allowing the transaction at RPC level and then being rejected at consensus layer.
Additional testing would be to use raw transactions to create these same transactions, without using normal RPCs:
- t=>t
- z=>t
- t=>(t,z)
- z=>(t,z)
We should see all these transactions rejected by the local mempool via consensus rules.
Our block time should go from 150s to 75s. -z2zheight
CLI param also controls this consensus change, so
whatever test height T
is used, we should see the blocktime average down, over a few dozen/hundred blocks, to being 75s
instead of 150s. If there is a re-organization across this block height, the internals know to change blocktime
to the correct value. On mainnet, we will have notarizations and the first notarization transaction after block 340K
will prevent any re-organizations across that height.