MCPcopy Create free account
hub / github.com/andrewmilson/sandstorm / execute_command

Function execute_command

cli/src/main.rs:138–166  ·  view source on GitHub ↗
(
    command: Command,
    claim: Claim,
)

Source from the content-addressed store, hash-verified

136}
137
138fn execute_command<Fp: PrimeField, Claim: Stark<Fp = Fp, Witness = CairoWitness<Fp>>>(
139 command: Command,
140 claim: Claim,
141) {
142 match command {
143 Command::Prove {
144 output,
145 air_private_input,
146 num_queries,
147 lde_blowup_factor,
148 proof_of_work_bits,
149 fri_folding_factor,
150 fri_max_remainder_coeffs,
151 } => {
152 let options = ProofOptions::new(
153 num_queries,
154 lde_blowup_factor,
155 proof_of_work_bits,
156 fri_folding_factor,
157 fri_max_remainder_coeffs,
158 );
159 prove(options, &air_private_input, &output, claim)
160 }
161 Command::Verify {
162 proof,
163 required_security_bits,
164 } => verify(required_security_bits, &proof, claim),
165 }
166}
167
168fn verify<Claim: Stark<Fp = impl Field>>(
169 required_security_bits: u8,

Callers 1

mainFunction · 0.85

Calls 2

proveFunction · 0.85
verifyFunction · 0.70

Tested by

no test coverage detected