From 8c9801875b3bd69121f07df65ec9283dc64b8da8 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 8 May 2024 14:45:43 +0800 Subject: [PATCH] chore(taiko-client): updates for hekla taiko-client --- .github/workflows/taiko-client-docker.yml | 5 +++-- .../txlist_decompressor/txlist_decompressor.go | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/taiko-client-docker.yml b/.github/workflows/taiko-client-docker.yml index 77f656daf8d..a7d44c4d403 100644 --- a/.github/workflows/taiko-client-docker.yml +++ b/.github/workflows/taiko-client-docker.yml @@ -2,7 +2,7 @@ name: "Push docker image to GAR" on: push: - branches: [main] + branches: [main, hekla-taiko-client] tags: - "taiko-client-v*" paths: @@ -35,11 +35,12 @@ jobs: uses: docker/metadata-action@v4 with: images: | - us-docker.pkg.dev/evmchain/images/taiko-client + us-docker.pkg.dev/evmchain/hekla/taiko-client tags: | type=ref,event=branch type=ref,event=pr type=ref,event=tag + type=raw,value=hekla type=sha - name: Cache Go build diff --git a/packages/taiko-client/driver/txlist_decompressor/txlist_decompressor.go b/packages/taiko-client/driver/txlist_decompressor/txlist_decompressor.go index 80f6e553b2d..0cd602ac6e3 100644 --- a/packages/taiko-client/driver/txlist_decompressor/txlist_decompressor.go +++ b/packages/taiko-client/driver/txlist_decompressor/txlist_decompressor.go @@ -48,13 +48,6 @@ func (v *TxListDecompressor) TryDecompress( return []byte{} } - // If calldata is used, the compressed bytes of the transaction list must be - // less than or equal to maxBytesPerTxList. - if !blobUsed && (len(txListBytes) > int(v.maxBytesPerTxList)) { - log.Info("Compressed transactions list binary too large", "length", len(txListBytes), "blockID", blockID) - return []byte{} - } - var ( txs types.Transactions err error @@ -66,6 +59,13 @@ func (v *TxListDecompressor) TryDecompress( return []byte{} } + // If calldata is used, the compressed bytes of the transaction list must be + // less than or equal to maxBytesPerTxList. + if !blobUsed && (len(txListBytes) > int(v.maxBytesPerTxList)) { + log.Info("Compressed transactions list binary too large", "length", len(txListBytes), "blockID", blockID) + return []byte{} + } + // Try to RLP decode the transaction list bytes. if err = rlp.DecodeBytes(txListBytes, &txs); err != nil { log.Info("Failed to decode transactions list bytes", "blockID", blockID, "error", err)