Commit 70e88ed
committed
S1: switch baseline-8 chain loader to config/chains/*.json files
Replace the UNIFIED_BLOCKCHAIN_CONFIG heredoc (config_loader.sh:407-654,
247 lines) with file-based discovery from config/chains/<name>.json.
CHANGES:
1. config/config_loader.sh — three edits
* validate_blockchain_node() no longer carries an 8-item hardcoded
supported_blockchains array. It now checks for a config/chains/
<chain>.json file and, on miss, lists every discovered file as
diagnostic output. Adding a new chain means dropping a JSON in.
* generate_auto_config() cache-miss branch reads
"$chains_dir/${blockchain_node_lower}.json" via `jq -c 'del(._meta)'`
instead of `jq -c .blockchains.<name>` against the heredoc string.
`del(._meta)` strips the research/baseline provenance field so the
downstream shape is bytes-equal to the legacy heredoc output.
* UNIFIED_BLOCKCHAIN_CONFIG=$(cat <<'EOF' ... EOF\n) heredoc deleted
in full (-248 lines). No external scripts source-and-reference this
variable (verified by full-repo grep before delete).
2. tools/mock_rpc_server.py — header docstring "Source of truth"
pointer updated to config/chains/<name>.json.
VERIFICATION (all green, no regression):
L1 config parity — for each of solana/ethereum/bsc/base/scroll/polygon/
starknet/sui, `source config_loader.sh + generate_auto_config`
CHAIN_CONFIG output is byte-equal to the snapshot
captured at S0-tools step 2:
✅ 8/8 loaded == baseline (canonical JSON compare, 817-1061 bytes each)
L2 runtime —
✅ tests/smoke_mock_rpc_8chains.sh 8/8 PASS
✅ tools/e2e_smoke_8chain_matrix.sh 8/8 PASS (276s)
L3 e2e (new chain-template-driven matrix) —
✅ tools/e2e_smoke_chain_matrix.sh ONLY=<8 baseline> 8/8 PASS (74s)
with CHAIN_CONFIG gate 8/8 hit and validated
Net file size: config_loader.sh 887 → 662 lines (-225 lines / -25%)
PARALLEL-ENTRY-TRAP CHECKLIST:
* Pre-delete grep of "UNIFIED_BLOCKCHAIN_CONFIG" in *.sh/*.py/*.md
returned 4 hits, all inside config_loader.sh itself + 1 stale comment
in mock_rpc_server.py. Zero external source-and-reference. SAFE to delete.
* After delete, only authority for "what chains exist" is the
config/chains/ directory contents. No second list to drift against.
See analysis-notes/p2-exec/wave-S1.md for full decision table, E1/E5
self-check, and next-step plan (S2 wave A: Bitcoin/Aptos/Cosmos/Cardano/
Polkadot/NEAR).
baseline=5bd01a61 parent 5bd01a6 commit 70e88ed
3 files changed
Lines changed: 159 additions & 264 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
0 commit comments