托管节点
您可以通过托管 Iron Fish 全节点来获得积分。为此,请确保您的遥测已打开,并且您的涂鸦已设置。您只会因每个涂鸦托管一个节点而获得积分奖励。
- 如何以赚取积分的方式托管节点?#
- 首先,运行
ironfish testnet
以使用适当的涂鸦和遥测设置配置您的节点。 - 然后,运行
ironfish start
并保持该进程运行。就是这样 – 您将每 12 小时获得10积分。
第三阶段
2023 年 1 月 18 日开始立即注册奖池4 :210,000个硬币
- 托管节点
- 查找错误
- 铸币/销毁/发送资产
奖池3 :105,000个硬币(跨越所有阶段)
- 提交拉取请求
自动化代码如下,根据自己的实际情况修改并把所有需要注册的账号放到云端可供服务器部署时读取。
[crypto-access-nft]
#!/bin/bash
[[ $EUID != 0 ]] && echo -e " 当前非ROOT账号,无法继续操作,请使用 sudo su。" && exit 1
echo "安装必要环境"
programs=("curl" "tar" "wget" "clang" "pkg-config" "libssl-dev" "jq" "build-essential" "git" "make" "ncdu" "expect")
for program in "${programs[@]}"; do
if ! command -v "$program" > /dev/null; then
apt-get update
apt-get install -y "$program"
fi
done
echo "生成涂鸦"
name=$(cat /dev/urandom | head -n 10 | md5sum | head -c 10)
echo "将涂鸦上传服务器"
response=$(curl -s -X POST -H "Content-Type: application/json" -d '{"name":"'$name'"}' 这里写自己服务器或本地可读取地址)
if echo "$response" | grep -q "success"; then
echo "Name submit successful!"
else
echo "Name submit failed: $response"
fi
echo "从服务器获取所需信息"
response=$(curl -s 这里写自己服务器或本地可读取地址)
email=$(echo $response | jq -r '.email')
graffiti=$name
country_code=$(echo $response | jq -r '.country_code')
github=$(echo $response | jq -r '.github')
discord=$(echo $response | jq -r '.discord')
telegram=$(echo $response | jq -r '.telegram')
payload=''
echo "检查空变量"
if [ -n "$github" ]; then
payload+='"github":"'$github'",'
fi
if [ -n "$discord" ]; then
payload+='"discord":"'$discord'",'
fi
if [ -n "$telegram" ]; then
payload+='"telegram":"'$telegram'",'
fi
echo "删除空数据"
payload="$(echo $payload | sed 's/,$//')"
echo "注册发出 POST 请求"
registration_response=$(curl -s -X POST -H "Content-Type: application/json" -H "Origin: https://testnet.ironfish.network" -H "Referer: https://testnet.ironfish.network" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" -H "Accept: */*" -H "Accept-Language: zh-CN,zh;q=0.9" -H "DNT: 1" -H "Sec-Fetch-Dest: empty" -H "Sec-Fetch-Mode: cors" -H "Sec-Fetch-Site: same-site" --data '{"email":"'$email'","graffiti":"'$graffiti'","country_code":"'$country_code'",'$payload'}' https://api.ironfish.network/users)
echo "检查响应是成功还是失败"
if echo "$registration_response" | grep -q "success"; then
echo "Registration successful!"
else
echo "Registration failed: $registration_response"
fi
echo " 安装nodejs18"
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
apt install nodejs -y
echo "安装 ironfish"
npm install -g ironfish
sleep 10
echo "这里根据自己的服务器修改需要延迟的时间。过早结束可能会导致交互未完成"
expect <<- DONE
spawn ironfish testnet
expect "URL:"
send "$name\r"
expect "(n)o:"
send "y\r"
sleep 15
interact
DONE
sleep 10
echo "设置默认"
echo y | ironfish accounts:create $name
echo y | ironfish accounts:use $name
echo "启动节点"
nohup ironfish start > nohup.log &
echo "开始挖矿"
nohup ironfish miners:start > miners.log &
echo "启动节点守护"
cd /root
echo "根据自己实际情况书写"
wget -O /root/yourscript.sh 脚本下载地址
chmod +x yourscript.sh
nohup ./yourscript.sh &
echo "写入开机启动,这里为腾讯云轻量,其他请自行修改"
bash -c "cat > /etc/rc.local" <<EOF
#!/bin/bash
/usr/local/qcloud/irq/net_smp_affinity.sh >/tmp/net_affinity.log 2>&1
/usr/local/qcloud/cpuidle/cpuidle_support.sh &> /tmp/cpuidle_support.log
/usr/local/qcloud/rps/set_rps.sh >/tmp/setRps.log 2>&1
/usr/local/qcloud/irq/virtio_blk_smp_affinity.sh > /tmp/virtio_blk_affinity.log 2>&1
/usr/local/qcloud/gpu/nv_gpu_conf.sh >/tmp/nv_gpu_conf.log 2>&1
/usr/local/qcloud/scripts/disable_rt_runtime_share.sh >/tmp/disable_rt_runtime_share.log 2>&1
sudo nohup ironfish start > nohup.log &
sudo nohup ironfish miners:start > miners.log &
EOF
echo "查看积分命令:echo y | ironfish accounts:balance"
echo "交互命令:echo y | ironfish accounts:pay"
echo "你的节点名字是:$name"
echo "重启后会自动启动并守护"
常用的命令
#节点启动
ironfish start
#节点停止
ironfish stop
#节点状态
ironfish status
ironfish status -f
#错误日志
ironfish logs -v
#挖矿
ironfish miners:start
#查询钱包地址
ironfish wallet:address
#支付交易
ironfish wallet:send
ironfish wallet:send -a 币数量 -o 0.00000001 -t 公钥 -f 钱包名
#查询挖矿积分
ironfish wallet:balance