scroll-tech / stateless-block-verifier

20 stars 6 forks source link

Development Roadmap #1

Closed lispc closed 2 months ago

lispc commented 2 months ago
  1. "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.
  2. move https://github.com/scroll-tech/zkevm-circuits/pull/1224 here with following changes (wait, if we move most codes here, testool will be no longer viable..?)
  3. we no longer need to check rws with bus-mapping, just check state root after revm execution VS state root in trace.
  4. 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?
  5. The final goal is make deps as clean/minimal as possible, and also paving the road towards scroll-reth

cc @lightsing