diff --git a/packages/protocol/contracts/L1/v1/V1Proposing.sol b/packages/protocol/contracts/L1/v1/V1Proposing.sol index 6add00c3b10..0ef68db1b5d 100644 --- a/packages/protocol/contracts/L1/v1/V1Proposing.sol +++ b/packages/protocol/contracts/L1/v1/V1Proposing.sol @@ -77,7 +77,7 @@ library V1Proposing { bytes calldata txList = inputs[1]; // perform validation and populate some fields require( - txList.length > 0 && + txList.length >= 0 && txList.length <= LibConstants.K_TXLIST_MAX_BYTES && meta.txListHash == txList.hashTxList(), "L1:txList" diff --git a/packages/protocol/contracts/libs/LibTxDecoder.sol b/packages/protocol/contracts/libs/LibTxDecoder.sol index a6c0d6e5db2..9dff797f56a 100644 --- a/packages/protocol/contracts/libs/LibTxDecoder.sol +++ b/packages/protocol/contracts/libs/LibTxDecoder.sol @@ -78,6 +78,9 @@ library LibTxDecoder { function decodeTxList( bytes calldata encoded ) public pure returns (TxList memory txList) { + if (encoded.length == 0) { + return txList; + } LibRLPReader.RLPItem[] memory txs = LibRLPReader.readList(encoded); Tx[] memory _txList = new Tx[](txs.length);