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

Registering a new Peer to an Iroha Network #447

Closed
matisalimbene opened this issue Dec 11, 2023 · 8 comments
Closed

Registering a new Peer to an Iroha Network #447

matisalimbene opened this issue Dec 11, 2023 · 8 comments
Assignees

Comments

@matisalimbene
Copy link

The documentation to register a new peer states:

After your peer is running, you should submit the register peer instruction. The peer will go through the handshake process and start chatting with the network.

So:
1- Start new peer
2- Issue register command to register peer in the network

But, for the new peer to run, It needs to be provided with a genesis configuration. ¿Do I need to start the new peer with the genesis configuration of my already running Iroha network?

¿Does this mean that for each new peer I want to register, I need to provide a list of all the current members of the network?

@mversic
Copy link
Contributor

mversic commented Dec 11, 2023

seems that atm, whatever you used as the TRUSTED_PEERS when starting the network is what you should use on your new peer

@matisalimbene
Copy link
Author

matisalimbene commented Dec 11, 2023

@mversic It seems to work that way. But for instance, after I register the new peer, If I query the peer count using http://localhost:8081/status/peers I get odd results:

http://localhost:8080/status/peers returns 4
http://localhost:8081/status/peers returns 4
http://localhost:8082/status/peers returns 4
http://localhost:8083/status/peers returns 3
http://localhost:8084/status/peers returns 3

They should return 5 right? the initial 4, plus the one I'm registering.

@mversic
Copy link
Contributor

mversic commented Dec 12, 2023

they should all return 4. status/peers returns the number of connected peers excluding the reporting peer

@mversic
Copy link
Contributor

mversic commented Dec 12, 2023

there is a bug, I'm working on it

@mversic mversic self-assigned this Dec 12, 2023
@mversic
Copy link
Contributor

mversic commented Dec 13, 2023

the fix will be merged today. The changes include:

  1. It's not necessary to specify "self"(current) peer in TRUSTED_PEERS anymore
  2. when bootstraping network TRUSTED_PEERS must contain genesis peer. It can also contain other peers but it's not necessary
  3. when adding a peer to an already running network. TRUSTED_PEERS must contain at least one live/active peer. It can contain additional peers but it's not necessary

@matisalimbene
Copy link
Author

@mversic Thanks Marin. This is on the iroha-stable branch, correct? That's the branch I'd need to rebuild to have these fixes appled.

@mversic
Copy link
Contributor

mversic commented Dec 13, 2023

The fix hasn't been merged yet

@mversic
Copy link
Contributor

mversic commented Dec 14, 2023

@mversic Thanks Marin. This is on the iroha-stable branch, correct? That's the branch I'd need to rebuild to have these fixes appled.

the fix was merged. Yes you can use iroha2-stable branch or pull the latest iroha2-stable docker image

@mversic mversic closed this as completed Dec 14, 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

2 participants