feat(l1): make amsterdam header default to slot = 0 if no data in genesis#6534
Conversation
Lines of code reportTotal lines added: Detailed view |
Greptile SummaryThis PR updates Confidence Score: 5/5Safe to merge — small, consistent, well-scoped fix with no P0/P1 issues. The change follows the exact same pattern already used for every other Amsterdam/Prague/Cancun/Shanghai/London fork-gated field in the same function. No logic errors, no security concerns, and the default of 0 matches the stated intent of aligning with Nethermind's genesis handling. No files require special attention.
|
| Filename | Overview |
|---|---|
| crates/common/types/genesis.rs | Adds Amsterdam-activation guard for slot_number, defaulting to 0 when absent — consistent with the existing pattern for other fork-gated header fields. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[get_block_header] --> B{is_amsterdam_activated?}
B -- No --> C[slot_number = None]
B -- Yes --> D{genesis.slot_number set?}
D -- Yes --> E["slot_number = Some(value)"]
D -- No --> F["slot_number = Some(0)"]
C --> G[BlockHeader]
E --> G
F --> G
Reviews (1): Last reviewed commit: "Make amsterdam default to slot = 0 if no..." | Re-trigger Greptile
🤖 Claude Code ReviewReview: feat(l1): make amsterdam header default to slot = 0 if no data in genesisPR #6534 — Small targeted fix, already merged with two approvals. SummaryThe change gates CorrectnessThe fix is correct and consistent with the established pattern in
The new Before the fix,
Both are resolved by the new code. Minor observation (non-blocking)
VerdictThe change is correct, minimal, and follows established patterns in the codebase. The behavioral fix (ensuring parity with Nethermind) is well-motivated. No issues. Automated review by Claude (Anthropic) · sonnet · custom prompt |
🤖 Kimi Code ReviewReview of Potential Issue: Silent default to 0 for required field Line 724-726: When Amsterdam is activated but // Current:
.then_some(self.slot_number.unwrap_or(0));
// Suggested (if slot_number is mandatory post-Amsterdam):
let slot_number = self
.config
.is_amsterdam_activated(self.timestamp)
.then(|| self.slot_number.expect("slot_number required in genesis when Amsterdam is active"));Type Safety Check Verify that Consensus Correctness
Minor Line 722-726: The use of Question: Does Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewNo correctness or security findings in this diff. The change in crates/common/types/genesis.rs looks correct: it makes Residual testing gap: crates/common/types/genesis.rs changes consensus-critical header/RLP construction, but the existing genesis coverage in crates/common/types/genesis.rs only exercises non-Amsterdam fixtures. A small regression test for an Amsterdam-at-genesis config would be worth adding to lock in I couldn’t run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
…esis (#6534) Not having this was making our genesis management different from clients like nethermind.
Not having this was making our genesis management different from clients like nethermind.