fix: use pallet-revive's keyless pallet account as the read-only query origin#275
Merged
UtkarshBhardwaj007 merged 1 commit intoJun 4, 2026
Conversation
…y origin
Read-only registry queries (mod browse/metadata, registry username
lookups) previously dry-ran with Alice's dev SS58 as defaultOrigin.
Switch to pallet-revive's own pallet account ("modlpy/reviv" + 20 zero
bytes, 5EYCAe5ij...), matching the QUERY_FALLBACK_ORIGIN that
@parity/product-sdk-contracts adopted in paritytech/product-sdk#152.
The SDK does not export the constant, so the derivation is mirrored
locally. We keep passing it explicitly as defaultOrigin so the SDK's
per-query 'No origin configured' warning never fires inside the TUI.
The registry test now freezes the real SS58 so a regression back to
Alice fails loudly.
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
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.
What
Switch the
defaultOriginused for read-only registry queries (playground modbrowse + metadata-uri lookup, registry username reads) from Alice's dev SS58 to pallet-revive's own keyless pallet account:Why
paritytech/product-sdk#152 replaced the SDK's Alice query-fallback origin with this account: it is semantically meaningful, not tied to a dev seed, and always exists on chain. That fallback never reaches us, though, because the CLI always passes an explicit
defaultOrigin, so our reads kept dry-running as Alice. This aligns the CLI with the SDK's choice.How
QUERY_FALLBACK_ORIGINis not exported from@parity/product-sdk-contracts, so the 3-line derivation is mirrored insrc/utils/registry.ts(verified byte-for-byte against the installed 0.7.0 dist).log.warnper query that would leak into the Ink TUI.registry.test.tsdrops thess58Encode/getDevPublicKeymocks and freezes the real SS58, so a regression back to Alice (or anything else) fails loudly.src/commands/mod/index.tsand the CLAUDE.mdplayground modinvariant; added a patch changeset.Test
pnpm format:check,pnpm lint:license,pnpm test(579/579),pnpm buildall pass.playground mod definitely-not-a-real-app.dotresolves the registry via the CDM meta-registry and theget_appdry-run returns the correct "not found in registry" with the new origin.Follow-up idea (not in this PR): ask product-sdk to export
QUERY_FALLBACK_ORIGINso consumers can import it instead of mirroring the derivation.