Skip to content

Latest commit

 

History

History
119 lines (109 loc) · 3.52 KB

README.md

File metadata and controls

119 lines (109 loc) · 3.52 KB

Install-morph-validator-node

This repository describes in detail how to install the validator node of the Morph project.


Build From Source Code

Clone Morph

mkdir -p ~/.morph 
cd ~/.morph
git clone https://github.com/morph-l2/morph.git

Now we move on to the current branch. At the time of writing the guide, this is a branch: v0.1.0-beta

cd morph
git checkout v0.1.0-beta

Build Geth

make nccc_geth

Build Node

cd ~/.morph/morph/node 
make build

Sync from the genesis block

Download genesis file

cd ~/.morph
wget https://raw.githubusercontent.com/morph-l2/config-template/main/holesky/data.zip
unzip data.zip

Create a secret

cd ~/.morph
openssl rand -hex 32 > jwt-secret.txt

Start two process

Geth

NETWORK_ID=2810

nohup ./morph/go-ethereum/build/bin/geth \
--datadir=./geth-data \
--verbosity=3 \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--http.port=8545 \
--http.api=web3,eth,txpool,net,engine \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=8546 \
--ws.origins="*" \
--ws.api=web3,eth,txpool,net,engine \
--networkid=$NETWORK_ID \
--authrpc.addr="0.0.0.0" \
--authrpc.port="8551" \
--authrpc.vhosts="*" \
--authrpc.jwtsecret=$JWT_SECRET_PATH \
--gcmode=archive \
--metrics \
--metrics.addr=0.0.0.0 \
--metrics.port=6060 \
--miner.gasprice="100000000"

Node

cd ~/.morph
export L1MessageQueueWithGasPriceOracle=0x778d1d9a4d8b6b9ade36d967a9ac19455ec3fd0b
export START_HEIGHT=1434640
export Rollup=0xd8c5c541d56f59d65cf775de928ccf4a47d4985c
./morph/node/build/bin/morphnode --validator --home ./node-data \
     --l2.jwt-secret ./jwt-secret.txt \
     --l2.eth http://localhost:8545 \
     --l2.engine http://localhost:8551 \
     --l1.rpc $(Ethereum Holesky RPC)  \
     --l1.beaconrpc $(Ethereum Holesky beacon chain RPC)  \
     --l1.chain-id  17000   \
     --validator.privateKey $(Your Validator Key)  \
     --sync.depositContractAddr $(L1MessageQueueWithGasPriceOracle) \
     --sync.startHeight  $(START_HEIGHT) \
     --derivation.rollupAddress $(Rollup) \
     --derivation.startHeight  $(START_HEIGHT) \
     --derivation.fetchBlockRange 200 \
     --log.filename ./node.log

The end!

If you liked this guide, please go to all my social networks)