export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export http_proxy="socks5://127.0.0.1:1080"
export https_proxy="socks5://127.0.0.1:1080"
git config --global http.proxy 'socks5://127.0.0.1:1080'
git clone https://github.com/filecoin-project/lotus.git
interopnet
# cd lotus/
# git show
commit 1d168579979e43cff6e47ca5d756287264b0391d (HEAD -> master, origin/master, origin/HEAD)
Merge: 628a598c bc914de3
Author: Whyrusleeping
Date: Tue Mar 24 09:22:08 2020 -0700
Merge pull request #1445 from jimpick/fix/spelling
Error message spelling fixes
# git checkout interopnet
分支 'interopnet' 设置为跟踪来自 'origin' 的远程分支 'interopnet'。
切换到一个新分支 'interopnet'
# git show
commit a5c291cca712fd543aba15830c4431967eeb481b (HEAD -> interopnet, origin/interopnet)
Author: Travis Person
Date: Fri Mar 27 03:45:57 2020 +0000
New interop network info
# git pull
# git show
commit db31cbe82e76223e0adc19a11f240ffe2e66158c (HEAD -> interopnet, origin/interopnet)
git clone -b interopnet https://github.com/filecoin-project/lotus.git
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
make clean all && make install
# lotus --version
lotus version 0.3.0+gita5c291cc
vim .bashrc
export LOTUS_STORAGE_PATH=/storage/lotuswork/lotusstorage
export LOTUS_PATH=/storage/lotuswork/lotus
export WORKER_PATH=/storage/lotuswork/lotusworker
export FIL_PROOFS_PARAMETER_CACHE=/storage/filecoin-proof-parameters
export IPFS_GATEWAY=https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/
export TMPDIR=/storage/lotuswork/tmpdir
# du -sh filecoin-proof-parameters/
49G filecoin-proof-parameters/
nohup lotus daemon >> /storage/lotus.log 2>&1 &
lotus net peers
可以获取到其它节点,找一个公网的节点,在运行lotus daemon
后手动连接到这个节点INFO peermgr peermgr/peermgr.go:156 connecting to bootstrap peers
INFO hello hello/hello.go:177 time offset {"offset": 0.122429887, "peerid": "12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior"}
INFO hello hello/hello.go:115 Got new tipset through Hello: [bafy2bzacedr36iiszhhymbnv26an2ehi35oqmimbhr3adqpz63qfp6y47nlsq] from 12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior
INFO chain chain/sync_manager.go:100 sync bootstrap has 1 peers
INFO chain chain/sync_manager.go:283 scheduling incoming tipset sync: [bafy2bzacedr36iiszhhymbnv26an2ehi35oqmimbhr3adqpz63qfp6y47nlsq]
WARN blocksync blocksync/blocksync_client.go:103 BlockSync request failed for peer 12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior: blocksync req failed: reading cid field t.Parents failed: i/o deadline reached
ERROR chain chain/sync.go:1002 failed to get blocks: GetBlocks failed with all peers:
# lotus net connect /ip4/36.156.7.157/tcp/6000/p2p/12D3KooWSSGvUR4evP9rnBEsHNHbbx8YUHL6ZkJaTBRhQMn5P36r
connect 12D3KooWSSGvUR4evP9rnBEsHNHbbx8YUHL6ZkJaTBRhQMn5P36r: success
- could not build arguments for function "github.com/filecoin-project/lotus/node/modules/lp2p".StartListening.func1 (/root/lotus/node/modules/lp2p/addrs.go:98): failed to build host.Host: could not build arguments for function "reflect".makeFuncStub (/usr/lib/go-1.14/src/reflect/asm_amd64.s:12): failed to build lp2p.BaseIpfsRouting: could not build arguments for function "reflect".makeFuncStub (/usr/lib/go-1.14/src/reflect/asm_amd64.s:12): failed to build dtypes.MetadataDS: function "reflect".makeFuncStub (/usr/lib/go-1.14/src/reflect/asm_amd64.s:12) returned a non-nil error: unsupported badger version, use github.com/ipfs/badgerds-upgrade to upgrade: manifest has unsupported version: 4 (we support 7).
Please see https://github.com/dgraph-io/badger/blob/master/README.md#i-see-manifest-has-unsupported-version-x-we-support-y-error on how to fix this.
rm -rf /storage/lotuswork/lotus/
# lotus sync wait
Worker 1: Target: [bafy2bzacedn7rxx3w3xtrs4he6nwbyxbjsgkocnw4ags7ojcod74mecrnsroq] State: error Height: 100
Done!
lotus wallet new bls
lotus-storage-miner init --actor=t0 --owner=t3
lotus-storage-miner init create-worker-key-t3... --sector-size 512MB
nohup lotus-storage-miner run >> /storage/miner.log 2>&1 &
nohup lotus-storage-miner run --enable-gpu-proving=false >> /storage/miner.log 2>&1 &
lotus-storage-miner sectors pledge
2020-03-19T09:39:47.148+0800 INFO sectors sealing/sealing.go:140 Start sealing 0
2020-03-19T09:39:47.166+0800 INFO sectors sealing/states.go:21 performing filling up rest of the sector... {"sector": "0"}
2020-03-19T09:39:47.173+0800 INFO sectors sealing/states.go:66 performing sector replication... {"sector": "0"}
2020-03-19T10:03:44.657+0800 INFO sectors sealing/states.go:128 submitting precommit for sector: 0
2020-03-19T10:03:44.679+0800 INFO sectors sealing/states.go:139 Sector precommitted: 0
2020-03-19T10:04:40.447+0800 INFO sectors sealing/states.go:150 precommit message landed on chain: 0
2020-03-19T10:04:40.447+0800 INFO sectors sealing/states.go:153 precommit for sector 0 made it on chain, will start proof computation at height 265
2020-03-19T10:08:50.720+0800 WARN sectors sealing/states.go:171 revert in interactive commit sector step
2020-03-19T10:08:50.755+0800 WARN sectors sealing/states.go:171 revert in interactive commit sector step
2020-03-19T10:11:20.663+0800 INFO sectors sealing/states.go:183 scheduling seal proof computation...
2020-03-19T10:11:20.663+0800 INFO sectors sealing/states.go:185 KOMIT 0 2a930f2181fc8a75f54f0d193167d86ec06294853c824bc4b9fbc7d00d3811fc(-304); cc61863a88463ff5b1206cd644d09033d9104af3d63c9e03b565841d2e573934(265); [{536870912 bafk4chzahfla46ytve5qpisd7utsb75hzm7b2lsqlkzwfhtz6rrrgujm3ida}]; r:6261666b3465687a6172797a676c756f6763683566357063736562746b77346c797a687a33753468696e336c6964786b6e6a7467707769736b766d6361; d:6261666b3463687a6168666c6134367974766535717069736437757473623735687a6d3762326c73716c6b7a776668747a3672727267756a6d33696461
2020-03-19T10:14:18.239+0800 WARN storageminer storage/fpost_sched.go:160 Aborting Fallback PoSt (EPS: -1)
2020-03-19T10:14:18.839+0800 INFO sectors sealing/fsm.go:163 Proving sector 0
lotus version 0.3.0+gita5c291cc
34分钟2020-03-27T14:15:04.763+0800 WARN advmgr sectorstorage/manager.go:266 stub NewSector
2020-03-27T14:15:04.763+0800 INFO sectors sealing/garbage.go:24 Pledge {16275 0}, contains []
2020-03-27T14:15:04.763+0800 DEBUG advmgr sectorstorage/manager.go:284 find workers for [{e555613a-95ac-48a5-b483-58e2a31f21f1 [http://127.0.0.1:2345/remote] 10 true true}]
2020-03-27T14:15:04.763+0800 DEBUG advmgr sectorstorage/worker_local.go:72 acquired sector {16275 0} (e:0; a:1): {{0 0} /storage/lotuswork/lotusstorage/unsealed/s-t016275-0 }
2020-03-27T14:15:27.310+0800 INFO sectors sealing/sealing.go:151 Start sealing 0
2020-03-27T14:15:28.891+0800 INFO sectors sealing/states.go:22 performing filling up rest of the sector... {"sector": "0"}
2020-03-27T14:15:28.901+0800 INFO sectors sealing/states.go:67 performing sector replication... {"sector": "0"}
2020-03-27T14:15:28.905+0800 DEBUG advmgr sectorstorage/worker_local.go:72 acquired sector {16275 0} (e:1; a:6): {{0 0} /storage/lotuswork/lotusstorage/unsealed/s-t016275-0 /storage/lotuswork/lotusstorage/sealed/s-t016275-0 /storage/lotuswork/lotusstorage/cache/s-t016275-0}
2020-03-27T14:36:53.013+0800 DEBUG advmgr sectorstorage/worker_local.go:72 acquired sector {16275 0} (e:6; a:0): {{0 0} /storage/lotuswork/lotusstorage/sealed/s-t016275-0 /storage/lotuswork/lotusstorage/cache/s-t016275-0}
2020-03-27T14:39:38.998+0800 INFO sectors sealing/states.go:129 submitting precommit for sector: 0
2020-03-27T14:39:39.047+0800 INFO sectors sealing/states.go:140 Sector precommitted: 0
2020-03-27T14:40:10.613+0800 INFO sectors sealing/states.go:151 precommit message landed on chain: 0
2020-03-27T14:40:10.613+0800 INFO sectors sealing/states.go:154 precommit for sector 0 made it on chain, will start proof computation at height 446
2020-03-27T14:46:45.397+0800 INFO sectors sealing/states.go:184 scheduling seal proof computation...
2020-03-27T14:46:45.397+0800 INFO sectors sealing/states.go:186 KOMIT 0 a5c42fdd5db56beaeb25327b3da9ec90b8ea4c2ae7691257a4713ab1e3b7d130(-123); 90497848195dbdf23925262efb4ecadaf8088bf9750ca16b84f69d277473ed6f(446); [{536870912 bafk4chzahfla46ytve5qpisd7utsb75hzm7b2lsqlkzwfhtz6rrrgujm3ida}]; r:6261666b3465687a616c706e7270666c66656a6869716b37367571336632683533693636726568616174663468776868697772746665716a6c66616c71; d:6261666b3463687a6168666c6134367974766535717069736437757473623735687a6d3762326c73716c6b7a776668747a3672727267756a6d33696461
2020-03-27T14:46:45.398+0800 DEBUG advmgr sectorstorage/worker_local.go:72 acquired sector {16275 0} (e:6; a:0): {{0 0} /storage/lotuswork/lotusstorage/sealed/s-t016275-0 /storage/lotuswork/lotusstorage/cache/s-t016275-0}
2020-03-27T14:49:18.531+0800 WARN storageminer storage/fpost_sched.go:160 Aborting Fallback PoSt (EPS: -1)
2020-03-27T14:49:18.555+0800 DEBUG advmgr sectorstorage/worker_local.go:72 acquired sector {16275 0} (e:4; a:0): {{0 0} /storage/lotuswork/lotusstorage/cache/s-t016275-0}
2020-03-27T14:49:19.059+0800 INFO stores stores/local.go:302 remove /storage/lotuswork/lotusstorage/unsealed/s-t016275-0
2020-03-27T14:49:19.165+0800 DEBUG stores stores/local.go:341 not moving {16275 0}(2); src and dest are the same
2020-03-27T14:49:19.166+0800 DEBUG stores stores/local.go:341 not moving {16275 0}(4); src and dest are the same
2020-03-27T14:49:19.166+0800 INFO sectors sealing/fsm.go:170 Proving sector 0
cat /storage/miner.log | grep -v "Time delta between" | grep -v "Generate candidates took" | grep -E "Pledge|Proving"
2020-03-20T23:46:05.944+0800 INFO sectors sealing/garbage.go:24 Pledge 12, contains []
2020-03-21T00:26:06.032+0800 INFO sectors sealing/garbage.go:24 Pledge 13, contains []
2020-03-21T00:28:26.729+0800 INFO sectors sealing/fsm.go:163 Proving sector 12
2020-03-21T01:03:36.524+0800 INFO sectors sealing/fsm.go:163 Proving sector 13
2020-03-21T01:06:06.081+0800 INFO sectors sealing/garbage.go:24 Pledge 14, contains []
2020-03-21T01:46:06.164+0800 INFO sectors sealing/garbage.go:24 Pledge 15, contains []
2020-03-21T01:46:09.105+0800 INFO sectors sealing/fsm.go:163 Proving sector 14
2020-03-21T02:22:33.446+0800 INFO sectors sealing/fsm.go:163 Proving sector 15
2020-03-21T02:26:06.222+0800 INFO sectors sealing/garbage.go:24 Pledge 16, contains []
2020-03-21T03:06:06.292+0800 INFO sectors sealing/garbage.go:24 Pledge 17, contains []
2020-03-21T03:46:06.356+0800 INFO sectors sealing/garbage.go:24 Pledge 18, contains []
2020-03-21T04:26:06.426+0800 INFO sectors sealing/garbage.go:24 Pledge 19, contains []
2020-03-21T05:06:06.500+0800 INFO sectors sealing/garbage.go:24 Pledge 20, contains []
2020-03-21T05:46:06.560+0800 INFO sectors sealing/garbage.go:24 Pledge 21, contains []
WaitSeed
一直处于等待状态Sectors: map[CommitFailed:2 Proving:14 Total:29 WaitSeed:13]
future: 13
# lotus mpool stat | grep t3wz5venh4q3y6yfzkhwjqrflr4cin7cwddvkvqudgy23riuunmetzn22nxrewhel523srrgdz2i6vxb5ok2gq
t3wz5venh4q3y6yfzkhwjqrflr4cin7cwddvkvqudgy23riuunmetzn22nxrewhel523srrgdz2i6vxb5ok2gq, past: 0, cur: 0, future: 13
lotus-shed
# cd lotus
# make lotus-shed
go build -ldflags=-X="github.com/filecoin-project/lotus/build".CurrentCommit="+gitbaeb0973" -o lotus-shed ./cmd/lotus-shed
go run github.com/GeertJohan/go.rice/rice append --exec lotus-shed -i ./build
# mv lotus-shed /usr/local/bin/
# which lotus-shed
/usr/local/bin/lotus-shed
# lotus-shed noncefix --addr=t3wz5venh4q3y6yfzkhwjqrflr4cin7cwddvkvqudgy23riuunmetzn22nxrewhel523srrgdz2i6vxb5ok2gq --auto
Creating 1 filler messages (35 ~ 36)
lotus-storage-miner sectors pledge
# lotus-storage-miner workers list
Worker 0, host 主机名
CPU: 1 core(s) in use
Memory: System: Physical 15.6 GiB, Swap 2 GiB, Reserved 3.17 GiB (20% phys)
Used: Physical 1 GiB (6% phys), Virtual 1.5 GiB (9% phys, 8% virt)
# lotus-storage-miner sectors list
0: Proving sSet: YES pSet: YES tktH: -123 seedH: 446 deals: [0]
1: Unsealed sSet: NO pSet: NO tktH: 0 seedH: 0 deals: [0]
# lotus-storage-miner sectors status 0
SectorID: 0
Status: Proving
CommD: 6261666b3463687a6168666c6134367974766535717069736437757473623735687a6d3762326c73716c6b7a776668747a3672727267756a6d33696461
CommR: 6261666b3465687a616c706e7270666c66656a6869716b37367571336632683533693636726568616174663468776868697772746665716a6c66616c71
Ticket: a5c42fdd5db56beaeb25327b3da9ec90b8ea4c2ae7691257a4713ab1e3b7d130
TicketH: -123
Seed: 90497848195dbdf23925262efb4ecadaf8088bf9750ca16b84f69d277473ed6f
SeedH: 446
Proof: a7c3c29a533f62d624470dd97b03864fb9ee3c632bc1a179187b0e09d723adcb15a29231f81f6c657adefd35fc61d634aacfb17b5323fed7dff301f84e13c44af39fc1d629a65861bc2516c02dc923f55accd4e45fecb41476a5ca647dfe7503112f41238161bb49a5a02191200f61fd37b6a200a870394967443e4376474ba96df4d8ac685011f76b57c1a096510604817b8efadfe939a126ab1ca012c11016f2480f616212f116a971bee47febc203e6534267c948bda50830a282292133f2
Deals: [0]
Retries: 0
# lotus-storage-miner sectors status --log 0
SectorID: 0
Status: Proving
CommD: 6261666b3463687a6168666c6134367974766535717069736437757473623735687a6d3762326c73716c6b7a776668747a3672727267756a6d33696461
CommR: 6261666b3465687a616c706e7270666c66656a6869716b37367571336632683533693636726568616174663468776868697772746665716a6c66616c71
Ticket: a5c42fdd5db56beaeb25327b3da9ec90b8ea4c2ae7691257a4713ab1e3b7d130
TicketH: -123
Seed: 90497848195dbdf23925262efb4ecadaf8088bf9750ca16b84f69d277473ed6f
SeedH: 446
Proof: a7c3c29a533f62d624470dd97b03864fb9ee3c632bc1a179187b0e09d723adcb15a29231f81f6c657adefd35fc61d634aacfb17b5323fed7dff301f84e13c44af39fc1d629a65861bc2516c02dc923f55accd4e45fecb41476a5ca647dfe7503112f41238161bb49a5a02191200f61fd37b6a200a870394967443e4376474ba96df4d8ac685011f76b57c1a096510604817b8efadfe939a126ab1ca012c11016f2480f616212f116a971bee47febc203e6534267c948bda50830a282292133f2
Deals: [0]
Retries: 0
--------
Event Log:
0. 2020-03-27 14:15:28 +0800 CST: [event;sealing.SectorStart] {"User":{"ID":0,"SectorType":7,"Pieces":[{"DealID":null,"Size":532676608,"CommP":{"/":"bafk4chzahfla46ytve5qpisd7utsb75hzm7b2lsqlkzwfhtz6rrrgujm3ida"}}]}}
1. 2020-03-27 14:15:28 +0800 CST: [event;sealing.SectorPacked] {"User":{"Pieces":null}}
2. 2020-03-27 14:39:38 +0800 CST: [event;sealing.SectorSealed] {"User":{"Sealed":{"/":"bafk4ehzalpnrpflfejhiqk76uq3f2h53i66rehaatf4hwhhiwrtfeqjlfalq"},"Unsealed":{"/":"bafk4chzahfla46ytve5qpisd7utsb75hzm7b2lsqlkzwfhtz6rrrgujm3ida"},"Ticket":{"Value":"pcQv3V21a+rrJTJ7PanskLjqTCrnaRJXpHE6seO30TA=","Epoch":-123}}}
3. 2020-03-27 14:39:39 +0800 CST: [event;sealing.SectorPreCommitted] {"User":{"Message":{"/":"bafy2bzaceaupws2blcgtbws6sctv7dfye6rcxf7g7tzeja6m6mbpxwfu24nyu"}}}
4. 2020-03-27 14:46:45 +0800 CST: [event;sealing.SectorSeedReady] {"User":{"Seed":{"Value":"kEl4SBldvfI5JSYu+07K2vgIi/l1DKFrhPadJ3Rz7W8=","Epoch":446}}}
5. 2020-03-27 14:48:42 +0800 CST: [event;sealing.SectorCommitted] {"User":{"Message":{"/":"bafy2bzaceafzlxapzstzsyfx4oywzjqec47b5uatgpvgw3y3vw3dnknufqutu"},"Proof":"p8PCmlM/YtYkRw3ZewOGT7nuPGMrwaF5GHsOCdcjrcsVopIx+B9sZXre/TX8YdY0qs+xe1Mj/tff8wH4ThPESvOfwdYpplhhvCUWwC3JI/VazNTkX+y0FHalymR9/nUDES9BI4Fhu0mloCGRIA9h/Te2ogCocDlJZ0Q+Q3ZHS6lt9NisaFAR92tXwaCWUQYEgXuO+t/pOaEmqxygEsEQFvJID2FiEvEWqXG+5H/rwgPmU0JnyUi9pQgwooIpITPy"}}
6. 2020-03-27 14:49:18 +0800 CST: [event;sealing.SectorProving] {"User":{}}
7. 2020-03-27 14:49:19 +0800 CST: [event;sealing.SectorFinalized] {"User":{}}
# lotus-storage-miner storage list
e555
Unsealed: 0; Sealed: 4; Caches: 4
Space Used: 1.1 TiB/20.9 TiB 5% (19.8 TiB avail)
Weight: 10; Use: Seal Store
Local: /storage/lotuswork/lotusstorage
URL: http://192.168.1.110:2345/remote
/usr/local/bin/lotus-seal-worker
到远程矿工节点nohup lotus-seal-worker run --address=192.168.1.114:3456 >> /storage/worker.log 2>&1 &
lotus-storage-miner storage list
Worker 0, host 主机名
CPU: 0 core(s) in use
Memory: System: Physical 15.6 GiB, Swap 2 GiB, Reserved 4.96 GiB (31% phys)
Used: Physical 0 B (0% phys), Virtual 0 B (0% phys, 0% virt)
Worker 1, host 主机名
CPU: 0 core(s) in use
Memory: System: Physical 15.6 GiB, Swap 2 GiB, Reserved 2.82 GiB (18% phys)
Used: Physical 0 B (0% phys), Virtual 0 B (0% phys, 0% virt)
lotus-storage-miner workers list
9e88
Unsealed: 0; Sealed: 0; Caches: 0
Space Used: 422 GiB/7.22 TiB 5% (6.81 TiB avail)
Weight: 10; Use: Seal
URL: http://192.168.1.114:3456/remote (latency: 3.3ms)
e55
Unsealed: 0; Sealed: 4; Caches: 4
Space Used: 1.1 TiB/20.9 TiB 5% (19.8 TiB avail)
Weight: 10; Use: Seal Store
Local: /storage/lotuswork/lotusstorage
URL: http://192.168.1.110:2345/remote
参考: