hardhat 2.16.0-dev.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/builtin-tasks/compile.js +18 -18
  2. package/builtin-tasks/compile.js.map +1 -1
  3. package/console.sol +3 -4
  4. package/internal/cli/analytics.d.ts +6 -6
  5. package/internal/cli/analytics.d.ts.map +1 -1
  6. package/internal/cli/analytics.js +43 -115
  7. package/internal/cli/analytics.js.map +1 -1
  8. package/internal/cli/bootstrap.js +0 -0
  9. package/internal/cli/cli.js +1 -1
  10. package/internal/cli/cli.js.map +1 -1
  11. package/internal/core/jsonrpc/types/input/blockTag.d.ts +3 -3
  12. package/internal/core/jsonrpc/types/input/filterRequest.d.ts +6 -6
  13. package/package.json +1 -3
  14. package/src/builtin-tasks/compile.ts +43 -35
  15. package/src/internal/cli/analytics.ts +82 -134
  16. package/src/internal/cli/cli.ts +1 -1
  17. package/internal/core/config/extenders.d.ts +0 -7
  18. package/internal/core/config/extenders.d.ts.map +0 -1
  19. package/internal/core/config/extenders.js +0 -16
  20. package/internal/core/config/extenders.js.map +0 -1
  21. package/internal/hardhat-network/provider/RethnetState.d.ts +0 -29
  22. package/internal/hardhat-network/provider/RethnetState.d.ts.map +0 -1
  23. package/internal/hardhat-network/provider/RethnetState.js +0 -110
  24. package/internal/hardhat-network/provider/RethnetState.js.map +0 -1
  25. package/internal/hardhat-network/provider/utils/bloom.d.ts +0 -32
  26. package/internal/hardhat-network/provider/utils/bloom.d.ts.map +0 -1
  27. package/internal/hardhat-network/provider/utils/bloom.js +0 -79
  28. package/internal/hardhat-network/provider/utils/bloom.js.map +0 -1
  29. package/internal/hardhat-network/provider/utils/convertToRethnet.d.ts +0 -17
  30. package/internal/hardhat-network/provider/utils/convertToRethnet.d.ts.map +0 -1
  31. package/internal/hardhat-network/provider/utils/convertToRethnet.js +0 -390
  32. package/internal/hardhat-network/provider/utils/convertToRethnet.js.map +0 -1
  33. package/internal/hardhat-network/provider/vm/block-builder/dual.d.ts +0 -14
  34. package/internal/hardhat-network/provider/vm/block-builder/dual.d.ts.map +0 -1
  35. package/internal/hardhat-network/provider/vm/block-builder/dual.js +0 -47
  36. package/internal/hardhat-network/provider/vm/block-builder/dual.js.map +0 -1
  37. package/internal/hardhat-network/provider/vm/block-builder/hardhat.d.ts +0 -27
  38. package/internal/hardhat-network/provider/vm/block-builder/hardhat.d.ts.map +0 -1
  39. package/internal/hardhat-network/provider/vm/block-builder/hardhat.js +0 -136
  40. package/internal/hardhat-network/provider/vm/block-builder/hardhat.js.map +0 -1
  41. package/internal/hardhat-network/provider/vm/block-builder/rethnet.d.ts +0 -20
  42. package/internal/hardhat-network/provider/vm/block-builder/rethnet.d.ts.map +0 -1
  43. package/internal/hardhat-network/provider/vm/block-builder/rethnet.js +0 -55
  44. package/internal/hardhat-network/provider/vm/block-builder/rethnet.js.map +0 -1
  45. package/internal/hardhat-network/provider/vm/block-builder.d.ts +0 -19
  46. package/internal/hardhat-network/provider/vm/block-builder.d.ts.map +0 -1
  47. package/internal/hardhat-network/provider/vm/block-builder.js +0 -24
  48. package/internal/hardhat-network/provider/vm/block-builder.js.map +0 -1
  49. package/internal/hardhat-network/provider/vm/creation.d.ts +0 -10
  50. package/internal/hardhat-network/provider/vm/creation.d.ts.map +0 -1
  51. package/internal/hardhat-network/provider/vm/creation.js +0 -29
  52. package/internal/hardhat-network/provider/vm/creation.js.map +0 -1
  53. package/internal/hardhat-network/provider/vm/dual.d.ts +0 -43
  54. package/internal/hardhat-network/provider/vm/dual.d.ts.map +0 -1
  55. package/internal/hardhat-network/provider/vm/dual.js +0 -487
  56. package/internal/hardhat-network/provider/vm/dual.js.map +0 -1
  57. package/internal/hardhat-network/provider/vm/ethereumjs.d.ts +0 -61
  58. package/internal/hardhat-network/provider/vm/ethereumjs.d.ts.map +0 -1
  59. package/internal/hardhat-network/provider/vm/ethereumjs.js +0 -517
  60. package/internal/hardhat-network/provider/vm/ethereumjs.js.map +0 -1
  61. package/internal/hardhat-network/provider/vm/exit.d.ts +0 -24
  62. package/internal/hardhat-network/provider/vm/exit.d.ts.map +0 -1
  63. package/internal/hardhat-network/provider/vm/exit.js +0 -140
  64. package/internal/hardhat-network/provider/vm/exit.js.map +0 -1
  65. package/internal/hardhat-network/provider/vm/rethnet.d.ts +0 -87
  66. package/internal/hardhat-network/provider/vm/rethnet.d.ts.map +0 -1
  67. package/internal/hardhat-network/provider/vm/rethnet.js +0 -262
  68. package/internal/hardhat-network/provider/vm/rethnet.js.map +0 -1
  69. package/internal/hardhat-network/provider/vm/vm-adapter.d.ts +0 -53
  70. package/internal/hardhat-network/provider/vm/vm-adapter.d.ts.map +0 -1
  71. package/internal/hardhat-network/provider/vm/vm-adapter.js +0 -3
  72. package/internal/hardhat-network/provider/vm/vm-adapter.js.map +0 -1
