Genesis Block reward is treated as +balance for zeroAddress.
Describe the bug
When running rosetta-cli for Ethereum Roopsten testnet or Mainnet, there was an reconciliation issue for 0x0000000000000000000000000000000000000000.
Error message: Command Failed: reconciliation failure: inactive reconciliation error for 0x0000000000000000000000000000000000000000 at 10 (computed: 5000000000000000001ETH, live: 1ETH)
Cause
- At the genesis block, there is a mining reward for
0x0000000000000000000000000000000000000000. - And that reward does not applied to on-chain balance of
0x0000000000000000000000000000000000000000. - But the problem is: Reconciler handles that genesis reward as +balance for
0x0000000000000000000000000000000000000000, so it triggers the error.
To Reproduce
- Following this guide is enough to re-produce the problem.
Expected behavior
- The first genesis block reward must not be calculated +balance for
0x0000000000000000000000000000000000000000because it is not applied to on-chain state.
Additional context
- OS: macOS 12.3
- Go version:
go1.17.7 darwin/arm64 - Source code version of rosetta-cli: https://github.com/coinbase/rosetta-cli/commit/18013bd2628aa98d9cde87e5d10b3216c35d070c
Currently, the cli user must set the startIndex as 1 to avoid Genesis Block mining reward issue.
In my opinion, below opotions should be considered.
- Dose not track balances of
ZeroAddress - Does not calculate Genesis mining reward as
+balance
One of above patch should be applied to rosetta-sdk-go.
@aeharvlee you are right. We had this check before but somehow due to one another issue we changed it (https://github.com/coinbase/rosetta-ethereum/issues/73) . We will fix that soon. Thanks for raising the issue.