Namada是一个用于跨链资产隐私的权益证明 L1 项目。Namada 协议专注于组件的子集,允许安全传输任何类型的令牌,无论它们是在哪个平台上创建的。使用 Namada,您可以转移您的 ETH、DAI 或任何其他资产(来自以太坊、ATOM、OSMO 等的 NFT)并以几秒的交易延迟和几乎零费用发送它们。
Anoma 在由 Polychain Capital 领投的两轮融资中筹集了 3280 万美元。参与的还有 Electric Capital、Coinbase Ventures、FBG Capital、CMS Holdings 等。
服务器准备
[crypto-connect label=”Connect to Login” class=”fl-button fl-is-info fl-is-light”]
[crypto-block]
该节点比较吃硬盘,可用空间小于 200GB,官方要求:4 CPU,8 GB RAM,500GB SSD。
在安装之前,请确保服务器上不再有节点在默认端口 – 26xxx 上使用 tendermint 共识(spaceforks、Penumbra 等)。
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev libclang-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool uidmap dbus-user-session -y
wget https://go.dev/dl/go1.19.5.linux-amd64.tar.gz; \ rm -rv /usr/local/go; \ tar -C /usr/local -xzf go1.19.5.linux-amd64.tar.gz && \ rm -v go1.19.5.linux-amd64.tar.gz && \ echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \ source ~/.bash_profile && \ go version
安装rustup
cd $HOME sudo curl https://sh.rustup.rs -sSf | sh -s -- -y . $HOME/.cargo/env curl https://deb.nodesource.com/setup_16.x | sudo bash sudo apt install cargo nodejs -y < "/dev/null" cargo --version
节点安装
VALIDATOR_ALIAS=名称 CHAIN_ID_NAMADA=public-testnet-6.0.a0266444b06 WALLET_NAMADA=wallet
echo "export VALIDATOR_ALIAS="${VALIDATOR_ALIAS}"" >> $HOME/.bash_profile echo "export CHAIN_ID_NAMADA="${CHAIN_ID_NAMADA}"" >> $HOME/.bash_profile echo "export WALLET_NAMADA="${WALLET_NAMADA}"" >> $HOME/.bash_profile source $HOME/.bash_profile echo -e "\nvalidator_alias > ${VALIDATOR_ALIAS}.\n" echo -e "\nchain_id_namada > ${CHAIN_ID_NAMADA}.\n" echo -e "\nwallet_namada > ${WALLET_NAMADA}.\n"
cd $HOME git clone https://github.com/anoma/namada cd namada git checkout v0.14.3 make build-release cp "$HOME/namada/target/release/namada" /usr/local/bin/namada && cp "$HOME/namada/target/release/namadac" /usr/local/bin/namadac && cp "$HOME/namada/target/release/namadan" /usr/local/bin/namadan && cp "$HOME/namada/target/release/namadaw" /usr/local/bin/namadaw
namada --version #Namada v0.14.3
cd $HOME git clone https://github.com/heliaxdev/tendermint cd tendermint git checkout v0.1.4-abciplus make build cp $HOME/tendermint/build/tendermint /usr/local/bin/tendermint
tendermint version #v0.1.4-abciplus
cd $HOME namada client utils join-network --chain-id $CHAIN_ID_NAMADA
wget "https://github.com/heliaxdev/anoma-network-config/releases/download/public-testnet-6.0.a0266444b06/public-testnet-6.0.a0266444b06.tar.gz" tar xvzf "$HOME/public-testnet-6.0.a0266444b06.tar.gz"
printf "[Unit] Description=Namada After=network-online.target [Service] User=$USER WorkingDirectory=$HOME/.namada Environment=NAMADA_LOG=debug Environment=NAMADA_TM_STDOUT=true ExecStart=/usr/local/bin/namada --base-dir=$HOME/.namada node ledger run StandardOutput=syslog StandardError=syslog Restart=always RestartSec=10 LimitNOFILE=65535 [Install] WantedBy=multi-user.target" > /etc/systemd/system/namadad.service
sudo systemctl daemon-reload && \ sudo systemctl enable namadad && \ sudo systemctl restart namadad && \ sudo journalctl -u namadad -f -o cat|grep indexed
curl -s localhost:26657/status
PS 由于某些未知原因,“catching_up”参数有时从同步一开始就显示为false 。在这种情况下,我们等到最后一个块(параметр – “latest_block_height”)与资源管理器中的指标匹配 – https://namada.explorers.guru/blocks
创建钱包和验证器
cd $HOME namada wallet address gen --alias $WALLET_NAMADA --unsafe-dont-encrypt
namada client transfer --source faucet --target $WALLET_NAMADA --token NAM \ --amount 1000 --signer $WALLET_NAMADA
该过程的成功完成像这样
namada client init-validator --alias $VALIDATOR_ALIAS --source $WALLET_NAMADA \ --commission-rate 0.05 --max-commission-rate-change 0.01 --signer $WALLET_NAMADA \ --gas-amount 100000000 --gas-token NAM --scheme ed25519 --unsafe-dont-encrypt
- 钱包密钥:$HOME/.namada/public-testnet-xxxxxx/wallet.toml
- 验证器密钥:$HOME/.namada/public-testnet-xxxxx/tendermint/config/priv_validator_key.json
namada client transfer --token NAM --amount 1000 --source faucet \ --target $VALIDATOR_ALIAS --signer $VALIDATOR_ALIAS
namada client transfer --token NAM --amount 1000 --source faucet \ --target $VALIDATOR_ALIAS --signer $VALIDATOR_ALIAS
namada client balance --owner $VALIDATOR_ALIAS --token NAM #NAM: 2000
在将代币抵押给验证者之前,您需要等待 2 个epoch。您可以使用以下命令检查当前epoch
namada client epoch
2 个epoch(约 30 分钟)后,我们将代币抵押给验证者
namada client bond --validator $VALIDATOR_ALIAS --amount 1800 \ --signer $VALIDATOR_ALIAS --source $VALIDATOR_ALIAS
namada client bonded-stake --validator $VALIDATOR_ALIAS namada client bonds --validator $VALIDATOR_ALIAS
目前所有可用的浏览器都不稳定
更新 v0.14.3
NEW_CHAIN_ID_NAMADA = public-testnet-6.0.a0266444b06
echo "export NEW_CHAIN_ID_NAMADA="${NEW_CHAIN_ID_NAMADA}"" >> $HOME/.bash_profile source $HOME/.bash_profile echo -e "\nnew_chain_id_namada > ${NEW_CHAIN_ID_NAMADA}.\n"
cd $HOME/namada git fetch && git checkout v0.14.3 make build-release
cd $HOME sudo systemctl stop namadad rm /usr/local/bin/namada /usr/local/bin/namadac /usr/local/bin/namadan /usr/local/bin/namadaw cp "$HOME/namada/target/release/namada" /usr/local/bin/namada cp "$HOME/namada/target/release/namadac" /usr/local/bin/namadac cp "$HOME/namada/target/release/namadan" /usr/local/bin/namadan cp "$HOME/namada/target/release/namadaw" /usr/local/bin/namadaw
namada --version #Namada v0.14.3
rm -r $HOME/.namada/public-testnet-3.0.81edd4d6eb6 rm $HOME/.namada/public-testnet-3.0.81edd4d6eb6.toml rm -r $HOME/.namada/public-testnet-4.0.16a35d789f4 rm $HOME/.namada/public-testnet-4.0.16a35d789f4.toml rm -r $HOME/.namada/public-testnet-5.0.d25aa64ace6 rm $HOME/.namada/public-testnet-5.0.d25aa64ace6.toml rm $HOME/.namada/global-config.toml
namada client utils join-network --chain-id $NEW_CHAIN_ID_NAMADA --genesis-validator $VALIDATOR_ALIAS
sudo systemctl restart namadad && \ sudo journalctl -u namadad -f -o cat|grep indexed #[2023-02-22] service start module=main msg="Starting Node service" impl=Node #[2023-02-22] Genesis time is in the future. Sleeping until then... module=main genTime="******
cd $HOME namada client utils join-network --chain-id $NEW_CHAIN_ID_NAMADA
wget "https://github.com/heliaxdev/anoma-network-config/releases/download/public-testnet-6.0.a0266444b06/public-testnet-6.0.a0266444b06.tar.gz" tar xvzf "$HOME/public-testnet-6.0.a0266444b06.tar.gz"
sudo systemctl restart namadad && \ sudo journalctl -u namadad -f -o cat|grep indexed
删除节点
- 钱包密钥:$HOME/.namada/public-testnet-xxxxxx/wallet.toml
- 验证器密钥:$HOME/.namada/public-testnet-xxxxx/tendermint/config/priv_validator_key.json
sudosystemctl stop namadad sudosystemctl disable namadad rm -rf $(which namadad) rm /usr/local/bin/namada /usr/local/bin/namadac /usr/local/bin/namadan /usr/local/bin/namadaw rm -rf $HOME/.namada* rm -rf $HOME/namada rm -rf /etc/systemd/system/namadad.service rm -rf $HOME/tendermint sudo systemctl daemon-reload
有用的命令
sudo systemctl restart namadad
sudo journalctl -u namadad -f -o cat
RAW_ADDRESS=`cat "$HOME/.namada/$CHAIN_ID_NAMADA/wallet.toml" | grep address`
WALLET_ADDRESS=$(echo -e $RAW_ADDRESS | sed 's|.*=||' | sed -e 's/^ "//' | sed -e 's/"$//')
echo "export WALLET_ADDRESS=$WALLET_ADDRESS" >> ~/.bash_profile
source ~/.bash_profile
echo -e " YOUR WALLET ADDRESS: $WALLET_ADDRESS"
[/crypto-block]