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

Decentralize node id distribution #330

Closed
Tracked by #326
itegulov opened this issue Oct 20, 2023 · 4 comments · Fixed by #400
Closed
Tracked by #326

Decentralize node id distribution #330

itegulov opened this issue Oct 20, 2023 · 4 comments · Fixed by #400
Assignees
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Near BOS NEAR BOS team at Pagoda

Comments

@itegulov
Copy link
Contributor

Description

Note: node id is equivalent to participant id and is represented as Participant model from cait-sith

Right now all nodes need to know their ID (i.e. index $i \in 0..N-1$ in the set of participants) at the startup time. This is highly impractical as newly joining nodes need to deduce what they should start with before they sync with the consensus. It is even more awkward when a node in the middle of the set leaves and everyone else has to restart with a different ID.

What should actually happen is that nodes get to know their ID based on their position in the current consensus state. That position can easily change over time depending on who joins/leaves.

@itegulov itegulov added Near BOS NEAR BOS team at Pagoda Emerging Tech Emerging Tech flying formation at Pagoda labels Oct 20, 2023
@volovyks volovyks self-assigned this Oct 26, 2023
@itegulov
Copy link
Contributor Author

@volovyks are you still working on this or can I give this to @DavidM-D as his first ticket?

@DavidM-D
Copy link
Contributor

How frequently is this changing? Should we encode the node ID on the smart contract or should we pull it out of consensus somehow?

@itegulov
Copy link
Contributor Author

@DavidM-D only when the set of participants changes (someone joins/leaves) so fairly infrequent.

Should we encode the node ID on the smart contract or should we pull it out of consensus somehow?

Essentially, they are already in the smart contract. All that needs to be done in this ticket is instead of nodes supplying it to the smart contract when they want to join, smart contract should generate it on its end and give it out once they made it to the participant set.

@volovyks
Copy link
Collaborator

I working on this.

@volovyks volovyks linked a pull request Jan 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Near BOS NEAR BOS team at Pagoda
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants