Conversation
…der-backend-rewrite4
…der-backend-rewrite4
ba69d45 to
ba7d7dd
Compare
ba7d7dd to
d263e91
Compare
|
I'm not sure I understand the replication to begin with.. zk_evm/trace_decoder/src/core.rs Lines 466 to 473 in cfe6d42 We enter the |
f56b00d to
af9251a
Compare
|
Yeah creating a trie subset should always produce a trie with an identical hash, so that's a bug. Maybe subset isn't the best name here. It's true that the trie has only subset of the original trie's node and it's a different trie, but it's a bit confusing as well since the trie is the same except for hash nodes. I would just run this through trie diff and see where they diverge. |
Relates #583
I'm a bit confused by
mpt_trie::trie_subsets::create_trie_subset.AIUI any subset should NOT change the state root of a trie - it just hides subtries behind a hash indirection.
Note that #583 calls hiding subtries "masking",
mpt_triecalls it "subsetting". TheStateMpt::maskfunction is a thin (and I think low risk) wrapper around thempt_triefunctionality:zk_evm/trace_decoder/src/typed_mpt.rs
Lines 341 to 351 in cfe6d42
Here we branch on masking a particular subtrie:
zk_evm/trace_decoder/src/core.rs
Lines 466 to 473 in cfe6d42
I've added an
SKIP_MASK_PRECOMPILEDfor the sake of this discussion.If we DO mask those addresses:
Everything is ok.
If we DO NOT mask those addresses:
Eek! Let's see more detail about one of the failures
I'll try and work on a smaller test case :)