Skip to content

Argus side of codec ownership correction + spongefish-dsfs#2

Merged
ricardo-perello merged 2 commits into
mainfrom
refactor/spongefish-dsfs-callsites
May 15, 2026
Merged

Argus side of codec ownership correction + spongefish-dsfs#2
ricardo-perello merged 2 commits into
mainfrom
refactor/spongefish-dsfs-callsites

Conversation

@ricardo-perello

Copy link
Copy Markdown
Owner

Summary

Argus-side companion to spongefish PR arkworks-rs/spongefish#153. Completes the codec-ownership correction: codec traits live in spongefish, DSFS lives in the new spongefish-dsfs sibling crate, and ia-core is back to being a pure protocol-abstraction crate.

Self-merging (I own this repo); PR is for the log / rationale record.

What changed

  • ia-core collapsed. Deleted codecs.rs, io.rs, deserialize.rs, error.rs, and drivers/. ia-core now re-exports Encoding/Decoding/NargSerialize/NargDeserialize/Deserialize/VerificationError/VerificationResult from spongefish. The 9 foreign-type features dropped; ia-core exposes only default / std.
  • spongefish-dsfs dependency added across the workspace (argus-examples, sigma-bridge; dev-dep in warp). All spongefish::dsfs::* import paths swept to spongefish_dsfs::*.
  • DSFS call sites migrated off the byte-oriented free fns onto the Dsfs::new(...).prove(...) / DsfsReduction::new(...).prove(...) wrappers (the free fns are now pub(crate) in spongefish-dsfs).
  • Workspace bumped to ark- 0.6* to match upstream spongefish v0.7.0 (0b565ac arkworks 0.6.0). ark-crypto-primitives patched to arkworks-rs/crypto-primitives release/0.6.0; r1cs feature → constraints.
  • crates/warp temporarily excluded from [workspace.members]. It depends on dmpierre/ark-codes, which has no ark-* 0.6 fork. Tracked as a follow-up — re-add once ark-codes is on 0.6. warp_accumulate.rs (in argus-examples) does NOT depend on the warp crate and survives the exclusion.

Verification

  • cargo build --workspace --all-features
  • cargo test --workspace --all-features ✅ except the 3 sigma-bridge golden_* tests (pre-existing — upstream PR #114 / 0010ea7 changed transcript bytes; regenerate fixtures later).
  • All 5 argus-examples binaries run and verify end-to-end (schnorr, sumcheck, sumcheck_commit, composition, warp_accumulate).

Coordination caveat

Argus main already pins [patch.crates-io] spongefish = { path = ../spongefish/spongefish }. This PR adds the same for spongefish-dsfs. So after merge, main requires the local spongefish checkout to be on refactor/codec-back-to-spongefish (or any branch carrying the spongefish-dsfs crate) until #153/#114 land upstream and a real version is published.

Follow-ups (not blocking)

  • Regenerate sigma-bridge golden vectors.
  • ark-codes 0.6 → re-include crates/warp (Option B: waiting for upstream).
  • Phase 2: indexed-relations / preprocessing (Chiesa's 5 remarks) — now unblocked by this refactor.

…fish-dsfs dep

ia-core no longer defines codec traits. Encoding/Decoding/NargSerialize/
NargDeserialize/Deserialize/VerificationError/VerificationResult are re-exported
from spongefish (which now owns them, alongside foreign-type codec impls).

ia-core/src/{codecs,io,deserialize,error}.rs and ia-core/src/drivers/ are deleted.
The 9 foreign-type features on ia-core (ark-ff, ark-ec, bls12_381, curve25519-
dalek, p256, k256, p3-baby-bear, p3-koala-bear, p3-mersenne-31) are dropped;
ia-core now exposes only `default` and `std`.

Argus protocol crates pick up a new workspace dep on `spongefish-dsfs` for the
DSFS bridge:
- argus-examples: regular dep
- sigma-bridge: regular dep
- warp: dev-dep (tests only)

All `spongefish::dsfs::*` import paths swept to `spongefish_dsfs::*` across
sigma-bridge/{lib,fiat_shamir}.rs, sigma-bridge/tests/*, sigma-bridge/examples/,
warp/tests/warp_test.rs, argus-examples/src/bin/{sumcheck,schnorr,composition,
warp_accumulate}.rs.

Argus workspace bumped to ark-* 0.6 to match upstream spongefish v0.7.0
(arkworks 0.6 everything). ark-crypto-primitives patched to
arkworks-rs/crypto-primitives release/0.6.0 branch; `r1cs` feature renamed to
`constraints`.

WORK IN PROGRESS — does not yet build. Blocked on:

1. `ark-codes` (dmpierre/ark-codes) only has a main branch on ark-ff 0.5; no
   0.6 fork exists. warp depends on ark-codes pervasively. Bumping requires
   either forking dmpierre/ark-codes to a 0.6 branch ourselves or pinning warp
   to ark-codes for the time being and resolving the trait-version skew.
2. The 23 free-fn DSFS call sites (`dsfs::prove`, `dsfs::verify`, *_with_*,
   *_reduction*) across argus-examples/src/bin/*, warp/tests/warp_test.rs,
   sigma-bridge/tests/* have NOT been swept onto the `Dsfs::new(...)` wrapper.
   The wrapper is the eventual single public surface; the free-fns will go
   `pub(crate)` once Argus stops calling them.
3. sigma-bridge golden vectors will need regeneration once the build works
   again (transcript bytes changed via spongefish PR #114 / 0010ea7).

Spongefish PR 1 (sibling commit on spongefish workspace branch
`refactor/codec-back-to-spongefish`) is fully working and tested; this PR is
the Argus-side companion.
…o Dsfs wrapper

Unblocks PR 2 build by excluding `crates/warp` from the workspace temporarily.
warp depends on `dmpierre/ark-codes` (third-party, ark-ff 0.5 only) which has no
0.6 fork. Re-add once ark-codes is bumped (see codec-ownership-correction wiki
note, follow-up).

Argus-examples / sigma-bridge call sites migrated from the byte-oriented free-fn
DSFS surface (`dsfs::prove`/`verify`/`prove_reduction`/`verify_reduction`) onto
the trait-based `Dsfs::new(...).prove(...)` / `DsfsReduction::new(...).prove(...)`
wrappers, in preparation for the eventual `pub(crate)` flip of the free fns.

Files touched:
- argus-examples/src/bin/{schnorr,sumcheck_commit,composition,warp_accumulate}.rs
- sigma-bridge/tests/{sigmaia_roundtrip,composed_relation_smoke}.rs
- sigma-bridge/examples/update_keccak_vectors.rs (import shape fix only)

`warp_accumulate.rs` lives in argus-examples and does NOT depend on the warp
crate (despite the name) — only on ark-curve25519 + ia-core + spongefish_dsfs.
It survives the warp drop.

All argus-examples binaries run successfully (schnorr, sumcheck, sumcheck_commit,
composition, warp_accumulate). Workspace tests pass except the 3 sigma-bridge
golden_vectors (pre-existing failures from upstream PR #114 changing transcript
bytes; not caused by this refactor). See codec-ownership-correction-2026-05
wiki note for the golden vector regeneration follow-up.

ark-crypto-primitives workspace dep entry switched from a hardcoded version in
argus-examples to `workspace = true`, so the [patch.crates-io] override to
arkworks-rs `release/0.6.0` branch takes effect uniformly.
@ricardo-perello ricardo-perello merged commit 86a057a into main May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant