Skip to content

Commit 52ecd29

Browse files
authored
Edit State Sync
1 parent e43407e commit 52ecd29

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

SGE/readme.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SGE
2-
[RPC](http://) | [API](http://) | [gRPC](http://)
2+
[RPC](http://sge.srgts.xyz:16657) | [API](http://sge.srgts.xyz:1417) | [gRPC](http://sge.srgts.xyz:9490)
33

44
Let's update and install the necessary packages:
55
````
@@ -25,7 +25,7 @@ git fetch --tags
2525
git checkout v0.0.3
2626
make install
2727
````
28-
Let's check the version (current as of December 2022 - v0.0.3 commit: c2f074f15fa895b0d8e67a9d88bfd2b9d9833b2f):
28+
Let's check the version (current as of January 2023 - v0.0.3 commit: c2f074f15fa895b0d8e67a9d88bfd2b9d9833b2f):
2929
````
3030
sged version --long
3131
````
@@ -40,7 +40,7 @@ Download the current genesis file:
4040
````
4141
curl -s https://raw.githubusercontent.com/sge-network/networks/master/sge-testnet-1/genesis.json > $HOME/.sge/config/genesis.json
4242
````
43-
Let's check sum genesis file (current as of December 2022 - 9a36a608e66fb194f404284c2d65aa5a7eb422b3efbd50869f270dfe65713e5b):
43+
Let's check sum genesis file (current as of January 2023 - 9a36a608e66fb194f404284c2d65aa5a7eb422b3efbd50869f270dfe65713e5b):
4444
````
4545
sha256sum $HOME/.sge/config/genesis.json
4646
````
@@ -59,6 +59,7 @@ Edit pruning parameter:
5959
sed -i 's|pruning = "default"|pruning = "custom"|g' $HOME/.sge/config/app.toml
6060
sed -i 's|pruning-keep-recent = "0"|pruning-keep-recent = "100"|g' $HOME/.sge/config/app.toml
6161
sed -i 's|pruning-interval = "0"|pruning-interval = "10"|g' $HOME/.sge/config/app.toml
62+
sed -i 's|^snapshot-interval *=.*|snapshot-interval = 2000|g' $HOME/.sge/config/app.toml
6263
````
6364
Create a service file:
6465
````
@@ -93,8 +94,9 @@ sudo journalctl -u sged -f -o cat
9394
State Sync:
9495
````
9596
sudo systemctl stop sged
97+
cp $HOME/.sge/data/priv_validator_state.json $HOME/.sge/priv_validator_state.json.backup
9698
sged tendermint unsafe-reset-all --home $HOME/.sge --keep-addr-book
97-
SNAP_RPC=""
99+
SNAP_RPC="http://sge.srgts.xyz:16657"
98100
99101
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
100102
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
@@ -107,5 +109,6 @@ s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
107109
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
108110
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.sge/config/config.toml
109111
112+
mv $HOME/.sge/priv_validator_state.json.backup $HOME/.sge/data/priv_validator_state.json
110113
sudo systemctl restart sged && sudo journalctl -u sged -f -o cat
111114
````

0 commit comments

Comments
 (0)