Skip to content

fix(server): allow Bulletin allocation on wasm - #449

Open
replghost wants to merge 2 commits into
mainfrom
fix/wasm-bulletin-allowance
Open

fix(server): allow Bulletin allocation on wasm#449
replghost wants to merge 2 commits into
mainfrom
fix/wasm-bulletin-allowance

Conversation

@replghost

@replghost replghost commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Problem

truapi-server compiles Bulletin allowance allocation out on wasm32, returning NativeOnly even when a browser host supplies the canonical People/Bulletin runtime services. This prevents the WASM signing host from proving a lite-person ring and claiming long-term Bulletin storage.

Change

  • removes the target-specific allocation stub and compiles the canonical allocator for WASM;
  • uses web-time for the WASM wall clock while native hosts retain std::time::SystemTime;
  • uses the existing statement-renewal and Bulletin RPC services for claim construction, authorization refresh, and bounded waits;
  • records a patch changeset for @parity/truapi-host.

Protocol ownership remains in TrUAPI. Browser hosts only provide the existing chain-service callbacks.

Verification

  • cargo +nightly fmt --check
  • cargo check --target wasm32-unknown-unknown -p truapi-server --no-default-features --features wasm-signing-host
  • cargo test -p truapi-server --all-features: 654 passed
  • Merged Epoca integration PR paritytech/epoca#321
  • Immutable Epoca Linux build: https://github.com/paritytech/epoca/actions/runs/32172498951
  • Live Epoca host-playground: allowance claim passed in 25.3s; preimage lookup in 0.8s; two consecutive signed preimage stores in 9.0s and 6.0s.

@replghost
replghost requested a review from a team August 18, 2026 20:04
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