【go-filecoin】V0.5.6 发布 / 命令更新

本文内容已过期,最新请移步 https://blog.csdn.net/weixin_43668031/article/details/106138180
go-filecoin https://github.com/filecoin-project/go-filecoin/releases/tag/0.5.6
打了个 Latest release 的tag,终于发布了0.5.6版本,现在对这个版本命令做一个更新说明。

注意

说明文档移至https://docs.filecoin.io
运行go-filecoin的机器建议至少8G内存,i5 4***以上。
推荐32G内存,i9 9900可以双开。

初始化

生成证明文件 ./paramcache
初始化文件夹 go-filecoin init --devnet-user --genesisfile=http://user.kittyhawk.wtf:8020/genesis.car
启动进程 nohup go-filecoin daemon>>filecoin.log&
写成服务形式

# cat /lib/systemd/system/filecoin.service

[Unit]
Description=FileCoin
[Service]
ExecStart=/usr/local/bin/go-filecoin daemon
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target

设置服务开机运行 systemctl enable filecoin.service
开启服务 systemctl start filecoin.service
查看服务状态 systemctl status filecoin.service
设置昵称 go-filecoin config heartbeat.nickname "BillImba"
设置心跳让官方的仪表盘能收集到我的信息 go-filecoin config heartbeat.beatTarget "/dns4/backend-stats.kittyhawk.wtf/tcp/8080/ipfs/QmUWmZnpZb6xFryNDeNU7KcJ1Af5oHy7fB9npU67sseEjR"

钱包、余额

查看默认钱包 go-filecoin address default
查看钱包列表 go-filecoin address ls
查看余额 go-filecoin wallet balance t1jcadi5yvzaj4mli7ouhcvvlco4i6jn6kbiokw7q
查看余额 go-filecoin wallet balance $(go-filecoin address default)

区块

查看当前最新区块 go-filecoin chain head
查看当前最新区块内容 go-filecoin show block $(go-filecoin chain head | head -n1)

信息查询

查看连接节点数量 go-filecoin swarm peers | wc -l
查看节点信息
go-filecoin inspect all| jq
go-filecoin inspect config | jq
go-filecoin inspect disk| jq
go-filecoin inspect environment| jq
go-filecoin inspect memory| jq
go-filecoin inspect runtime| jq

开始挖矿

测试代币获取 curl -X POST -F "target=$(go-filecoin address default)" "http://user.kittyhawk.wtf:9797/tap"
创建储存池 go-filecoin miner create --gas-price=0.001 --gas-limit=1000 -- 400
创建定价 go-filecoin miner set-price --miner=t2qjso4nsol35r6rvwlcafg62gjblwzmiakdodtry --gas-price=0.001 --gas-limit=1000 0.0000000001 86400
开始挖矿 go-filecoin mining start
查看挖矿状态 go-filecoin mining status
查看储存挖矿状态 go-filecoin deals list --miner

储存数据

查看宣告的订单列表 go-filecoin client list-asks
上传到本节点 go-filecoin client import go-ipfs_v0.4.21_linux-amd64.tar.gz
储存数据go-filecoin client propose-storage-deal t2qjso4nsol35r6rvwlcafg62gjblwzmiakdodtry QmaDaJTW6jQZfJLVhC95a9doU844HqhvVxu4AVmNbUQYUy 000 20160
查询交易是否完成 go-filecoin client query-storage-deal zDPWYqFD67XeKsEWZHoF65T7TuvKu2mR9mu4ZLxqJ8chiKRKBCg3
我比较关心的数据监控 watch -n 30 'go-filecoin show block $(go-filecoin chain head | head -n1);go-filecoin swarm peers |wc -l;go-filecoin address default;go-filecoin wallet balance $(go-filecoin address default)'

刷单脚本

文件夹/mnt/mp4/内放的是小于256M的视频文件。

#!/bin/bash
#set -x
pa=/mnt/mp4/
m=t2qjso4nsol35r6rvwlcafg62gjblwzmiakdodtry

for file in `ls $pa`
do
	if [ -f $pa$file ]
	then
		echo $file
		h=`go-filecoin client import $pa$file`
		echo $h
		r=`go-filecoin client propose-storage-deal --allow-duplicates $m $h 000 10000`
		echo $r
	fi	
done
原创文章 29 获赞 21 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43668031/article/details/101598017