derivation rules for block recovery#911
Conversation
There was a problem hiding this comment.
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_timestampimplementing derivation-rule bounds checks. - Bump workspace version from
1.34.6to1.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.
There was a problem hiding this comment.
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_timestampbetween recovered blocks. - Extend
ProposalManager::recover_from_l2_blockto validate recovered block timestamps and return the recovered block timestamp for chaining. - Bump workspace/crate versions from
1.34.6to1.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.
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>
No description provided.