-
16GB+ RAM
-
8C+ CPU
-
500GB+ disk (HDD works for now, SSD is better)
-
10mb/s+ download
git clone https://github.com/mantlenetworkio/networks.git
generat the 'jwt_secret_txt' file and the 'p2p_node_key_txt'
cd networks/
mkdir sepolia/secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" > sepolia/secret/jwt_secret_txt
cast w n |grep -i "Private Key" |awk -F ": " '{print $2}' |sed 's/0x//' > sepolia/secret/p2p_node_key_txt
We recommend that you start the node with latest shapshot, so that you don't need to wait a long time to sync data.
First, create a path for ledger:
mkdir -p ./data/sepolia-geth
Second, download the latest official snapshot:
# Download tarball
SEPOLIA_CURRENT_TARBALL_DATE=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/current.info`
wget -c https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst
# Then you can verify your download
SEPOLIA_CURRENT_TARBALL_CHECKSUM=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst.sha256sum | awk '{print $1}'`
echo "${SEPOLIA_CURRENT_TARBALL_CHECKSUM} *${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst" | shasum -a 256 --check
# You should get the following output:
# ${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst: OK
Third, unzip snapshot to the ledger path
tar --use-compress-program=unzstd -xvf ${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst -C ./data/sepolia-geth
Check the data was unarchived successfully:
$ ls ./data/sepolia-geth
chaindata
use mantle da-indexer to pull the data for rollup node, and you need to edit
docker-compose-sepolia-upgrade-da-indexer.yml
replace OP_NODE_L1_ETH_RPC to your own l1 rpc (not beacon )
then , start rpc
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml up -d
Will start the node in a detached shell (-d
), meaning the node will continue to run in the background. You will need to run this again if you ever turn your machine off.
Congratulations, the node has been deployed!
use EigenDA and L1 beacon chain to pull the data for rollup node, and you need to edit
edit docker-compose-sepolia-upgrade-beacon.yml
replace OP_NODE_L1_BEACON to your own beacon rpc, replace OP_NODE_L1_ETH_RPC to your own l1 rpc (not beacon )
then start with
docker-compose -f docker-compose-sepolia-upgrade-beacon.yml up -d
Follow these steps to check if the installation is successful
If the service status is 'up,' it means that the service has started without any issues.
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml ps
Use the command 'cast bn' to execute multiple times and check if the height increases.
example:
# query local op-geth latest block height
cast bn
# query latest block height from mantle rpc
cast bn --rpc-url https://rpc.sepolia.mantle.xyz
Use the command 'cast rpc optimism_syncStatus' to execute multiple times and check if the safe_l2 and inalized_l2 increases. It may need to be increased after thirty minutes
example:
cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .finalized_l2.number
cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .safe_l2.number
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml down
Will shut down the node without wiping any volumes. You can safely run this command and then restart the node again.
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml down -v
Will completely wipe the node by removing the volumes that were created for each container. Note that this is a destructive action, be very careful!
docker-compose logs <service name>
Will display the logs for a given service. You can also follow along with the logs for a service in real time by adding the flag -f
.
The available services are:
docker-compose pull
Will download the latest images for any services where you haven't hard-coded a service version. Updates are regularly pushed to improve the stability of Mantle nodes or to introduce new quality-of-life features like better logging and better metrics. I recommend that you run this command every once in a while (once a week should be more than enough).
docker-compose -f docker-compose-sepolia.yml down
# If your local code have changes, please use 'git stash' to cache first
git pull
this upgrade updates three files
-
sepolia/rollup.json
- modify the address of L1 rollup contract for EigenDA data
-
docker-compose-sepolia-upgrade-da-indexer.yml
- start with mantle da-indexer, it will use mantle da-indexer to pull the data for rollup node, the function of da-indexer is caching the rollup data of EigenDA and blobs, making it available for third-party use
-
docker-compose-sepolia-upgrade-beacon.yml
- start with EigenDA and L1 beacon chain, op-node will pull data from EigenDA and beacon chain directly
If you start the node using your own way, please refer to the three files from this upgrade. Otherwise, it may cause irreversible damage to the node.
use mantle da-indexer to pull the data for rollup node, and you need to edit
docker-compose-sepolia-upgrade-da-indexer.yml
replace OP_NODE_L1_ETH_RPC to your own l1 rpc (not beacon )
then , start rpc
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml up -d
use EigenDA and L1 beacon chain to pull the data for rollup node, and you need to edit
edit docker-compose-sepolia-upgrade-beacon.yml
replace OP_NODE_L1_BEACON to your own beacon rpc, replace OP_NODE_L1_ETH_RPC to your own l1 rpc (not beacon )
then start with
docker-compose -f docker-compose-sepolia-upgrade-beacon.yml up -d
Use the command 'cast bn' to execute multiple times and check if the height increases.
example:
# query local op-geth latest block height
cast bn
# query latest block height from mantle rpc
cast bn --rpc-url https://rpc.sepolia.mantle.xyz
Use the command 'cast rpc optimism_syncStatus' to execute multiple times and check if the safe_l2 and inalized_l2 increases. It may need to be increased after thirty minutes
example:
cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .finalized_l2.number
cast rpc optimism_syncStatus --rpc-url localhost:9545 |jq .safe_l2.number
If your node's data is corrupted due to abnormal operations, please refer to the following steps for recovery
rm -fr ./data/sepolia-geth
mkdir -p ./data/sepolia-geth
# download the latest official snapshot
SEPOLIA_CURRENT_TARBALL_DATE=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/current.info`
wget -c https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst
# unzip snapshot to the ledger path
tar --use-compress-program=unzstd -xvf ${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst -C ./data/sepolia-geth
If you use da-indexer
docker-compose -f docker-compose-sepolia-upgrade-da-indexer.yml up -d
Otherwise
docker-compose -f docker-compose-sepolia-upgrade-beacon.yml up -d