@@ -92,14 +92,22 @@ pub fn to_system_config(
92
92
93
93
// After holocene's activation, the EIP-1559 parameters are stored in the block header's nonce.
94
94
if rollup_config. is_holocene_active ( block. header . timestamp ) {
95
- let eip1559_params = block. header . nonce ;
95
+ let eip1559_params =& block. header . extra_data ;
96
+
97
+ if eip1559_params. len ( ) !=9 {
98
+ return Err ( OpBlockConversionError :: Eip1559DecodeError ) ;
99
+ }
100
+ if eip1559_params[ 0 ] !=0 {
101
+ return Err ( OpBlockConversionError :: Eip1559DecodeError ) ;
102
+ }
103
+
96
104
cfg. eip1559_denominator =Some ( u32:: from_be_bytes (
97
- eip1559_params[ 0 .. 4 ]
105
+ eip1559_params[ 1 .. 5 ]
98
106
. try_into ( )
99
107
. map_err ( |_|OpBlockConversionError :: Eip1559DecodeError ) ?,
100
108
) ) ;
101
109
cfg. eip1559_elasticity =Some ( u32:: from_be_bytes (
102
- eip1559_params[ 4 .. 8 ]
110
+ eip1559_params[ 5 .. 9 ]
103
111
. try_into ( )
104
112
. map_err ( |_|OpBlockConversionError :: Eip1559DecodeError ) ?,
105
113
) ) ;
@@ -156,7 +164,7 @@ mod tests {
156
164
use crate :: test_utils:: { RAW_BEDROCK_INFO_TX , RAW_ECOTONE_INFO_TX , RAW_ISTHMUS_INFO_TX } ;
157
165
use alloc:: vec;
158
166
use alloy_eips:: eip1898:: BlockNumHash ;
159
- use alloy_primitives:: { address, hex , uint, U256 } ;
167
+ use alloy_primitives:: { address, bytes , uint, U256 } ;
160
168
use kona_genesis:: ChainGenesis ;
161
169
162
170
#[ test]
@@ -300,8 +308,8 @@ mod tests {
300
308
let block =OpBlock {
301
309
header : alloy_consensus:: Header {
302
310
number : 1 ,
303
- // Holocene EIP1559 parameters stored in thenonce .
304
- nonce : hex ! ( "0000beef0000babe" ) . into ( ) ,
311
+ // Holocene EIP1559 parameters stored in theextra data .
312
+ extra_data : bytes ! ( "000000beef0000babe" ) ,
305
313
..Default :: default ( )
306
314
} ,
307
315
body : alloy_consensus:: BlockBody {
@@ -347,8 +355,8 @@ mod tests {
347
355
let block =OpBlock {
348
356
header : alloy_consensus:: Header {
349
357
number : 1 ,
350
- // Holocene EIP1559 parameters stored in thenonce .
351
- nonce : hex ! ( "0000beef0000babe" ) . into ( ) ,
358
+ // Holocene EIP1559 parameters stored in theextra data .
359
+ extra_data : bytes ! ( "000000beef0000babe" ) ,
352
360
..Default :: default ( )
353
361
} ,
354
362
body : alloy_consensus:: BlockBody {