Change JSON filename/miner ID on local lotus `add-miner` command
Opened this issue · 4 comments
As per step 11 in this local network doc.
Running this command:
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
Generate the following output:
INFO preseal seed/seed.go:228 Writing preseal manifest to /Users/pancy/.genesis-sectors/pre-seal-f01000.json
Note that the miner ID prefix has changed from t
to f
and the file written to is now pre-seal-f01000.json
. Therefore, the file name should be corrected in the command in step 14 from ~/.genesis-sectors/pre-seal-t01000.json
to ~/.genesis-sectors/pre-seal-f01000.json
.
Hey @jochasinga! Thanks for the ticket. I tried to repro the outlined issue, but I can´t get the same output as you:
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
sector-id: {{1000 0} 5}, piece info: {2048 baga6ea4seaqc2yeeenvfpqodvnfojoqwdanqjhi4gcj2a4pnlnveneikm3wv6ei}
2024-04-24T06:51:37.260Z WARN preseal seed/seed.go:174 PreCommitOutput: {{1000 0} 5} bagboea4b5abcazvayqzvipro4cwzu6bz26ugzpz6ctfamgrdnre7rtk6li75x2r4 baga6ea4seaqc2yeeenvfpqodvnfojoqwdanqjhi4gcj2a4pnlnveneikm3wv6ei
sector-id: {{1000 1} 5}, piece info: {2048 baga6ea4seaqiit5rla3jxtj4yi3emrjxwtxh3yz3qgmwvejbjkch7lupn2dy4ny}
2024-04-24T06:51:37.315Z WARN preseal seed/seed.go:174 PreCommitOutput: {{1000 1} 5} bagboea4b5abcbrq7rbqmernyl777xth7pjrmvb6apuwvic7apn3sx5ld3rehzklk baga6ea4seaqiit5rla3jxtj4yi3emrjxwtxh3yz3qgmwvejbjkch7lupn2dy4ny
2024-04-24T06:51:37.315Z WARN preseal seed/seed.go:99 PeerID not specified, generating dummy
2024-04-24T06:51:37.317Z INFO preseal seed/seed.go:228 Writing preseal manifest to /root/.genesis-sectors/pre-seal-t01000.json
I suspect that this difference comes from that you are on a binary that was built for mainnet? Can you check the output of Lotus -v
and post it here?
In Filecoin we differentiate Mainnet and Devnnet addresses by the prefix f
for mainnet addresses, and t
for testnet/devnet addresses.
Hey @jochasinga! Thanks for the ticket. I tried to repro the outlined issue, but I can´t get the same output as you:
./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 sector-id: {{1000 0} 5}, piece info: {2048 baga6ea4seaqc2yeeenvfpqodvnfojoqwdanqjhi4gcj2a4pnlnveneikm3wv6ei} 2024-04-24T06:51:37.260Z WARN preseal seed/seed.go:174 PreCommitOutput: {{1000 0} 5} bagboea4b5abcazvayqzvipro4cwzu6bz26ugzpz6ctfamgrdnre7rtk6li75x2r4 baga6ea4seaqc2yeeenvfpqodvnfojoqwdanqjhi4gcj2a4pnlnveneikm3wv6ei sector-id: {{1000 1} 5}, piece info: {2048 baga6ea4seaqiit5rla3jxtj4yi3emrjxwtxh3yz3qgmwvejbjkch7lupn2dy4ny} 2024-04-24T06:51:37.315Z WARN preseal seed/seed.go:174 PreCommitOutput: {{1000 1} 5} bagboea4b5abcbrq7rbqmernyl777xth7pjrmvb6apuwvic7apn3sx5ld3rehzklk baga6ea4seaqiit5rla3jxtj4yi3emrjxwtxh3yz3qgmwvejbjkch7lupn2dy4ny 2024-04-24T06:51:37.315Z WARN preseal seed/seed.go:99 PeerID not specified, generating dummy 2024-04-24T06:51:37.317Z INFO preseal seed/seed.go:228 Writing preseal manifest to /root/.genesis-sectors/pre-seal-t01000.json
I suspect that this difference comes from that you are on a binary that was built for mainnet? Can you check the output of
Lotus -v
and post it here?In Filecoin we differentiate Mainnet and Devnnet addresses by the prefix
f
for mainnet addresses, andt
for testnet/devnet addresses.
lotus version 1.23.1-dev+mainnet+git.c6c23ec6d
Look like what I have is a mainnet version. I followed the instruction on the doc and clone the latest. How do I switch to devnet and should this be included in the doc?
Look like what I have is a mainnet version. I followed the instruction on the doc and clone the latest. How do I switch to devnet and should this be included in the doc?
Yeah, I would be interested to hear how you built you binary. As long as you are following the step in the tutorial where you make 2k
, it should build the devnet binary.
Can you do ./lotus -v
in your lotus-folder, and then lotus -v
in som other directory. Maybe you have a older binary laying around somewhere, and you missed the sudo make install
step that is outputted at the end of the make 2k
logs
@rjan90 current make 2k
fails at least on Mac OS 13.6.6 per #724. I had to run the go build
command myself to supply the path to the missing dep.
So instead of running make 2k
, I ran this with the additional path to hwloc
:
go build -ldflags="-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.082a9159c -extldflags=-L/usr/local/opt/openblas/lib -extldflags=-L/usr/local/opt/hwloc/lib" -tags=2k -o lotus ./cmd/lotus
So that might have caused it to build the mainnet binary.
EDIT: Looking at the 2k
directive in Makefile, it seems so.