zorch.pcs.jagged.verifier¶
SP1 jagged-eval verifier: the zorch-native dual of the stage-5 prover.
verify_jagged_eval_msg replays the sumcheck half (prove_jagged_eval):
the outer Hadamard sumcheck against the column claim recomputed from the
zerocheck openings, the inner branching-program sumcheck against the proof's
claimed J̃, the succinct branching-program leaf check at the reduced point,
and the product check tying D(z_final)·J̃ to the outer reduction.
stacked_basefold_verify is the dual of stacked_basefold_open's SP1
wire: the stacking check binding D(z_final) to the per-round batch
evaluations, the interleaved-sumcheck round identities, the proof-of-work
check, and the query phase — component openings against the carry's
separator-bound commitments, their staggered RLC tied to fold layer 0, and
the per-layer fold chain down to the constant final poly.
Both run on zorch verifier blocks (CoeffsSumcheckRound under the
zorch.verify scan, bp_eval_core, verify_fold_chain); what stays
here is the SP1 wire — the absorb schedule, the canonical-low-bits query
rule, the separator-bound fold-layer roots, and the scalar final poly.
References (pinned at the same SP1 commit as zerocheck/jagged.py):
- jagged verify — verify_trusted_evaluations:
https://github.com/fractalyze/sp1/blob/640d8b80c/slop/crates/jagged/src/verifier.rs
- inner leaf check — jagged_evaluation:
https://github.com/fractalyze/sp1/blob/640d8b80c/slop/crates/jagged/src/jagged_eval/sumcheck_eval.rs
- stacking check — verify_trusted_evaluation:
https://github.com/fractalyze/sp1/blob/640d8b80c/slop/crates/stacked/src/verifier.rs
- fold/query phase — verify_mle_evaluations:
https://github.com/fractalyze/sp1/blob/640d8b80c/slop/crates/basefold/src/verifier.rs
SP1 checks each query's fold chain against the final poly and never
separately compares the sumcheck side's terminal claim to it; the dual
mirrors SP1's check set exactly.
verify_jagged_eval_msg ¶
verify_jagged_eval_msg(
col_heights: Sequence[int],
all_claims: Array,
z_row: Array,
z_col: Array,
msg: JaggedEvalMsg,
transcript: Transcript,
*,
dtype: Any
) -> tuple[Transcript, Array, Array]
Verify the sumcheck half of the stage-5 proof; returns
(transcript, z_final, ok).
col_heights / all_claims are the statement-side column manifest
and the per-column claims assembled from the zerocheck opened values
(assemble_columns); z_row is the zerocheck point in SP1's
insert-at-front order and z_col the caller's own column samples.
z_final is the dual's own outer reduction point (pinned against the
wire copy), which the stacked open consumes. ok ANDs every
acceptance leg; malformed proof structure raises instead — shapes are
host decisions, the same split as the zerocheck dual.
Source code in zorch/pcs/jagged/verifier.py
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 | |
stacked_basefold_verify ¶
stacked_basefold_verify(
smcs: SingleMatrixCommitmentScheme,
code: BitReversedReedSolomon,
round_widths: Sequence[int],
z_final: Array,
dense_eval: Array,
log_stacking_height: int,
proof: StackedOpenProof,
transcript: Transcript,
*,
num_queries: int,
pow_bits: int
) -> tuple[Transcript, Array]
Verify a stacked BaseFold open; returns (transcript, ok).
round_widths is the statement-side stacked column count of each
round (its aligned area over the stacking height). Openings verify
against the proof's own component_commitments — soundness comes
from the caller tying each of those to the statement's commitment via
the structure rebind (the jagged level's check, as in SP1). The
transcript must be the grinding transcript at the state SP1 enters the
open with, exactly as on the prover side.
Source code in zorch/pcs/jagged/verifier.py
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 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | |