Skip to content

Commit

Permalink
Upgrade sepolia rpc doc (#103)
Browse files Browse the repository at this point in the history
* upgrade rpc doc
  • Loading branch information
danielpenglinlin authored Sep 3, 2024
1 parent 92230ea commit 466c087
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Mantle public resources

### run a replica node
[run a node in mainnet](./run-node-mainnet.md)

[run a node in goerli testnet](./run-node-testnet.md)
[run a node in mainnet](./run-node-mainnetv2.md)

[run a node in sepolia testnet](./run-node-sepolia.md)
31 changes: 23 additions & 8 deletions run-node-mainnetv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- 16GB+ RAM
- 8C+ CPU
- 4T+ disk(HDD works for now, SSD is better)
- 5T+ disk(HDD works for now, SSD is better)
- 10mb/s+ download

## Installation and Setup Instructions
Expand All @@ -37,25 +37,40 @@ 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:
```sh
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**
- **Asia:** https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/20240623-mainnet-chaindata.tar.zst
- **US:** https://s3.amazonaws.com/snapshot-us.mantle.xyz/20240623-mainnet-chaindata.tar.zst
- **Asia:** https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst
- **US:** https://s3.amazonaws.com/snapshot-us.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst
- **Fullnode**
- **Asia:** https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/20240623-mainnet-full-chaindata.tar.zst
- **Asia:** https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/${MAINNET_CURRENT_TARBALL_DATE}-mainnet-full-chaindata.tar.zst

example:

```sh
mkdir -p ./data/mainnet-geth

# latest snapshot tarball
# 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 https://s3.ap-southeast-1.amazonaws.com/snapshot.mantle.xyz/20240623-mainnet-chaindata.tar.zst
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/20240623-mainnet-chaindata.tar.zst
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}-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

tar --use-compress-program=unzstd -xvf 20240623-mainnet-chaindata.tar.zst -C ./data/mainnet-geth
# unzip snapshot to the ledger path:
tar --use-compress-program=unzstd -xvf ${MAINNET_CURRENT_TARBALL_DATE}-mainnet-chaindata.tar.zst -C ./data/mainnet-geth

```

Expand Down
22 changes: 15 additions & 7 deletions run-node-sepolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,23 @@ First, create a path for ledger:
mkdir -p ./data/sepolia-geth
```

\# 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~~
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
```
SEPOLIA_CURRENT_TARBALL_DATE=`curl https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/current.info`

# download the latest official snapshot
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
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
```

Expand Down Expand Up @@ -292,10 +299,11 @@ rm -fr ./data/sepolia-geth
mkdir -p ./data/sepolia-geth
# download the latest official snapshot
wget https://s3.ap-southeast-1.amazonaws.com/snapshot.sepolia.mantle.xyz/20240707-sepolia-chaindata.tar.zst
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 20240707-sepolia-chaindata.tar.zst -C ./data/sepolia-geth
tar --use-compress-program=unzstd -xvf ${SEPOLIA_CURRENT_TARBALL_DATE}-sepolia-chaindata.tar.zst -C ./data/sepolia-geth
```

## 3 Start the service
Expand Down

0 comments on commit 466c087

Please sign in to comment.