Deploying a Rollup Verifier/Replica Node From Docker
To build an app on Mantle network, you'll need access to a Mantle node. There are multiple public Node RPC Providers that you can choose from, or you can deploy your own depending on the requirements for your specific use cases.
This doc is a simple introduction to the process. For more details, please refer to this:
Prerequisites
Ensure you have the following software installed:
Hardware Recommendations
For optimal performance, it is recommended to have the following hardware specifications:
- RAM - 16GB+
- CPU - 8C+
- Storage - 4T+ disk(HDD works for now, SSD is better)
- Bandwidth - 10mb/s+ download speed
Approximate Disk Usage
As of Dec. 25, 2023:
- Archive node: ~1.5TB
- Full node: ~75GB
Installation and Configuration
Clone the Repository
Firstly, we need to clone the repository:
git clone https://github.com/mantlenetworkio/networks.git
Initialize to Generate Files
Before running the node, you need to generate some necessary files, such as the jwt_secret.txt
and p2p_node_key.txt
. You can find more details here.
Deploy the Node
Download Latest Snapshot From Mantle (Recommended)
We recommend that you start the node with the latest snapshot, so that you don't need to wait a long time to sync data. Check this to know how to get the latest snapshot.
-
Depending on the user's location, we provide download links for snapshots in different regions. Check more details here.
-
If you want to run with fullnode mode, please change the
--gcmode
tofull
in thedocker-compose-mainnetv2.yml
.
Operate Mantle Node
Once the snapshot is downloaded and extracted to the correct folder, you can start the node, we've prepared a docker-compose
file for you, so that you can easily start and stop the node.
- How to start the node
- How to stop the node
- How to wipe the node
- How to view logs
- How to update the node
Please make sure to change your own L1 RPC Node URL in the docker-compose-mainnetv2.yml
.
OP_NODE_L1_ETH_RPC: 'wss://mainnet.gateway.tenderly.co' #change this
Example
- Start the node
docker-compose -f docker-compose-mainnetv2.yml up -d
- We can use
docker ps
to get container id anddocker logs
to view the logs
docker logs -f <container_id>
Verification
Check Service Status
Once you start the node, you also need to check the service status, we provide a command to check the service status and the chain data.
Example
When we use cast bn
to check the service status, we will get the block number of the latest block. For example:
1758076
We can run this command many times to make sure the service is running correctly.