Closed rrw-zilliqa closed 3 weeks ago
Im not seeing the same behavior at head of main
, and the total_native_token_supply
should be defaulted. Do you remember which commit you saw this on and do you still have the config file?
Merged code to perform safer checked_sub()
when initialising zero account - https://github.com/Zilliqa/zq2/pull/1662
I can only assume that the issue seen by @rrw-zilliqa was due to a config which specified sum(genesis_deposits) + sum(genesis_accounts) > total_native_token_supple
. Closing issue @rrw-zilliqa please re-open if this doesnt seem correct.
If you attempt to join a node to zq2_devnet with a debug build, you will get a subtraction underflow error in consensus.rs:121 because there's no max supply specified in the config file. With a release build, it will simply underflow.
We should probably check for such things explicitly, and also fix the config file.