Skip to content

derivation rules for block recovery#911

Merged
mskrzypkows merged 6 commits intomasterfrom
derviation_rules_for_recovery
Mar 19, 2026
Merged

derivation rules for block recovery#911
mskrzypkows merged 6 commits intomasterfrom
derviation_rules_for_recovery

Conversation

@mskrzypkows
Copy link
Copy Markdown
Collaborator

No description provided.

@mskrzypkows mskrzypkows marked this pull request as ready for review March 18, 2026 14:50
Copilot AI review requested due to automatic review settings March 18, 2026 14:50
Copy link
Copy Markdown
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

Adds timestamp-derivation rule validation to the Shasta node’s block recovery flow, aiming to detect invalid recovered L2 blocks earlier and trigger reanchor when needed.

Changes:

  • Add per-block timestamp validation during recovery (VerifierThread::handle_unprocessed_blocks).
  • Introduce ProposalManager::validate_block_timestamp implementing derivation-rule bounds checks.
  • Bump workspace version from 1.34.6 to 1.34.7 (Cargo.toml / Cargo.lock).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
shasta/src/node/verifier.rs Adds timestamp validation calls into the recovery loop and improves offset error reporting.
shasta/src/node/proposal_manager/mod.rs Introduces validate_block_timestamp to enforce derivation timestamp bounds during recovery.
Cargo.toml Workspace version bump to 1.34.7.
Cargo.lock Lockfile updates reflecting the 1.34.7 version bump across crates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread shasta/src/node/proposal_manager/mod.rs Outdated
Comment thread shasta/src/node/proposal_manager/mod.rs Outdated
Comment thread shasta/src/node/verifier.rs Outdated
Comment thread shasta/src/node/verifier.rs Outdated
Comment thread shasta/src/node/proposal_manager/mod.rs Outdated
Copy link
Copy Markdown
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

Adds derivation-rule enforcement during L2 block recovery by validating recovered blocks’ timestamps against protocol bounds, while also optimizing recovery by threading parent timestamps through the recovery loop.

Changes:

  • Update verifier recovery loop to track and pass parent_timestamp between recovered blocks.
  • Extend ProposalManager::recover_from_l2_block to validate recovered block timestamps and return the recovered block timestamp for chaining.
  • Bump workspace/crate versions from 1.34.6 to 1.34.7.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
shasta/src/node/verifier.rs Threads parent_timestamp through recovery and adjusts offset validation error handling/logging.
shasta/src/node/proposal_manager/mod.rs Adds timestamp-derivation validation during recovery and changes recovery API to return timestamps.
Cargo.toml Workspace version bump to 1.34.7.
Cargo.lock Lockfile updates reflecting version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread shasta/src/node/proposal_manager/mod.rs
Comment thread shasta/src/node/proposal_manager/mod.rs Outdated
Comment thread shasta/src/node/proposal_manager/mod.rs Outdated
mskrzypkows and others added 3 commits March 19, 2026 09:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mskrzypkows mskrzypkows merged commit 6df4740 into master Mar 19, 2026
7 checks passed
@mskrzypkows mskrzypkows deleted the derviation_rules_for_recovery branch March 19, 2026 08:31
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