diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index e98d6c800..cfd56c301 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -499,6 +499,12 @@ proc init*(T: type BeaconNode, else: none(DepositContractSnapshot) + if config.web3Urls.len() == 0: + if cfg.BELLATRIX_FORK_EPOCH == FAR_FUTURE_EPOCH: + notice "Running without execution client - validator features partially disabled (see https://nimbus.guide/eth1.html)" + else: + notice "Running without execution client - validator features disabled (see https://nimbus.guide/eth1.html)" + var eth1Monitor: Eth1Monitor if not ChainDAGRef.isInitialized(db).isOk(): var diff --git a/docs/the_nimbus_book/src/eth1.md b/docs/the_nimbus_book/src/eth1.md index dba4a1945..679f61b6d 100644 --- a/docs/the_nimbus_book/src/eth1.md +++ b/docs/the_nimbus_book/src/eth1.md @@ -4,7 +4,13 @@ In order to be able to produce blocks and process incoming validator deposits, y Nimbus has been tested all major execution clients - see the [execution client comparison](https://ethereum.org/en/developers/docs/nodes-and-clients/#execution-clients) for more information. -By default, Nimbus uses WebSockets to communicate with the execution client, connecting to ws://localhost:8546. You can provide a different URL with the `--web3-url` parameter. +The `--web3-url` option informs the beacon node how to connect to the execution client - both `http://` and `ws://` URL:s are supported. + +Assuming the execution client is running on the same computer as the beacon node: + +```sh +./run-mainnet-beacon-node.sh --web3-url=ws://127.0.0.1:8546 +``` > ⚠️ You need to run your own execution client after [the merge](./merge.md) - relying on third-party services such as Infura, Alchemy and Pocket will not be possible. @@ -55,7 +61,6 @@ INFO [05-29|01:16:10] Imported new chain segment blocks=1 txs=1 INFO [05-29|01:16:14] Imported new chain segment blocks=1 txs=11 mgas=1.135 elapsed=22.281ms mgasps=50.943 number=3785444 hash=277bb9…623d8c ``` - Geth accepts connections from the loopback interface (`127.0.0.1`), with default WebSocket port `8546`. This means that your default Web3 provider URL should be: `ws://127.0.0.1:8546` ## Nethermind diff --git a/run-mainnet-beacon-node.sh b/run-mainnet-beacon-node.sh index 180df0024..cff7de916 100755 --- a/run-mainnet-beacon-node.sh +++ b/run-mainnet-beacon-node.sh @@ -9,5 +9,5 @@ cd "$(dirname $0)" # Allow the binary to receive signals directly. -exec scripts/run-beacon-node.sh nimbus_beacon_node mainnet $@ +exec scripts/run-beacon-node.sh nimbus_beacon_node mainnet "$@" diff --git a/run-prater-beacon-node.sh b/run-prater-beacon-node.sh index 3c8323a94..27de1aa75 100755 --- a/run-prater-beacon-node.sh +++ b/run-prater-beacon-node.sh @@ -9,5 +9,5 @@ cd "$(dirname $0)" # Allow the binary to receive signals directly. -exec scripts/run-beacon-node.sh nimbus_beacon_node prater $@ +exec scripts/run-beacon-node.sh nimbus_beacon_node prater "$@" diff --git a/run-ropsten-beacon-node.sh b/run-ropsten-beacon-node.sh index 56a85c8a3..218d71d7f 100755 --- a/run-ropsten-beacon-node.sh +++ b/run-ropsten-beacon-node.sh @@ -9,4 +9,4 @@ cd "$(dirname $0)" # Allow the binary to receive signals directly. -exec scripts/run-beacon-node.sh nimbus_beacon_node ropsten $@ +exec scripts/run-beacon-node.sh nimbus_beacon_node ropsten "$@" diff --git a/run-sepolia-beacon-node.sh b/run-sepolia-beacon-node.sh index 208f98fab..edd3d56f3 100755 --- a/run-sepolia-beacon-node.sh +++ b/run-sepolia-beacon-node.sh @@ -9,4 +9,4 @@ cd "$(dirname $0)" # Allow the binary to receive signals directly. -exec scripts/run-beacon-node.sh nimbus_beacon_node sepolia $@ +exec scripts/run-beacon-node.sh nimbus_beacon_node sepolia "$@" diff --git a/scripts/run-beacon-node.sh b/scripts/run-beacon-node.sh index 03f10dc76..f608aa11c 100755 --- a/scripts/run-beacon-node.sh +++ b/scripts/run-beacon-node.sh @@ -58,36 +58,6 @@ MISSING_BINARY_HELP exit 1 fi -WEB3_URL_OPT_PRESENT=0 -for op in "$@"; do - if [[ "${op}" =~ ^--web3-url=.*$ ]]; then - WEB3_URL_OPT_PRESENT=1 - break - fi -done - -if [[ "${WEB3_URL}" == "" && "${WEB3_URL_OPT_PRESENT}" == "0" ]]; then - cat <