In order to use a local instance of geth
you'd have to follow these steps:
- Make sure to have installed
geth
and to have it accessible on the commandline (added to PATH, etc): https://geth.ethereum.org/docs/install-and-build/installing-geth - Run it with the following parameters:
geth --ws --gcmode archive
--ws
: enable the websocket RPC API so Nimbus can query the Eth1 chain using Web3 API calls--gcmode archive
: without this Nimbus won't be able to sync because calls toeth_call
will be failing due to missing trie nodes more than 128 blocks away from the current head of the Eth1 chain. This however requires more disk space - in the case of theGoerli
testnet this increases thechaindata
folder from<10GB
to60GB+
.- if you'd like to connect to an Eth2 testnet (like
Medalla
) instead of Eth2 mainnet you'd have to also pass--goerli
so thatgeth
connects to theGoerli
Eth1 testnet where the deposit contract for the specific Eth2 testnet lives (likeMedalla
). - You can also change the listening address and port of your
geth
instance by specifying--ws.addr value
and--ws.port value
but don't forget to reflect that in the Web3 URL when starting Nimbus.
- Let it sync - you'll be using the fast sync mode by default and 16 months of
Goerli
Eth1 chain data takes about a couple of hours, but you could also use--syncmode full
if you so desire. It could take a lot longer if there are problems finding peers to sync. - Launch Nimbus by specifying a different Web3 address from the default one (centralized - using Infura) like this:
make GOERLI_WEB3_URL=ws://localhost:8546 medalla
- TODO: change this to not be always
GOERLI_...
if this document should be readable for mainnet as well
- TODO: change this to not be always
In order to run an archive node, you need to specify
--syncmode full
in addition to--gcmode archive
.