State sync
Last updated
firmachaind init <moniker-name> --chain-id <chain-id>vim .firmachain/config/config.toml
# A custom human readable name for this node
moniker = "<moniker-name>"sed -i -E 's/minimum-gas-prices = ".*"/minimum-gas-prices = "0.01ufct"/' ~/.firmachain/config/app.toml# Mainnet
sed -i.bak -e "s/^seeds *=.*/seeds = \"f89dcc15241e30323ae6f491011779d53f9a5487@mainnet-seed1.firmachain.dev:26656,04cce0da4cf5ceb5ffc04d158faddfc5dc419154@mainnet-seed2.firmachain.dev:26656,940977bdc070422b3a62e4985f2fe79b7ee737f7@mainnet-seed3.firmachain.dev:26656\"/" ~/.firmachain/config/config.toml# Testnet
sed -i.bak -e "s/^seeds *=.*/seeds = \"583717da6ee75478aea4e6717aff03e0faab4370@testnet-seed1.firmachain.dev:26656,d1619ff4762037484017e3c48c7c40c1f94bca47@testnet-seed2.firmachain.dev:26656\"/" ~/.firmachain/config/config.toml# Mainnet genesis.json
wget https://raw.githubusercontent.com/FirmaChain/mainnet/main/colosseum-1/genesis.json -O ~/.firmachain/config/genesis.json# Testnet genesis.json
wget https://raw.githubusercontent.com/FirmaChain/testnet/master/imperium-4/genesis.json -O ~/.firmachain/config/genesis.jsonsudo apt install jq -y# Mainnet
SNAP_RPC="https://lcd-mainnet.firmachain.dev:26657"
BLOCK_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height | awk '{print $1 - ($1 % 10000-1)}') &&
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $BLOCK_HEIGHT $TRUST_HASH
# Expected return data
18520001 7623BBA5B341DA3C9FC716103A56AAD3ABA2D4FC4BC57F786B3474F5F631DEE8# Testnet
SNAP_RPC="https://lcd-testnet.firmachain.dev:26657"
BLOCK_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height | awk '{print $1 - ($1 % 10000-1)}') &&
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $BLOCK_HEIGHT $TRUST_HASH
# Expected return data
3500001 C4D994F9BDEF1A49EBEAF3552B9BD5BCF2E887CDA318816E6A70C69E0EEADD99SNAP_RPC= # Mainnet or Testnet PRC address
BLOCK_HEIGHT=$(curl -s $SNAP_RPC/block | grep -o '"height":"[0-9]\+"' | head -n1 | grep -o '[0-9]\+' | awk '{print $1 - ($1 % 10000 - 1)}')
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" \
| grep -o '"hash":"[A-F0-9]\+"' \
| head -n1 \
| sed 's/"hash":"//;s/"//')
echo $BLOCK_HEIGHT $TRUST_HASH# Mainnet
sed -i -e 's/enable = false/enable = true/g' ~/.firmachain/config/config.toml
sed -i -e 's/rpc_servers = ""/rpc_servers = "mainnet-seed1.firmachain.dev:26657,mainnet-seed2.firmachain.dev:26657,mainnet-seed3.firmachain.dev:26657"/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_height = 0/trust_height = 18520001/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_hash = ""/trust_hash = "7623BBA5B341DA3C9FC716103A56AAD3ABA2D4FC4BC57F786B3474F5F631DEE8"/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_period = "168h0m0s"/trust_period = "336h0m0s"/g' ~/.firmachain/config/config.toml# Testnet
sed -i -e 's/enable = false/enable = true/g' ~/.firmachain/config/config.toml
sed -i -e 's/rpc_servers = ""/rpc_servers = "testnet-seed1.firmachain.dev:26657,testnet-seed2.firmachain.dev:26657"/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_height = 0/trust_height = 1337168/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_hash = ""/trust_hash = "C826D099BD2F4E941597140115F4871067B293563A9019A9E788FF434EF3771B"/g' ~/.firmachain/config/config.toml
sed -i -e 's/trust_period = "168h0m0s"/trust_period = "336h0m0s"/g' ~/.firmachain/config/config.tomlfirmachaind start
Discovering snapshots for 15s
Discovered new snapshot height=3000 format=1 hash=0F14A473
Discovered new snapshot height=2000 format=1 hash=C6209AF7