-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring. some minor improvements to the snapshot download script,…
… other quality of life enhancements
- Loading branch information
Showing
17 changed files
with
78 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ grafana_cloud_promtail_url: "https://{{ grafana_cloud_promtail_username }}:{{ gr | |
users: | ||
- username: 'pokt' | ||
moniker: "SDL-POKT-1" | ||
seeds: "03b74fa3c68356bb40d58ecc10129479b159a145@seed1.mainnet.pokt.network:20656,64c91701ea98440bc3674fdb9a99311461cdfd6f@seed2.mainnet.pokt.network:21656,0057ee693f3ce332c4ffcb499ede024c586ae37b@seed3.mainnet.pokt.network:22856,9fd99b89947c6af57cd0269ad01ecb99960177cd@seed4.mainnet.pokt.network:23856,f2a4d0ec9d50ea61db18452d191687c899c3ca42@seed5.mainnet.pokt.network:24856,f2a9705924e8d0e11fed60484da2c3d22f7daba8@seed6.mainnet.pokt.network:25856,582177fd65dd03806eeaa2e21c9049e653672c7e@seed7.mainnet.pokt.network:26856,2ea0b13ab823986cfb44292add51ce8677b899ad@seed8.mainnet.pokt.network:27856,a5f4a4cd88db9fd5def1574a0bffef3c6f354a76@seed9.mainnet.pokt.network:28856,d4039bd71d48def9f9f61f670c098b8956e52a08@seed10.mainnet.pokt.network:29856,5c133f07ed296bb9e21e3e42d5f26e0f7d2b2832@poktseed100.chainflow.io:26656,[email protected]:26656" | ||
#seeds: "03b74fa3c68356bb40d58ecc10129479b159a145@seed1.mainnet.pokt.network:20656,64c91701ea98440bc3674fdb9a99311461cdfd6f@seed2.mainnet.pokt.network:21656,0057ee693f3ce332c4ffcb499ede024c586ae37b@seed3.mainnet.pokt.network:22856,9fd99b89947c6af57cd0269ad01ecb99960177cd@seed4.mainnet.pokt.network:23856,f2a4d0ec9d50ea61db18452d191687c899c3ca42@seed5.mainnet.pokt.network:24856,f2a9705924e8d0e11fed60484da2c3d22f7daba8@seed6.mainnet.pokt.network:25856,582177fd65dd03806eeaa2e21c9049e653672c7e@seed7.mainnet.pokt.network:26856,2ea0b13ab823986cfb44292add51ce8677b899ad@seed8.mainnet.pokt.network:27856,a5f4a4cd88db9fd5def1574a0bffef3c6f354a76@seed9.mainnet.pokt.network:28856,d4039bd71d48def9f9f61f670c098b8956e52a08@seed10.mainnet.pokt.network:29856,5c133f07ed296bb9e21e3e42d5f26e0f7d2b2832@poktseed100.chainflow.io:26656,[email protected]:26656" | ||
seeds: "7c0d7ec36db6594c1ffaa99724e1f8300bbd52d0@seed1.mainnet.pokt.network:26662,cdcf936d70726dd724e0e6a8353d8e5ba5abdd20@seed2.mainnet.pokt.network:26663,74b4322a91c4a7f3e774648d0730c1e610494691@seed3.mainnet.pokt.network:26662,b3235089ff302c9615ba661e13e601d9d6265b15@seed4.mainnet.pokt.network:26663" | ||
persistent_peers: "" | ||
MaxNumInboundPeers: 30 | ||
MaxNumOutboundPeers: 10 | ||
|
@@ -25,6 +26,7 @@ pokt_user_dir: "/home/{{ pokt_user }}" | |
monitor_user: 'monitor' | ||
monitor_user_dir: "/home/{{ monitor_user }}" | ||
custom_port_prefix: 55 | ||
|
||
repo: 'https://github.com/pokt-network/pocket-core' | ||
pokt_release_tag: 'RC-0.10.4' | ||
#pokt_release_tag: 'RC-0.9.2' | ||
|
@@ -41,8 +43,10 @@ account_passphrase: "{{ vault_account_passphrase }}" | |
|
||
genesis_url: 'https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/mainnet/genesis.json' | ||
genesis_hash: 'sha256:83e411fe6298d83963f2ebf5af3ef65b49dd029a6eb1a04db31a08b244f3d414' | ||
snapshot_url: 'https://snapshot.nodes.pokt.network/latest.tar.gz' | ||
expose_public_ip: true | ||
#snapshot_url: 'https://snapshot.nodes.pokt.network/latest.tar.gz' | ||
snapshot_url: 'https://pocket-snapshot.liquify.com/files' | ||
#expose_public_ip: true | ||
expose_public_ip: false | ||
|
||
ethereum_rpc_uri: "{{ vault_ethereum_rpc_uri }}" | ||
osmosis_rpc_uri: "{{ vault_osmosis_rpc_uri }}" | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
echo "Stopping pocket service" | ||
sudo systemctl stop pocket | ||
sleep 3 | ||
POCKET_DATA_DIR={{ pokt_user_dir }}/.pocket | ||
echo "Removing old data from $POCKET_DATA_DIR" | ||
rm -rf $POCKET_DATA_DIR/data/* | ||
echo "Getting filename of latest snapshot from {{ snapshot_url }}/latest_compressed.txt" | ||
latestFile=$(curl -s '{{ snapshot_url }}/latest_compressed.txt') | ||
# above likely subjects us to a cmd injection attack :( | ||
echo "Downloading and extracting snapshot data" | ||
wget -O - "{{ snapshot_url }}/$latestFile" | lz4 -d - | tar -xv -C $POCKET_DATA_DIR | ||
echo "Setting perms on downloaded chain data" | ||
chown -R {{ pokt_user }}:{{ pokt_user }} $POCKET_DATA_DIR | ||
echo "Done. Don't forget to start the daemon! with sudo systemctl start pocket" |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# if running bash | ||
if [ -n "$BASH_VERSION" ]; then | ||
# include .bashrc if it exists | ||
if [ -f "$HOME/.bashrc" ]; then | ||
. "$HOME/.bashrc" | ||
fi | ||
fi | ||
|
||
# set PATH so it includes user's private bin if it exists | ||
if [ -d "$HOME/bin" ] ; then | ||
PATH="$HOME/bin:$PATH" | ||
fi | ||
|
||
# set PATH so it includes user's private bin if it exists | ||
if [ -d "$HOME/.local/bin" ] ; then | ||
PATH="$HOME/.local/bin:$PATH" | ||
fi | ||
|
||
export GOROOT=/usr/local/go | ||
export GOPATH=$HOME/go | ||
export GO111MODULE=on | ||
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin | ||
|
||
INTERVAL=1 | ||
|
||
alias status='curl -s http://localhost:{{ custom_port_prefix }}657/status' | ||
alias wstatus='watch -n $INTERVAL "curl -s http://localhost:{{ custom_port_prefix }}657/status"' | ||
alias peers='curl -s http://localhost:{{ custom_port_prefix }}657/net_info | jq .result.n_peers' | ||
alias wpeers='watch -n $INTERVAL "curl -s http://localhost:{{ custom_port_prefix }}657/net_info | jq .result.n_peers"' | ||
alias peerinfo="curl -s http://localhost:{{ custom_port_prefix }}657/net_info | jq '.result.peers[]| {moniker: .node_info.moniker, version: .node_info.version, ip: .remote_ip, outbound: .is_outbound}'" | ||
alias wpeerinfo='watch -n 1 "curl -s http://localhost:{{ custom_port_prefix }}657/net_info | jq '\''.result.peers[]| {moniker: .node_info.moniker, version: .node_info.version, ip: .remote_ip, outbound: .is_outbound} '\''"' | ||
alias ll='ls -laF' | ||
|
File renamed without changes.