From 00c970dcd17cea881cc24bd2b887000681e94c38 Mon Sep 17 00:00:00 2001 From: Neo Date: Sat, 30 Dec 2023 22:37:21 +0100 Subject: [PATCH] StarkUnsentCommitment --- src/input_structs.cairo | 1 + src/input_structs/stark_proof.cairo | 8 +++--- .../stark_unsent_commitment.cairo | 25 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/input_structs/stark_unsent_commitment.cairo diff --git a/src/input_structs.cairo b/src/input_structs.cairo index 6257aea34..73f27c3a0 100644 --- a/src/input_structs.cairo +++ b/src/input_structs.cairo @@ -1,3 +1,4 @@ mod public_input; mod stark_config; mod stark_proof; +mod stark_unsent_commitment; diff --git a/src/input_structs/stark_proof.cairo b/src/input_structs/stark_proof.cairo index 81ab05ae0..73363d4af 100644 --- a/src/input_structs/stark_proof.cairo +++ b/src/input_structs/stark_proof.cairo @@ -1,11 +1,13 @@ -use cairo_verifier::input_structs::stark_config::StarkConfig; -use cairo_verifier::input_structs::public_input::PublicInput; +use cairo_verifier::input_structs::{ + stark_config::StarkConfig, public_input::PublicInput, + stark_unsent_commitment::StarkUnsentCommitment, +}; #[derive(Drop, Serde)] struct StarkProof { config: StarkConfig, public_input: PublicInput, -// unsent_commitment: StarkUnsentCommitment, + unsent_commitment: StarkUnsentCommitment, // witness: StarkWitness, } diff --git a/src/input_structs/stark_unsent_commitment.cairo b/src/input_structs/stark_unsent_commitment.cairo new file mode 100644 index 000000000..737c8991b --- /dev/null +++ b/src/input_structs/stark_unsent_commitment.cairo @@ -0,0 +1,25 @@ +#[derive(Drop, Serde)] +struct StarkUnsentCommitment { + traces: TracesUnsentCommitment, + composition: felt252, + oods_values: Array, + fri: FriUnsentCommitment, + proof_of_work: ProofOfWorkUnsentCommitment, +} + +#[derive(Drop, Serde)] +struct TracesUnsentCommitment { + original: felt252, + interaction: felt252, +} + +#[derive(Drop, Serde)] +struct FriUnsentCommitment { + inner_layers: Array, + last_layer_coefficients: Array, +} + +#[derive(Drop, Serde)] +struct ProofOfWorkUnsentCommitment { + nonce: felt252, +}