Surface accounts the chain names, and make genesis unmissable #2

Closed
opened 2026-09-10 05:56:35 +00:00 by grenade · 0 comments
Owner

What

Some accounts are special, and nothing on the site says so. The treasury looks
like any other empty address; the minting sentinel looks like a wallet; the
twenty-one accounts endowed at genesis look like they earned it.

Everything needed is already on the chain, and the chain names them itself — so
this needs no curated list, and a pallet added next year gets its accounts
labelled for free.

The three sources, which are three different claims

named by a runtime constant   MiningRewards::MintingAccount    0x0101…0101
                              Wormhole::MintingAccount         0x0101…0101  (same address)
named by chain state          TreasuryPallet::TreasuryAccount  0x12d0…1cb7
endowed at genesis            21 System::Account entries at block 0

They must not be flattened into one badge:

  • Named by the runtime — baked into the code, immutable for that
    spec_version.
  • Named by state — assigned, and changeable. set_treasury_account exists
    precisely to change it (root only, never dispatched here).
  • Endowed at genesis — permanent history, and not a role. An account can
    be endowed and have no job.

Note the treasury is not among the endowed, so "named as treasury, never
funded" becomes a stated fact rather than something a reader notices by accident.

Scope

  1. Coredecode_storage already builds the set of AccountId32 values it
    saw and throws it away. Expose it, and do the same for constants. This is the
    only correct way to tell an account from a hash: after normalise both are
    0x + 64 hex, and filtering by shape wrongly catches System::ParentHash
    and ZkTree::Root.
  2. Datastorage_keys_paged needs an at hash so genesis can be
    enumerated. Genesis state needs an archive node; bob is archive-canonical,
    but the endowed set never changes, so read it once and hold it rather than
    depending on that forever.
  3. API/v1/chains/:chain/roles (every named account, what names it,
    whether it holds anything) and /v1/chains/:chain/genesis (endowments plus
    genesis facts). AccountDetail gains the roles for that account.
  4. Web
    • A chip wherever an account appears — TREASURY, MINTING, GENESIS — in
      the same visual language as the existing node? / elsewhere / You
      chips.
    • A callout on the account page carrying the citation, because the chip
      is the claim and the citation is the evidence.
    • A roles index.
    • Block zero is a special page. Endowments happen there and are invisible
      to anyone who has not read the chainspec. /:chain/block/0 should surface
      them.
    • A Genesis link in the chain nav routing straight to block zero, so
      somebody who would never think to look is given an unmissable opportunity
      to.

Constraints

  • Identify accounts by registry path, never by shape. See item 1.
  • A chip states what the chain says; it does not endorse.
    MintingAccount is 0x0101…0101 — a sentinel with no System::Account entry
    at all, not a wallet. Label it as what the runtime calls it and let the empty
    balance speak. Anything warmer would be the site vouching for an address,
    which it has no standing to do.
  • A label must be derived from the chain's own name for the thing
    (TreasuryPallet::TreasuryAccountTREASURY), never invented.
## What Some accounts are special, and nothing on the site says so. The treasury looks like any other empty address; the minting sentinel looks like a wallet; the twenty-one accounts endowed at genesis look like they earned it. Everything needed is already on the chain, and the chain names them itself — so this needs **no curated list**, and a pallet added next year gets its accounts labelled for free. ## The three sources, which are three different claims ``` named by a runtime constant MiningRewards::MintingAccount 0x0101…0101 Wormhole::MintingAccount 0x0101…0101 (same address) named by chain state TreasuryPallet::TreasuryAccount 0x12d0…1cb7 endowed at genesis 21 System::Account entries at block 0 ``` They must not be flattened into one badge: - **Named by the runtime** — baked into the code, immutable for that `spec_version`. - **Named by state** — assigned, and changeable. `set_treasury_account` exists precisely to change it (root only, never dispatched here). - **Endowed at genesis** — permanent history, and *not a role*. An account can be endowed and have no job. Note the treasury is **not** among the endowed, so "named as treasury, never funded" becomes a stated fact rather than something a reader notices by accident. ## Scope 1. **Core** — `decode_storage` already builds the set of `AccountId32` values it saw and throws it away. Expose it, and do the same for constants. This is the only correct way to tell an account from a hash: after `normalise` both are `0x` + 64 hex, and filtering by shape wrongly catches `System::ParentHash` and `ZkTree::Root`. 2. **Data** — `storage_keys_paged` needs an `at` hash so genesis can be enumerated. Genesis state needs an archive node; bob is `archive-canonical`, but the endowed set never changes, so read it once and hold it rather than depending on that forever. 3. **API** — `/v1/chains/:chain/roles` (every named account, what names it, whether it holds anything) and `/v1/chains/:chain/genesis` (endowments plus genesis facts). `AccountDetail` gains the roles for that account. 4. **Web** - A chip wherever an account appears — `TREASURY`, `MINTING`, `GENESIS` — in the same visual language as the existing `node?` / `elsewhere` / `You` chips. - A callout on the account page carrying the **citation**, because the chip is the claim and the citation is the evidence. - A roles index. - **Block zero is a special page.** Endowments happen there and are invisible to anyone who has not read the chainspec. `/:chain/block/0` should surface them. - **A `Genesis` link in the chain nav** routing straight to block zero, so somebody who would never think to look is given an unmissable opportunity to. ## Constraints - **Identify accounts by registry path, never by shape.** See item 1. - **A chip states what the chain says; it does not endorse.** `MintingAccount` is `0x0101…0101` — a sentinel with no `System::Account` entry at all, not a wallet. Label it as what the runtime calls it and let the empty balance speak. Anything warmer would be the site vouching for an address, which it has no standing to do. - A label must be derived from the chain's own name for the thing (`TreasuryPallet::TreasuryAccount` → `TREASURY`), never invented.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blackbeard/observer#2