Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 committed Oct 16, 2024
1 parent 6138b8b commit 1b7240f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
39 changes: 30 additions & 9 deletions packages/taiko-client/proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 1b7240f

Please sign in to comment.