Commit 59d4901
fix(clickhouse): nullable storage_key on canonical_beacon_block_access_list
balance/nonce/code/touched access-list changes carry no storage slot. The
column was a non-nullable FixedString(66) and the route appended nil for
them, which zero-pads to 66 raw NUL bytes rather than NULL: ~48.9M rows on
glamsterdam-devnet-7. Those values are not valid hex, so
startsWith(storage_key, '0x') misses them and they render as garbage in
exports and Grafana.
storage_key is part of the table's ORDER BY, so the type cannot be changed
by ALTER. The fix is applied to the original 006 table definition instead,
with allow_nullable_key = 1 (already used in 001_init) so existing devnet
data can be migrated by a rebuild rather than in place.
The zero hash was rejected as a sentinel because storage_read legitimately
has 2.3M rows at real storage slot 0x000..0, which NULL keeps distinct.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 1669229 commit 59d4901
4 files changed
Lines changed: 21 additions & 10 deletions
File tree
- deploy/migrations/clickhouse/xatu
- pkg/clickhouse/route/canonical
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | | - | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
0 commit comments