feat: add artifact dumping for aggregation proof debugging#800
Closed
fakedev9999 wants to merge 4 commits intofakedev9999/prover-mainnet-readyfrom
Closed
feat: add artifact dumping for aggregation proof debugging#800fakedev9999 wants to merge 4 commits intofakedev9999/prover-mainnet-readyfrom
fakedev9999 wants to merge 4 commits intofakedev9999/prover-mainnet-readyfrom
Conversation
Contributor
Performance Comparison (ELF: eigenda-range-elf-embedded)Range 1276952~1276957
|
Add --save-artifacts and --artifacts-dir CLI flags to scripts/prove/bin/agg.rs. When enabled, after constructing the aggregation SP1Stdin, the binary saves: - program.bin: the aggregation ELF (~775KB) - stdin.bin: bincode-serialized SP1Stdin with compressed proofs and aggregation inputs This enables external debugging by allowing reproduction of failing aggregation proofs with minimal setup overhead.
New validity/bin/dump_proofs.rs binary that connects to the proposer's Postgres
database and exports completed range proofs as BLOB files for use in local
aggregation proof debugging.
The binary:
- Queries range proofs in a given block range
- Writes each proof to data/fetched_proofs/{start}-{end}.bin
- Prints aggregation request metadata (checkpoint hash, prover address)
- Outputs a ready-to-use agg command with --save-artifacts
This streamlines the workflow for reproducing aggregation proof failures.
… tokio runtime CpuProver::new() creates its own tokio runtime internally, causing "Cannot start a runtime from within a runtime" panic when called from #[tokio::main] async main. Wrap load_aggregation_proof_data body in tokio::task::spawn_blocking, matching the pattern in lib.rs and cost_estimator.rs.
…y check The prover network's recursion pipeline may embed a different vk hash in the proof's public values than what the local CpuProver recomputes, causing verification to fail with "sp1 vk hash mismatch". This is a known SDK-vs-network discrepancy in rc.1 and does not affect the aggregation stdin or on-chain verification. When --skip-verification is set, CpuProver initialization is skipped entirely (saving ~10s), and proofs are loaded without local verification.
baa1e24 to
ad71c22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add tooling to dump aggregation proof artifacts for external debugging and reproduction of failing proofs on the prover network.
New features:
scripts/prove/bin/agg.rs: Add--save-artifactsflag to dump program.bin (ELF) and stdin.bin (serialized SP1Stdin)validity/bin/dump_proofs.rs: New binary to extract range proof BLOBs from the proposer DB for local useTest plan
cargo build --bin agg --release— compiles with new flagscargo build --bin dump_proofs --release— new binary compilescargo run --bin agg --release -- --help— flags are visible and documentedcargo run --bin dump_proofs --release -- --help— usage is clear