From 64e338a934b31cd4b20ff56d593abafd7009a511 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Jan 2025 14:07:46 +0800 Subject: [PATCH 1/3] feat(taiko-client): improve proposer gas estimation --- .github/workflows/taiko-client--docker.yml | 2 +- .../proposer/transaction_builder/fallback.go | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index 08faa9847d..0421710bf0 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: [main, improve-estimation] tags: - "taiko-alethia-client-v*" paths: diff --git a/packages/taiko-client/proposer/transaction_builder/fallback.go b/packages/taiko-client/proposer/transaction_builder/fallback.go index 60f6c7b0d0..06813537e5 100644 --- a/packages/taiko-client/proposer/transaction_builder/fallback.go +++ b/packages/taiko-client/proposer/transaction_builder/fallback.go @@ -162,13 +162,10 @@ func (b *TxBuilderWithFallback) estimateCandidateCost( gasFeeCap := new(big.Int).Add(baseFee, gasTipCap) msg := ethereum.CallMsg{ - From: txMgr.From(), - To: candidate.To, - Gas: candidate.GasLimit, - GasFeeCap: gasFeeCap, - GasTipCap: gasTipCap, - Value: candidate.Value, - Data: candidate.TxData, + From: txMgr.From(), + To: candidate.To, + Value: candidate.Value, + Data: candidate.TxData, } if len(candidate.Blobs) != 0 { var blobHashes []common.Hash @@ -176,7 +173,6 @@ func (b *TxBuilderWithFallback) estimateCandidateCost( return nil, fmt.Errorf("failed to make sidecar: %w", err) } msg.BlobHashes = blobHashes - msg.BlobGasFeeCap = blobBaseFee } gasUsed, err := b.rpc.L1.EstimateGas(ctx, msg) From bc736e9d0b0f45d87dff5ff71dc6b64a716ad840 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Jan 2025 14:09:04 +0800 Subject: [PATCH 2/3] feat(taiko-client): improve proposer gas estimation --- packages/taiko-client/proposer/transaction_builder/fallback.go | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/taiko-client/proposer/transaction_builder/fallback.go b/packages/taiko-client/proposer/transaction_builder/fallback.go index 06813537e5..8bcc5360ff 100644 --- a/packages/taiko-client/proposer/transaction_builder/fallback.go +++ b/packages/taiko-client/proposer/transaction_builder/fallback.go @@ -164,6 +164,7 @@ func (b *TxBuilderWithFallback) estimateCandidateCost( msg := ethereum.CallMsg{ From: txMgr.From(), To: candidate.To, + Gas: candidate.GasLimit, Value: candidate.Value, Data: candidate.TxData, } From 738de2a6067b34d28a51a07a7a2eebcce117ed12 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Jan 2025 15:54:49 +0800 Subject: [PATCH 3/3] feat(taiko-client): improve proposer gas estimation --- .github/workflows/taiko-client--docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index 7df3af9dfc..fcd767c8d2 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, improve-estimation] + branches: [main] tags: - "taiko-alethia-client-v*" paths: