The BobaBNB archive node has a size of 525GB on August 8th, 2024
BobaBNB
Boba Network is built on the Optimistic Rollup developed by Optimism, which ensures EVM and Solidity compatibility, minimizing the efforts required to migrate smart contracts from L1 to L2.
In this guide, we are walking through the process of setting up a BobaBNB archive node using l2geth and DTL (Data Transport Layer).
BobaBNB is a Layer 2 scaling solution for the Binance Smart Chain (BSC), designed to enhance transaction throughput and reduce fees while maintaining the security of BSC. By deploying a BobaBNB archive node, you gain access to the complete transaction history, enabling advanced queries and analytics
sudo ufw allow from ${REMOTE.HOST.IP} to any port 8545
Not advised to allow all or unknown IP address to RPC port
Enable Firewall
sudo ufw enable
To check the status of UFW and see the current rules
sudo ufw status verbose
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
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
#to verify Go installation
go version
#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 with
source /root/.bashrc
cd /root/bobabnb/boba_legacy/packages/data-transport-layer
wget https://raw.githubusercontent.com/bobanetwork/boba_legacy/develop/boba_community/boba-node/state-dumps/bobabnb/state-dump.latest.json -O /root/bobabnb/boba_legacy/packages/data-transport-layer/state-dump.latest.json
set -o allexport; source /root/bobabnb/boba_legacy/packages/data-transport-layer/.env; set +o allexport; /root/bobabnb/boba_legacy/l2geth/build/bin/geth init --datadir=/root/data/bobabnb/geth/l2geth /root/bobabnb/boba_legacy/packages/data-transport-layer/state-dump.latest.json --nousb
Launch BobaBNB
Start DTL
sudo systemctl daemon-reload #refresh systemd configuration when changes made
sudo systemctl enable dtl.service #enable dtl service at system startup
sudo systemctl start dtl.service #start dtl
sudo nano /etc/systemd/system/dtl.service #make changes in dtl.service file
Start l2geth
sudo systemctl daemon-reload #refresh systemd configuration when changes made
sudo systemctl enable l2geth.service #enable l2geth service at system startup
sudo systemctl start l2geth.service #start l2geth
sudo nano /etc/systemd/system/l2geth.service #make changes in l2geth.service file
Run curl command in the terminal to check the status of your node
curl -H "Content-type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545
When it returns false then your node is fully synchronized with the network
Monitor the logs for errors
sudo journalctl -fu dtl.service #follow logs of dtl.service
sudo journalctl -fu l2geth.service #follow logs of l2geth.service
During the synchonization, you are expected to get following log messages from DTL:
{"level":30,"time":1722479386601,"method":"GET","url":"/transaction/latest?backend=l2","elapsed":0,"msg":"Served HTTP Request"}
{"level":30,"time":1722479393551,"fromBlock":39649105,"toBlock":39649106,"msg":"Synchronizing unconfirmed transactions from Layer 2 (Optimism)"}
and l2geth:
INFO [08-01|04:29:56.601] Syncing transaction range start=39649105 end=39649105 backend=l2
INFO [08-01|04:29:56.609] New block index=39649105 l1-timestamp=1722479389 l1-blocknumber=40970591 tx-hash=0x0256f7a95b88f10495ae3a67642009b7ee681c730aac249df16472a90e7be>
INFO [08-01|04:30:07.488] Deep froze chain segment blocks=3 elapsed=119.358ms number=39559105 hash=256255…ce8334