@@ -13,6 +13,7 @@ import (
13
13
"github.com/ethereum/go-ethereum/core/rawdb"
14
14
"github.com/ethereum/go-ethereum/core/types"
15
15
"github.com/ethereum/go-ethereum/log"
16
+ "github.com/ethereum/go-ethereum/rlp"
16
17
"github.com/holiman/uint256"
17
18
18
19
"github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/encoding"
@@ -302,6 +303,17 @@ func (i *BlocksInserterPacaya) insertPreconfBlockFromExecutionPayload(
302
303
if executableData .Transactions [0 ], err = utils .DecompressPacaya (executableData .Transactions [0 ]); err != nil {
303
304
return nil , fmt .Errorf ("failed to decompress transactions list bytes: %w" , err )
304
305
}
306
+ // Try to RLP decode the transaction list bytes, if it fails, we will set the transactions list to empty.
307
+ if err := rlp .DecodeBytes (executableData .Transactions [0 ], new (types.Transactions )); err != nil {
308
+ log .Info (
309
+ "Failed to RLP decode preconfirmation block transactions list bytes, will set it to empty" ,
310
+ "blockID" , executableData .BlockNumber ,
311
+ "error" , err ,
312
+ )
313
+ if executableData .Transactions [0 ], err = rlp .EncodeToBytes (types.Transactions {}); err != nil {
314
+ return nil , fmt .Errorf ("failed RLP encode transactions list bytes: %w" , err )
315
+ }
316
+ }
305
317
306
318
var u256BaseFee = uint256 .Int (executableData .BaseFeePerGas )
307
319
payload , err := createExecutionPayloadsAndSetHead (
0 commit comments