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 ..
# 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"
For this step you need NVM to compile all the Lodestar files. See Here
git clone -b stable https://github.com/chainsafe/lodestar.git
Switch to created directory.
cd lodestar
yarn install --ignore-optional
yarn run build
./lodestar --help
# If you want to move the lodestar file you can use:
sudo cp lodestar /usr/local/bin
lodestar --version
nohup lodestar beacon \
--suggestedFeeRecipient "YOUR ADDRESS HERE" \
--execution.urls "http://127.0.0.1:8551" \
--jwt-secret /path/your/folder/jwt.hex \
--dataDir "/home/ubuntu/cartenz/data-2" \
--paramsFile "/home/ubuntu/cartenz/consensus/config.yaml" \
--genesisStateFile "/home/ubuntu/cartenz/consensus/genesis.ssz" \
--enr.ip 172.31.22.244 \
--rest.port 9599 \
--port 9001 \
--network.connectToDiscv5Bootnodes true \
--logLevel info \
--bootnodes="ADD YOUR ENR HERE AND ADDING MORE FROM THE CARTENZ TESTNET REPOSITORY" \
> /home/ubuntu/cartenz/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"
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