The Mode Mainnet archive node has a size of 544GB on October 11th, 2024
Mode
Mode operates within the Optimism Superchain ecosystem. It is powered by the OP Stack, in collaboration with Optimism, leveraging the scalability and security of Optimism's Layer 2 infrastructure.
In this guide, we are walking through the process of setting up a Mode Mainnet archive node using Optimism's op-geth and op-node.
Before you start, make sure that you have your own synced Ethereum L1 RPC URL (e.g. Erigon) and L1 Consensus Layer Beacon endpoint with all historical blobs data (e.g. Lighthouse) ready. A beacon endpoint meeting this criteria is essential for syncing to start.
Not advised to allow all or unknown IP address to RPC port
Enable Firewall
sudoufwenable
To check the status of UFW and see the current rules
sudoufwstatusverbose
Install dependencies
Required Software Dependencies
Dependency
Version
Version Check Command
go
^1.21
go version
node
^20
node --version
pnpm
^8
pnpm --version
foundry
^0.2.0
forge --version
make
^4
make --version
yarn
1.22.21
yarn --version
nvm
0.39.3
nvm --verison
Install GO
sudowgethttps://go.dev/dl/go1.21.6.linux-amd64.tar.gz&&sudorm-rf/usr/local/go&&sudotar-C/usr/local-xzfgo1.21.6.linux-amd64.tar.gz&&rmgo1.21.6.linux-amd64.tar.gz#to verify Go installationgoversion#If it returns Command 'go' not found simply run echo'export PATH=$PATH:/usr/local/go/bin:/root/.local/bin'>>/root/.bashrc#and then apply changes withsource/root/.bashrc
cd#to return to /root/ directorygitclonehttps://github.com/mode-network/nodecdnodeexport CONDUIT_NETWORK=mode-mainnet-0./download-config.py $CONDUIT_NETWORK#move genesis.json and rollup.json into op-geth directory mv/root/node/networks/mode-mainnet-0/genesis.json/root/node/networks/mode-mainnet-0/rollup.json/root/data/mode/mode-op-geth/
Build op-node
cd/root/mode/gitclonehttps://github.com/ethereum-optimism/optimism.gitcdoptimismgitcheckoutv1.9.3makeop-node# The binary is built at /root/zora/optimism/op-node/bin/op-node
Create systemd service for op-node
sudonano/etc/systemd/system/mode-op-node.service
Paste the following configs replacing {L1 RPC},{L1 BEACON RPC},{SERVER IP} with own values
cd/root/mode/gitclonehttps://github.com/ethereum-optimism/op-geth.gitcdop-gethgitcheckoutv1.101408.0makegeth# The binary is built at /root/github/op-geth/build/bin/geth
It's usually simpler to begin with startingop-geth before you start op-node. You can start op-geth even if op-node isn't running yet, but op-geth won't get any blocks until op-node starts.
sudosystemctldaemon-reload#refresh systemd configuration when changes madesudosystemctlenablemode-op-geth.service#enable mode-op-geth service at system startupsudosystemctlstartmode-op-geth.service#start mode-op-gethsudonano/etc/systemd/system/mode-op-geth.service#make changes in mode-op-geth.service file
Start op-node
Once you've started op-geth, you can start op-node. op-node will connect to op-geth and begin synchronizing the Mode network. op-node will begin sending block payloads to op-geth when it derives enough blocks from Ethereum
sudosystemctldaemon-reload#refresh systemd configuration when changes madesudosystemctlenablemode-op-node.service#enable mode-op-node service at system startupsudosystemctlstartmode-op-node.service#start mode-op-nodesudonano/etc/systemd/system/mode-op-node.service#make changes in mode-op-node.service file
Monitor the logs for errors
sudojournalctl-fumode-op-node.service#follow logs of mode-op-node.servicesudojournalctl-fumode-op-geth.service#follow logs of mode-op-geth.service
You are expected to get following log messages from op-node
INFO [09-25|18:05:58.867]Chainheadwasupdatednumber=13,351,729hash=9370fe..c97646root=7893dd..996e12elapsed="259.761µs"age=4d17h41mINFO [09-25|18:05:58.885]Startingworkonpayloadid=0x033de8416465dcbcINFO [09-25|18:05:58.902]Importednewpotentialchainsegmentnumber=13,351,730hash=c104d3..5e623bblocks=1txs=3mgas=2.563elapsed=15.108msmgasps=169.673age=4d17h41msnapdiffs=3.4triedirty=0.00B
Run curl command in the terminal to check the status of your node