forked from 0xheycat/Testnet-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 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 |
---|---|---|
|
@@ -44,15 +44,18 @@ source ~/.profile | |
|
||
echo -e "\e[1m\e[32m3. Downloading and building binaries... \e[0m" && sleep 1 | ||
# download binary | ||
cd $HOME | ||
cd $HOME && rm $HOME/mun -rf | ||
git clone https://github.com/munblockchain/mun && cd mun | ||
sudo rm -rf ~/.mun | ||
go mod tidy | ||
make install | ||
|
||
mkdir -p ~/.mun/upgrade_manager/upgrades | ||
mkdir -p ~/.mun/upgrade_manager/genesis/bin | ||
|
||
# config | ||
mund config chain-id $MUN_CHAIN_ID | ||
mund config keyring-backend test | ||
|
||
#Fetch genesis | ||
curl --tlsv1 https://node1.mun.money/genesis? | jq ".result.genesis" > ~/.mun/config/genesis.json | ||
|
||
|
@@ -70,6 +73,11 @@ sed -i 's/stake/utmun/g' ~/.mun/config/genesis.json | |
peers="[email protected]:26656" | ||
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.mun/config/config.toml | ||
|
||
# custom pruning | ||
sed -i 's|pruning = "default"|pruning = "custom"|g' $HOME/.mund/config/app.toml | ||
sed -i 's|pruning-keep-recent = "0"|pruning-keep-recent = "100"|g' $HOME/.mund/config/app.toml | ||
sed -i 's|pruning-interval = "0"|pruning-interval = "10"|g' $HOME/.mund/config/app.toml | ||
|
||
# create service | ||
sudo tee /etc/systemd/system/mund.service > /dev/null << EOF | ||
[Unit] | ||
|
@@ -90,6 +98,8 @@ PermissionsStartOnly=true | |
ExecStart=/usr/bin/mund-manager start --pruning="nothing" --rpc.laddr "tcp://0.0.0.0:26657" --home $HOME/.mun | ||
StandardOutput=file:/var/log/mund/mund.log | ||
StandardError=file:/var/log/mund/mund_error.log | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
KillSignal=SIGTERM | ||
LimitNOFILE=4096 | ||
[Install] | ||
|