Skip to content

feat(protocol): share native protocol types and dependencies with WASM clients - #29

Draft
mickvandijke wants to merge 35 commits into
mainfrom
web-support
Draft

mickvandijke wants to merge 35 commits into
mainfrom
web-support

Conversation

@mickvandijke

@mickvandijke mickvandijke commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

Exposes the native chunk wire types, content addressing, quote and commitment verification, pricing, and payment proofs to browser clients through one Rust protocol crate. Default features retain native behavior; portable consumers disable defaults and enable RPC only when needed.

The transport, pqc, and evm re-exports keep client and node on the same underlying types and immutable dependency revisions. Native consumers also receive the signed-payment journal API. Authenticated browser sessions and framing come from saorsa_transport::webrtc; application chunk messages and payment policy remain shared protocol types.

The native EVM re-export now includes finality-aware payment recovery. RPC-only tests exclude native Anvil fixtures, run in CI, and the lockfile retains patched h2 and ruint versions.

Linear issue

Closes V2-803 — Linear issue

Risk tier

  • T0 — docs / tooling / CI / pure UX-output. Repo CI only.
  • T1 — client-only, no network-facing behavior change. CI + prod compat smoke.
  • T2 — node/client logic with behavioral surface, no protocol/format/economics change. Dev testnet + ADR.
  • T3 — protocol / storage format / payments / routing. T2 evidence + adversarial testing.

Proposed for human review.

Compatibility

  • Wire: Existing native chunk, quote, and payment formats are retained. Browser v5 framing/session behavior comes from the coordinated transport dependency.
  • Storage: No stored chunk or DataMap format change.
  • Api: Adds portable feature selection and shared re-exports. Default native APIs remain available; dependency types and the raised Rust 1.91 MSRV require compatibility review.

Semver impact

  • breaking
  • feature
  • fix

Test evidence

Validated on the current revision during this refresh:

  • cargo test --locked --lib: 87 passed.
  • cargo test --locked --no-default-features --features rpc -- --test-threads=1: 83 passed.
  • cargo check --locked --target wasm32-unknown-unknown --no-default-features --features rpc: passed.
  • cargo clippy --locked --all-targets --all-features -- -D warnings: passed.

Native, portable RPC, and WASM consumers resolve the same finalized-journal evmlib revision. The RPC-only test command is also part of CI.

New dependency

Immutable Git revisions of saorsa-core, saorsa-pqc, and evmlib; Tokio and native dependency features are gated. No separate browser protocol or crypto implementation.

ADR

Shared native/browser core ADR-019 and browser transport ADR-015.

Mitigation / rollback

Keep consumers on the default native feature and revert coordinated dependency revisions together.

Coordinated dependencies

Exact immutable revisions are recorded in Cargo.toml and Cargo.lock. Compatible published releases remain a release gate.

Current stack revisions

All PRs link to V2-803. Immutable Git revisions used by the validated stack:

PR Revision
saorsa-pqc#7 29a2b272
evmlib#17 cf424c04
saorsa-transport#160 6f0b1f62
saorsa-core#158 0df7853e
ant-protocol#29 cdae7d19
ant-node#220 26f5fb79
ant-client#186 f1303e1a

EVM recovery now retains ambiguous journals until finalized failure/replacement evidence is available. The protocol and native client include the matching consumer changes. Existing browser wire and payment formats are retained.

Security dependency refresh (2026-09-15)

The shared transport now requires rustls >=0.23.45, fixing RUSTSEC-2026-0285. Affected lockfiles and downstream immutable Git pins are updated. This branch passes cargo check --all-targets --all-features and cargo audit (zero vulnerabilities; existing warning advisories remain).

ICE admission interoperability fix (2026-09-16)

Admission challenges now carry a random nonzero 64-bit ICE-CONTROLLED tie-breaker, stable for the listener lifetime. This removes the zero value that libjuice treats as a missing role attribute. Downstream Git revisions are aligned.

Validation: cargo check --all-targets --all-features passes with the updated pins.

Browser performance dependency refresh (2026-09-16)

Pins now include transport 6f0b1f62, which forwards the admission-completing Binding request to ICE instead of waiting for another client retransmission. The coordinated client caches exact verified signed publications while retaining shared ownership, replacement and witness checks. No additional API, payment or wire changes are introduced by this refresh.

cargo check --no-default-features passed. Full stack measurements and validation.

@mickvandijke mickvandijke changed the title feat: add portable browser protocol surface feat(protocol): share native protocol types and dependencies with WASM clients Sep 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