From cf1550b2ec57ab4d5177e5a82675561d5b0cefeb Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 May 2024 09:01:13 +0800 Subject: [PATCH] feat: update comments --- pkg/txlist_validator/tx_list_validator.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/txlist_validator/tx_list_validator.go b/pkg/txlist_validator/tx_list_validator.go index b660a823b..2c2acc4b6 100644 --- a/pkg/txlist_validator/tx_list_validator.go +++ b/pkg/txlist_validator/tx_list_validator.go @@ -30,7 +30,12 @@ func NewTxListValidator( } // ValidateTxList checks whether the transactions list in the TaikoL1.proposeBlock transaction's -// input data is valid. +// input data is valid, the rules are: +// - If the transaction list is empty, it's valid. +// - If the transaction list is not empty: +// 1. If the transaction list is using calldata, the compressed bytes of the transaction list must be +// less than or equal to maxBytesPerTxList. +// 2. The transaction list bytes must be able to be RLP decoded into a list of transactions. func (v *TxListValidator) ValidateTxList( blockID *big.Int, txListBytes []byte,