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

Error: unexpected argument '--unsafe-force-node-key-generation' found #990

Open
MohsenNz opened this issue Nov 17, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@MohsenNz
Copy link

MohsenNz commented Nov 17, 2024

Describe the bug

I got this error after running: scripts/localnet.sh

...
error: unexpected argument '--unsafe-force-node-key-generation' found
...

To Reproduce

Accourdng to bittensor-node-template
Build with:

cargo build -p node-subtensor --profile production --features pow-faucet

Then run:

BUILD_BINARY=0 ./scripts/localnet.sh 

Expected behavior

Should Run normally.

Environment

Linux Ubuntu 24.04
Subtensor commit hash: cceaaa9249e70830f0801d37ca8a1916dd372dfb

@MohsenNz MohsenNz added the bug Something isn't working label Nov 17, 2024
@MohsenNz
Copy link
Author

OK, if we run ./scripts/localnet.sh only, it works.
It seems bittensor-node-template needs to update.

@thewhaleking thewhaleking self-assigned this Nov 18, 2024
@thewhaleking
Copy link

OK, if we run ./scripts/localnet.sh only, it works. It seems bittensor-node-template needs to update.

Hey @MohsenNz
Just to confirm. When you run

BUILD_BINARY=0 ./scripts/localnet.sh

you get the error:

...
error: unexpected argument '--unsafe-force-node-key-generation' found
...

but when you run

./scripts/localnet.sh

you receive no such error?

I was unable to recreate this, so I just want to confirm you're still experiencing this error.

@MohsenNz
Copy link
Author

MohsenNz commented Nov 19, 2024

Sorry, It seems it was my mistake because of dirty build environment.
After cargo clean and running cargo build -p node-subtensor --profile production --features pow-faucet then running BUILD_BINARY=0 ./scripts/localnet.sh I got this:

fast_blocks is On
*** Building chainspec...
./scripts/localnet.sh: line 56: /home/mohsen/dev/bittensor-related/subtensor/scripts/../target/release/node-subtensor: No such file or directory
*** Chainspec built and output to file
*** Purging previous state...
*** Previous chainstate purged
*** Starting localnet nodes...
./scripts/localnet.sh: line 100: /home/mohsen/dev/bittensor-related/subtensor/scripts/../target/release/node-subtensor: No such file or directory
./scripts/localnet.sh: line 101: /home/mohsen/dev/bittensor-related/subtensor/scripts/../target/release/node-subtensor: No such file or directory

As I said earlier, It should be bittensor-node-templete out-of-date problem.

Running './scripts/localnet.sh' alone is fine and works.

BTW, I think a change needed in node/Cargo.toml in line 97:

-pow-faucet = []
+pow-faucet = ["node-subtensor-runtime/pow-faucet"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants