The route then does .unwrap_or_default(), so the error becomes an empty page.
It does not look broken — it looks like a chain with nothing in flight, which is
exactly what mainnet legitimately looks like. This would have shipped and stayed
wrong indefinitely.
Found only because ReversibleTransfers::NextTransactionId is a plain counter
and reads 5 on Heisenberg, which contradicted the page.
Why it did not show up in testing
GENESIS_LIMIT is 500, under the cap, so genesis enumeration worked and gave
false confidence in the machinery. The System::Account verification also used
a small count. Every path that was checked happened to be under 1,000.
Fix
Clamp count in storage_keys_paged — 1,000 is a protocol limit, not a
caller's preference, so it belongs in the one place that knows about the RPC
rather than in each caller's constant.
Stop swallowing the error. An enumeration that fails is not an empty map.
A chain whose runtime lacks the pallet already returns 404, so a failure here
is a real fault and should say so.
Page properly rather than truncating at one request, so a map larger than
1,000 entries is complete rather than quietly cut off.
Note
The same silent shape is worth grepping for: unwrap_or_default() on anything
that talks to a node turns "could not ask" into "the answer is nothing", and the
two are never the same.
## What
`/heisenberg/reversible` reports **0 pending**. The chain has **2**.
`PENDING_LIMIT` is 1,600 and `state_getKeysPaged` caps `count` at 1,000:
```
count=20 -> 2 keys
count=1000 -> 2 keys
count=1600 -> ERROR 4002 "count exceeds maximum value. value: 1600, max: 1000"
```
The route then does `.unwrap_or_default()`, so the error becomes an empty page.
It does not look broken — it looks like a chain with nothing in flight, which is
exactly what mainnet legitimately looks like. This would have shipped and stayed
wrong indefinitely.
Found only because `ReversibleTransfers::NextTransactionId` is a plain counter
and reads `5` on Heisenberg, which contradicted the page.
## Why it did not show up in testing
`GENESIS_LIMIT` is 500, under the cap, so genesis enumeration worked and gave
false confidence in the machinery. The `System::Account` verification also used
a small count. Every path that was checked happened to be under 1,000.
## Fix
1. Clamp `count` in `storage_keys_paged` — 1,000 is a protocol limit, not a
caller's preference, so it belongs in the one place that knows about the RPC
rather than in each caller's constant.
2. **Stop swallowing the error.** An enumeration that fails is not an empty map.
A chain whose runtime lacks the pallet already returns 404, so a failure here
is a real fault and should say so.
3. Page properly rather than truncating at one request, so a map larger than
1,000 entries is complete rather than quietly cut off.
## Note
The same silent shape is worth grepping for: `unwrap_or_default()` on anything
that talks to a node turns "could not ask" into "the answer is nothing", and the
two are never the same.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
/heisenberg/reversiblereports 0 pending. The chain has 2.PENDING_LIMITis 1,600 andstate_getKeysPagedcapscountat 1,000:The route then does
.unwrap_or_default(), so the error becomes an empty page.It does not look broken — it looks like a chain with nothing in flight, which is
exactly what mainnet legitimately looks like. This would have shipped and stayed
wrong indefinitely.
Found only because
ReversibleTransfers::NextTransactionIdis a plain counterand reads
5on Heisenberg, which contradicted the page.Why it did not show up in testing
GENESIS_LIMITis 500, under the cap, so genesis enumeration worked and gavefalse confidence in the machinery. The
System::Accountverification also useda small count. Every path that was checked happened to be under 1,000.
Fix
countinstorage_keys_paged— 1,000 is a protocol limit, not acaller's preference, so it belongs in the one place that knows about the RPC
rather than in each caller's constant.
A chain whose runtime lacks the pallet already returns 404, so a failure here
is a real fault and should say so.
1,000 entries is complete rather than quietly cut off.
Note
The same silent shape is worth grepping for:
unwrap_or_default()on anythingthat talks to a node turns "could not ask" into "the answer is nothing", and the
two are never the same.