spike(ring-vrf): raw proof contexts for local dev builds - #457
Draft
peetzweg wants to merge 1 commit into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-signingmakescreateAccountProoftake 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 ofraw: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 noblake2b("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:
Then pass
{ productId: "raw:", suffix: { tag: "Raw", value: "0x<32 bytes>" } }as the proof context.