correctly set hf order
test specs
fix the merge hf push condition
try placing merge block in better wat
fix test spec for kiln
alternate fix of skipping only pos validation on genesis
move merge validations to non genesis
fix unsupported test case
correctly set hardfork
resolve test genesis poisioning
add comment
cli arg for mergeforkid placement
place merge only after genesis
fix tests
restore test
address another case for merge just post genesis
test case for the new edge case
add comment
Showing 2 of 12 files from the diff.
packages/evm/src/evm.ts
changed.
Other files ignored by Codecov
packages/client/bin/cli.ts
has changed.
packages/common/src/types.ts
has changed.
packages/common/src/common.ts
has changed.
packages/common/src/utils.ts
has changed.
packages/common/test/utils.spec.ts
has changed.
packages/common/test/hardforks.spec.ts
has changed.
packages/vm/test/api/index.spec.ts
has changed.
@@ -56,7 +56,6 @@
Loading
56 | 56 | throw new Error('cannot get iterator head: blockchain has no getTotalDifficulty function') |
|
57 | 57 | } |
|
58 | 58 | const td = await vm.blockchain.getTotalDifficulty(parentBlock.hash()) |
|
59 | - | vm._common.setHardforkByBlockNumber(parentBlock.header.number, td) |
|
60 | 59 | ||
61 | 60 | const builder = await vm.buildBlock({ |
|
62 | 61 | parentBlock, |
@@ -69,6 +68,7 @@
Loading
69 | 68 | withdrawals, |
|
70 | 69 | blockOpts: { |
|
71 | 70 | putBlockIntoBlockchain: false, |
|
71 | + | hardforkByTTD: td, |
|
72 | 72 | }, |
|
73 | 73 | }) |
|
74 | 74 |
@@ -139,6 +139,25 @@
Loading
139 | 139 | * @ignore |
|
140 | 140 | */ |
|
141 | 141 | export class EVM implements EVMInterface { |
|
142 | + | private static supportedHardforks = [ |
|
143 | + | Hardfork.Chainstart, |
|
144 | + | Hardfork.Homestead, |
|
145 | + | Hardfork.Dao, |
|
146 | + | Hardfork.TangerineWhistle, |
|
147 | + | Hardfork.SpuriousDragon, |
|
148 | + | Hardfork.Byzantium, |
|
149 | + | Hardfork.Constantinople, |
|
150 | + | Hardfork.Petersburg, |
|
151 | + | Hardfork.Istanbul, |
|
152 | + | Hardfork.MuirGlacier, |
|
153 | + | Hardfork.Berlin, |
|
154 | + | Hardfork.London, |
|
155 | + | Hardfork.ArrowGlacier, |
|
156 | + | Hardfork.GrayGlacier, |
|
157 | + | Hardfork.MergeForkIdTransition, |
|
158 | + | Hardfork.Merge, |
|
159 | + | Hardfork.Shanghai, |
|
160 | + | ] |
|
142 | 161 | protected _tx?: { |
|
143 | 162 | gasPrice: bigint |
|
144 | 163 | origin: Address |
@@ -246,25 +265,7 @@
Loading
246 | 265 | } |
|
247 | 266 | } |
|
248 | 267 | ||
249 | - | const supportedHardforks = [ |
|
250 | - | Hardfork.Chainstart, |
|
251 | - | Hardfork.Homestead, |
|
252 | - | Hardfork.Dao, |
|
253 | - | Hardfork.TangerineWhistle, |
|
254 | - | Hardfork.SpuriousDragon, |
|
255 | - | Hardfork.Byzantium, |
|
256 | - | Hardfork.Constantinople, |
|
257 | - | Hardfork.Petersburg, |
|
258 | - | Hardfork.Istanbul, |
|
259 | - | Hardfork.MuirGlacier, |
|
260 | - | Hardfork.Berlin, |
|
261 | - | Hardfork.London, |
|
262 | - | Hardfork.ArrowGlacier, |
|
263 | - | Hardfork.GrayGlacier, |
|
264 | - | Hardfork.MergeForkIdTransition, |
|
265 | - | Hardfork.Merge, |
|
266 | - | ] |
|
267 | - | if (!supportedHardforks.includes(this._common.hardfork() as Hardfork)) { |
|
268 | + | if (!EVM.supportedHardforks.includes(this._common.hardfork() as Hardfork)) { |
|
268 | 269 | throw new Error( |
|
269 | 270 | `Hardfork ${this._common.hardfork()} not set as supported in supportedHardforks` |
|
270 | 271 | ) |
Files | Coverage |
---|---|
packages | 86.45% |
Project Totals (140 files) | 86.45% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.