Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change JSON filename/miner ID on local lotus add-miner command #725

Open
jochasinga opened this issue Apr 23, 2024 · 4 comments
Open

Change JSON filename/miner ID on local lotus add-miner command #725

jochasinga opened this issue Apr 23, 2024 · 4 comments

Comments

@jochasinga
Copy link

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.

jochasinga added a commit to jochasinga/lotus-docs that referenced this issue Apr 23, 2024
Update miner prefix from `t10100` to `f10100` and the output address.
@rjan90
Copy link
Collaborator

rjan90 commented Apr 24, 2024

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.

@rjan90 rjan90 mentioned this issue Apr 24, 2024
@jochasinga
Copy link
Author

jochasinga commented May 7, 2024

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.

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?

@rjan90
Copy link
Collaborator

rjan90 commented May 8, 2024

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

@jochasinga
Copy link
Author

jochasinga commented May 9, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants