Configure Node

Setup validator name

Replace YOUR_MONIKER_GOES_HERE with your validator name

Copy

MONIKER="YOUR_MONIKER_GOES_HERE"

Setting Enclave

Obtain master key

Before starting your node, you should obtain the master key, which will be used to encrypt and decrypt transactions and smart contract state.

To do it, use the following command:

Copy

swisstronikd enclave request-master-key rpc.testnet.swisstronik.com:46789

Initialize Node

Copy

# Set node configuration
swisstronikd config chain-id swisstronik_1291-1
swisstronikd config keyring-backend test
swisstronikd config node tcp://localhost:17557

# Initialize the node
swisstronikd init $MONIKER --chain-id swisstronik_1291-1

# Download genesis and addrbook check this one for changes
curl -Ls https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.2/genesis.json > $HOME/.swisstronik/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/swisstronik-testnet/addrbook.json > $HOME/.swisstronik/config/addrbook.json

# Add seeds check this one for changes
sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@swisstronik-testnet.rpc.kjnodes.com:17559\"|" $HOME/.swisstronik/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"7aswtr\"|" $HOME/.swisstronik/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.swisstronik/config/app.toml

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:17558\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:17557\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:17560\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:17556\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":17566\"%" $HOME/.swisstronik/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:17517\"%; s%^address = \":8080\"%address = \":17580\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:17590\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:17591\"%; s%:8545%:17545%; s%:8546%:17546%; s%:6065%:17565%" $HOME/.swisstronik/config/app.toml

Create Services

Copy

Start the service & check logs

Copy

Last updated