zorch.pcs.basefold.verifier¶
BaseFold verifier — the verifier half of the multilinear PCS.
verify rebuilds the queried codeword leaves from the committed roots and checks
the fold consistency of the batch open: the staggered RLC of the committed
matrices' opened rows must agree with the batched codeword's first pair-leaf, and
each fold layer's opened pair must fold to the next layer's, down to the constant
final poly. It holds only the public params (code for the block geometry and
fold, tree for the Merkle config) — never the prover's retained codeword.
The replay is driven by a (BasefoldConfig, BasefoldChoreography, SumcheckKernel)
triple — the verify dual of BasefoldProver: the config fixes the fold schedule
(commit cadence), the choreography fixes the Fiat-Shamir framing (message/root/
terminal observes, query sampling, grind checks), and the kernel owns the round
algebra (the per-round round_check consistency + reduce_claim recurrence).
BasefoldVerifier's defaults are zorch's native wire — so the plain
BasefoldVerifier(code, tree, num_queries=…) construction replays byte-for-byte
today's implementation and accepts/rejects identically. Prover and verifier must
share ONE choreography + kernel so their Fiat-Shamir streams stay equal by
construction. A byte-fixed consumer supplies its own config +
choreography and drives verify_with_basis (raw basis, bind_statement's
point=None) — the dual of BasefoldProver.open_with_basis.
BasefoldVerifier
dataclass
¶
Bases: VerifierStage[OpeningClaim[BasefoldCommitment], TrivialClaim, OpeningProof[BasefoldProof], TranscriptT], Generic[TranscriptT]
BaseFold PCS verifier. code fixes the block geometry +
fold; tree the Merkle config; choreography the Fiat-Shamir wire (share
the instance with the prover); config the fold schedule. The defaults are
zorch's native wire — the plain BasefoldVerifier(code, tree, num_queries=…)
construction replays byte-for-byte today's implementation. config=None
derives the native per-verify config (commits_per_round, num_queries
from the verifier).
Source code in zorch/pcs/basefold/verifier.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
verify ¶
verify(
claim: OpeningClaim[BasefoldCommitment],
reduction_proof: OpeningProof[BasefoldProof],
transcript: TranscriptT,
) -> VerifyResult[TrivialClaim, TranscriptT]
Verify a single-matrix open — the degenerate one-round batch.
Source code in zorch/pcs/basefold/verifier.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
verify_with_basis ¶
verify_with_basis(
commitment: BasefoldCommitment,
basis: Array,
value: Array,
proof: BasefoldProof | CadenceProof,
transcript: TranscriptT,
) -> tuple[Array, TranscriptT]
Verify a RAW-basis open — the dual of BasefoldProver.open_with_basis
(bind_statement receives point=None), dispatching on the fold schedule
exactly as the prover entry does.
Under a non-native schedule (row_batch_prefix / fold_arities) this
replays the generic cadence (row-batch prefix + multi-arity FRI epochs)
against a CadenceProof, the symmetric dual of _open_with_basis_cadence:
commitment is the prover's initial codeword root (bound, not observed —
the outer protocol committed it), value the claimed target the kernel's
reduce_claim/verify_final fold against.
Under the native uniform schedule the per-round check evaluates the
sumcheck message at the opening point's coordinates, which a raw basis
lacks, so that path has no basis replay yet — a fail-loud consumer delta
(the native binding also refuses point=None).
Source code in zorch/pcs/basefold/verifier.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |