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

Two different peer id, for single node. #52

Closed
harsh-98 opened this issue Jun 1, 2020 · 4 comments
Closed

Two different peer id, for single node. #52

harsh-98 opened this issue Jun 1, 2020 · 4 comments

Comments

@harsh-98
Copy link

harsh-98 commented Jun 1, 2020

I was going through the starting your own private network with https://www.substrate.io/tutorials/start-a-private-network/v2.0.0-rc2. I generated keys with subkey. Created chainspec, started node 1 and node2 . But node 2 failed with

Error: Service(Network(The same bootnode (`/ip4/127.0.0.1/tcp/30333`) is registered with two different peer ids: `QmYkKnqtB46sufgYSPUBCFUdYn8ipvZ1H8jSDzvpMjx6wp` and `QmYb6raWsGsw5rpncKW2iJUBTxP3SdFy8KzjofaEtBAiJy`))

Id QmYb6raWsGsw5rpncKW2iJUBTxP3SdFy8KzjofaEtBAiJy was printed in logs of node1. But using it as bootnode peer id for node2 failed. Using QmYkKnqtB46sufgYSPUBCFUdYn8ipvZ1H8jSDzvpMjx6wp worked and I was successfully able to complete it.

Why is node1 printing a peer id and using another peer one?

@JoshOrndorff
Copy link
Contributor

This is probably because your chain spec file contains one boot node address, but your bootnode itself advertises a different one. For this tutorial, there should not be any bootnodes in your chainspec file.

Please open your customSpecRaw.json file and look for a line like this near the top.

"bootNodes": [],

If that list contains an actual bootnode, please remove it, and try again.

If you followed the tutorial exactly you shouldn't end up in this situation because https://www.substrate.io/tutorials/start-a-private-network/v2.0.0-rc2/customspec#create-a-chain-specification says to generate your custom spec using this command.

# Export the local chainspec to json
$ ./target/release/node-template build-spec --disable-default-bootnode --chain local > customSpec.json

When you include --disable-default-bootnode as demonstrated, your spec file does not include that bootnode address.

@harsh-98
Copy link
Author

harsh-98 commented Jun 3, 2020

Yup, thanks.

@harsh-98 harsh-98 closed this as completed Jun 3, 2020
@VikXNebu
Copy link

Hi, I do have similar issue with the following error:
error: Invalid value for '--bootnodes ...': invalid multiaddr

Can assist on this issue?

Thank you

@danforbes
Copy link
Contributor

Can you describe what are you doing when you encounter this error? Were you working with chain specs? If so, how did you generate them?

3Dpass referenced this issue in 3Dpass/3DP Apr 22, 2022
* Super Node Runtime compiles

* Basic example of default config.

* One crate per config. In hopes of combining configs with runtimes later.

* fix some typos

* add basic-token config, update some deps

* check-membership

* double-map

* linked-map

* module constants with Get

* schedule on finalize

* simple-map

* add simple events and storage; order existing from easy to hard

* storage-cache example

* push to merge

* Add wrapper node to kitchen
mateuszaaa pushed a commit to mateuszaaa/substrate-node-template that referenced this issue May 23, 2023
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

4 participants