total 64
drwxr-xr-x 14 user staff 448 Dec 3 16:37 .
drwxr-xr-x 4 user staff 128 Dec 3 16:05 ..
-rw-r--r-- 1 user staff 682 Dec 3 16:07 .env.example
drwxr-xr-x 14 user staff 448 Dec 3 16:20 .git
-rw-r--r-- 1 user staff 9 Dec 3 16:08 .gitignore
-rw-r--r-- 1 user staff 581 Dec 3 16:17 Makefile
-rw-r--r-- 1 user staff 569 Dec 3 16:05 README.md
drwxr-xr-x 11 user staff 352 Dec 3 16:05 config
-rw-r--r-- 1 user staff 1518 Dec 3 16:05 docker-compose.yaml
-rw-r--r-- 1 user staff 1121 Dec 3 16:05 genesis.json
-rwxr-xr-x 1 user staff 216 Dec 3 16:05 init-script.sh
drwxr-xr-x 4 user staff 128 Dec 3 16:11 keys
-rw-r--r-- 1 user staff 466 Dec 3 16:19 validator.yaml
Create an Environment file with:
makeenv
Edit .env file
VALIDATOR NODE: Edit on the VALIDATOR Configuration section only
NODE_GRAFFITI: use your node's graffiti flag to include a short text in the blocks that your node creates
PUBLIC_BEACON_NODE : If you're running a full node change to your beacon node.
FEE_RECIPIENT : Input your JBC address to receive transaction fees
FULL NODE: Edit BOOTNODE Configuration too
NODE_PUBLIC_IP : your machine's public IP address (IPv4)
total 16
drwxr-xr-x 4 user staff 128 Dec 3 15:14 .
drwxr-xr-x 3 user staff 96 Dec 3 15:14 ..
-r--r----- 1 user staff 702 Dec 3 15:14 deposit_data-1701591267.json
-r--r----- 1 user staff 710 Dec 3 15:14 keystore-m_12381_3600_0_0_0-1701591267.json
Copy keystore-m_<timestamp>.json to folder keys
Example:
Import validator key
makeimport-validator-key
Example:
docker run -ti --rm -v ./data/lighthouse:/root/lighthouse -v ./data/lighthouse/custom/validators:/root/.lighthouse/custom/validators -v ./config:/config -v ./keys:/keys sigp/lighthouse lighthouse account validator import --directory=/keys --testnet-dir=/config
Running account manager for custom (/config) network
validator-dir path: "/root/.lighthouse/custom/validators"
WARNING: DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH ANOTHER CLIENT, OR YOU WILL GET SLASHED.
Keystore found at "/keys/keystore-m_12381_3600_0_0_0-1701591267.json":
- Public key: 0x92d768771c062137e7433fd27072330b14b75d94379432098916ea145d648d2aa84daa448fce166a943315e2644068b6
- UUID: 96bcdd0c-e0ef-48c2-8bff-7930965c86aa
If you enter the password it will be stored as plain-text in validator_definitions.yml so that it is not required each time the validator client starts.
Enter the keystore password, or press enter to omit it:
INPUT YOUR VALIDATOR KEY PASSWORD
If a password is correct and imported successfully will be shown:
Password is correct.
Successfully imported keystore.
Successfully updated validator_definitions.yml.
Successfully imported 1 validators (0 skipped).
WARNING: DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH ANOTHER CLIENT, OR YOU WILL GET SLASHED.
If you have more than 1 key store. you will input a password equal number of Keystore
The system will create a folder data
ls-ladata/lighthouse/custom/validators/
Example:
total 64
drwxr-xr-x 5 user staff 160 Dec 3 16:49 .
drwxr-xr-x 3 user staff 96 Dec 3 16:48 ..
drwxr-xr-x 3 user staff 96 Dec 3 16:49 0x92d768771c062137e7433fd27072330b14b75d94379432098916ea145d648d2aa84daa448fce166a943315e2644068b6
-rw------- 1 user staff 28672 Dec 3 16:49 slashing_protection.sqlite
-rw------- 1 user staff 425 Dec 3 16:49 validator_definitions.yml
You will see your validator public key that you imported!
Run a Validator node
makerun-validator
Example:
docker compose -f validator.yaml up -d
[+] Running 2/2
✔ Network node_default Created
✔ Container jbc-validator Started
Check a validator logs
makevalidator-logs
docker compose -f validator.yaml logs
jbc-validator | Dec 03 09:55:50.134 INFO Logging to file path: "/root/.lighthouse/custom/validators/logs/validator.log"
jbc-validator | Dec 03 09:55:50.134 INFO Lighthouse started version: Lighthouse/v4.5.0-441fc16
jbc-validator | Dec 03 09:55:50.134 INFO Configured for network name: custom (/config)
jbc-validator | Dec 03 09:55:50.135 INFO Starting validator client validator_dir: "/root/.lighthouse/custom/validators", beacon_nodes: ["http://119.59.123.101:5002/"]
jbc-validator | Dec 03 09:55:50.135 INFO HTTP metrics server is disabled
jbc-validator | Dec 03 09:55:50.150 INFO Completed validator discovery new_validators: 0
jbc-validator | Dec 03 09:55:50.739 INFO Enabled validator voting_pubkey: 0x92d768771c062137e7433fd27072330b14b75d94379432098916ea145d648d2aa84daa448fce166a943315e2644068b6, signing_method: local_keystore
jbc-validator | Dec 03 09:55:51.352 INFO Modified key_cache saved successfully
jbc-validator | Dec 03 09:55:51.353 INFO Initialized validators enabled: 1, disabled: 0
jbc-validator | Dec 03 09:55:51.399 INFO Initialized beacon node connections available: 1, total: 1
jbc-validator | Dec 03 09:55:51.409 INFO Loaded validator keypair store voting_validators: 1
jbc-validator | Dec 03 09:55:51.409 INFO Pruning slashing protection DB msg: pruning may take several minutes the first time it runs, epoch: 1142
jbc-validator | Dec 03 09:55:51.409 INFO Completed pruning of slashing protection DB
jbc-validator | Dec 03 09:55:51.418 INFO HTTP API server is disabled
jbc-validator | Dec 03 09:55:51.418 INFO Genesis has already occurred seconds_ago: 438700
jbc-validator | Dec 03 09:55:51.418 INFO Block production service started service: block
jbc-validator | Dec 03 09:55:51.418 INFO Attestation production service started next_update_millis: 7581, service: attestation
jbc-validator | Dec 03 09:55:51.418 INFO Sync committee service started next_update_millis: 7581, service: sync_committee
jbc-validator | Dec 03 09:55:51.418 INFO Validator registration service started service: preparation
jbc-validator | Dec 03 09:55:51.418 INFO Proposer preparation service started service: preparation
jbc-validator | Dec 03 09:55:51.418 INFO Doppelganger protection disabled.
jbc-validator | Dec 03 09:56:05.000 INFO Connected to beacon node(s) synced: 1, available: 1, total: 1, service: notifier
jbc-validator | Dec 03 09:56:05.000 INFO Awaiting activation slot: 36559, epoch: 1142, validators: 1, service: notifier
jbc-validator | Dec 03 09:56:17.003 INFO Connected to beacon node(s) synced: 1, available: 1, total: 1, service: notifier
jbc-validator | Dec 03 09:56:17.003 INFO Awaiting activation slot: 36560, epoch: 1142, validators: 1, service: notifier