Proving host: the setup line splits prover-client creation from the two key setups (ledger P20 gap); simnet export and generator results kept with the fixtures

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-josh 2026-10-04 11:10:26 +01:00
parent 9faf9c4859
commit 4424dfae30
4 changed files with 54 additions and 3 deletions

View file

@ -19,7 +19,6 @@ mod proof_system;
use alloy_primitives::{Address, B256};
use anyhow::{anyhow, bail, Context, Result};
use igneum_prove_core::agg::{self, AggInput, BlockOutput};
use igneum_prove_core::config::SHARD_PROVING_GAS_BUDGET;
use igneum_prove_core::shard::{build_shards, shard_statement, BuiltShard, ShardInput, ShardOutput};
use igneum_prove_core::Fixture;
use proof_system::{ProofSystem, SegmentClaim, ShardWitness, Sp1ProofSystem, Sp1ShardProof, StubProofSystem};
@ -190,7 +189,9 @@ fn run() -> Result<()> {
let t = Instant::now();
let sp1 = Sp1ProofSystem::from_env(SHARD_ELF, AGG_ELF)?;
let setup_s = t.elapsed().as_secs_f64();
println!("RESULT setup: {:.2} s (shard {:.2} s, aggregator {:.2} s), ProofSystem v{} shard program id {} aggregator id {} at {}", setup_s, sp1.last_timing("setup-shard").map(|d| d.as_secs_f64()).unwrap_or(0.0), sp1.last_timing("setup-aggregator").map(|d| d.as_secs_f64()).unwrap_or(0.0), Sp1ProofSystem::VERSION, sp1.program_id(), sp1.aggregator_id(), now());
let secs = |k: &str| sp1.last_timing(k).map(|d| d.as_secs_f64()).unwrap_or(0.0);
println!("RESULT setup: {:.2} s (prover client {:.2} s, shard keys {:.2} s, aggregator keys {:.2} s), ProofSystem v{} shard program id {} aggregator id {} at {}", setup_s, secs("client"), secs("setup-shard"), secs("setup-aggregator"), Sp1ProofSystem::VERSION, sp1.program_id(), sp1.aggregator_id(), now());
results.insert("client_seconds".into(), secs("client").into());
results.insert("setup_seconds".into(), setup_s.into());
results.insert("shard_program_id".into(), sp1.program_id().to_string().into());
results.insert("aggregator_id".into(), sp1.aggregator_id().to_string().into());

View file

@ -173,7 +173,9 @@ pub struct Sp1WrappedProof(pub SP1ProofWithPublicValues);
impl Sp1ProofSystem {
/// Builds the prover from the environment (`SP1_PROVER` = cpu, cuda or mock) and runs both key setups.
pub fn from_env(shard_elf: Elf, agg_elf: Elf) -> Result<Self> {
let t = Instant::now();
let client = ProverClient::from_env();
let client_dt = t.elapsed();
let t = Instant::now();
let shard_pk = client.setup(shard_elf)?;
let shard_vk = shard_pk.verifying_key().clone();
@ -189,7 +191,7 @@ impl Sp1ProofSystem {
agg_pk,
agg_vk,
table: PgasTable { name: "prototype-b7fca5a0", version: 1 },
timings: std::sync::Mutex::new(vec![("setup-shard".into(), setup_shard), ("setup-aggregator".into(), setup_agg)]),
timings: std::sync::Mutex::new(vec![("client".into(), client_dt), ("setup-shard".into(), setup_shard), ("setup-aggregator".into(), setup_agg)]),
})
}

View file

@ -0,0 +1,47 @@
{
"chainId": 4463,
"S_p": 7500000,
"calibration": [
{
"n": 100,
"pgas": 354375,
"gas": 104462
},
{
"n": 400,
"pgas": 1386075,
"gas": 263774
}
],
"perIter": 3439,
"fixed": 10475,
"iters": 651,
"bombAddr": "0xb4fe09ff2fc5f44fea043e2e410f9ccec1dce9a8",
"counterAddr": "0x9424b9e3c5e35893e8094209b2e7a26d4ea93e48",
"blocks": {
"1": {
"block": 338,
"txs": 11,
"pgas": 6751568,
"gas": 1390773,
"segmentPgas": 6751568,
"segmentGas": 1390773
},
"2": {
"block": 341,
"txs": 14,
"pgas": 13499360,
"gas": 2564838,
"segmentPgas": 13499360,
"segmentGas": 2564838
},
"4": {
"block": 344,
"txs": 20,
"pgas": 26994944,
"gas": 4947168,
"segmentPgas": 26994944,
"segmentGas": 4947168
}
}
}

File diff suppressed because one or more lines are too long