MANTRA выступает в качестве блокчейна первого уровня с приоритетом на безопасность, который соблюдает все нормы и требования к соответствию. Построенная на основе Cosmos SDK для разработчиков и учреждений, MANTRA Chain нацелена на решение всех препятствий, которые мешают плавному переходу реальных активов (RWAs) в блокчейн. MANTRA Chain обеспечивает совместимую токенизацию неликвидных активов через сеть IBC и предлагает различные модули для соответствия, активов и токенов.
Минимальный системные требования:
- Node Type: Testnet
- CPU: 4
- RAM: 8GB
- Storage: 150GB
wget -O mantrat https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/mantrat && chmod +x mantrat && ./mantrat
Подготовка сервера:
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc chrony liblz4-tool -y
Установка Go 1.21.6:
ver="1.21.6"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
Сборка MantraChain:
cd $HOME && mkdir -p go/bin/
wget https://github.com/MANTRA-Finance/public/releases/download/v2.0.0/mantrachaind-2.0.0-linux-amd64.tar.gz
tar -xvzf mantrachaind-2.0.0-linux-amd64.tar.gz
chmod +x mantrachaind
rm -rf mantrachaind-2.0.0-linux-amd64.tar.gz
mv mantrachaind $HOME/go/bin
mantrachaind version --long | grep -e commit -e version
Версия: 2.0.0
Коммит: c0b4618
mantrachaind init STAVR_guide --chain-id=mantra-hongbai-1
mantrachaind config chain-id mantra-hongbai-1
mantrachaind keys add <имя_кошелька>
или
mantrachaind keys add <имя_кошелька> --recover
wget -L -O $HOME/.mantrachain/config/genesis.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/genesis.json"
sha256sum $HOME/.mantrachain/config/genesis.json
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0002uom\"/;" ~/.mantrachain/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.mantrachain/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.mantrachain/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.mantrachain/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.mantrachain/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.mantrachain/config/config.toml
pruning="custom"
pruning_keep_recent="1000"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.mantrachain/config/app.toml
indexer="null" &&
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.mantrachain/config/config.toml
Загрузка addrbook
bash
Copy code
wget -O $HOME/.mantrachain/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/addrbook.json"
sudo tee /etc/systemd/system/mantrachaind.service > /dev/null <<EOF
[Unit]
Description=mantrachaind
After=network-online.target
[Service]
User=$USER
ExecStart=$(which mantrachaind) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
SNAP_RPC=https://mantra.rpc.t.stavr.tech:443
peers="b6943ba9d189c545d92051250d2a3641f2216b2b@mantra-t.seed.stavr.tech:36056"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.mantrachain/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
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.bak -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\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.mantrachain/config/config.toml
mantrachaind tendermint unsafe-reset-all --home $HOME/.mantrachain
curl -o - -L https://mantra-t.wasm.stavr.tech/wasm-mantra.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
wget -O $HOME/.mantrachain/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/addrbook.json"
sudo systemctl restart mantrachaind && journalctl -fu mantrachaind -o cat
cd $HOME
apt install lz4
sudo systemctl stop mantrachaind
cp $HOME/.mantrachain/data/priv_validator_state.json $HOME/.mantrachain/priv_validator_state.json.backup
rm -rf $HOME/.mantrachain/data
curl -o - -L https://mantra-t.snapshot.stavr.tech/mantra-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
curl -o - -L https://mantra-t.wasm.stavr.tech/wasm-mantra.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
mv $HOME/.mantrachain/priv_validator_state.json.backup $HOME/.mantrachain/data/priv_validator_state.json
wget -O $HOME/.mantrachain/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/addrbook.json"
sudo systemctl restart mantrachaind && journalctl -fu mantrachaind -o cat
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind
sudo systemctl restart mantrachaind && sudo journalctl -fu mantrachaind -o cat
mantrachaind tx staking create-validator \
--commission-rate 0.1 \
--commission-max-rate 1 \
--commission-max-change-rate 1 \
--min-self-delegation "1" \
--amount 1000000uom \
--pubkey $(mantrachaind tendermint show-validator) \
--from <кошелёк> \
--moniker="STAVR_guide" \
--chain-id mantra-hongbai-1 \
--fees 35uom \
--gas 350000 \
--identity="" \
--website="" \
--details="" -y
sudo systemctl stop mantrachaind
sudo systemctl disable mantrachaind
rm /etc/systemd/system/mantrachaind.service
sudo systemctl daemon-reload
cd $HOME
rm -rf .mantrachain
rm -rf $(which mantrachaind)
Дополнительно
Downgrade
sudo wget -O /usr/lib/libwasmvm.x86_64.so https://github.com/CosmWasm/wasmvm/releases/download/v1.3.1/libwasmvm.x86_64.so
wget https://github.com/MANTRA-Finance/public/raw/main/mantrachain-hongbai/mantrachaind-linux-amd64.zip
unzip mantrachaind-linux-amd64.zip
rm mantrachaind-linux-amd64.zip
mv mantrachaind $(which mantrachaind)
Snapshot
sudo systemctl stop mantrachaind
cp $HOME/.mantrachain/data/priv_validator_state.json $HOME/.mantrachain/priv_validator_state.json.backup
rm -rf $HOME/.mantrachain/data
curl -o - -L https://mantra-t.snapshot.stavr.tech/mantra-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
curl -o - -L https://mantra-t.wasm.stavr.tech/wasm-mantra.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
mv $HOME/.mantrachain/priv_validator_state.json.backup $HOME/.mantrachain/data/priv_validator_state.json
wget -O $HOME/.mantrachain/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/addrbook.json"
sudo systemctl restart mantrachaind && journalctl -fu mantrachaind -o cat
wget https://github.com/MANTRA-Finance/public/releases/download/v2.0.0/mantrachaind-2.0.0-linux-amd64.tar.gz
tar -xvzf mantrachaind-2.0.0-linux-amd64.tar.gz
chmod +x mantrachaind
rm -rf mantrachaind-2.0.0-linux-amd64.tar.gz
mv mantrachaind $(which mantrachaind)
mantrachaind version --long | grep -e commit -e version
#commit: c0b4618
#version: 2.0.0
sudo systemctl restart mantrachaind && sudo journalctl -fu mantrachaind -o cat
- EXPLORER-T: https://explorer.stavr.tech/MANTRA-Hongbai Indexer "ON"
- API-T: https://mantra.api.t.stavr.tech
- RPC-T: https://mantra.rpc.t.stavr.tech Snapshot-interval = 1000
- gRPC-T: mantra.grpc.t.stavr.tech:3601
b6943ba9d189c545d92051250d2a3641f2216b2b@mantra-t.seed.stavr.tech:36056
wget -O $HOME/.mantrachain/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/addrbook.json"
wget -L -O $HOME/.mantrachain/config/genesis.json "https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/genesis.json"
curl -o - -L https://mantra-t.wasm.stavr.tech/wasm-mantra.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.mantrachain --strip-components 2
wget -O mantrat https://raw.githubusercontent.com/111STAVR111/props/main/Mantra/mantrat && chmod +x mantrat && ./mantrat
at Height -> 1633260
cd $HOME
wget https://github.com/MANTRA-Finance/public/releases/download/v2.0.0/mantrachaind-2.0.0-linux-amd64.tar.gz
tar -xvzf mantrachaind-2.0.0-linux-amd64.tar.gz
chmod +x mantrachaind
rm -rf mantrachaind-2.0.0-linux-amd64.tar.gz
mv mantrachaind $(which mantrachaind)
mantrachaind version --long | grep -e commit -e version
#commit: c0b4618
#version: 2.0.0
sudo systemctl restart mantrachaind && sudo journalctl -fu mantrachaind -o cat
- mantrachaind status 2>&1 | jq .NodeInfo
- mantrachaind status 2>&1 | jq .SyncInfo
- mantrachaind status 2>&1 | jq .ValidatorInfo
sudo journalctl -fu mantrachaind -o cat
sudo systemctl status mantrachaind
sudo systemctl restart mantrachaind
sudo systemctl stop mantrachaind
sudo systemctl start mantrachaind
sudo systemctl daemon-reload
sudo systemctl disable mantrachaind
sudo systemctl enable mantrachaind
Ваш Peer
echo $(mantrachaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.mantrachain/config/config.toml | grep -oPm1 "(?<=^laddr = \").*(?=\")" | cut -d ":" -f3)
sudo systemctl stop mantrachaind && \
sudo systemctl disable mantrachaind && \
rm /etc/systemd/system/mantrachaind.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf .mantrachain && \
rm -rf $(which mantrachaind)