Skip to content

feat(server): make the reserved people rings usable without registration - #371

Open
filvecchiato wants to merge 24 commits into
mainfrom
feat/reserved-people-ring-keys
Open

feat(server): make the reserved people rings usable without registration#371
filvecchiato wants to merge 24 commits into
mainfrom
feat/reserved-people-ring-keys

Conversation

@filvecchiato

Copy link
Copy Markdown
Collaborator

Follow-up to #360, addressing @valentunn's review note: keep the well-known light/full people ring keys usable so other products can use ring-VRF features until Humanity takes over key management.

Stacked on codex/rfc0024-integration — the diff only reads clean once #360 merges.

What it does

PeopleCollection names the two reserved peopl.dot rings and maps each to its 32-byte collection id, its derivation index and its ring location on the configured People chain:

collection id handle
full pop:polkadot.network/people (space-padded) peopl.dot index 0
lite pop:polkadot.network/people-lite peopl.dot index 1

Both are listed, resolvable for proofs and signatures, offered as providers and selectable as one — no RFC-0024 registration required. A ring outside either collection still falls through to the registry, so an explicit registration continues to decide whether a handle covers it.

A reserved member key identifies which ring member the user is, so it is disclosed only to peopl.dot itself. Other callers receive the handle and its declared ring, which is what provider selection needs.

Reserved handles are recognised through their derived index bytes, so a Raw index naming the same key resolves the same way. statement_allowance::ring reads the lite collection id from the shared constant instead of repeating the literal.

Verification

cargo +nightly fmt --check and cargo clippy -p truapi-server -p truapi --all-targets --all-features -- -D warnings are clean. cargo test --workspace --all-features passes, 514 in truapi-server.

Both native hosts were checked for parity. The collection ids match Android (RingCollectionId.paddedString) and iOS (PeoplePallet+Members.swift) byte for byte. Both key these rings off the account holding them rather than a derivation index, so member keys are not portable across hosts — only the collection ids are shared. Neither host has a registration step, and neither exposes a personhood-active signal this core could gate on, so both collections are offered unconditionally and ring membership stays a chain question.

Separate finding for #360

HostAccountCreateProofError and HostAccountGetAliasError gain three variants ahead of Rejected and Unknown, shifting their SCALE discriminants. triangle-js-sdks carries the four-variant form (packages/host-api/src/protocol/v1/accounts.ts), so against a host on that branch a declined proof decodes to nothing and KeyNotRegistered reads as Rejected. Appending the new variants, or pinning #[codec(index = N)], avoids it. Not addressed here.

valentunn and others added 24 commits July 30, 2026 18:45
This branch forked before chain.get_chain_info landed on main claiming
request id 166, so the three RFC-0024 account methods were allocated the
same id. Shift them to 168/170/172 and leave 166 free for the chain
method arriving on merge.

Regenerates the server wire table and updates the codegen golden.
Chain the two follow-alias resolvers in chain_runtime so a product-scoped
alias resolves against pending intents and awaits setup before binding to
the transport follow. Point the getAccountAlias example at
chain.getChainInfo, and reach the platform through RuntimeServices in the
ring VRF paths. Wire ids: chain.getChainInfo 166, ring VRF 168/170/172.
Resolve through the connection's sticky alias binding first, so pending
intents only cover a request that beats follow setup. A second follow on
a chain made the intent lookup ambiguous and failed every aliased
operation on it.
PeopleCollection names the two reserved peopl.dot rings, mapping each to
its 32-byte collection id, derivation index and ring location. Both are
listed, resolvable for proofs and signatures, and selectable as providers
without an RFC-0024 registration.

Reserved member keys are disclosed only to peopl.dot; other callers get
the handle and its ring. Rings outside a collection still fall through to
the registry.
@filvecchiato
filvecchiato requested review from a team August 12, 2026 12:50
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.

4 participants