Skip to content

spike(ring-vrf): raw proof contexts for local dev builds - #457

Draft
peetzweg wants to merge 1 commit into
mainfrom
raw-signing
Draft

spike(ring-vrf): raw proof contexts for local dev builds#457
peetzweg wants to merge 1 commit into
mainfrom
raw-signing

Conversation

@peetzweg

@peetzweg peetzweg commented Aug 19, 2026

Copy link
Copy Markdown
Member

Draft, not for merge. Opening it so the tradeoff is visible rather than living in a local branch, and so the branch has a name people can be pointed at.

raw-signing makes createAccountProof take 32 raw bytes as the proof context verbatim, instead of hashing them into the calling product's namespace. It is 41 lines in one file, gated twice: TRUAPI_RAW_PROOF_CONTEXT=1, and a product id of raw: which dotNS cannot issue.

Why: a runtime whose ring-VRF contexts are string literals, such as pop:polkadot.network/score, cannot be reached from a product at all, because no blake2b("product/…") hash can equal one. We used this to run the lite free-play flow end to end on nextv2 and establish which parts already work.

To build it:

git fetch origin raw-signing && git checkout raw-signing
cargo install --path rust/crates/truapi-host-cli --locked
TRUAPI_RAW_PROOF_CONTEXT=1 truapi-host signing-host --network paseo-next-v2 ...

Then pass { productId: "raw:", suffix: { tag: "Raw", value: "0x<32 bytes>" } } as the proof context.

The chain checks a lite-alias proof's context against its own constants
(pop:polkadot.network/score for the game), and no blake2b("product/<id>/…")
can equal one, so the whole lite free-play flow is unrunnable end to end
before individuality#1247 aligns them. This lets a caller name the 32 bytes
directly, gated on an env var no released host sets and a product id dotNS
cannot issue.

Not for release: a host that honours it lets a product mint a proof in a
context it does not own, which is the property the derivation guarantees. It
exists so the flow could be run once, which it now has been - both legs land
on nextv2.
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