Linea
Instructions to set up your Linea node.
Requirements
- Setup your Axelar validator
- Minimum hardware requirements: 4 cores, 16GB RAM, 100GB Disk
- Ubuntu 22.04, Docker(tested on 22.04)
- Official Documentation
Prerequisites
sudo apt-get install jq -y
Install geth
Check the appropriate version for the network accordingly in their docs
# This is an example - check their docs and release page to opt for the right versionGETH_RELEASE=1.12.0-e501b3b0
# verify correct versionecho $GETH_RELEASE
# create a temp dir for binariescd $HOMEmkdir binaries && cd binaries
# if you are on linux amdwget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_RELEASE.tar.gztar -xvf geth-linux-amd64-$GETH_RELEASE.tar.gzcd geth-linux-amd64-$GETH_RELEASEchmod +x gethsudo mv geth /usr/bin/# verify versiongeth versioncd $HOME
Download genesis file
genesis.json https://docs.linea.build/files/geth/mainnet/genesis.json
Initialize the node
cd $HOMEmkdir -p $HOME/.linea/datageth --datadir $HOME/.linea/data init $HOME/.linea/config/genesis.json
It should give an output similar to this
INFO [07-16|15:48:00.683] Maximum peer count ETH=50 LES=0 total=50INFO [07-16|15:48:00.685] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"INFO [07-16|15:48:00.690] Set global gas cap cap=50,000,000INFO [07-16|15:48:00.690] Initializing the KZG library backend=gokzgINFO [07-16|15:48:00.799] Defaulting to pebble as the backing databaseINFO [07-16|15:48:00.799] Allocated cache and file handles database=$HOME/.linea/data/geth/chaindata cache=16.00MiB handles=16INFO [07-16|15:48:00.847] Opened ancient database database=$HOME/.linea/data/geth/chaindata/ancient/chain readonly=falseINFO [07-16|15:48:00.847] Writing custom genesis blockINFO [07-16|15:48:00.861] Persisted trie from memory database nodes=356 size=50.85KiB time="761.943µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00BINFO [07-16|15:48:00.867] Successfully wrote genesis state database=chaindata hash=b6762a..0ffbc6INFO [07-16|15:48:00.867] Defaulting to pebble as the backing databaseINFO [07-16|15:48:00.867] Allocated cache and file handles database=$HOME/.linea/data/geth/lightchaindata cache=16.00MiB handles=16INFO [07-16|15:48:00.914] Opened ancient database database=$HOME/.linea/data/geth/lightchaindata/ancient/chain readonly=falseINFO [07-16|15:48:00.914] Writing custom genesis blockINFO [07-16|15:48:00.931] Persisted trie from memory database nodes=356 size=50.85KiB time="747.265µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00BINFO [07-16|15:48:00.936] Successfully wrote genesis state database=lightchaindata hash=b6762a..0ffbc6
Setup systemd
Set the necessary variables
BOOTNODES="enode://ca2f06aa93728e2883ff02b0c2076329e475fe667a48035b4f77711ea41a73cf6cb2ff232804c49538ad77794185d83295b57ddd2be79eefc50a9dd5c48bbb2e@3.23.106.165:30303,enode://eef91d714494a1ceb6e06e5ce96fe5d7d25d3701b2d2e68c042b33d5fa0e4bf134116e06947b3f40b0f22db08f104504dd2e5c790d8bcbb6bfb1b7f4f85313ec@3.133.179.213:30303,enode://cfd472842582c422c7c98b0f2d04c6bf21d1afb2c767f72b032f7ea89c03a7abdaf4855b7cb2dc9ae7509836064ba8d817572cf7421ba106ac87857836fa1d1b@3.145.12.13:30303"
Create the systemd service file /etc/systemd/system/geth-linea.service
📝
📝
The following settings will allow your node to be accessed publicly from any machine, so update the IP address from 0.0.0.0 to your vald machine.
sudo tee /etc/systemd/system/geth-linea.service &>/dev/null <<EOF[Unit]Description=Geth nodeAfter=online.target
[Service]Type=simpleUser=$USERExecStart=/usr/bin/geth \--datadir $HOME/.linea/data \--networkid $NETWORK_ID \--rpc.allow-unprotected-txs \--txpool.accountqueue 50000 \--txpool.globalqueue 50000 \--txpool.globalslots 50000 \--txpool.pricelimit 1000000 \--txpool.pricebump 1 \--txpool.nolocals \--http --http.addr "0.0.0.0" --http.port 8545 --http.corsdomain '*' --http.api 'web3,eth,txpool,net' --http.vhosts='*' \--ws --ws.addr "0.0.0.0" --ws.port 8546 --ws.origins '*' --ws.api 'eth,net,web3,txpool' \--bootnodes $BOOTNODES \--syncmode full \--metrics --pprof --pprof.addr "0.0.0.0" --pprof.port 9545 \--verbosity 3Restart=alwaysRestartSec=3LimitNOFILE=4096
[Install]WantedBy=multi-user.targetEOF
Start the service
sudo systemctl daemon-reloadsudo systemctl enable geth-lineasudo systemctl restart geth-linea
Check logs
# change log settings to persistent if not alreadysed -i 's/#Storage=auto/Storage=persistent/g' /etc/systemd/journald.confsudo systemctl restart systemd-journaldjournalctl -u geth-linea.service -f -n 100 -o cat
Logs should appear like this
INFO [07-16|15:59:06.904] Imported new chain segment number=730 hash=e63dd9..478f65 blocks=128 txs=150 mgas=132.120 elapsed=205.694ms mgasps=642.312 age=1d19h51m dirty=1.04MiBINFO [07-16|15:59:07.113] Imported new chain segment number=858 hash=f81d81..7bf36a blocks=128 txs=133 mgas=17.657 elapsed=183.688ms mgasps=96.126 age=1d16h40m dirty=1.17MiBINFO [07-16|15:59:07.364] Imported new chain segment number=986 hash=4a154d..315f98 blocks=128 txs=204 mgas=32.286 elapsed=202.001ms mgasps=159.830 age=1d12h53m dirty=1.23MiBINFO [07-16|15:59:07.580] Imported new chain segment number=1114 hash=92b77b..1c2b95 blocks=128 txs=178 mgas=45.001 elapsed=183.949ms mgasps=244.637 age=1d7h33m dirty=1.24MiB
Verify RPC
The Linea RPC is
RPC=$(curl -4 ifconfig.me):8545
curl -X POST $RPC -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' | jq
If you get something like this in response of the above rpc call, your node is setup correctly
{ "jsonrpc": "2.0", "id": 1, "result": { "currentBlock": "0x10bcec", "healedBytecodeBytes": "0x0", "healedBytecodes": "0x0", "healedTrienodeBytes": "0x0", "healedTrienodes": "0x0", "healingBytecode": "0x0", "healingTrienodes": "0x0", "highestBlock": "0x1792276", "startingBlock": "0x1233f", "syncedAccountBytes": "0x422a06f3", "syncedAccounts": "0x5b14c0", "syncedBytecodeBytes": "0x26c0e4d8", "syncedBytecodes": "0x13cfd", "syncedStorage": "0x38195bc", "syncedStorageBytes": "0x2ef128d1b" }}
Wait for "result"
to become false
before using it in vald config
{ "jsonrpc": "2.0", "id": 1, "result": false }
Configure vald
In order for vald
to connect to your Linea node, your rpc_addr
should be exposed in
vald’s config.toml
[[axelar_bridge_evm]] name = "linea" rpc_addr = "http://IP:PORT"start-with-bridge = truefinality_override = "confirmation"