Commit 56ffbe7
Normalise logs across providers, and say what the server said
Found by solving a real challenge end to end rather than by reading the
code: reconstruct a fund-flow trail over a 200,000-block window under
rules that specify successful-transaction, EOA-at-block, valid-ERC-20-log
and exact-integer arithmetic.
Three defects, each of which produced a confident wrong answer:
A 400 from the RPC endpoint surfaced as "Client error '400 Bad Request'
for url ..." and nothing else. The reason was in the response body, which
the transport discarded. With it included the answer was immediate:
Alchemy's free tier caps `eth_getLogs` at a ten-block range. That is a
five-second fix hidden behind an afternoon of guessing, so the body now
travels with the error.
Blockscout's Etherscan-compatible getLogs pads topics to four with nulls
and omits `blockHash`. A caller applying the ERC-20 rule "exactly three
topics" rejected every record --- fifteen real transfers became zero, and
an empty set does not look like a mistake. Normalised at the provider
boundary, because two providers exist here so one can catch the other
being wrong, and that fails if a caller written against one shape silently
gets a different answer from the other.
Etherscan's `tokentx` is not a substitute for raw logs. Deriving the
token sums from it gave IN=277,433,022,846 against OUT=301,665,542,644;
from logs both are 301,665,542,644, which is the eligibility condition the
task defines. A silently short answer to a set-valued query, which is the
exact failure `Router.corroborate` was built for.
The challenge is now solvable with this package alone, and the arithmetic
balances to the raw unit.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXWQ25VgFeMuuMhGWjvdof1 parent 5ac857c commit 56ffbe7
3 files changed
Lines changed: 110 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 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 | + | |
88 | 115 | | |
89 | 116 | | |
90 | 117 | | |
| |||
454 | 481 | | |
455 | 482 | | |
456 | 483 | | |
457 | | - | |
| 484 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
452 | 470 | | |
453 | 471 | | |
454 | 472 | | |
| |||
| 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 | + | |
0 commit comments