From 26abc965c9e9b5c88e53879c1f3e73aa92173e99 Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:41:54 +0800 Subject: [PATCH 1/5] make sequencer forwarding non-blocking if tx pool is enabled --- eth/api_backend.go | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/eth/api_backend.go b/eth/api_backend.go index f7151383f5e9..4d993019d003 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -19,6 +19,7 @@ package eth import ( "context" "errors" + "fmt" "math/big" "time" @@ -277,16 +278,29 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) // Forward to remote sequencer RPC if b.eth.sequencerRPCService != nil { - signedTxData, err := signedTx.MarshalBinary() - if err != nil { - return err + // If the transaction pool is disabled, then we need to make sure that we send the transaction to the sequencer RPC synchronously. + if b.disableTxPool { + return b.sendToSequencer(ctx, signedTx) } - if err = b.eth.sequencerRPCService.CallContext(ctx, nil, "eth_sendRawTransaction", hexutil.Encode(signedTxData)); err != nil { + + // If the transaction pool is enabled, we send the transaction to the sequencer RPC asynchronously as this is + // additional to the public mempool. + go func() { + err := b.sendToSequencer(ctx, signedTx) log.Warn("failed to forward tx to sequencer", "tx", signedTx.Hash(), "err", err) - if b.disableTxPool { - return err - } - } + }() + } + + return nil +} + +func (b *EthAPIBackend) sendToSequencer(ctx context.Context, signedTx *types.Transaction) error { + signedTxData, err := signedTx.MarshalBinary() + if err != nil { + return fmt.Errorf("failed to marshal signed tx: %w", err) + } + if err = b.eth.sequencerRPCService.CallContext(ctx, nil, "eth_sendRawTransaction", hexutil.Encode(signedTxData)); err != nil { + return fmt.Errorf("eth_sendRawTransaction to sequencer RPC failed: %w", err) } return nil From 85222a9677056863f69679a8117194ca72f1690f Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Fri, 25 Jul 2025 07:46:26 +0000 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20auto=20version=20bump=E2=80=89[bot?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index a3e4aa16451f..5b27d244c14e 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 74 // Patch version component of the current release + VersionPatch = 75 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) From f0362d400950c36ff5f1e858647bacc58a8478f6 Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:49:44 +0800 Subject: [PATCH 3/5] address review comments --- eth/api_backend.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eth/api_backend.go b/eth/api_backend.go index 4d993019d003..04fdf2684701 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -280,14 +280,20 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) if b.eth.sequencerRPCService != nil { // If the transaction pool is disabled, then we need to make sure that we send the transaction to the sequencer RPC synchronously. if b.disableTxPool { - return b.sendToSequencer(ctx, signedTx) + err = b.sendToSequencer(ctx, signedTx) + if err != nil { + log.Warn("failed to forward tx to sequencer", "tx", signedTx.Hash(), "err", err) + } + return err } // If the transaction pool is enabled, we send the transaction to the sequencer RPC asynchronously as this is // additional to the public mempool. go func() { err := b.sendToSequencer(ctx, signedTx) - log.Warn("failed to forward tx to sequencer", "tx", signedTx.Hash(), "err", err) + if err != nil { + log.Warn("failed to forward tx to sequencer", "tx", signedTx.Hash(), "err", err) + } }() } From 06c07b6c8f8b4ea6724c3e24b7a1c98cdb3c422e Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Thu, 31 Jul 2025 04:50:57 +0000 Subject: [PATCH 4/5] =?UTF-8?q?chore:=20auto=20version=20bump=E2=80=89[bot?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index 5b27d244c14e..b1e0cc28d6e1 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 75 // Patch version component of the current release + VersionPatch = 76 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) From 48f88e3fccdc49f59099cbeb8fc7b4afa2bd585b Mon Sep 17 00:00:00 2001 From: Morty <70688412+yiweichi@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:30:41 +0800 Subject: [PATCH 5/5] fix: blob client beacon node do http request with context (#1228) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: beacon node client request with context * chore: auto version bump [bot] --- rollup/da_syncer/blob_client/beacon_node_client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rollup/da_syncer/blob_client/beacon_node_client.go b/rollup/da_syncer/blob_client/beacon_node_client.go index f7129af76d3d..98e922aa553e 100644 --- a/rollup/da_syncer/blob_client/beacon_node_client.go +++ b/rollup/da_syncer/blob_client/beacon_node_client.go @@ -114,7 +114,11 @@ func (c *BeaconNodeClient) GetBlobByVersionedHashAndBlockTime(ctx context.Contex if err != nil { return nil, fmt.Errorf("failed to join path, err: %w", err) } - resp, err := c.client.Get(blobSidecarPath) + req, err := http.NewRequestWithContext(ctx, "GET", blobSidecarPath, nil) + if err != nil { + return nil, fmt.Errorf("failed to create request, err: %w", err) + } + resp, err := c.client.Do(req) if err != nil { return nil, fmt.Errorf("cannot do request, err: %w", err) }