Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
defrisk0 authored Aug 28, 2024
1 parent c94d26a commit b9a5f9f
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions GITOPIA/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# GITOPIA
[RPC](http://gitopia.srgts.xyz:41117) | [API](http://gitopia.srgts.xyz:4117) | [STATESYNC](#title1)

Let's update and install the necessary packages:
````
Expand All @@ -22,10 +21,10 @@ Install CLI:
cd $HOME
git clone https://github.com/gitopia/gitopia.git
cd gitopia
git checkout v3.3.0
git checkout v4.0.0
make install
````
Let's check the version (current as of October 2023 - v3.3.0 commit: 0eab60ecf8c3e22e9c71d54346f76a35830a5dc5):
Let's check the version (current as of September 2024 - v4.0.0 | commit: 20a03bd0025b91e3a48b4046f08f4f6115f35e79):
````
gitopiad version --long
````
Expand All @@ -43,7 +42,7 @@ tar -xzf $HOME/genesis.tar.gz
mv genesis.json $HOME/.gitopia/config/genesis.json
rm $HOME/genesis.tar.gz
````
Let's check sum genesis file (current as of October 2023 - 0cf5c55e6ea1fbcebccadba0f6dc0b83ac76d1b608487a06978956404ce33e66):
Let's check sum genesis file (current as of September 2024 - 0cf5c55e6ea1fbcebccadba0f6dc0b83ac76d1b608487a06978956404ce33e66):
````
sha256sum $HOME/.gitopia/config/genesis.json
````
Expand All @@ -54,7 +53,7 @@ sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001ulore"|g' $HOME/.
Adding seeds and peers:
````
seeds="[email protected]:57656,[email protected]:11356"
peers="[email protected]:51056,[email protected]:28656,[email protected]:26656,[email protected]:36656,[email protected]:26656,[email protected]:41116"
peers="[email protected]:51056,[email protected]:28656,[email protected]:26656,[email protected]:36656,[email protected]:26656"
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.gitopia/config/config.toml
````
Edit pruning parameter:
Expand Down Expand Up @@ -94,24 +93,3 @@ Checking the logs
````
sudo journalctl -u gitopiad -f -o cat
````
### <a id="title1">State Sync</a>
````
sudo systemctl stop gitopiad
cp $HOME/.gitopia/data/priv_validator_state.json $HOME/.gitopia/priv_validator_state.json.backup
gitopiad tendermint unsafe-reset-all --home $HOME/.gitopia --keep-addr-book
SNAP_RPC="http://gitopia.srgts.xyz:41117"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.gitopia/config/config.toml
mv $HOME/.gitopia/priv_validator_state.json.backup $HOME/.gitopia/data/priv_validator_state.json
sudo systemctl restart gitopiad && sudo journalctl -u gitopiad -f -o cat
````

0 comments on commit b9a5f9f

Please sign in to comment.