diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index aaeb9efe68..814281cbe6 100644 --- a/.github/workflows/taiko-client--docker.yml +++ b/.github/workflows/taiko-client--docker.yml @@ -2,7 +2,7 @@ name: "Build and Push Multi-Arch Docker Image" on: push: - branches: [main] + branches: [feature/batch-proof] tags: - "taiko-client-v*" paths: diff --git a/packages/taiko-client/proposer/proposer.go b/packages/taiko-client/proposer/proposer.go index 171bcdb740..a126133b24 100644 --- a/packages/taiko-client/proposer/proposer.go +++ b/packages/taiko-client/proposer/proposer.go @@ -416,18 +416,39 @@ func (p *Proposer) ProposeTxListOntake( txNums []int totalTxs int ) - for _, txs := range txLists { - txListBytes, err := rlp.EncodeToBytes(txs) - if err != nil { - return fmt.Errorf("failed to encode transactions: %w", err) - } + for i, txs := range txLists { + if i == 0 && len(txs) > 1 { + txListBytesA, err := rlp.EncodeToBytes(txs[:len(txs)/2]) + if err != nil { + return fmt.Errorf("failed to encode transactions: %w", err) + } + txListBytesB, err := rlp.EncodeToBytes(txs[len(txs)/2:]) + if err != nil { + return fmt.Errorf("failed to encode transactions: %w", err) + } + compressedTxListBytesA, err := utils.Compress(txListBytesA) + if err != nil { + return err + } + txListsBytesArray = append(txListsBytesArray, compressedTxListBytesA) + compressedTxListBytesB, err := utils.Compress(txListBytesB) + if err != nil { + return err + } + txListsBytesArray = append(txListsBytesArray, compressedTxListBytesB) + } else { + txListBytes, err := rlp.EncodeToBytes(txs) + if err != nil { + return fmt.Errorf("failed to encode transactions: %w", err) + } - compressedTxListBytes, err := utils.Compress(txListBytes) - if err != nil { - return err + compressedTxListBytes, err := utils.Compress(txListBytes) + if err != nil { + return err + } + txListsBytesArray = append(txListsBytesArray, compressedTxListBytes) } - txListsBytesArray = append(txListsBytesArray, compressedTxListBytes) txNums = append(txNums, len(txs)) totalTxs += len(txs) }