Skip to content

examples: let chopsticks author past RetentionPeriod#570

Open
x3c41a wants to merge 3 commits into
mainfrom
ndk/chopsticks-author-past-retention
Open

examples: let chopsticks author past RetentionPeriod#570
x3c41a wants to merge 3 commits into
mainfrom
ndk/chopsticks-author-past-retention

Conversation

@x3c41a
Copy link
Copy Markdown
Contributor

@x3c41a x3c41a commented May 28, 2026

Summary

  • check_chopsticks.js now overrides TransactionStorage::RetentionPeriod to u32::MAX on the fork and authors several blocks (default 8, override via CHOPSTICKS_NEW_BLOCKS).

Why

Chopsticks can't construct a TransactionStorageProof (no off-chain chunks), so authoring past store_block + RetentionPeriod panics in apply_block_inherents with Storage proof must be checked once in the block. With RetentionPeriod = u32::MAX, target_number.saturating_sub(MAX) == 0 for every block, so proof_ok short-circuits via the target_number.is_zero() branch and no proof is required.

Verified

  • Local zombienet (retention=10, store at block 11): control panics at block 21; with override, produced blocks 12–23 cleanly.

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.

1 participant