feat(individuality): buildLiteAliasBindTx encodes the lite bind leg client-side - #352
Open
peetzweg wants to merge 1 commit into
Open
feat(individuality): buildLiteAliasBindTx encodes the lite bind leg client-side#352peetzweg wants to merge 1 commit into
peetzweg wants to merge 1 commit into
Conversation
…lient-side The bind leg of the lite sign-up — PeopleLite.set_alias_account under PeopleLiteAuth::AsLiteAliasWithProof — is an unsigned V5 general extrinsic (origin None), so it can ride neither a PolkadotSigner nor the host's createTransaction dialects. With the extension pipeline read from the chain's own metadata the SDK now assembles the whole extrinsic itself: compact(len) ++ 0x45 ++ extensionVersion ++ extras ++ call, with every extra holding the value a general transaction needs (RestrictOrigins enabled, VerifyMultiSignature Disabled, immortal era, zero nonce and tip, every origin Option slot None) and the ring-VRF proof minted over the implication after PeopleLiteAuth. The layout reproduces the encoding verified live on previewnet (spec 1000036) and is pinned byte for byte against the previewnet and paseo blobs; devnet's pre-revision PeopleLiteAuth is a loud error.
5 tasks
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.
Stacked on #348. The bind leg of the lite sign-up (#354):
PeopleLite.set_alias_accountas an unsigned V5 general extrinsic, encoded entirely client-side.Why: the bind leg has origin
None— no signature, nothing to sign — so it needs neither aPolkadotSignernor a hostcreateTransaction(whose per-host dialects are exactly what bit us before). And becauseaccountis a plain call parameter, this is the call that lets the personhood product vouch for another product's account.How:
buildLiteAliasBindTx(chain, { account, createProof })reads the extension pipeline from the chain's own metadata, fills every slot from a table of general-transaction defaults (VerifyMultiSignature=Disabled,RestrictOrigins=true, immortal era so the implicit is the genesis hash, nonce 0 — each probed against the real blobs), computes the proof message as blake2-256 of the implication afterPeopleLiteAuth, and assemblescompact(len) ++ 0x45 ++ extVersion ++ extras ++ call. All extension encoding reuses thewithLiteAliasmachinery; call bytes come from the caller's typed PAPI tx, so no call index is hand-rolled. Returns finished extrinsic bytes for any raw submit. One judgment call: immortal era + nonce 0 instead of the live run's mortal/real values — both are pass-throughs for aNoneorigin, and immortal spares a block-hash fetch.Full extrinsic pinned byte-for-byte against a hand-written per-slot hex table on the previewnet blob (spec 1000036 — the chain the flow ran live on) and paseo; devnet (pre-
RevisionIndex) is the loud-failure negative. 468 package tests pass; workspace tests + typecheck + biome clean.