Skip to content

Commit

Permalink
Increase default websocket size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-Wilson committed May 10, 2024
1 parent 9dda8ef commit dc706bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
13 changes: 6 additions & 7 deletions cmd/conf/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ type ParentChainConfig struct {
}

var L1ConnectionConfigDefault = rpcclient.ClientConfig{
URL: "",
Retries: 2,
Timeout: time.Minute,
ConnectionWait: time.Minute,
ArgLogLimit: 2048,
// Use geth's unexported wsDefaultReadLimit from rpc/websocket.go
WebsocketMessageSizeLimit: 32 * 1024 * 1024,
URL: "",
Retries: 2,
Timeout: time.Minute,
ConnectionWait: time.Minute,
ArgLogLimit: 2048,
WebsocketMessageSizeLimit: 256 * 1024 * 1024,
}

var L1ConfigDefault = ParentChainConfig{
Expand Down
15 changes: 7 additions & 8 deletions util/rpcclient/rpcclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@ type ClientConfigFetcher func() *ClientConfig
var TestClientConfig = ClientConfig{
URL: "self",
JWTSecret: "",
WebsocketMessageSizeLimit: 32 * 1024 * 1024,
WebsocketMessageSizeLimit: 256 * 1024 * 1024,
}

var DefaultClientConfig = ClientConfig{
URL: "self-auth",
JWTSecret: "",
Retries: 3,
RetryErrors: "websocket: close.*|dial tcp .*|.*i/o timeout|.*connection reset by peer|.*connection refused",
ArgLogLimit: 2048,
// Use geth's unexported wsDefaultReadLimit from rpc/websocket.go
WebsocketMessageSizeLimit: 32 * 1024 * 1024,
URL: "self-auth",
JWTSecret: "",
Retries: 3,
RetryErrors: "websocket: close.*|dial tcp .*|.*i/o timeout|.*connection reset by peer|.*connection refused",
ArgLogLimit: 2048,
WebsocketMessageSizeLimit: 256 * 1024 * 1024,
}

func RPCClientAddOptions(prefix string, f *flag.FlagSet, defaultConfig *ClientConfig) {
Expand Down

0 comments on commit dc706bf

Please sign in to comment.