"fill_state_roots" does too much useful computation, mostly related to circuit witness generation. i want to totally bypass zkevm-circuits/zktrie/src/state/witness.rs and zkevm-circuits/zkevm-circuits/src/witness/mpt.rs, so we write to zktrie directly. Most codes related to "witness" are useless, they are only useful for zktrie circuit. While ZktrieState seems useful.. I am considering move ZktrieState down to zktrie repo. (inside zktrie repo, add another crate called zktrie-ext? Move zkevm-circuits/zktrie/src/state/builder.rs there too?. So for zkevm-circuits/zktrie, codes related to circuit will be moved to zkevm-circuits/src/witness/mpt.rs, codes not related to circuit will be moved to zktrie/zktrie-ext? So in future there will be no zkevm-circuits/zktrie) So maybe we don't need the MptUpdate struct? For this refactoring, we can read Database related codes in reth, to make the interface similar, so in future when we implement scroll-reth, it will be easier.
we no longer need to check rws with bus-mapping, just check state root after revm execution VS state root in trace.
i don't want rely on bus-mapping. We can move "update_codedb" and even CodeDB struct to eth-types? And only crate we need in zkevm-circuits will be eth-types?
The final goal is make deps as clean/minimal as possible, and also paving the road towards scroll-reth
cc @lightsing