-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial refactoring for SMT & Contination support in trace_decoder
#197
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after a first pass
Just a heads up. I'm going to be doing a rebase to get back up to date with |
- Created type aliases for all `evm_arithmetization` types that we need to swap out depending on whether or not we are compiling for `mpt` or `smt`.
- Realized that there is no clean way to disable a default feature when it absolutely needs to be disabled (eg. when "smt" is enabled). - Also added a compile time check to enforce that one of these features is enabled.
- Prep for `mpt`/`smt` logic feature gating.
- Realized that we can link again both versions of the library at once without conditional compilation.
Hmm that's my bad on this, but I hadn't realized you had targeted this against |
Yeah should have been |
I know we talked about this yesterday, but I'll just do a write-up here as well. So we could do this, but I would worry that this would hurt overall dev time as we would need to also maintain two separate branches in Could we maybe do something different instead? The worst case if there are major breaking changes to |
A fundamental question with the overall approach that I had already shared in the past is why do we even want to maintain two concurrent trace_decoder version, to support MPT and SMT in parallel, as we won't be supporting concurrent type-1 and type-2 in the near/mid-future. It seems to me like the overall workspace should be consistent. As for maintenance effort, I agree maintaining branches is a pain. We're currently having:
Given that the overall logic of the type2 SMT is dependent on EIP-6780 introduced in Cancun, it would make sense to me to combine both |
This PR lays the refactoring groundwork in
trace_decoder
needed to support both smt and continuations payloads. In effect, this means moving a lot of the existing code around into separate modules.The biggest changes are:
decoding.rs
into separate modules formpt
&smt
.processed_block_trace.rs
into separate modules formpt
&smt
.mpt
orsmt
).evm_artithmetization
formpt
&smt
usage.@cffls Would you be able to look at the diff of
trace_decoder/src/trace_protocol.rs
and make sure this look good from Erigon & CDK's end?Note that there is still the issue that the global memory allocator in
evm_arithmetization
currently has a name collision and prevents the test binary from being able to be built (but strangely normal builds are fine). This should be resolved before this PR is merged.