@@ -1,487 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DualModeAdapter = void 0;
4
- const ethereumjs_util_1 = require("@nomicfoundation/ethereumjs-util");
5
- const errors_1 = require("../../../core/errors");
6
- const message_trace_1 = require("../../stack-traces/message-trace");
7
- const opcodes_1 = require("../../stack-traces/opcodes");
8
- const vm_tracer_1 = require("../../stack-traces/vm-tracer");
9
- const node_types_1 = require("../node-types");
10
- const ForkStateManager_1 = require("../fork/ForkStateManager");
11
- const assertions_1 = require("../utils/assertions");
12
- const ethereumjs_1 = require("./ethereumjs");
13
- const rethnet_1 = require("./rethnet");
14
- const dual_1 = require("./block-builder/dual");
15
- /* eslint-disable @nomiclabs/hardhat-internal-rules/only-hardhat-error */
16
- /* eslint-disable @typescript-eslint/restrict-template-expressions */
17
- function _printTrace(trace) {
18
- console.log(JSON.stringify(trace, function (key, value) {
19
- if (key === "op") {
20
- return (0, opcodes_1.opcodeName)(value);
21
- }
22
- else if (typeof value === "bigint") {
23
- return value.toString();
24
- }
25
- else {
26
- return value;
27
- }
28
- }, 2));
29
- }
30
- class DualModeAdapter {
31
- constructor(_ethereumJSAdapter, _rethnetAdapter, _ethereumJSVMTracer, _rethnetVMTracer) {
32
- this._ethereumJSAdapter = _ethereumJSAdapter;
33
- this._rethnetAdapter = _rethnetAdapter;
34
- this._ethereumJSVMTracer = _ethereumJSVMTracer;
35
- this._rethnetVMTracer = _rethnetVMTracer;
36
- }
37
- static async create(common, blockchain, config, selectHardfork) {
38
- const ethereumJSAdapter = await ethereumjs_1.EthereumJSAdapter.create(common, blockchain, config, selectHardfork);
39
- // If the fork node config doesn't specify a block number, then the
40
- // ethereumjs adapter will fetch and use the latest block number. We re-use
41
- // that value here; otherwise, rethnet would also fetch it and we could have
42
- // a race condition if the latest block changed in the meantime.
43
- if ((0, node_types_1.isForkedNodeConfig)(config) &&
44
- config.forkConfig.blockNumber === undefined) {
45
- const forkBlockNumber = ethereumJSAdapter.getForkBlockNumber();
46
- config.forkConfig.blockNumber = parseInt(forkBlockNumber.toString(10), 10);
47
- }
48
- const rethnetAdapter = await rethnet_1.RethnetAdapter.create(config, selectHardfork, async (blockNumber) => {
49
- const block = await blockchain.getBlock(blockNumber);
50
- (0, errors_1.assertHardhatInvariant)(block !== null, "Should be able to get block");
51
- return block.header.hash();
52
- }, common);
53
- const ethereumJSVMTracer = new vm_tracer_1.VMTracer(common, false);
54
- const rethnetVMTracer = new vm_tracer_1.VMTracer(common, false);
55
- return new DualModeAdapter(ethereumJSAdapter, rethnetAdapter, ethereumJSVMTracer, rethnetVMTracer);
56
- }
57
- async dryRun(tx, blockContext, forceBaseFeeZero) {
58
- const [[ethereumJSResult, _ethereumJSTrace], [rethnetResult, rethnetTrace],] = await Promise.all([
59
- this._ethereumJSAdapter.dryRun(tx, blockContext, forceBaseFeeZero),
60
- this._rethnetAdapter.dryRun(tx, blockContext, forceBaseFeeZero),
61
- ]);
62
- // Matches EthereumJS' runCall checkpoint call
63
- rethnet_1.globalRethnetContext.setHashGeneratorSeed((0, ForkStateManager_1.randomHashSeed)());
64
- try {
65
- (0, assertions_1.assertEqualRunTxResults)(ethereumJSResult, rethnetResult);
66
- return [rethnetResult, rethnetTrace];
67
- }
68
- catch (e) {
69
- // if the results didn't match, print the traces
70
- // console.log("EthereumJS trace");
71
- // printEthereumJSTrace(ethereumJSTrace);
72
- // console.log();
73
- // console.log("Rethnet trace");
74
- // printRethnetTrace(rethnetTrace);
75
- throw e;
76
- }
77
- }
78
- async getStateRoot() {
79
- const ethereumJSRoot = await this._ethereumJSAdapter.getStateRoot();
80
- const rethnetRoot = await this._rethnetAdapter.getStateRoot();
81
- if (!ethereumJSRoot.equals(rethnetRoot)) {
82
- console.trace(`Different state root: ${ethereumJSRoot.toString("hex")} (ethereumjs) !== ${rethnetRoot.toString("hex")} (rethnet)`);
83
- await this.printState();
84
- throw new Error("Different state root");
85
- }
86
- return rethnetRoot;
87
- }
88
- async getAccount(address) {
89
- const ethereumJSAccount = await this._ethereumJSAdapter.getAccount(address);
90
- const rethnetAccount = await this._rethnetAdapter.getAccount(address);
91
- assertEqualAccounts(address, ethereumJSAccount, rethnetAccount);
92
- return rethnetAccount;
93
- }
94
- async getContractStorage(address, key) {
95
- const ethereumJSStorageSlot = await this._ethereumJSAdapter.getContractStorage(address, key);
96
- const rethnetStorageSlot = await this._rethnetAdapter.getContractStorage(address, key);
97
- if (!ethereumJSStorageSlot.equals(rethnetStorageSlot)) {
98
- // we only throw if any of the returned values was non-empty, but
99
- // ethereumjs and rethnet return different values when that happens
100
- if (ethereumJSStorageSlot.length !== 0 ||
101
- !rethnetStorageSlot.equals(Buffer.from([0x00]))) {
102
- console.trace(`Different storage slot: ${(0, ethereumjs_util_1.bufferToHex)(ethereumJSStorageSlot)} (ethereumjs) !== ${(0, ethereumjs_util_1.bufferToHex)(rethnetStorageSlot)} (rethnet)`);
103
- throw new Error("Different storage slot");
104
- }
105
- }
106
- return rethnetStorageSlot;
107
- }
108
- async getContractCode(address) {
109
- const ethereumJSCode = await this._ethereumJSAdapter.getContractCode(address);
110
- const rethnetCode = await this._rethnetAdapter.getContractCode(address);
111
- if (!ethereumJSCode.equals(rethnetCode)) {
112
- console.trace(`Different contract code: ${ethereumJSCode.toString("hex")} (ethereumjs) !== ${rethnetCode.toString("hex")} (rethnet)`);
113
- throw new Error("Different contract code");
114
- }
115
- return rethnetCode;
116
- }
117
- async putAccount(address, account) {
118
- await this._ethereumJSAdapter.putAccount(address, account);
119
- await this._rethnetAdapter.putAccount(address, account);
120
- }
121
- async putContractCode(address, value) {
122
- await this._ethereumJSAdapter.putContractCode(address, value);
123
- await this._rethnetAdapter.putContractCode(address, value);
124
- }
125
- async putContractStorage(address, key, value) {
126
- await this._ethereumJSAdapter.putContractStorage(address, key, value);
127
- await this._rethnetAdapter.putContractStorage(address, key, value);
128
- }
129
- async restoreContext(stateRoot) {
130
- await this._ethereumJSAdapter.restoreContext(stateRoot);
131
- await this._rethnetAdapter.restoreContext(stateRoot);
132
- }
133
- async traceTransaction(hash, block, config) {
134
- return this._ethereumJSAdapter.traceTransaction(hash, block, config);
135
- }
136
- async setBlockContext(block, irregularStateOrUndefined) {
137
- await this._ethereumJSAdapter.setBlockContext(block, irregularStateOrUndefined);
138
- await this._rethnetAdapter.setBlockContext(block, irregularStateOrUndefined);
139
- }
140
- async runTxInBlock(tx, block) {
141
- const [[ethereumJSResult, ethereumJSDebugTrace], [rethnetResult, _rethnetDebugTrace],] = await Promise.all([
142
- this._ethereumJSAdapter.runTxInBlock(tx, block),
143
- this._rethnetAdapter.runTxInBlock(tx, block),
144
- ]);
145
- // Matches EthereumJS' runCall checkpoint call
146
- rethnet_1.globalRethnetContext.setHashGeneratorSeed((0, ForkStateManager_1.randomHashSeed)());
147
- try {
148
- (0, assertions_1.assertEqualRunTxResults)(ethereumJSResult, rethnetResult);
149
- // Validate trace
150
- const _trace = this.getLastTrace();
151
- return [rethnetResult, ethereumJSDebugTrace];
152
- }
153
- catch (e) {
154
- // if the results didn't match, print the traces
155
- // console.log("EthereumJS trace");
156
- // printEthereumJSTrace(ethereumJSTrace);
157
- // console.log();
158
- // console.log("Rethnet trace");
159
- // printRethnetTrace(rethnetTrace);
160
- throw e;
161
- }
162
- }
163
- async makeSnapshot() {
164
- const ethereumJSRoot = await this._ethereumJSAdapter.makeSnapshot();
165
- const rethnetRoot = await this._rethnetAdapter.makeSnapshot();
166
- if (!ethereumJSRoot.equals(rethnetRoot)) {
167
- console.trace(`Different snapshot state root: ${ethereumJSRoot.toString("hex")} (ethereumjs) !== ${rethnetRoot.toString("hex")} (rethnet)`);
168
- await this.printState();
169
- throw new Error("Different snapshot state root");
170
- }
171
- return rethnetRoot;
172
- }
173
- async removeSnapshot(stateRoot) {
174
- await this._ethereumJSAdapter.removeSnapshot(stateRoot);
175
- await this._rethnetAdapter.removeSnapshot(stateRoot);
176
- }
177
- getLastTrace() {
178
- const { trace: ethereumJSTrace, error: ethereumJSError } = this._ethereumJSAdapter.getLastTrace();
179
- const { trace: rethnetTrace, error: rethnetError } = this._rethnetAdapter.getLastTrace();
180
- if (ethereumJSTrace === undefined) {
181
- if (rethnetTrace !== undefined) {
182
- throw new Error("ethereumJSTrace is undefined but rethnetTrace is defined");
183
- }
184
- }
185
- else {
186
- if (rethnetTrace === undefined) {
187
- throw new Error("ethereumJSTrace is defined but rethnetTrace is undefined");
188
- }
189
- const differences = traceDifferences(ethereumJSTrace, rethnetTrace);
190
- if (differences.length > 0) {
191
- console.trace(`Different traces: ${differences}`);
192
- // console.log("EthereumJS trace:");
193
- // printTrace(ethereumJSTrace);
194
- // console.log();
195
- // console.log("Rethnet trace:");
196
- // printTrace(rethnetTrace);
197
- throw new Error(`Different traces: ${differences}`);
198
- }
199
- }
200
- if (ethereumJSError === undefined) {
201
- if (rethnetError !== undefined) {
202
- throw new Error("ethereumJSError is undefined but rethnetError is defined");
203
- }
204
- }
205
- else {
206
- if (rethnetError === undefined) {
207
- throw new Error("ethereumJSError is defined but rethnetError is undefined");
208
- }
209
- // both errors are defined
210
- if (ethereumJSError.name !== rethnetError.name) {
211
- throw new Error(`Different error name: ${ethereumJSError.name} (ethereumjs) !== ${rethnetError.name} (rethnet)`);
212
- }
213
- if (ethereumJSError.message !== rethnetError.message) {
214
- throw new Error(`Different error message: ${ethereumJSError.message} (ethereumjs) !== ${rethnetError.message} (rethnet)`);
215
- }
216
- if (ethereumJSError.stack === undefined) {
217
- if (rethnetError.stack !== undefined) {
218
- throw new Error("ethereumJSError.stack is undefined but rethnetError.stack is defined");
219
- }
220
- }
221
- else {
222
- if (rethnetError.stack === undefined) {
223
- throw new Error("ethereumJSError.stack is defined but rethnetError.stack is undefined");
224
- }
225
- // both error stacks are defined
226
- if (ethereumJSError.stack !== rethnetError.stack) {
227
- throw new Error(`Different error stack: ${ethereumJSError.stack} (ethereumjs) !== ${rethnetError.stack} (rethnet)`);
228
- }
229
- }
230
- }
231
- const ethereumJSSteps = this._ethereumJSVMTracer.tracingSteps;
232
- const rethnetSteps = this._rethnetVMTracer.tracingSteps;
233
- if (ethereumJSSteps.length !== rethnetSteps.length) {
234
- throw new Error(`Different number of steps in tracers: ${this._ethereumJSVMTracer.tracingSteps.length} (ethereumjs) !== ${this._rethnetVMTracer.tracingSteps.length} (rethnet)`);
235
- }
236
- for (let stepIdx = 0; stepIdx < ethereumJSSteps.length; ++stepIdx) {
237
- const ethereumJSStep = ethereumJSSteps[stepIdx];
238
- const rethnetStep = rethnetSteps[stepIdx];
239
- if (ethereumJSStep.depth !== rethnetStep.depth) {
240
- console.trace(`Different steps[${stepIdx}] depth: ${ethereumJSStep.depth} (ethereumjs) !== ${rethnetStep.depth} (rethnet) (rethnet)`);
241
- throw new Error("Different step depth");
242
- }
243
- if (ethereumJSStep.pc !== rethnetStep.pc) {
244
- console.trace(`Different steps[${stepIdx}] pc: ${ethereumJSStep.pc} (ethereumjs) !== ${rethnetStep.pc} (rethnet) (rethnet)`);
245
- throw new Error("Different step pc");
246
- }
247
- // if (ethereumJSStep.opcode !== rethnetStep.opcode) {
248
- // console.trace(
249
- // `Different steps[${stepIdx}] opcode: ${ethereumJSStep.opcode} !== ${rethnetStep.opcode}`
250
- // );
251
- // throw new Error("Different step opcode");
252
- // }
253
- // if (ethereumJSStep.gasCost !== rethnetStep.gasCost) {
254
- // console.trace(
255
- // `Different steps[${stepIdx}] gasCost: ${ethereumJSStep.gasCost} !== ${rethnetStep.gasCost}`
256
- // );
257
- // throw new Error("Different step gasCost");
258
- // }
259
- // if (ethereumJSStep.gasLeft !== rethnetStep.gasLeft) {
260
- // console.trace(
261
- // `Different steps[${stepIdx}] gasLeft: ${ethereumJSStep.gasLeft} !== ${rethnetStep.gasLeft}`
262
- // );
263
- // throw new Error("Different step gasLeft");
264
- // }
265
- // const ethereumJSStack = ethereumJSStep.stack;
266
- // const rethnetStack = rethnetStep.stack;
267
- // if (ethereumJSStack.length !== rethnetStack.length) {
268
- // throw new Error(
269
- // `Different number of stack elements in tracers: ${ethereumJSStack.length} !== ${rethnetStack.length}`
270
- // );
271
- // }
272
- // for (let stackIdx = 0; stackIdx < ethereumJSSteps.length; ++stackIdx) {
273
- // const ethereumJSStackElement = ethereumJSStack[stackIdx];
274
- // const rethnetStackElement = rethnetStack[stackIdx];
275
- // if (ethereumJSStackElement !== rethnetStackElement) {
276
- // console.trace(
277
- // `Different steps[${stepIdx}] stack[${stackIdx}]: ${ethereumJSStackElement} !== ${rethnetStackElement}`
278
- // );
279
- // throw new Error("Different step stack element");
280
- // }
281
- // }
282
- // if (!ethereumJSStep.memory.equals(rethnetStep.memory)) {
283
- // console.trace(
284
- // `Different steps[${stepIdx}] memory: ${ethereumJSStep.memory} !== ${rethnetStep.memory}`
285
- // );
286
- // throw new Error("Different step memory");
287
- // }
288
- // if (ethereumJSStep.contract.balance !== rethnetStep.contract.balance) {
289
- // console.trace(
290
- // `Different steps[${stepIdx}] contract balance: ${ethereumJSStep.contract.balance} !== ${rethnetStep.contract.balance}`
291
- // );
292
- // throw new Error("Different step contract balance");
293
- // }
294
- // if (ethereumJSStep.contract.nonce !== rethnetStep.contract.nonce) {
295
- // console.trace(
296
- // `Different steps[${stepIdx}] contract nonce: ${ethereumJSStep.contract.nonce} !== ${rethnetStep.contract.nonce}`
297
- // );
298
- // throw new Error("Different step contract nonce");
299
- // }
300
- // Code can be stored separately from the account in Rethnet
301
- // const ethereumJSCode = ethereumJSStep.contract.code;
302
- // const rethnetCode = rethnetStep.contract.code;
303
- // if (ethereumJSCode === undefined) {
304
- // if (rethnetCode !== undefined) {
305
- // console.trace(
306
- // `Different steps[${stepIdx}] contract code: ${ethereumJSCode} !== ${rethnetCode}`
307
- // );
308
- // throw new Error(
309
- // "ethereumJSCode is undefined but rethnetCode is defined"
310
- // );
311
- // }
312
- // } else {
313
- // if (rethnetCode === undefined) {
314
- // console.trace(
315
- // `Different steps[${stepIdx}] contract code: ${ethereumJSCode} !== ${rethnetCode}`
316
- // );
317
- // throw new Error(
318
- // "ethereumJSCode is defined but rethnetCode is undefined"
319
- // );
320
- // }
321
- // if (!ethereumJSCode.equals(rethnetCode)) {
322
- // console.trace(
323
- // `Different steps[${stepIdx}] contract code: ${ethereumJSCode} !== ${rethnetCode}`
324
- // );
325
- // throw new Error("Different step contract code");
326
- // }
327
- // }
328
- // if (!ethereumJSStep.contractAddress.equals(rethnetStep.contractAddress)) {
329
- // console.trace(
330
- // `Different steps[${stepIdx}] contract address: ${ethereumJSStep.contractAddress} !== ${rethnetStep.contractAddress}`
331
- // );
332
- // throw new Error("Different step contract address");
333
- // }
334
- }
335
- // TODO: compare each step
336
- // TODO: compare tracers tracingMessages and tracingMessageResults
337
- return {
338
- trace: rethnetTrace,
339
- error: rethnetError,
340
- };
341
- }
342
- clearLastError() {
343
- this._ethereumJSVMTracer.clearLastError();
344
- this._rethnetVMTracer.clearLastError();
345
- }
346
- async printState() {
347
- console.log("EthereumJS:");
348
- await this._ethereumJSAdapter.printState();
349
- console.log("Rethnet:");
350
- await this._rethnetAdapter.printState();
351
- }
352
- async createBlockBuilder(common, opts) {
353
- const [ethereumJSBlockBuilder, rethnetBlockBuilder] = await Promise.all([
354
- this._ethereumJSAdapter.createBlockBuilder(common, opts),
355
- this._rethnetAdapter.createBlockBuilder(common, opts),
356
- ]);
357
- return new dual_1.DualModeBlockBuilder(ethereumJSBlockBuilder, rethnetBlockBuilder);
358
- }
359
- }
360
- exports.DualModeAdapter = DualModeAdapter;
361
- function assertEqualAccounts(address, ethereumJSAccount, rethnetAccount) {
362
- const differences = [];
363
- if (ethereumJSAccount.balance !== rethnetAccount.balance) {
364
- console.trace(`Account: ${address}`);
365
- console.trace(`Different balance: ${ethereumJSAccount.balance} (ethereumjs) !== ${rethnetAccount.balance} (rethnet)`);
366
- differences.push("balance");
367
- }
368
- if (!ethereumJSAccount.codeHash.equals(rethnetAccount.codeHash)) {
369
- console.trace(`Different codeHash: ${ethereumJSAccount.codeHash} !== ${rethnetAccount.codeHash}`);
370
- differences.push("codeHash");
371
- }
372
- if (ethereumJSAccount.nonce !== rethnetAccount.nonce) {
373
- console.trace(`Different nonce: ${ethereumJSAccount.nonce} !== ${rethnetAccount.nonce}`);
374
- differences.push("nonce");
375
- }
376
- if (!ethereumJSAccount.storageRoot.equals(rethnetAccount.storageRoot)) {
377
- console.trace(`Different storageRoot: ${ethereumJSAccount.storageRoot.toString("hex")} !== ${rethnetAccount.storageRoot.toString("hex")}`);
378
- throw new Error("Different storageRoot");
379
- }
380
- }
381
- function traceDifferences(ethereumJSTrace, rethnetTrace) {
382
- const differences = [];
383
- // both traces are defined
384
- if (ethereumJSTrace.depth !== rethnetTrace.depth) {
385
- console.log(`Different depth: ${ethereumJSTrace.depth} !== ${rethnetTrace.depth}`);
386
- differences.push("depth");
387
- }
388
- if (ethereumJSTrace.exit.kind !== rethnetTrace.exit.kind) {
389
- console.log(`Different exit: ${ethereumJSTrace.exit.kind} !== ${rethnetTrace.exit.kind}`);
390
- differences.push("exit");
391
- }
392
- if (ethereumJSTrace.gasUsed !== rethnetTrace.gasUsed) {
393
- console.log(`Different gasUsed: ${ethereumJSTrace.gasUsed} !== ${rethnetTrace.gasUsed}`);
394
- differences.push("gasUsed");
395
- }
396
- if (!ethereumJSTrace.returnData.equals(rethnetTrace.returnData)) {
397
- console.log(`Different returnData: ${ethereumJSTrace.returnData} !== ${rethnetTrace.returnData}`);
398
- differences.push("returnData");
399
- }
400
- if (ethereumJSTrace.value !== rethnetTrace.value) {
401
- console.log(`Different value: ${ethereumJSTrace.value} !== ${rethnetTrace.value}`);
402
- differences.push("value");
403
- }
404
- if ((0, message_trace_1.isPrecompileTrace)(ethereumJSTrace)) {
405
- if (!(0, message_trace_1.isPrecompileTrace)(rethnetTrace)) {
406
- throw new Error(`ethereumJSTrace is a precompiled trace but rethnetTrace is not`);
407
- }
408
- // Both traces are precompile traces
409
- if (ethereumJSTrace.precompile !== rethnetTrace.precompile) {
410
- console.log(`Different precompile: ${ethereumJSTrace.precompile} !== ${rethnetTrace.precompile}`);
411
- differences.push("precompile");
412
- }
413
- if (!ethereumJSTrace.calldata.equals(rethnetTrace.calldata)) {
414
- console.log(`Different calldata: ${ethereumJSTrace.calldata} !== ${rethnetTrace.calldata}`);
415
- differences.push("calldata");
416
- }
417
- }
418
- else {
419
- if ((0, message_trace_1.isPrecompileTrace)(rethnetTrace)) {
420
- throw new Error(`rethnetTrace is a precompiled trace but ethereumJSTrace is not`);
421
- }
422
- // Both traces are NOT precompile traces
423
- if (!ethereumJSTrace.code.equals(rethnetTrace.code)) {
424
- console.log(`Different code: ${ethereumJSTrace.code.toString("hex")} (ethereumjs) !== ${rethnetTrace.code.toString("hex")} (rethnet)`);
425
- differences.push("code");
426
- }
427
- if (ethereumJSTrace.steps.length !== rethnetTrace.steps.length) {
428
- console.log(`Different steps length: ${ethereumJSTrace.steps.length} !== ${rethnetTrace.steps.length}`);
429
- differences.push("steps.length");
430
- }
431
- for (let stepIdx = 0; stepIdx < ethereumJSTrace.steps.length; stepIdx++) {
432
- const ethereumJSStep = ethereumJSTrace.steps[stepIdx];
433
- const rethnetStep = rethnetTrace.steps[stepIdx];
434
- const stepDifferences = [];
435
- if ((0, message_trace_1.isEvmStep)(ethereumJSStep)) {
436
- // if (stepIdx >= rethnetTrace.steps.length) {
437
- // console.log("code:", ethereumJSTrace.code);
438
- // console.log(stepIdx);
439
- // console.log(ethereumJSStep);
440
- // console.log("opcode:", ethereumJSTrace.code[ethereumJSStep.pc]);
441
- // continue;
442
- // }
443
- if (!(0, message_trace_1.isEvmStep)(rethnetStep)) {
444
- throw new Error(`ethereumJSStep '${stepIdx}' is an EVM step but rethnetStep '${stepIdx}' is not`);
445
- }
446
- if (ethereumJSStep.pc !== rethnetStep.pc) {
447
- console.log(`Different step[${stepIdx}] pc: ${ethereumJSStep.pc} !== ${rethnetStep.pc}`);
448
- stepDifferences.push("pc");
449
- }
450
- }
451
- else {
452
- if ((0, message_trace_1.isEvmStep)(rethnetStep)) {
453
- throw new Error(`rethnetStep '${stepIdx}' is an EVM step but ethereumJSStep '${stepIdx}' is not`);
454
- }
455
- const messageDifferences = traceDifferences(ethereumJSStep, rethnetStep);
456
- if (messageDifferences.length > 0) {
457
- stepDifferences.push(`message: ${messageDifferences}`);
458
- }
459
- }
460
- if (stepDifferences.length > 0) {
461
- differences.push(`step[${stepIdx}]: ${stepDifferences}`);
462
- }
463
- }
464
- if (ethereumJSTrace.bytecode === undefined) {
465
- if (rethnetTrace.bytecode !== undefined) {
466
- console.log("ethereumJSTrace.bytecode is undefined but rethnetTrace.bytecode is defined");
467
- differences.push("bytecode");
468
- }
469
- }
470
- else {
471
- if (rethnetTrace.bytecode === undefined) {
472
- throw new Error("ethereumJSTrace.bytecode is defined but rethnetTrace.bytecode is undefined");
473
- }
474
- // Both traces contain bytecode
475
- if (!ethereumJSTrace.bytecode.equals(rethnetTrace.bytecode)) {
476
- console.log(`Different bytecode: ${ethereumJSTrace.bytecode} !== ${rethnetTrace.bytecode}`);
477
- differences.push("bytecode");
478
- }
479
- }
480
- if (ethereumJSTrace.numberOfSubtraces !== rethnetTrace.numberOfSubtraces) {
481
- console.log(`Different numberOfSubtraces: ${ethereumJSTrace.numberOfSubtraces} !== ${rethnetTrace.numberOfSubtraces}`);
482
- differences.push("numberOfSubtraces");
483
- }
484
- }
485
- return differences;
486
- }
487
- //# sourceMappingURL=dual.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dual.js","sourceRoot":"","sources":["../../../../src/internal/hardhat-network/provider/vm/dual.ts"],"names":[],"mappings":";;;AAGA,sEAI0C;AAE1C,iDAA8D;AAE9D,oEAI0C;AAC1C,wDAAwD;AACxD,4DAAwD;AACxD,8CAA+D;AAE/D,+DAA0D;AAE1D,oDAA8D;AAE9D,6CAAiD;AACjD,uCAAiE;AAGjE,+CAA4D;AAE5D,yEAAyE;AACzE,qEAAqE;AAErE,SAAS,WAAW,CAAC,KAAU;IAC7B,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ,KAAK,EACL,UAAU,GAAG,EAAE,KAAK;QAClB,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,OAAO,IAAA,oBAAU,EAAC,KAAK,CAAC,CAAC;SAC1B;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpC,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,KAAK,CAAC;SACd;IACH,CAAC,EACD,CAAC,CACF,CACF,CAAC;AACJ,CAAC;AAED,MAAa,eAAe;IAC1B,YACU,kBAA6B,EAC7B,eAA0B,EAC1B,mBAA6B,EAC7B,gBAA0B;QAH1B,uBAAkB,GAAlB,kBAAkB,CAAW;QAC7B,oBAAe,GAAf,eAAe,CAAW;QAC1B,wBAAmB,GAAnB,mBAAmB,CAAU;QAC7B,qBAAgB,GAAhB,gBAAgB,CAAU;IACjC,CAAC;IAEG,MAAM,CAAC,KAAK,CAAC,MAAM,CACxB,MAAc,EACd,UAAsC,EACtC,MAAkB,EAClB,cAA+C;QAE/C,MAAM,iBAAiB,GAAG,MAAM,8BAAiB,CAAC,MAAM,CACtD,MAAM,EACN,UAAU,EACV,MAAM,EACN,cAAc,CACf,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ACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -1,61 +0,0 @@
1
- /// <reference types="node" />
2
- import { Block } from "@nomicfoundation/ethereumjs-block";
3
- import { Common } from "@nomicfoundation/ethereumjs-common";
4
- import { StateManager } from "@nomicfoundation/ethereumjs-statemanager";
5
- import { TypedTransaction } from "@nomicfoundation/ethereumjs-tx";
6
- import { Account, Address } from "@nomicfoundation/ethereumjs-util";
7
- import { VM } from "@nomicfoundation/ethereumjs-vm";
8
- import { RpcDebugTracingConfig } from "../../../core/jsonrpc/types/input/debugTraceTransaction";
9
- import { MessageTrace } from "../../stack-traces/message-trace";
10
- import { NodeConfig } from "../node-types";
11
- import { RpcDebugTraceOutput } from "../output";
12
- import { HardhatBlockchainInterface } from "../types/HardhatBlockchainInterface";
13
- import { RunTxResult, Trace, VMAdapter } from "./vm-adapter";
14
- import { BlockBuilderAdapter, BuildBlockOpts } from "./block-builder";
15
- declare type StateManagerWithAddresses = StateManager & {
16
- addresses: Set<string>;
17
- };
18
- export declare class EthereumJSAdapter implements VMAdapter {
19
- private readonly _vm;
20
- readonly _stateManager: StateManagerWithAddresses;
21
- private readonly _blockchain;
22
- private readonly _common;
23
- private readonly _configNetworkId;
24
- private readonly _configChainId;
25
- private readonly _selectHardfork;
26
- private readonly _forkNetworkId?;
27
- private readonly _forkBlockNumber?;
28
- private _vmTracer;
29
- constructor(_vm: VM, _stateManager: StateManagerWithAddresses, _blockchain: HardhatBlockchainInterface, _common: Common, _configNetworkId: number, _configChainId: number, _selectHardfork: (blockNumber: bigint) => string, _forkNetworkId?: number | undefined, _forkBlockNumber?: bigint | undefined);
30
- getForkBlockNumber(): bigint | undefined;
31
- static create(common: Common, blockchain: HardhatBlockchainInterface, config: NodeConfig, selectHardfork: (blockNumber: bigint) => string): Promise<EthereumJSAdapter>;
32
- dryRun(tx: TypedTransaction, blockContext: Block, forceBaseFeeZero?: boolean): Promise<[RunTxResult, Trace]>;
33
- getStateRoot(): Promise<Buffer>;
34
- getAccount(address: Address): Promise<Account>;
35
- getContractStorage(address: Address, key: Buffer): Promise<Buffer>;
36
- getContractCode(address: Address): Promise<Buffer>;
37
- putAccount(address: Address, account: Account): Promise<void>;
38
- putContractCode(address: Address, value: Buffer): Promise<void>;
39
- putContractStorage(address: Address, key: Buffer, value: Buffer): Promise<void>;
40
- restoreContext(stateRoot: Buffer): Promise<void>;
41
- setBlockContext(block: Block, irregularStateOrUndefined: Buffer | undefined): Promise<void>;
42
- traceTransaction(hash: Buffer, block: Block, config: RpcDebugTracingConfig): Promise<RpcDebugTraceOutput>;
43
- runTxInBlock(tx: TypedTransaction, block: Block): Promise<[RunTxResult, Trace]>;
44
- makeSnapshot(): Promise<Buffer>;
45
- removeSnapshot(_stateRoot: Buffer): Promise<void>;
46
- getLastTrace(): {
47
- trace: MessageTrace | undefined;
48
- error: Error | undefined;
49
- };
50
- clearLastError(): void;
51
- printState(): Promise<void>;
52
- createBlockBuilder(common: Common, opts: BuildBlockOpts): Promise<BlockBuilderAdapter>;
53
- private _getCommonForTracing;
54
- private _isEip1559Active;
55
- private _isEip4895Active;
56
- private _beforeMessageHandler;
57
- private _stepHandler;
58
- private _afterMessageHandler;
59
- }
60
- export {};
61
- //# sourceMappingURL=ethereumjs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ethereumjs.d.ts","sourceRoot":"","sources":["../../../../src/internal/hardhat-network/provider/vm/ethereumjs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAQ5D,OAAO,EAEL,YAAY,EACb,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAGL,EAAE,EACH,MAAM,gCAAgC,CAAC;AAGxC,OAAO,E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