Skip to content

Conversation

@zjg555543
Copy link

Problem

Sequencer fails to commit large blocks to Conductor with 413 Request Entity Too Large:

lvl=error msg="Engine failed temporarily, backing off sequencer"
err="failed to commit unsafe payload to conductor:
413 Request Entity Too Large: content length too large (9340888>5242880)"

Root Cause: Default HTTP body limit is 5MB, insufficient for blocks with 150+ transactions (9.3MB).

Call Stack & Evidence

Evidence Type Location Description
Entry Point op-conductor/cmd/main.go:25 main() starts conductor
RPC Init service.go:117 initRPCServer() called by init()
RPC Start service.go:435 rpcServer.Start() starts service
go.mod Replace go.mod go-ethereumokx/op-geth
Import Declaration handler.go:12 import "github.com/ethereum/go-ethereum/rpc"
Call op-geth handler.go:150 rpc.NewServer() creates op-geth Server
Set Limit handler.go:155 srv.SetHTTPBodyLimit(b.httpBodyLimit)
op-geth Implementation op-geth/rpc/server.go:96 SetHTTPBodyLimit() method
Validation Logic op-geth/rpc/http.go:345 HTTP body size check

Execution Flow

conductor main (cmd/main.go:25)
    ↓
conductor.New() → init() → initRPCServer() (service.go:92,117)
    ↓
oprpc.NewServer(WithHTTPBodyLimit(64MB)) (service.go:278)
    ↓
handler.NewHandler() → AddRPC() (handler.go:58,150)
    ↓
rpc.NewServer() [via go.mod replace → op-geth/rpc]
    ↓
srv.SetHTTPBodyLimit(64MB) (handler.go:155)
    ↓
s.httpBodyLimit = 67108864 (op-geth/rpc/server.go:97)
    ↓
ServeHTTP() → validateRequest() (op-geth/rpc/http.go:310,341)
    ↓
if ContentLength > httpBodyLimit { return 413 } ✅ (http.go:345)

Dependency Chain

go.mod: github.com/ethereum/go-ethereum
          → replaced with github.com/okx/op-geth
             ↓
op-service/rpc imports "github.com/ethereum/go-ethereum/rpc"
             ↓
Actually uses op-geth/rpc due to replace directive
             ↓
SetHTTPBodyLimit() defined in op-geth/rpc/server.go:96
             ↓
Validation occurs in op-geth/rpc/http.go:345

Solution

Increase Conductor's HTTP body limit to 64MB by leveraging op-geth's SetHTTPBodyLimit() API.

Changes

  1. Add WithHTTPBodyLimit() option in handler_options.go
  2. Apply limit via srv.SetHTTPBodyLimit() in handler.go
  3. Set 64MB for Conductor in service.go:278
  4. Add error logging with payload size in sequencer.go

Configuration

# Flag, default is 5 MB
- --rpc.http-body-limit-mb=64

@zjg555543 zjg555543 marked this pull request as ready for review December 24, 2025 07:46
@zjg555543 zjg555543 requested review from a team as code owners December 24, 2025 07:46
@zjg555543 zjg555543 requested a review from jelias2 December 24, 2025 07:46
@opgitgovernance opgitgovernance added the S-stale Status: Will be closed unless there is activity label Jan 7, 2026
@opgitgovernance
Copy link
Contributor

This pr has been automatically marked as stale and will be closed in 5 days if no updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-stale Status: Will be closed unless there is activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants