当前位置:网站首页>lotus-local-net 2k v1.17.0-rc4
lotus-local-net 2k v1.17.0-rc4
2022-07-31 10:55:00 【mixboot】
系列文章目录
lotus
前言
Local network
一、依赖
- Ubuntu
# cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y
- rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
# rustc --version
rustc 1.62.1 (e092d0b6b 2022-07-16)
- go
wget https://studygolang.com/dl/golang/go1.18.4.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile && source ~/.profile
# go version
go version go1.18.4 linux/amd64
二、源码编译
1.清理环境
rm -rf $LOTUS_PATH
rm -rf $LOTUS_MINER_PATH
rm -rf ~/.lotus/
rm -rf ~/.lotusminer/
rm -rf ~/.genesis-sectors/
rm -rf ~/devgen.car
rm -rf ~/localnet.json
2.环境变量
.bashrc
# lotus 2k
export LOTUS_PATH=/2k/lotus-local-net
export LOTUS_MINER_PATH=/2k/lotus-miner-local-net
export LOTUS_SKIP_GENESIS_CHECK=_yes_
export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
export CGO_CFLAGS="-D__BLST_PORTABLE__"
export IPFS_GATEWAY=https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/
3.源码编译
git clone https://github.com/filecoin-project/lotus lotus-local-net
# cd lotus-local-net/
# git checkout v1.17.0-rc4
# git show
commit fd1207c5c73213b496b12da0860c1e55d69465e2 (HEAD, tag: v1.17.0-rc4, origin/release/v1.17.0)
make clean 2k
make install
# lotus --version
lotus version 1.17.0-rc4+2k+git.fd1207c5c
三、创世
- 2k 复制证明参数
lotus fetch-params 2048
- 预封装2个扇区
lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
- 生成创世块
lotus-seed genesis new localnet.json
- 生成钱包地址
lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
- 启动创世节点lotus daemon
lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false
- 导入创世矿工密钥
lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
- 初始化创世旷工
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
报错
ERROR main lotus-miner/init.go:264 Failed to initialize lotus-miner: failed to configure miner:
main.storageMinerInit
/root/lotus-local-net/cmd/lotus-miner/init.go:506
- GasEstimateMessageGas error: estimating gas used: CallWithGas failed: failed to set up vm: Serialization error for Cbor protocol: RequireLength {
name: "tuple", expect: 1, value: 0 }
- 清理环境,切换到
lotus-local-net
目录
# cd lotus-local-net/
./lotus fetch-params 2048
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
./lotus-seed genesis new localnet.json
./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
./lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false
./lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
./lotus-miner run --nosync
# lotus-miner info
Enabled subsystems (from miner API): [Mining Sealing SectorStorage Markets]
Enabled subsystems (from markets API): [Mining Sealing SectorStorage Markets]
Chain: [sync ok] [basefee 100 aFIL]
Miner: t01000 (2 KiB sectors)
Power: 40 Ki / 40 Ki (100.0000%)
Raw: 4 KiB / 4 KiB (100.0000%)
Committed: 4 KiB
Proving: 4 KiB
Projected average block win rate: 20024.16/week (every 30s)
Projected block win with 99.9% probability every 41s
(projections DO NOT account for future network and miner growth)
Miner Balance: 4315.656 FIL
PreCommit: 0
Pledge: 2 aFIL
Vesting: 3236.742 FIL
Available: 1078.914 FIL
Market Balance: 0
Locked: 0
Available: 0
Worker Balance: 50000000 FIL
Total Spendable: 50001078.914 FIL
Sectors:
Total: 2
Proving: 2
Workers: Seal(1) WdPoSt(0) WinPoSt(0)
Storage Deals: 0, 0 B
Retrieval Deals (complete): 0, 0 B
1.后台运行
nohup lotus daemon --genesis=/root/lotus-local-net/devgen.car --profile=bootstrapper >> /var/log/2k/daemon.log 2>&1 &
nohup lotus-miner run --nosync >> /var/log/2k/miner.log 2>&1 &
四、第二个节点
参考
边栏推荐
- 新人学习小熊派华为iot介绍
- WSL2安装.NET 6
- 《MySQL高级篇》五、InnoDB数据存储结构
- mpu9150(driverack pa简明教程)
- "JUC Concurrent Programming - Advanced" 06 - Immutability of Shared Models (Design of Immutable Classes | Use of Immutable Classes | Flyweight Pattern)
- odoo14 | 附件上传功能及实际使用
- 力扣shell刷题
- 如何优雅的停止一个线程?
- 7 天能找到 Go 工作吗?学学 Go 数组和指针试试
- 众多mock工具,这一次我选对了
猜你喜欢
Make your own dataset in FCN and train it
《MySQL高级篇》五、InnoDB数据存储结构
因存在自燃安全隐患,宝马7系和5系紧急召回,合计超过5.7万辆
SQL去重的三种方法汇总
3D激光SLAM:LeGO-LOAM论文解读---完整篇
NowCoderTOP28-34 binary tree - continuous update ing
Sql optimization summary!detailed!(Required for the latest interview in 2021)
Sql优化总结!详细!(2021最新面试必问)
众多mock工具,这一次我选对了
Three ways of single sign-on
随机推荐
Build finished with errors/Executable Not Found
7 天能找到 Go 工作吗?学学 Go 数组和指针试试
Day113. Shangyitong: user authentication, Alibaba Cloud OSS, patient management
【LeetCode】73.矩阵置零
KVM virtualization job
1161. 最大层内元素和 (二叉树的层序遍历)
一、excel转pdf格式jacob.jar
Redis-基础
Redis缓存面临的缓存击穿问题
应用层基础 —— 认识URL
Dart Log tool class
C#多态的实现
Simple understanding of GCD
Meikle Studio--Hongmeng 14-day development training notes (8)
Usage of exists in sql
Deletion of the sequence table
csdn file export to pdf
解决报错TypeError:unsupported operand type(s) for +: ‘NoneType‘ and ‘str‘
双链表的创建
WEB核心【记录网站登录人数,记录用户名案例】Cookie技术实现