Merged
Conversation
Refactor preconfirmation driver and node logic to improve clarity and functionality. Replace L2BlockV2Payload with direct parameters in post_preconf_requests, enhance logging with trace level, and streamline anchor block ID calculation. This update also ensures proper handling of transaction lists and timestamps.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the anchor block offset configuration and fixes several issues in the preconfirmation system. It converts the hardcoded MIN_ANCHOR_OFFSET constant (previously set to 2) into a configurable parameter with a default value of 1, adds a genesis block edge case fix, and improves error handling and logging in the preconfirmation driver.
Changes:
- Replaced hardcoded
MIN_ANCHOR_OFFSETconstant with configurablemin_anchor_offsetparameter (default: 1, previously: 2) - Added genesis block (block 0) handling in
get_anchor_block_id_from_gethto avoid anchor transaction lookup errors - Refactored
post_preconf_requeststo accept individual parameters instead ofL2BlockV2Payload, improving API clarity and avoiding unnecessary anchor block info fetching - Enhanced error messages in preconfirmation driver with method names and context
- Adjusted logging levels from
debug!totrace!for frequently-called RPC methods
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Version bump from 1.33.7 to 1.33.8 |
| Cargo.lock | Updated package versions to match workspace version |
| common/src/config/mod.rs | Added min_anchor_offset configuration with environment variable support and default value of 1 |
| shasta/src/node/proposal_manager/mod.rs | Replaced hardcoded constant with configurable field, threaded through struct initialization |
| shasta/src/node/mod.rs | Passed min_anchor_offset from config to ProposalManager constructor |
| shasta/src/node/config.rs | Added min_anchor_offset field to NodeConfig |
| shasta/src/lib.rs | Passed min_anchor_offset from root config to node config |
| shasta/src/l2/execution_layer.rs | Added genesis block (0) edge case handling to return 0 as anchor id |
| permissionless/src/node/mod.rs | Refactored to calculate only anchor_block_id instead of full AnchorBlockInfo, removed unused L2BlockV2Payload construction, improved error messages |
| permissionless/src/node/config.rs | Added min_anchor_offset field to NodeConfig |
| permissionless/src/lib.rs | Passed min_anchor_offset from root config through to node config and ProposalManager |
| permissionless/src/l2/preconfirmation_driver.rs | Refactored post_preconf_requests signature to accept individual parameters, improved error messages with RPC method context, changed logging from debug to trace for get_preconf_slot_info |
| pacaya/src/l1/operators_cache.rs | Changed logging level from debug to trace for frequently-called method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mikhailUshakoff
approved these changes
Feb 25, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.