implement aleth/geth/parity compatibility mode -- 100% pass test #459
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
aleth/geth/parity compatibility mode:
affected test cases both in GST and BCT:
pyEVM sided with original Nimbus EVM
implementation difference:
Aleth/geth/parity using accounts cache. When contract creation happened on an existing but 'empty' account with non empty storage will get new empty storage root. Aleth cs. only clear the storage cache while both pyEVM and Nimbus will modify the state trie.
During the next SSTORE call, aleth cs. calculate gas used based on this cached 'original storage value'. In other hand pyEVM and Nimbus will fetch 'original storage value' from persisted state trie.
Both Yellow Paper and EIP2200 are not clear about this situation but since aleth/geth/and parity implement this behavior, we perhaps also need to implement it.
initially, parity also does not support this behavior. see openethereum/parity-ethereum#10065
Definitions of terms are as below(from EIP1283):
aleth/geth/parity revert to empty cache.
pyEVM and Nimbus revert to 'original state trie'.