axieinfinity / ronin

A DPoS blockchain.
GNU Lesser General Public License v3.0
67 stars 30 forks source link

trie, core: track state changes in statedb #589

Closed Francesco4203 closed 3 weeks ago

Francesco4203 commented 3 weeks ago

Reference: https://github.com/ethereum/go-ethereum/pull/27349

This PR is for tracking state changes in stateDB. The tracked changes will later be used in PBSS to generate the history data.

Changes:

huyngopt1994 commented 3 weeks ago

We have an interested thing here, need to track latter, In case we don't track dirties account in journal resetobject entry when we encounter create the existing account. The test state_fuzz_test will failed with missing trienode in storage. We have some ways for reproducing like runing action SetState + CreateAccount + the other random action. Otherwise, we can make those test passed by setting byzantium for calling to Finalised without IntermediateRoot which will compute current root hash to update to state trie. Will note it for troubleshooting more.

huyngopt1994 commented 3 weeks ago

LGTM 🙏 .