Skip to content

Bind snapshot export height to exact nullifier checkpoint#112

Open
p0mvn wants to merge 1 commit into
v2-updatesfrom
codex/snapshot-height-binding
Open

Bind snapshot export height to exact nullifier checkpoint#112
p0mvn wants to merge 1 commit into
v2-updatesfrom
codex/snapshot-height-binding

Conversation

@p0mvn

@p0mvn p0mvn commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require exact index-height matches for historical export in nf-server sync so floored offsets cannot be labeled as newer heights
  • make pir-export parse full checkpoint (height, offset) and export only the committed nullifiers.bin prefix
  • remove unreachable legacy in-process rebuild code while keeping /snapshot/prepare explicitly disabled

Test plan

  • cargo test -p nf-server resolve_export_offset
  • cargo test -p pir-export --bin pir-export --features cli
  • cargo test -p nf-ingest exact_offset_requires_exact_height
  • cargo test -p nf-server --no-run
  • run nf-server sync over >20K heights and verify completion

Require exact index height matches for historical exports, enforce checkpoint offset usage in pir-export, and remove unreachable legacy rebuild code to eliminate mislabeled snapshot artifacts.
Comment on lines -38 to -45
/// Query the chain SDK for an active voting round.
///
/// Returns `Some(round_id)` if a round is currently active, `None` otherwise.
/// Used to prevent rebuilds during active rounds which would invalidate proofs.
///
/// Retained for historical reasons; see the module-level note above.
#[allow(dead_code)]
async fn check_active_round(chain_url: &str) -> Result<Option<String>> {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note: deleted unused logic

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