Skip to content

fix(rpc-replay): support historical committed-fee replays - #3

Open
Mohiiit wants to merge 3 commits into
mainfrom
codex/committed-fee-replay
Open

Mohiiit wants to merge 3 commits into
mainfrom
codex/committed-fee-replay

Conversation

@Mohiiit

@Mohiiit Mohiiit commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • Replays historical fee transfers from committed receipts behind an opt-in flag while preserving default Blockifier fee behavior.
  • Uses authoritative committed receipt fields for block commitments and fails closed on inconsistent fee traces or balances.
  • Supports bounded sequential replay with durable output paths and a reproducible release-image build.

Safety

SNOS_REPLAY_USE_COMMITTED_FEES remains disabled by default. Invalid values are ignored, and incomplete or mismatched receipt data aborts reconciliation.

Validation

  • Formatting is clean.
  • Focused unit coverage passed (10 tests).
  • Strict linting passed for the affected crates.


pub(crate) const USE_COMMITTED_FEES_ENV: &str = "SNOS_REPLAY_USE_COMMITTED_FEES";

pub(crate) fn is_enabled() -> bool {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could we parse this once at the rpc-replay configuration boundary and pass the selected mode explicitly through PieGenerationInput instead of reading process-global environment state inside generate-pie? This setting decides whether SNOS follows Blockifier fees or the Rust-canonical committed fee state, so it should be visible and testable in the invocation configuration. Invalid values should also fail fast rather than silently selecting Blockifier mode.

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.

2 participants