Skip to content

Permissionless preconf fixes#877

Merged
mskrzypkows merged 7 commits intomasterfrom
permissionless_preconf_fixes
Feb 26, 2026
Merged

Permissionless preconf fixes#877
mskrzypkows merged 7 commits intomasterfrom
permissionless_preconf_fixes

Conversation

@mskrzypkows
Copy link
Collaborator

No description provided.

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.
Copilot AI review requested due to automatic review settings February 25, 2026 15:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_OFFSET constant with configurable min_anchor_offset parameter (default: 1, previously: 2)
  • Added genesis block (block 0) handling in get_anchor_block_id_from_geth to avoid anchor transaction lookup errors
  • Refactored post_preconf_requests to accept individual parameters instead of L2BlockV2Payload, 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! to trace! 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.

mskrzypkows and others added 2 commits February 26, 2026 09:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mskrzypkows mskrzypkows merged commit 1e44dd5 into master Feb 26, 2026
7 of 8 checks passed
@mskrzypkows mskrzypkows deleted the permissionless_preconf_fixes branch February 26, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants