Fix reaped Polkadot/Kusama test accounts via verified Treasury pallet account

Last remaining balances-test failures (2 of 112): both Polkadot and
Kusama's fixture account (inherited from upstream nova-utils) had
zero balance - reaped since the fixture was last updated, causing
"Balance was null" assertion failures. Not a CI/infra bug, not
related to Tron - genuinely stale test data.

Replaced with the Treasury pallet account (py/trsry) for both chains
- protocol-owned, continuously replenished from fees/inflation, never
reaped. This matches the fixture's own existing pattern (Moonbeam and
Moonriver both already use their crowdloan pallet account, not a
personal wallet).

The account (0x6d6f646c70792f74727372790000000000000000000000000000000000000000)
was independently verified two ways before use: derived by hand
(modl + py/trsry + zero padding) and cross-checked against
@polkadot/api's own derivation - both matched exactly - then its
balance was queried live against wss://rpc.polkadot.io (22,527,885,189,670
free) and wss://kusama-rpc.polkadot.io (25,368,610,181,623 free) to
confirm it's genuinely funded, not just plausible-looking.

Applied via a new pezkuwi-overlay/tests/account_overrides.json,
applied by sync_from_nova.py after the existing chain-filtering step,
rather than hand-editing the generated fixture output (which would be
overwritten on the next sync).
This commit is contained in:
2026-07-08 07:20:51 -07:00
parent 534479d57b
commit 8f74172a1b
3 changed files with 37 additions and 2 deletions
+17
View File
@@ -292,6 +292,12 @@ def sync_tests():
that are blacklisted, testnets that were retired, or otherwise no longer
configured, which would just make every test for that chain fail with
"chain not found" instead of actually testing anything.
Account overrides (pezkuwi-overlay/tests/account_overrides.json) swap in a
replacement account for a chain whose upstream-fixture account has since
been reaped/emptied - each override must be verified live before being
added, not guessed. See that file for details on the accounts currently
in use.
"""
print("\nSyncing tests...")
@@ -310,6 +316,17 @@ def sync_tests():
filtered = [entry for entry in fixture if entry['chainId'] in current_chain_ids]
dropped = len(fixture) - len(filtered)
overrides_file = PEZKUWI_OVERLAY / "tests" / "account_overrides.json"
if overrides_file.exists():
overrides = {o['chainId']: o['account'] for o in load_json(overrides_file)['overrides']}
overridden = 0
for entry in filtered:
if entry['chainId'] in overrides:
entry['account'] = overrides[entry['chainId']]
overridden += 1
if overridden:
print(f" Applied {overridden} account override(s)")
save_json(OUTPUT_TESTS / "chains_for_testBalance.json", filtered)
print(f" chains_for_testBalance.json: {len(fixture)} - {dropped} not in {latest_version.name} = {len(filtered)}")