-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update State-sync docs to support mainnet (#259)
- Loading branch information
1 parent
dff8725
commit 427abc2
Showing
2 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ This guide was created and tested in MacOS and may need to be modified slightly | |
|
||
### Mainnet | ||
|
||
| Region | IP | | ||
| :-------------------------- | :-- | | ||
| | TBD | | ||
| Region | IP | | ||
| :-------------------------- | :----------- | | ||
| US | 34.69.20.168 | | ||
|
||
## Download binary | ||
Make sure you are downloading the same version as our network is using. | ||
|
@@ -40,19 +40,31 @@ chmod a+x /usr/local/bin/zetacored | |
|
||
1. Initialize the base folder and config with the following command: | ||
|
||
| Chain | ID | | ||
| :------------- | :--------------- | | ||
| Testnet | athens_7001-1 | | ||
| Mainnet | zetachain_7000-1 | | ||
|
||
```bash | ||
MONIKER=$(hostname) | ||
zetacored init ${MONIKER} --chain-id athens_7001-1 | ||
CHAIN_ID="[Replace with desired CHAIN ID]" | ||
zetacored init ${MONIKER} --chain-id $CHAIN_ID | ||
``` | ||
|
||
## Download config files | ||
1. Download the genesis.json file and *.toml configuration files: | ||
|
||
| Environment | Configuration Files Repository | | ||
| :------------------- | :-------------------------------------------------------------- | | ||
| Testnet | https://raw.githubusercontent.com/zeta-chain/network-athens3 | | ||
| Mainnet | https://raw.githubusercontent.com/zeta-chain/network-mainnet | | ||
|
||
```bash | ||
wget https://raw.githubusercontent.com/zeta-chain/network-athens3/main/network_files/config/genesis.json -O ~/.zetacored/config/genesis.json | ||
wget https://raw.githubusercontent.com/zeta-chain/network-athens3/main/network_files/config/config.toml -O ~/.zetacored/config/config.toml | ||
wget https://raw.githubusercontent.com/zeta-chain/network-athens3/main/network_files/config/app.toml -O ~/.zetacored/config/app.toml | ||
wget https://raw.githubusercontent.com/zeta-chain/network-athens3/main/network_files/config/client.toml -O ~/.zetacored/config/client.toml | ||
REPOSITORY_URL="[Config File Repository]" | ||
wget ${REPOSITORY_URL}/main/network_files/config/genesis.json -O ~/.zetacored/config/genesis.json | ||
wget ${REPOSITORY_URL}/main/network_files/config/config.toml -O ~/.zetacored/config/config.toml | ||
wget ${REPOSITORY_URL}/main/network_files/config/app.toml -O ~/.zetacored/config/app.toml | ||
wget ${REPOSITORY_URL}/main/network_files/config/client.toml -O ~/.zetacored/config/client.toml | ||
``` | ||
|
||
## State sync | ||
|
@@ -67,11 +79,17 @@ TRUST_HASH=$(curl -s "http://${STATE_SYNC_SERVER}/block?height=${HEIGHT}" | jq - | |
NOTE: You need to sync from LATEST_HEIGHT - 40000 to make sure that the node will fetch an existing state-sync snapshot. | ||
|
||
## Replace config values | ||
1. Make sure to replace `[closest StateSync IP]` with the IP from our state-sync node and run this block of code: | ||
1. Make sure to replace `[closest StateSync IP]` with the IP from our state-sync node, also replace with the desired seed node and run this block of code: | ||
|
||
| Environment | Seed Node | | ||
| :------------------- | :-------------------------------------------------------------- | | ||
| Testnet | `[email protected]:26656` | | ||
| Mainnet | `[email protected]:26656` | | ||
|
||
```bash | ||
RPC_STATE_SYNC_SERVERS="[closest StateSync IP]:26657,[closest StateSync IP]:26657" | ||
SEED="[email protected]:26656" | ||
EXTERNAL_IP=$(curl -4 icanhazip.com) | ||
SEED="[Seed Node from list]" | ||
EXTERNAL_IP="$(curl -4 icanhazip.com):26656" | ||
sed -i "" -e "s/^enable = .*/enable = \"true\"/" ~/.zetacored/config/config.toml && | ||
sed -i "" -e "s/^rpc_servers = .*/rpc_servers = \"${RPC_STATE_SYNC_SERVERS}\"/" ~/.zetacored/config/config.toml && | ||
sed -i "" -e "s/^trust_height = .*/trust_height = \"${HEIGHT}\"/" ~/.zetacored/config/config.toml && | ||
|