Crate sp1_stark

Source
Expand description

STARK-based primitives for proof generation and verification over AIRs.

Modules§

air
Building blocks for defining AIRs.
baby_bear_poseidon2
septic_curve
Elliptic Curve y^2 = x^3 + 2x + 26z^5 over the F_{p^7} = F_p[z]/(z^7 - 2z - 5) extension field.
septic_digest
Elliptic Curve digests with a starting point to avoid weierstrass addition exceptions.
septic_extension
A septic extension with an irreducible polynomial z^7 - 2z - 5.
shape
Utilities for working with shapes.

Macros§

chip_name
Macro to get the name of a chip.

Structs§

AirOpenedValues
BabyBearPoseidon2Inner
The recursion config used for recursive reduce circuit.
Chip
An Air that encodes lookups based on interactions.
ChipOpenedValues
CpuProver
A prover implementation based on x86 and ARM CPUs.
CpuProverError
An error that occurs during the execution of the CpuProver.
DebugConstraintBuilder
A builder for debugging constraints.
DeferredDigest
The hash of all the deferred proofs that have been witnessed in the VM.
GenericVerifierConstraintFolder
A folder for verifier constraints.
Interaction
An interaction for a lookup or a permutation argument.
InteractionBuilder
A builder for the lookup table interactions.
InteractionData
The data for an interaction.
MachineProof
OodEvaluationMismatch
An error that occurs when the openings do not match the expected shape.
ProverConstraintFolder
A folder for prover constraints.
PublicValuesDigest
The hash of all the public values that a zkvm program has committed to.
SP1CoreOpts
Options for the core prover.
SP1ProverOpts
Options to configure the SP1 prover for core and recursive proofs.
ShardCommitment
ShardMainData
ShardOpenedValues
ShardProof
SplitOpts
Options for splitting deferred events.
StarkMachine
A STARK for proving RISC-V execution.
StarkProvingKey
A proving key for a STARK.
StarkVerifyingKey
A verifying key for a STARK.
UniConfig
Verifier
A verifier for a collection of air chips.
Word
An array of four bytes to represent a 32-bit value.

Enums§

InteractionKind
The type of interaction for a lookup argument.
MachineVerificationError
Errors that can occur during machine verification.
OpeningShapeError
An error that occurs when the shape of the openings does not match the expected shape.
VerificationError
An error that occurs during the verification.

Constants§

DIGEST_SIZE
PROOF_MAX_NUM_PVS
The maximum number of elements that can be stored in the public values vec. Both SP1 and recursive proofs need to pad their public values vec to this length. This is required since the recursion verification program expects the public values vec to be fixed length.

Traits§

MachineProver
An algorithmic & hardware independent prover implementation for any MachineAir.
MachineProvingKey
A proving key for any MachineAir that is agnostic to hardware.
MachineRecord
A record that can be proven by a machine.
StarkGenericConfig
ZeroCommitment

Functions§

count_permutation_constraints
Counts the number of permutation constraints for the given chip.
debug_constraints
Checks that the constraints of the given AIR are satisfied, including the permutation trace.
debug_cumulative_sums
Checks that all the interactions between the chips has been satisfied.
debug_interactions
Debugs the interactions of a chip.
debug_interactions_with_all_chips
Calculate the number of times we send and receive each event of the given interaction type, and print out the ones for which the set of sends and receives don’t match.
eval_permutation_constraints
Evaluates the permutation constraints for the given chip.
generate_permutation_trace
Generates the permutation trace for the given chip and main trace based on a variant of LogUp.
inner_fri_config
The FRI config for inner recursion.
inner_perm
The permutation for inner recursion.
local_permutation_trace_width
Computes the width of the local permutation trace in terms of extension field elements.
populate_local_permutation_row
Populates a local permutation row.
quotient_values
Computes the quotient values.
scoped_interactions
Returns the sends, receives, and permutation trace width grouped by scope.
sp1_fri_config
The FRI config for sp1 proofs.
vec_to_string
Converts a vector of field elements to a string.

Type Aliases§

Challenge
Challenger
Com
Dom
Domain
InnerBatchOpening
InnerChallenge
InnerChallengeMmcs
InnerChallenger
InnerCommitPhaseStep
InnerCompress
InnerDft
InnerDigest
InnerDigestHash
InnerFriProof
InnerHash
InnerPcs
InnerPcsProof
InnerPerm
InnerQueryProof
InnerVal
A configuration for inner recursion.
InnerValMmcs
MachineChip
A chip in a machine.
OpeningError
OpeningProof
PackedChallenge
PackedVal
PcsProverData
QuotientOpenedValues
Val
VerifierConstraintFolder
A folder for verifier constraints.