Repository navigation
Commit ddd22df
committed
build: restore Hardhat 2 debug traces in the patch
Hardhat 2 converts EDR's geth-format debug traces back to its legacy
format in the open NomicFoundation/hardhat#7985. EDR's patched Hardhat
2.28.6 lacked that conversion, so EDR CI tested a format that Hardhat 2
no longer returns.
Port the conversion from #7985. The port adds edrRpcDebugTraceToHardhat2
and its StorageTracker to convertToEdr.ts. It wires the memory default,
the empty tracer handling and the result conversion into the provider's
request method. RpcStructLog gains the returnData field. The debug trace
code matches #7985. Outside it, the port keeps EDR's existing patch and
its formatting.
The compiled files come from TypeScript 5.0.4 with the package's own
2.28.6 tsconfig. That compiler reproduces the patched provider.js byte
for byte. The source maps are now regenerated with the code they map.
The revert commit restored the Hardhat 2 format fixtures and reversed
the test hunks of #1251, so the debug tests are green again from here.
assertEqualTraces loses the refund normalisation that only geth's format
needed and the zeroing of call-opcode gas, which EDR now reports as the
fixtures do. It compares returnValue without its prefix, except for a
failed trace whose fixture recorded none. The unsupported tracer tests
expect EDR's rejection of such a tracer as a JavaScript tracer, and
debug_traceTransaction checks the hash first.1 parent d37fdbe commit ddd22df
5 files changed
Lines changed: 841 additions & 84 deletions
File tree
- hardhat-tests/test/internal/hardhat-network/provider
- modules/debug
- utils
- patches
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | | - | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
80 | | - | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 42 | | |
56 | 43 | | |
57 | 44 | | |
| |||
75 | 62 | | |
76 | 63 | | |
77 | 64 | | |
78 | | - | |
| 65 | + | |
79 | 66 | | |
80 | | - | |
81 | | - | |
| 67 | + | |
| 68 | + | |
82 | 69 | | |
83 | 70 | | |
84 | 71 | | |
85 | 72 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 73 | | |
97 | 74 | | |
98 | 75 | | |
| |||
0 commit comments