feat: a network page — supply, capability and daily activity
The site answered "who is mining" thoroughly and "what is this economy doing"
not at all. Everything needed was already reachable and none of it was
assembled anywhere.
Measured against mainnet rather than assumed:
total issuance 5,682,913.17 QTC
endowed at genesis 5,670,000.00 QTC
mined since 12,913.17 QTC <- emission to date, printed nowhere else
accounts 1,925 counted, not inferred from indexed events
locks/holds/freezes/reserves 0 all four, counted
vesting schedules 48
referenda 0
reversible transfers 0
calls used 7 of 58
events fired 18 of 107
**No "circulating supply" field, deliberately.** With every immobilising map
empty it would equal total issuance exactly, and printing it as a separate
headline would assert a distinction this chain does not currently make. The page
states what was counted and lets that be read. Vesting is a count rather than a
sum for the same reason: this runtime's vesting does not touch the balances
locks, so what it holds and when it releases would be a guess.
**Signed extrinsics are separated from the total**, because three quarters of
this chain's extrinsics are inherents — 513 signed of 2,052 on the day measured
— and a single "transactions per day" line would be mostly clockwork, a number
that reads as adoption and is not.
Two kinds of certainty share the page and are kept apart. Supply and the map
sizes are chain state, read now. The daily activity is our index, and the
Activity panel prints the range it covered and says "the whole chain" or "a
partial index" — a chart whose axis claims a month over a week of data is the
failure this repository has already shipped twice.
One thing found while building it: a counter that has never moved is *absent*
from storage, not zero. `TechReferenda::ReferendumCount` and
`ReversibleTransfers::NextTransactionId` both read as nothing, and reporting
them unknown would have hidden the most interesting fact about them — that
governance and reversible transfers are shipped and have never been used.
`plain_value` falls back to the entry's declared default, which is only sound
because `StorageTarget` says whether it is `Default` or `Optional`.
Refs #17
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5
This commit is contained in:
65
.sqlx/query-55088480d69f66f04286a74bc2b98c260c2f1f5020c29ebce6f183b5098c4614.json
generated
Normal file
65
.sqlx/query-55088480d69f66f04286a74bc2b98c260c2f1f5020c29ebce6f183b5098c4614.json
generated
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n with span as (\n select generate_series(\n date_trunc('day', now()) - make_interval(days => $2::int - 1),\n date_trunc('day', now()),\n interval '1 day'\n ) as day\n ),\n blocks as (\n select date_trunc('day', authored_at) as day,\n count(*) as blocks,\n count(distinct miner) as miners\n from block\n where chain = $1 and authored_at is not null\n group by 1\n ),\n calls as (\n select date_trunc('day', at) as day,\n count(*) as extrinsics,\n count(*) filter (where signer is not null) as signed,\n count(distinct signer) as signers\n from chain_extrinsic\n where chain = $1 and at is not null\n group by 1\n ),\n events as (\n select date_trunc('day', at) as day, count(*) as events\n from chain_event\n where chain = $1 and at is not null\n group by 1\n ),\n -- An account's first appearance anywhere in the indexed record. Only\n -- honest on a chain indexed from genesis; on a partial index this is\n -- \"first seen by us\", which is why the caller reports the range.\n first_seen as (\n select account, min(at) as first_at\n from (\n select unnest(accounts) as account, at from chain_event\n where chain = $1 and at is not null\n union all\n select unnest(accounts) as account, at from chain_extrinsic\n where chain = $1 and at is not null\n ) seen\n group by account\n ),\n arrivals as (\n select date_trunc('day', first_at) as day, count(*) as new_accounts\n from first_seen\n group by 1\n )\n select span.day as \"day!\",\n coalesce(blocks.blocks, 0) as \"blocks!\",\n coalesce(blocks.miners, 0) as \"miners!\",\n coalesce(calls.extrinsics, 0) as \"extrinsics!\",\n coalesce(calls.signed, 0) as \"signed!\",\n coalesce(calls.signers, 0) as \"signers!\",\n coalesce(events.events, 0) as \"events!\",\n coalesce(arrivals.new_accounts, 0) as \"new_accounts!\"\n from span\n left join blocks on blocks.day = span.day\n left join calls on calls.day = span.day\n left join events on events.day = span.day\n left join arrivals on arrivals.day = span.day\n order by span.day asc\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "day!",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "blocks!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "miners!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "extrinsics!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "signed!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "signers!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "events!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "new_accounts!",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "55088480d69f66f04286a74bc2b98c260c2f1f5020c29ebce6f183b5098c4614"
|
||||
}
|
||||
Reference in New Issue
Block a user