Setting up a Validator FAQ

When I run $ docker run -vpwd:/root/.celo -it us.gcr.io/celo-testnet/celo-node:alfajores account new, I get the following error:

Fatal: Failed to read passphrase: liner: function not supported in this terminal

This is an issue with running the Celo blockchain (or any other version of geth) in Docker. Since the error is non deterministic just rerun the command until it succeeds. Use a non-empty passphrase to avoid problems in later steps.

If that doesn’t work then access the Celo node shell by entering into the following Docker container:

$ docker run -vpwd:/root/.celo --entrypoint /bin/sh -it us.gcr.io/celo-testnet/celo-node:alfajores

Once you’re in the shell of the above created container, create two accounts, one for the Validator and one for Validator Group, and get their addresses if you don’t already have them.

Take note of these addresses, label one of them CELO_VALIDATOR_GROUP_ADDRESS and the other CELO_VALIDATOR_ADDRESS. You’ll be prompted to enter a password. Take note of these too.

If you already have your accounts, you can skip this step.

/ # geth account new

In order to register the validator later on, generate a “proof of possession” - a signature proving you know your validator’s BLS private key. Run this command:

/ # geth account proof-of-possession <CELO_VALIDATOR_ADDRESS>

Take note of the proof of possession hash.

Leave the Docker container:

/ # exit

And finally, save these addresses to environment variables, so that you can reference it later:

$ export CELO_VALIDATOR_GROUP_ADDRESS=<YOUR-VALIDATOR-GROUP-ADDRESS>
$ export CELO_VALIDATOR_ADDRESS=<YOUR-VALIDATOR-ADDRESS>
$ export CELO_VALIDATOR_POP=<YOUR-VALIDATOR-PROOF-OF-POSSESSION>

Your are now ready to move to the next section in the documentation: Deploy the Validator Node.


When I run $docker run -vpwd:/root/.celo us.gcr.io/celo-testnet/celo-node:alfajores init /celo/genesis.json, I get the following error:

Fatal: Failed to read passphrase: liner: function not supported in this terminal

This is an issue with running the Celo blockchain (or any other version of geth) in Docker. Since the error is non deterministic just rerun the command until it succeeds.

If that doesn’t work then access the Celo node shell by entering into the following Docker container:

$ docker run -rm -vpwd:/root/.celo --entrypoint /bin/sh -it us.gcr.io/celo-testnet/celo-node:alfajores

Initialize Celo with the genesis block:

/ # geth init /celo/genesis.json

To participate in consensus, we need to set up our nodekey for our account. We can do so via the following command (it will prompt you for your passphrase):

/ # geth account set-node-key <CELO_VALIDATOR_ADDRESS>

In order to allow the node to sync with the network, give it the address for the bootnode:

/ # cp /celo/static-nodes.json /root/.celo/

/ # exit

Finally, start up the node:

$ docker run -p 127.0.0.1:8545:8545 -p 127.0.0.1:8546:8546 -p 30303:30303 -p 30303:30303/udp -vpwd:/root/.celo us.gcr.io/celo-testnet/celo-node:alfajores --verbosity 3 --networkid 44782 --syncmode full --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --maxpeers 1100 --mine --miner.verificationpool=https://us-central1-celo-testnet-production.cloudfunctions.net/handleVerificationRequestalfajores/v0.1/sms/ --etherbase $CELO_VALIDATOR_ADDRESS

Then return to Set up deposits in the documentation.


When I try to set-up up a validator following the instructions in the docs, I get the following: Error: Returned error: gas required exceeds allowance or always failing transaction

Your node may not be synchronized. When you start running your node you should see messages like the ones below. There may be some errors or warnings that are ignorable.

INFO [07-16|14:04:24.924] Imported new chain segment               blocks=139  txs=319 mgas=61.987 elapsed=8.085s mgasps=7.666 number=406  hash=9acf16…4fddc8 age=6h58m44s cache=1.51mB
INFO [07-16|14:04:32.928] Imported new chain segment               blocks=303  txs=179 mgas=21.837 elapsed=8.004s mgasps=2.728 number=709  hash=8de06a…77bb92 age=6h33m37s cache=1.77mB
INFO [07-16|14:04:40.918] Imported new chain segment               blocks=411  txs=0   mgas=0.000  elapsed=8.023s mgasps=0.000 number=1120 hash=3db22a…9fa95a age=5h59m30s cache=1.92mB
INFO [07-16|14:04:48.941] Imported new chain segment               blocks=335  txs=0   mgas=0.000  elapsed=8.023s mgasps=0.000 number=1455 hash=7eb3f8…32ebf0 age=5h31m43s cache=2.09mB
INFO [07-16|14:04:56.944] Imported new chain segment               blocks=472  txs=0   mgas=0.000  elapsed=8.003s mgasps=0.000 number=1927 hash=4f1010…1414c1 age=4h52m31s cache=2.34mB

You will have fully synced with the network once you have pulled the latest block number, which you can lookup by visiting at the Alfajores Testnet Stats page.

It could also be that you haven’t got the latest version of CeloCLI installed. Check that you have version 0.0.17 by running:

$ npm view @celo/celocli version

If you’re still facing issues you can do $ DEBUG=* celocli <command> for more information.


I’ve gotten my validator setup and synced but I can’t see my node on ethstats: https://alfajores-ethstats.celo-testnet.org .

The C Labs team currently has a secret associated with ethstats so that nodes will only show up if they know the secret. Here’s the culprit line in the C Labs validator infrastructure where we use the --ethstats flag to tell geth where to send ethstats metrics.

There’s definitely merit in node operators apart from C Labs being able to monitor a node without having to spin up their own infrastructure like ethstats. We’re having discussions on how to enable node operators to do this.