Open
Description
I attempted to move my testing from hardhat node
to anvil
. Some of my testing requires mining a large number of blocks. anvil_mine
execution time seems to scale linearly relative to block count, whereas hardhat_mine
with hardhat node
is nearly constant. See the following benchmarks:
Anvil
In [1]: import timeit
In [2]: [timeit.timeit(stmt=(f'chain.mine({i})'), globals=globals(), number=50) for i in [1, 1
...: 0, 100, 1000]]
Out[2]:
[0.07101033299113624,
0.39050891700026114,
6.034164124997915,
276.3122650830046]
Hardhat
In [1]: import timeit
In [2]: [timeit.timeit(stmt=(f'chain.mine({i})'), globals=globals(), number=50) for i in [1, 1
...: 0, 100, 1000]]
Out[2]:
[0.10906625000643544,
0.09370395800215192,
0.0902477499912493,
0.08129970800655428]
I'm using:
anvil 0.1.0 (0e33b3e 2023-07-26T00:26:08.161934000Z)
hardhat 9.6.7
ape 0.6.14
(for testing)
Lines 1421 to 1440 in 41bae8e
Metadata
Metadata
Assignees
Type
Projects
Status
Todo