2k devtest add multiple miners #8267
Locked
alanmoleapfive
started this conversation in
Tutorials
Replies: 2 comments
-
@alanmoleapfive Is this a tutorial or is there a problem with adding multiple miners? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am archiving this discussion as there has been no new input from the author for more than 7 days. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
docker lotus Local mirror to build a multi-miner test environment devtest V1.14.4
first docker
node +miner
two docker
node +miner
lotus:v1.14.4 is build for v1.14.4
first docker
1、start
docker run -dit --name first-lotus -v /home/alan/firstlotus:/home/lotus -p 1234:1234 -p 2345:2345 -p 3456:3456 -p 1777:1777 --entrypoint /bin/sh 192.168.1.45/blockchain/lotus:v1.14.4
2、into docker
docker exec -it first-lotus /bin/bash
cd /home/lotus
rm -rf ~/.genesis-sectors
3、 Pre-seal some sectors for the genesis block
lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
4、Create a genesis block
lotus-seed genesis new localnet.json
5、Create a default address and give it some funds
lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
6、start node
nohup lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false &
7、set miner
lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
out:
imported key t3xe5je75lkrvye32tfl37gug3az42iotuu3wxgkrhbpbvmum4lu26begiw74ju5a35nveqaw4ywdibj4y6kxq successfully!
8、Set up the genesis miner
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=
/.genesis-sectors --pre-sealed-metadata=/.genesis-sectors/pre-seal-t01000.json --nosync9、lotus-miner start
nohup lotus-miner run --nosync &
10、get listen
lotus net listen
/ip4/172.17.0.4/tcp/33189/p2p/12D3KooWH7s2kS4ZM4ofXX8egcJA1sb6UUju1QWxi3nVwhVGR2JH
/ip4/127.0.0.1/tcp/33189/p2p/12D3KooWH7s2kS4ZM4ofXX8egcJA1sb6UUju1QWxi3nVwhVGR2JH
two docker
1、start
docker run -dit --name two-lotus -v /home/alan/twolotus:/home/lotus -p 21234:1234 -p 22345:2345 -p 23456:3456 -p 21777:1777 --entrypoint /bin/sh 192.168.1.45/blockchain/lotus:v1.14.2
2、copy devgen.car to
cp /home/alan/firstlotus/devgen.car /home/alan/twolotus/
3、into docker
docker exec -it two-lotus /bin/bash
cd /home/lotus
rm -rf ~/.genesis-sectors
4、start
nohup lotus daemon --genesis=devgen.car --bootstrap=false &
5、connect
lotus net connect /ip4/172.17.0.4/tcp/33189/p2p/12D3KooWH7s2kS4ZM4ofXX8egcJA1sb6UUju1QWxi3nVwhVGR2JH
connect 12D3KooWH7s2kS4ZM4ofXX8egcJA1sb6UUju1QWxi3nVwhVGR2JH: success
6、sync status
lotus sync status
sync status:
worker 0:
Base: [bafy2bzacedtphgr7bqouwflxvplijjyz2iqlruux7aj2wgvjg5xmycfjd5btw]
Target: [bafy2bzacedwgukbssu3gi4xwzet4h7cvqgdyuyxidfd34rgghsbuw5jcwxcmy] (121)
Height diff: 121
Stage: message sync
Height: 64
Elapsed: 22.826980788s
this ok
7、create BLS wallet
lotus wallet new bls
t3uofdx5vvp7i43achugxdxmrggwgjwpykdeuwipvt4tc3m3t744vaulxqbg4wr4obz6b6j3lbxn2ic7fb7guq
8、Install 100 FIL from the genesis node to the current wallet
lotus send t3uofdx5vvp7i43achugxdxmrggwgjwpykdeuwipvt4tc3m3t744vaulxqbg4wr4obz6b6j3lbxn2ic7fb7guq 100
bafy2bzaced75qy2rjwu3uyv32bzc47ewqdljm4fs2am4umcvzdw4grjpnzefu
9、check balance
lotus wallet balance
100 FIL
lotus wallet list
Address Balance Nonce Default
t3r33j64poh7x6o3obvhdtqtz5ychmyrdnh2caawfflmfpcdezx23vljpetcq7zp3gifpkdpe6hbzazw3ojp6a 100 FIL 0 X
10、Initialize a new node
lotus-miner init --sector-size=2KiB --nosync
this wait
2022-02-22T07:58:19.155Z INFO main lotus-miner/init.go:748 Pushed CreateMiner message: bafy2bzacebpcmr54hoz7ug6zo7e5okx6r44xhs7medbo2hdx4pzvyqd4t6bno
2022-02-22T07:58:19.155Z INFO main lotus-miner/init.go:749 Waiting for confirmation
message not send to chain
first mpool not has this message
11、 start lotus-miner
nohup lotus-miner run &
12、info
lotus-miner info
Beta Was this translation helpful? Give feedback.
All reactions