MCPcopy Create free account
hub / github.com/argumentcomputer/ix / leaf_assumptions

Function leaf_assumptions

zisk/host/src/main.rs:532–552  ·  view source on GitHub ↗

Mirror of the leaf guest's assumption rule (`zisk/guest/src/main.rs`): the direct `Constant.refs` of every checked target that are neither in the checked set nor data blobs — the constants the leaf *assumes* well-typed. Computed against the full env; the guest computes it against the injected sub-env, whose constants are byte-identical, so the sets agree. Returned sorted + deduped (a set; `merkle_

(
  env: &IxonEnv,
  targets: &[ix_common::address::Address],
)

Source from the content-addressed store, hash-verified

530/// fold). `witness = Some(per-child (subject set, assumption set))` selects
531/// mode 1 (set discharge): the guest verifies each list's canonical root
532/// against the child's committed publics, then discharges assumptions proven
533/// by sibling subjects. Witness order must match `proofs` order.
534fn agg_stdin(
535 allowed_vks: &[Vec<u8>],
536 proofs: &[Vec<u8>],
537 witness: Option<&[(Vec<u8>, Vec<u8>)]>,
538) -> ZiskStdin {
539 let stdin = ZiskStdin::new();
540 stdin.write(&u32::from(witness.is_some())); // mode
541 stdin.write(&(allowed_vks.len() as u32));
542 for vk in allowed_vks {
543 stdin.write(vk);
544 }
545 stdin.write(&(proofs.len() as u32));
546 for bytes in proofs {
547 stdin.write(bytes);
548 }
549 if let Some(w) = witness {
550 assert_eq!(w.len(), proofs.len(), "witness/proof count mismatch");
551 for (s_blob, a_blob) in w {
552 stdin.write(s_blob);
553 stdin.write(a_blob);
554 }
555 }

Callers 1

run_shard_planFunction · 0.85

Calls 4

pushMethod · 0.80
get_constMethod · 0.45
get_blobMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected