-
Notifications
You must be signed in to change notification settings - Fork 283
fix: post-euclid block tracing #1119
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
Conversation
WalkthroughThis pull request modifies how the system handles tracing and versioning. In the tracing logic (both in the VM logger and the rollup tracer), the code now conditionally determines which hash to use and adds an error branch for post-Euclid blocks. Additionally, the patch version has been incremented in the versioning module. No public API or exported entity modifications were made. Changes
Sequence Diagram(s)sequenceDiagram
participant VM as LoggerTrace
participant Env as Environment
participant DB as StateDB
participant Map as BytecodesMap
VM->>Env: Call traceCodeWithAddress(address, keccakCodeHash)
alt Chain rules not Euclid
Env->>DB: GetPoseidonCodeHash(address)
DB-->>Env: Return PoseidonCodeHash
Env-->>VM: Use PoseidonCodeHash as codeHash
else
Env-->>VM: Use keccakCodeHash as codeHash
end
VM->>Map: Update bytecodes with codeHash
sequenceDiagram
participant Caller as Client
participant TraceEnv as Trace Environment
participant Chain as ChainConfig
Caller->>TraceEnv: Call GetBlockTrace(block)
TraceEnv->>Chain: IsEuclid(block.Time())
alt Block is post-Euclid
Chain-->>TraceEnv: True
TraceEnv-->>Caller: Return error ("Tracing not possible for post-Euclid blocks")
else
Chain-->>TraceEnv: False
TraceEnv->>Caller: Process tracing normally
end
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📥 CommitsReviewing files that changed from the base of the PR and between f22d6e6f7107d0ce48ffe52b13d64b9b917e3c03 and 543ed19. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
1fd7385
to
51f3ab9
Compare
f22d6e6
to
8bae826
Compare
1. Purpose or design rationale of this PR
...
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
New Features
Refactor
Chores