- 16GB+ RAM
- 8C+ CPU
- 5T+ disk(HDD works for now, SSD is better)
- 10mb/s+ download
cd networks/
mkdir -p mainnet/secret
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" > mainnet/secret/jwt_secret_txt
cast w n |grep -i "Private Key" |awk -F ": " '{print $2}' |sed 's/0x//' > mainnet/secret/p2p_node_key_txt
After mantle upgrade to v2, you have to start the node with latest snapshot.
You can choose different types of node running modes (fullnode or archive) based on your needs, thus selecting different snapshots for node synchronization. Additionally, we provide download links for snapshots in different regions to expedite your snapshot downloads. (Given that fullnode snapshots are relatively small, we will not provide additional download links.) Currently supported regions include:
You need to get the latest tarball date first:
MAINNET_CURRENT_TARBALL_DATE=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/current.info`
Then replace the MAINNET_CURRENT_TARBALL_DATE in the link below:
- Archive
- Fullnode
example:
mkdir -p ./data/mainnet-geth
# Download latest snapshot tarball
# You can choose one of two ways to download,Using aria2c to download can improve download speed, but you need to install aria2
MAINNET_CURRENT_TARBALL_DATE=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/current.info`
1.
wget -c https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst
2.
aria2c -x 16 -s 16 -k 100M https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst
#Then you can verify your download
MAINNET_CURRENT_TARBALL_CHECKSUM=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst.sha256sum | awk '{print $1}'`
echo "${MAINNET_CURRENT_TARBALL_CHECKSUM} *${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst" | shasum -a 256 --check
# You should get the following output:
# ${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst: OK
# unzip snapshot to the ledger path:
tar --use-compress-program=unzstd -xvf ${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst -C ./data/mainnet-geth
Check the data was unarchived successfully:
$ ls ./data/mainnet-geth
chaindata
docker-compose -f docker-compose-mainnetv2.yml up -d
Will start the node in a detatched 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.
The first time you start the node it synchronizes from regenesis (December 1th, 2022) to the present. This process takes hours.
docker-compose -f docker-compose-mainnetv2.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-mainnetv2.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).
If the service status is 'up,' it means that the service has started without any issues.
docker-compose -f docker-compose-mainnetv2.yml ps
Use the command 'cast bn' to execute multiple times and check if the height increases.
example:
cast bn
cast bn --rpc-url https://rpc.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