Commit 44810d3
feat: add BPO1 and BPO2 hardfork support (#9)
* feat: add BPO1 and BPO2 hardfork support
Add BPO1 (Blob Parameter Only fork 1, EIP-7892) and BPO2 SpecId variants
between Osaka and Amsterdam, with corresponding blob fraction and max blob
count constants.
- Add `bpo1` and `bpo2` to `SpecId` enum (between osaka and amsterdam)
- Add `HardforkName.BPO1`/`BPO2` string constants
- Add `specIdFromString`/`specIdToString` mappings for BPO1/BPO2
- Add `BLOB_BASE_FEE_UPDATE_FRACTION_BPO1` (8346193) and `_BPO2` (11684671)
- Add `MAX_BLOB_NUMBER_PER_BLOCK_BPO1` (15) and `_BPO2` (21)
- Add `BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN` alias for clarity
- Map bpo1/bpo2 to Osaka precompile set in `PrecompileSpecId`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: wire BPO1/BPO2 blob fractions into blobBaseFeeUpdateFraction
The new bpo1/bpo2 SpecId variants were added but blobBaseFeeUpdateFraction
only checked for Prague, returning 3,338,477 for all post-Prague forks
instead of the correct values.
Cascade the spec check to return the correct fraction per fork:
- BPO2+: 11,684,671 (BLOB_BASE_FEE_UPDATE_FRACTION_BPO2)
- BPO1+: 8,346,193 (BLOB_BASE_FEE_UPDATE_FRACTION_BPO1)
- Osaka+: 5,007,716 (BLOB_BASE_FEE_UPDATE_FRACTION_OSAKA, EIP-7691)
- Cancun+: 3,338,477 (BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: activate EIP-7691 blob fraction at Prague instead of Osaka
BLOB_BASE_FEE_UPDATE_FRACTION_OSAKA (5007716) is renamed to
BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE since EIP-7691 activates at
Prague, not Osaka. The redundant Prague alias for the Cancun fraction
(3338477) is removed. blobBaseFeeUpdateFraction now branches on
.prague instead of .osaka.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c728935 commit 44810d3
3 files changed
+40
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
348 | 349 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
353 | 359 | | |
354 | 360 | | |
355 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
| |||
191 | 203 | | |
192 | 204 | | |
193 | 205 | | |
| 206 | + | |
| 207 | + | |
194 | 208 | | |
195 | 209 | | |
196 | 210 | | |
| |||
220 | 234 | | |
221 | 235 | | |
222 | 236 | | |
| 237 | + | |
| 238 | + | |
223 | 239 | | |
224 | 240 | | |
225 | 241 | | |
| |||
247 | 263 | | |
248 | 264 | | |
249 | 265 | | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
0 commit comments