Closed Francesco4203 closed 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.
LGTM 🙏 .
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:
Set
representing the state changes that will be tracked. There will be pairs of values before and after being changed.database.Update()
now take in the tracked state changes, which will later be used in PBSS.stateObject
represents an account being updated. Now,origin
, which represents the account before changes, is added for keeping track of changes. Thisorigin
will be updated to the current account only after committing.stateObjectsDestruct
that store destructed objects will be stored along with their previous values.handleDestruction
to track the destructed objectsSet
and passed tos.db.TrieDB().Update()
when committing.