Skip to content

Commit

Permalink
fix: websocket toggle for execution clients (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgresham authored Nov 22, 2023
1 parent 803291d commit d1a29d4
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 3 deletions.
80 changes: 79 additions & 1 deletion src/common/NodeSpecs/besu/besu-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"input": {
"defaultConfig": {
"http": "Enabled",
"webSockets": "Enabled",
"webSockets": "Disabled",
"httpCorsDomains": "\"http://localhost\"",
"hostAllowList": "localhost,host.containers.internal",
"engineRpc": "Enabled",
Expand Down Expand Up @@ -198,6 +198,84 @@
"documentation": "https://besu.hyperledger.org/public-networks/reference/cli/options#rpc-ws-port",
"infoDescription": "The port (TCP) on which WebSocket JSON-RPC listens. The default is 8546. You must expose ports appropriately (https://besu.hyperledger.org/en/stable/HowTo/Find-and-Connect/Configuring-Ports/)."
},
"webSocketAddress": {
"displayName": "WebSocket-RPC server listening interface",
"cliConfigPrefix": "--rpc-ws-host=",
"defaultValue": "0.0.0.0",
"uiControl": {
"type": "text"
},
"documentation": "https://besu.hyperledger.org/public-networks/reference/cli/options#rpc-ws-host"
},
"webSocketApis": {
"displayName": "Enabled certain WebSocket APIs",
"category": "RPC APIs",
"cliConfigPrefix": "--rpc-ws-api=",
"valuesJoinStr": ",",
"uiControl": {
"type": "select/multiple",
"controlTranslations": [
{
"value": "ADMIN",
"config": "ADMIN"
},
{
"value": "CLIQUE",
"config": "CLIQUE"
},
{
"value": "DEBUG",
"config": "DEBUG"
},
{
"value": "EEA",
"config": "EEA"
},
{
"value": "ETH",
"config": "ETH"
},
{
"value": "IBFT",
"config": "IBFT"
},
{
"value": "MINER",
"config": "MINER"
},
{
"value": "NET",
"config": "NET"
},
{
"value": "PERM",
"config": "PERM"
},
{
"value": "PLUGINS",
"config": "PLUGINS"
},
{
"value": "QBFT",
"config": "QBFT"
},
{
"value": "TRACE",
"config": "TRACE"
},
{
"value": "TXPOOL",
"config": "TXPOOL"
},
{
"value": "WEB3",
"config": "WEB3"
}
]
},
"defaultValue": ["ETH", "NET", "WEB3"],
"documentation": "https://besu.hyperledger.org/public-networks/reference/cli/options#rpc-ws-api"
},
"httpCorsDomains": {
"displayName": "HTTP-RPC CORS domains",
"cliConfigPrefix": "--rpc-http-cors-origins=",
Expand Down
55 changes: 55 additions & 0 deletions src/common/NodeSpecs/geth/geth-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"httpVirtualHosts": "localhost,host.containers.internal",
"authVirtualHosts": "localhost,host.containers.internal",
"httpAddress": "0.0.0.0",
"webSocketAddress": "0.0.0.0",
"syncMode": "snap"
},
"docker": {
Expand Down Expand Up @@ -144,6 +145,60 @@
"infoDescription": "The port (TCP) on which WebSocket JSON-RPC listens. The default is 8546. You must expose ports appropriately.",
"documentation": "https://geth.ethereum.org/docs/rpc/server#websocket-server"
},
"webSocketAddress": {
"displayName": "WebSocket-RPC server listening interface",
"cliConfigPrefix": "--ws.addr ",
"defaultValue": "0.0.0.0",
"uiControl": {
"type": "text"
},
"documentation": "https://geth.ethereum.org/docs/interacting-with-geth/rpc#websockets-server"
},
"webSocketAllowedOrigins": {
"displayName": "WebSocket-RPC allowed origins",
"defaultValue": "http://localhost",
"cliConfigPrefix": "--ws.origins ",
"uiControl": {
"type": "text"
},
"infoDescription": "Change where the node accepts web socket connections (use comma separated urls) or \"*\" for all"
},
"webSocketApis": {
"displayName": "Enabled WebSocket APIs",
"cliConfigPrefix": "--ws.api ",
"defaultValue": ["eth", "net", "web3"],
"valuesJoinStr": ",",
"uiControl": {
"type": "select/multiple",
"controlTranslations": [
{
"value": "eth",
"config": "eth"
},
{
"value": "net",
"config": "net"
},
{
"value": "web3",
"config": "web3"
},
{
"value": "debug",
"config": "debug"
},

{
"value": "personal",
"config": "personal"
},
{
"value": "admin",
"config": "admin"
}
]
}
},
"httpApis": {
"displayName": "Enabled HTTP APIs",
"cliConfigPrefix": "--http.api ",
Expand Down
24 changes: 22 additions & 2 deletions src/common/NodeSpecs/nethermind/nethermind-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"input": {
"defaultConfig": {
"http": "Enabled",
"webSockets": "Disabled",
"syncMode": "snap",
"webSocketsPort": "8546",
"enginePort": "8551"
Expand Down Expand Up @@ -110,6 +111,25 @@
"defaultValue": "Enabled",
"documentation": "https://docs.nethermind.io/nethermind/ethereum-client/json-rpc"
},
"webSockets": {
"displayName": "WebSocket JSON-RPC connections",
"category": "RPC APIs",
"uiControl": {
"type": "select/single",
"controlTranslations": [
{
"value": "Enabled",
"config": ""
},
{
"value": "Disabled",
"config": "--Init.WebSocketsEnabled false"
}
]
},
"defaultValue": "Enabled",
"documentation": "https://docs.nethermind.io/interacting/json-rpc-server/#websocket"
},
"p2pPorts": {
"displayName": "P2P port (UDP and TCP)",
"cliConfigPrefix": ["--Network.P2PPort ", "--Network.DiscoveryPort "],
Expand Down Expand Up @@ -234,8 +254,8 @@
"webSocketsPort": {
"displayName": "WebSockets JSON-RPC port",
"cliConfigPrefix": "--JsonRpc.WebSocketsPort ",
"defaultValue": "8545",
"niceNodeDefaultValue": "8545",
"defaultValue": "8546",
"niceNodeDefaultValue": "8546",
"uiControl": {
"type": "text"
},
Expand Down
74 changes: 74 additions & 0 deletions src/common/NodeSpecs/reth/reth-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,80 @@
"defaultValue": "Disabled",
"documentation": "https://paradigmxyz.github.io/reth/cli/node.html"
},
"webSocketAddress": {
"displayName": "WebSocket-RPC server listening interface",
"cliConfigPrefix": "--ws.addr ",
"defaultValue": "0.0.0.0",
"uiControl": {
"type": "text"
},
"documentation": "https://geth.ethereum.org/docs/interacting-with-geth/rpc#websockets-server"
},
"webSocketAllowedOrigins": {
"displayName": "WebSocket-RPC allowed origins",
"defaultValue": "http://localhost",
"cliConfigPrefix": "--ws.origins ",
"uiControl": {
"type": "text"
},
"infoDescription": "Change where the node accepts web socket connections (use comma separated urls) or \"*\" for all"
},
"webSocketApis": {
"displayName": "Enabled WebSocket APIs",
"cliConfigPrefix": "--ws.api ",
"defaultValue": ["eth", "net", "web3"],
"valuesJoinStr": ",",
"uiControl": {
"type": "select/multiple",
"controlTranslations": [
{
"value": "eth",
"config": "eth"
},
{
"value": "net",
"config": "net"
},
{
"value": "web3",
"config": "web3"
},
{
"value": "debug",
"config": "debug"
},

{
"value": "personal",
"config": "personal"
},
{
"value": "admin",
"config": "admin"
},
{
"value": "ots",
"config": "ots"
},
{
"value": "rpc",
"config": "rpc"
},
{
"value": "reth",
"config": "reth"
},
{
"value": "trace",
"config": "trace"
},
{
"value": "txpool",
"config": "txpool"
}
]
}
},
"httpApis": {
"displayName": "Enabled HTTP APIs",
"cliConfigPrefix": "--http.api ",
Expand Down

0 comments on commit d1a29d4

Please sign in to comment.