refactor(synccommittee): Use execution.StateDB instead of custom vm.StateDB#510
Merged
refactor(synccommittee): Use execution.StateDB instead of custom vm.StateDB#510
execution.StateDB instead of custom vm.StateDB#510Conversation
execution.StateDB instead of custom on…execution.StateDB instead of custom vm.StateDB
oclaw
reviewed
Mar 10, 2025
olegrok
reviewed
Mar 17, 2025
shermike
reviewed
Mar 17, 2025
akokoshn
reviewed
Mar 17, 2025
shermike
reviewed
Mar 24, 2025
Contributor
shermike
left a comment
There was a problem hiding this comment.
I'm not sure about all these changes in state.go that transform one-line code to multiline. Could you please elaborate the purpose of these changes?
akokoshn
approved these changes
Mar 25, 2025
oclaw
approved these changes
Mar 25, 2025
…e in tracer Refactored the tracer to use `execution.StateDB` instead of a custom `vm.StateDB` implementation. This change enables comparison between the original block hash and the traced block hash, ensuring all operations remain consistent. Key changes: - Introduced `OnTxStart` and `OnTxEnd` hooks in the tracing package, moving all per-transaction tracer calls into these hooks. - Modified the `GetContract` method in the debug API to include proof of absence when a contract does not exist. This proof is either the longest matched path with the queried contract path or the root node if no path matches at all. This ensures we can prove the absence of even the beginning of such a path in the trie. Includes adjustment to `mpt.BuildProof` function. - Refactored the ZKEVM tracer to avoid relying on values unavailable in the EVM tracing hook context. To fetch the current code when needed, added a `Code()` method to `tracing.OpContext`. - Significantly changed the MPT tracer: it now computes differences between tries by traversing a trie with the initial root and comparing it against a trie with the current root. This eliminates the need to track changed values during tracing—only the initial and current roots are required, along with the underlying database storing all accessed values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored the tracer to use
execution.StateDBinstead of a customvm.StateDBimplementation. This change enables comparison between the original block hash and the traced block hash, ensuring all operations remain consistent.Key changes:
OnTxStartandOnTxEndhooks in the tracing package, moving all per-transaction tracer calls into these hooks.GetContractmethod in the debug API to include proof of absence when a contract does not exist. This proof is either the longest matched path with the queried contract path or the root node if no path matches at all. This ensures we can prove the absence of even the beginning of such a path in the trie. Includes adjustment tompt.BuildProoffunction.Code()method totracing.OpContext.