Defund是基于cosmos sdk的去中心化etf。近期宣布了激励性测试网。
官网:defund.app
官方discord: discord.gg/QuXAdnd7Pc
本文仅供参考,请以官方教程为准。
官方推荐的最低配置
8核 (4 physical core) x86_64 cpu
32GB RAM
1TB ssd
实际可能不需要那么高配置,4核8G 500gb Ubuntu 20.04可以正常运行。
sudo apt-get update -y && sudo apt upgrade -y && sudo apt-get install make build-essential gcc git jq chrony -y
sudo rm -rf /usr/local/go;
curl https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - ;
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source ~/.profile
运行go version检查版本,需1.18或更新的版本
git clone https://github.com/defund-labs/defund
cd defund
git checkout v0.0.2
make install
defundd config chain-id defund-private-1
defundd init 你的节点名
seeds="8e1590558d8fede2f8c9405b7ef550ff455ce842@51.79.30.9:26656,bfffaf3b2c38292bd0aa2a3efe59f210f49b5793@51.91.208.71:26656,106c6974096ca8224f20a85396155979dbd2fb09@198.244.141.176:26656"
peers="111ba4e5ae97d5f294294ea6ca03c17506465ec5@208.68.39.221:26656,f114c02efc5aa7ee3ee6733d806a1fae2fbfb66b@5.189.178.222:46656,8980faac5295875a5ecd987a99392b9da56c9848@85.10.216.151:26656,3c3170f0bcbdcc1bef12ed7b92e8e03d634adf4e@65.108.103.236:27656"
sed -i.bak -e "s/^seeds =./seeds = "$seeds"/; s/^persistent_peers =./persistent_peers = "$peers"/" $HOME/.defund/config/config.toml
cd $HOME/.defund/config
wget https://raw.githubusercontent.com/defund-labs/defund/v0.0.2/testnet/private/genesis.json
检查genesis文件
sha256sum ~/.defund/config/genesis.json
输出应该为
268f625672ed618a844ee32bcfc3a66d51921b12e6a966a0965aa296fb82c032
defundd keys add 你的钱包名
创建成功后记得保存好助记词。
sudo tee /lib/systemd/system/defund.service > /dev/null <<EOF
[Unit]
Description=Defund daemon
After=network-online.target
[Service]
User=$USER
ExecStart=${HOME}/go/bin/defundd start
Restart=always
RestartSec=3
LimitNOFILE=infinity
LimitNPROC=infinity
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl restart systemd-journald
sudo systemctl start defund
检查服务状态
sudo systemctl status defund
检查节点日志
journalctl -f -n 100 -u defund -o cat
curl localhost:26657/status | grep "catching_up"
若显示为
"catching_up": false
则区块高度已经同步到最新区块。
水龙头网站:
注:需要在区块高度已经同步到最新区块之后,且领取测试币成功后,才能创建验证人
defundd tx staking create-validator \
--amount=1000000ufetf \
--pubkey=$(defundd tendermint show-validator) \
--moniker="你的验证人名字" \
--chain-id=defund-private-1 \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--gas="auto" \
--from=你创建的钱包名
官方说不管你的验证人是否是活跃(active)验证人,都可以获得相同的奖励。不需要刷水龙头领取测试币,即创建好验证人即可。
创建后可以在区块浏览器检查。
查余额
defundd query bank balances 你的钱包地址
查看你的钱包地址
defundd keys list
查询节点状态
curl localhost:26657/status