From b0df33967c12bd17ca28f44746df3a1463c72c62 Mon Sep 17 00:00:00 2001 From: Jonny Rhea <5555162+jrhea@users.noreply.github.com> Date: Thu, 28 May 2026 02:30:08 -0500 Subject: [PATCH 1/5] node, cmd/clef, graphql: disable gzip on engine API (#35057) Add a disableGzip parameter to NewHTTPHandlerStack and httpConfig. initAuth sets it true so compression is disabled in the engine api. Public HTTP RPC behavior is unchanged. --- cmd/clef/main.go | 2 +- graphql/service.go | 2 +- node/node.go | 1 + node/rpcstack.go | 8 ++++++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 72dfd5016b2e..2b54bb14cbf4 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -739,7 +739,7 @@ func signer(c *cli.Context) error { if err != nil { utils.Fatalf("Could not register API: %w", err) } - handler := node.NewHTTPHandlerStack(srv, cors, vhosts, nil) + handler := node.NewHTTPHandlerStack(srv, cors, vhosts, nil, false) // set port port := c.Int(rpcPortFlag.Name) diff --git a/graphql/service.go b/graphql/service.go index 4d530586a33d..b65ac20baf5d 100644 --- a/graphql/service.go +++ b/graphql/service.go @@ -148,7 +148,7 @@ func newHandler(stack *node.Node, backend ethapi.Backend, filterSystem *filters. return nil, err } h := handler{Schema: s} - handler := node.NewHTTPHandlerStack(h, cors, vhosts, nil) + handler := node.NewHTTPHandlerStack(h, cors, vhosts, nil, false) stack.RegisterHandler("GraphQL UI", "/graphql/ui", GraphiQL{}) stack.RegisterHandler("GraphQL UI", "/graphql/ui/", GraphiQL{}) diff --git a/node/node.go b/node/node.go index 56ecd7d52278..9e87337c2d81 100644 --- a/node/node.go +++ b/node/node.go @@ -445,6 +445,7 @@ func (n *Node) startRPC() error { Vhosts: n.config.AuthVirtualHosts, Modules: DefaultAuthModules, prefix: DefaultAuthPrefix, + disableGzip: true, rpcEndpointConfig: sharedConfig, }) if err != nil { diff --git a/node/rpcstack.go b/node/rpcstack.go index 1db2ed3f449b..bd19b58b84d3 100644 --- a/node/rpcstack.go +++ b/node/rpcstack.go @@ -42,6 +42,7 @@ type httpConfig struct { CorsAllowedOrigins []string Vhosts []string prefix string // path prefix on which to mount http handler + disableGzip bool rpcEndpointConfig } @@ -320,7 +321,7 @@ func (h *httpServer) enableRPC(apis []rpc.API, config httpConfig) error { } h.httpConfig = config h.httpHandler.Store(&rpcHandler{ - Handler: NewHTTPHandlerStack(srv, config.CorsAllowedOrigins, config.Vhosts, config.jwtSecret), + Handler: NewHTTPHandlerStack(srv, config.CorsAllowedOrigins, config.Vhosts, config.jwtSecret, config.disableGzip), prefix: config.prefix, server: srv, }) @@ -402,13 +403,16 @@ func isWebsocket(r *http.Request) bool { } // NewHTTPHandlerStack returns wrapped http-related handlers -func NewHTTPHandlerStack(srv http.Handler, cors []string, vhosts []string, jwtSecret []byte) http.Handler { +func NewHTTPHandlerStack(srv http.Handler, cors []string, vhosts []string, jwtSecret []byte, disableGzip bool) http.Handler { // Wrap the CORS-handler within a host-handler handler := newCorsHandler(srv, cors) handler = newVHostHandler(vhosts, handler) if len(jwtSecret) != 0 { handler = newJWTHandler(jwtSecret, handler) } + if disableGzip { + return handler + } return newGzipHandler(handler) } From 10a198220350b6e767346afc0157a57ef1816dcd Mon Sep 17 00:00:00 2001 From: cui Date: Thu, 28 May 2026 16:05:40 +0800 Subject: [PATCH 2/5] eth/protocols/eth: fix track-before-send (#35056) Track the transaction only after it was sent out --- eth/protocols/eth/peer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eth/protocols/eth/peer.go b/eth/protocols/eth/peer.go index 2d7079fa12aa..9e1daae608a4 100644 --- a/eth/protocols/eth/peer.go +++ b/eth/protocols/eth/peer.go @@ -159,11 +159,13 @@ func (p *Peer) MarkTransaction(hash common.Hash) { // The reasons this is public is to allow packages using this protocol to write // tests that directly send messages without having to do the async queueing. func (p *Peer) SendTransactions(txs types.Transactions) error { - // Mark all the transactions as known, but ensure we don't overflow our limits + if err := p2p.Send(p.rw, TransactionsMsg, txs); err != nil { + return err + } for _, tx := range txs { p.knownTxs.Add(tx.Hash()) } - return p2p.Send(p.rw, TransactionsMsg, txs) + return nil } // AsyncSendTransactions queues a list of transactions (by hash) to eventually From 9f434c04db0a5e443139efd381e25095e1a6da48 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 28 May 2026 10:16:15 +0200 Subject: [PATCH 3/5] go.mod: update pion/dtls (#35062) Updates dtls to newest version --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 2a96f2c76134..1a35f89ce51d 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 - github.com/pion/stun/v3 v3.0.1 + github.com/pion/stun/v3 v3.1.2 github.com/protolambda/bls12-381-util v0.1.0 github.com/protolambda/zrnt v0.34.1 github.com/protolambda/ztyp v0.2.2 @@ -75,7 +75,7 @@ require ( golang.org/x/sync v0.19.0 golang.org/x/sys v0.40.0 golang.org/x/text v0.33.0 - golang.org/x/time v0.9.0 + golang.org/x/time v0.10.0 golang.org/x/tools v0.40.0 google.golang.org/protobuf v1.36.11 gopkg.in/natefinch/lumberjack.v2 v2.2.1 @@ -87,7 +87,8 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect - github.com/pion/dtls/v3 v3.0.7 // indirect + github.com/pion/dtls/v3 v3.1.2 // indirect + github.com/pion/transport/v4 v4.0.1 // indirect github.com/wlynxg/anet v0.0.5 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/otel/metric v1.40.0 // indirect @@ -150,7 +151,6 @@ require ( github.com/naoina/go-stringutil v0.1.0 // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/pion/logging v0.2.4 // indirect - github.com/pion/transport/v3 v3.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.15.0 // indirect diff --git a/go.sum b/go.sum index a95ae4322405..b355b32050d6 100644 --- a/go.sum +++ b/go.sum @@ -297,14 +297,14 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pion/dtls/v3 v3.0.7 h1:bItXtTYYhZwkPFk4t1n3Kkf5TDrfj6+4wG+CZR8uI9Q= -github.com/pion/dtls/v3 v3.0.7/go.mod h1:uDlH5VPrgOQIw59irKYkMudSFprY9IEFCqz/eTz16f8= +github.com/pion/dtls/v3 v3.1.2 h1:gqEdOUXLtCGW+afsBLO0LtDD8GnuBBjEy6HRtyofZTc= +github.com/pion/dtls/v3 v3.1.2/go.mod h1:Hw/igcX4pdY69z1Hgv5x7wJFrUkdgHwAn/Q/uo7YHRo= github.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8= github.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so= -github.com/pion/stun/v3 v3.0.1 h1:jx1uUq6BdPihF0yF33Jj2mh+C9p0atY94IkdnW174kA= -github.com/pion/stun/v3 v3.0.1/go.mod h1:RHnvlKFg+qHgoKIqtQWMOJF52wsImCAf/Jh5GjX+4Tw= -github.com/pion/transport/v3 v3.0.8 h1:oI3myyYnTKUSTthu/NZZ8eu2I5sHbxbUNNFW62olaYc= -github.com/pion/transport/v3 v3.0.8/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= +github.com/pion/stun/v3 v3.1.2 h1:86IhD8wFn6IDW4b1/0QzoQS+f5PeA8OHHRn8UZW5ErY= +github.com/pion/stun/v3 v3.1.2/go.mod h1:H7gDic7nNwlUL05pbs6T1dtaBehh/KjupxfWw3ZI7cA= +github.com/pion/transport/v4 v4.0.1 h1:sdROELU6BZ63Ab7FrOLn13M6YdJLY20wldXW2Cu2k8o= +github.com/pion/transport/v4 v4.0.1/go.mod h1:nEuEA4AD5lPdcIegQDpVLgNoDGreqM/YqmEx3ovP4jM= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -481,8 +481,8 @@ golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= From 4017efe3450586e932cf12f85ad1fefc7091d266 Mon Sep 17 00:00:00 2001 From: rayoo Date: Thu, 28 May 2026 16:38:34 +0800 Subject: [PATCH 4/5] rpc: reject empty batch in BatchCallContext (#34985) The server already rejects empty batches with -32600. On the client side, calling BatchCallContext with a zero-length slice on inproc/WS/IPC transports registers no request IDs but the server still replies with an error message whose id is null. The dispatch loop has no requestOp to match it to, so op.resp is never written and op.wait blocks until ctx deadline. Short-circuit on len(b) == 0 with the same invalidRequestError the server uses, so all transports return immediately with -32600. --- rpc/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc/client.go b/rpc/client.go index 917562624189..51a595e72610 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -397,6 +397,9 @@ func (c *Client) BatchCall(b []BatchElem) error { // // Note that batch calls may not be executed atomically on the server side. func (c *Client) BatchCallContext(ctx context.Context, b []BatchElem) error { + if len(b) == 0 { + return &invalidRequestError{"empty batch"} + } var ( msgs = make([]*jsonrpcMessage, len(b)) byID = make(map[string]int, len(b)) From 95320ffe69fd889cde412f5a073f3ac2f26b8ef2 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Thu, 28 May 2026 10:52:27 +0200 Subject: [PATCH 5/5] miner: set slot number for pending block post-Amsterdam (#34792) --- miner/miner.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index 0ff0237a083c..921200bcaa3d 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -151,12 +151,24 @@ func (miner *Miner) getPending() *newPayloadResult { return cached } var ( - timestamp = uint64(time.Now().Unix()) - withdrawal types.Withdrawals + timestamp = uint64(time.Now().Unix()) + childNumber = new(big.Int).Add(header.Number, big.NewInt(1)) + withdrawal types.Withdrawals + slotNum *uint64 ) - if miner.chainConfig.IsShanghai(new(big.Int).Add(header.Number, big.NewInt(1)), timestamp) { + if miner.chainConfig.IsShanghai(childNumber, timestamp) { withdrawal = []*types.Withdrawal{} } + // Post-Amsterdam, prepareWork requires a slot number (EIP-7843). The pending + // block is synthetic and has no canonical slot, so derive one from the parent + // when available and fall back to zero otherwise. + if miner.chainConfig.IsAmsterdam(childNumber, timestamp) { + var n uint64 + if header.SlotNumber != nil { + n = *header.SlotNumber + 1 + } + slotNum = &n + } ret := miner.generateWork(context.Background(), &generateParams{ timestamp: timestamp, @@ -166,6 +178,7 @@ func (miner *Miner) getPending() *newPayloadResult { random: common.Hash{}, withdrawals: withdrawal, beaconRoot: nil, + slotNum: slotNum, noTxs: false, }, false) // we will never make a witness for a pending block if ret.err != nil {