EIP-7748 test filling#534
Conversation
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
| if !bytes.Equal(acc.CodeHash, types.EmptyCodeHash[:]) { | ||
| code := rawdb.ReadCode(statedb.Database().DiskDB(), common.BytesToHash(acc.CodeHash)) | ||
| chunks := trie.ChunkifyCode(code) | ||
| count += uint64(len(chunks)) / 32 |
There was a problem hiding this comment.
This is a required fix to the conversion code. While in EIP-7748 we always migrate all the code in one go, we still need to count the number of chunks as used stride quota.
For more info see the EIP python implementation and the corresponding rationale section.
| // TODO(jsign): for fixture execution this isn't needed since it's configured (hardcoded) | ||
| // in the forks.go file. But it's required for filling! Fix this eventually when the testing | ||
| // framework passes flag. | ||
| maxMovedCount = 7 |
There was a problem hiding this comment.
Fix the stride until the testing-framework supports configuring this from the test side.
Seven is a big enough number that allows to create most of the situations we're interested covering.
| Started: true, | ||
| // initialize so that the first storage-less accounts are processed | ||
| StorageProcessed: true, | ||
| StorageProcessed: false, |
There was a problem hiding this comment.
We already discussed this offline. The true value conflicts with the first account to be converted being a contract. When re-running the Holesky shadow fork again, we can further confirm this is fine.
| TerminalTotalDifficulty: big.NewInt(0), | ||
| ShanghaiTime: u64(0), | ||
| VerkleTime: u64(32), | ||
| OverlayStride: 7, |
There was a problem hiding this comment.
This is where we'll wire the new flag to be added in the testing framework to make the stride dynamic (and remove the hardcoded value mentioned in a previous comment).
e5d5e09 to
4a2f6fb
Compare
This PR contains required changes to support test filling for EIP-7748.
This is still work in progress.