Skip to content

Commit

Permalink
fix: fix inclusion stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
tchataigner committed Jul 22, 2024
1 parent 884b322 commit c816e56
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions ethereum/light-client/src/proofs/inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ impl Prover for StorageInclusionProver {
.to_ssz_bytes()
.map_err(|err| ProverError::SphinxInput { source: err.into() })?,
);
stdin.write(&inputs.eip1186_proof.to_ssz_bytes());
Ok(stdin)
}

Expand Down Expand Up @@ -378,21 +379,4 @@ mod test {
let _ = prover.prove(inclusion_inputs, ProvingMode::SNARK).unwrap();
println!("Proving took {:?}", start.elapsed());
}

#[test]
fn test_ssz_serde_inputs() {
let test_assets = generate_test_assets();

let inclusion_inputs = StorageInclusionIn {
store: test_assets.store.clone(),
update: Update::from(test_assets.finality_update.clone()),
eip1186_proof: test_assets.eip1186_proof.clone(),
};

let ssz_bytes = inclusion_inputs.to_ssz_bytes().unwrap();

let deserialized_inclusion_inputs = StorageInclusionIn::from_ssz_bytes(&ssz_bytes).unwrap();

assert_eq!(inclusion_inputs, deserialized_inclusion_inputs);
}
}

0 comments on commit c816e56

Please sign in to comment.