A leading open-source Ethereum consensus client, written in Rust.
Lighthouse is an Ethereum consensus client that connects to other Ethereum consensus clients to form a resilient and decentralized proof-of-stake blockchain.
A. Run these commands to enter this Cartenz Chain directory
cd gitshock-chain/cartenz
B. Create a JWT Secret to create a new secret key by running this command
openssl rand -hex 32 | tr -d "\n" > "jwt.hex"
C. Run this command to create a new execution layer account
geth account new --datadir "data" << data is folder PATH for your keystore
Your new account is locked with a password. Please give a password. Do not forget this password.
Password: (.............)
Create a password and remember it (as you wish)
a public address of the key will be generated (public address of the key will look like 0x.. something). Then a path of the secret key file will also be generated, save it .You’ll need to save them in a safe place directly and you can share the PUBLIC KEY, and don’t EVEN Share your path to the secret key
Before running the Node, we use the POSIX Nohup (No Hang UP) command which means (Do Not Close) a command in Linux systems that keeps the process running even after exiting the shell or terminal. Nohup prevents the process or job from receiving the SIGHUP (Signal Hang UP) signal. This is the signal sent to the process after closing or exiting the terminal.
Running Execution Layer
# Create Folder
mkdir logs
cd logs
touch geth_1.log
cd ..
nohup geth \
--datadir "/PATH/YOUR/ACCOUNT" \
--http --http.api="engine,eth,web3,net,admin" \
--ws \
--ws.api="engine,eth,web3,net,debug" \
--http.corsdomain="*" \
--networkid=1881 \
--syncmode=full \
--authrpc.jwtsecret="/your/path/folder/jwt.hex" \
> /your/path/folder/log/geth_1.log &
# If You Need RPC Api, You Can Add This
--http.addr 0.0.0.0
--http.port 8545
Add Peer Node
geth attach http://localhost:8545
After entering the Geth Interactive Console Javascript, you must add a Manual Peer & Trusted Peer of at least 1 to connect to the blockchain, please take it in the folder: consensus/bootnodes_enr.txt
Example: admin.addPeer("enode://03fc89e2035b52a609715a15dacad4179f57c0b1e51b3464a931f0fa913b9169d06df1b23515f41e4ed6d9be0e50f33175cbf836e7b6738c62eee00ad45250b0@212.47.241.173:30303")
Output:
> True
Get Bootnodes
Get the Bootnode Inside the Geth Interactive Console, for You to Save Using Command
admin.nodeInfo.enode
Example Output:
"enode://03fc89e2035b52a609715a15dacad4179f57c0b1e51b3464a931f0fa913b9169d06df1b23515f41e4ed6d9be0e50f33175cbf836e7b6738c62eee00ad45250b0@212.47.241.173:30303"
nohup lighthouse \
--testnet-dir /your/path/folder/consensus \
bn \
--datadir "/your/path/folder/beacons1" \
--eth1 \
--http \
--http-allow-sync-stalled \
--execution-endpoints "http://127.0.0.1:8551" \
--eth1-endpoints "http://127.0.0.1:8545" \
--http-address 0.0.0.0 \
--http-port 5053 \
--http-allow-origin="*" \
--listen-address 0.0.0.0 \
--enr-udp-port 9001 \
--enr-tcp-port 9001 \
--port 9001 \
--enr-address 54.82.42.159 \
--execution-jwt "/your/path/folder/jwt.hex" \
--suggested-fee-recipient="YOUR ADDRESS VALIDATOR HERE" \
--boot-nodes="FILL IN THE ENR YOU GOT FROM THE FIRST CONSENSUS LAYER AND ADD IT FROM THE CARTENZ CHAIN ENR." \
> /home/ubuntu/logs/beacon_2.log &
Building a Staker To Be Good Validator
Visit the Staking Website and Select Deposit and Make a Deposit with Command:
// Example From Deposit
deposit new-mnemonic --num_validators 200 --eth1_withdrawal_address 0x9adddA86C9479C45bD145BBa9FC28146FdF46C83
# Example Output Mnemonic:
"vibrant refuse observe flag shy depth disagree proud race angle vote picnic fancy renew museum bonus arena people thumb there atom tuna abstract negative"
Import Validator Keystore
# Before Import The Key you need create file password.txt and input
lighthouse account validator import \
--testnet-dir /your/path/folder/logs/consensus \
--datadir "/your/path/folder/logs/validator" \
--directory /your/path/folder/logs/validator_keys \
--password-file /your/path/folder/logs/password.txt \
--reuse-password
Output :
Mar 29 16:06:09.001 INFO Connected to beacon node(s) synced: 1, available: 1, total: 1, service: notifier
Mar 29 16:06:09.001 INFO Awaiting activation slot: 9748, epoch: 304, validators: 8, service: notifier
Mar 29 16:06:21.001 INFO Connected to beacon node(s) synced: 1, available: 1, total: 1, service: notifier
How long does it take to sync a node?
48-72hours
this cannot be an actual reference time. The sync process is very long and can take up to 48-72 hours. Sync speed depends on your internet speed and storage device write speed. Because data is stored in blocks and linked together, corruption in a single block can corrupt the entire data chain