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

Implement Session Grid Topology #4454

Open
1 task
EclesioMeloJunior opened this issue Jan 14, 2025 · 0 comments
Open
1 task

Implement Session Grid Topology #4454

EclesioMeloJunior opened this issue Jan 14, 2025 · 0 comments
Labels
T-feat this issue/pr is a new feature or functionality. T-implementation this issue/pr is a new feature or functionality.

Comments

@EclesioMeloJunior
Copy link
Member

EclesioMeloJunior commented Jan 14, 2025

Issue summary

The Session Grid Topology is the actual representation of the Grid Topology, it should have all the session authorities.

Implementation details

The Session Grid Topology has the following functionalities:

  • Update Peer ID for Authority IDs: Given a set of authority ids (validators public key) and a peer ID we should append these new peer ID inside the topology peer information for each of the authority ids.

    • Should return true if the peer ID can be updated for at least one authority id, false otherwise.
  • Compute Grid Neighbors: Since the Session Grid Topology is the representation of the grid topology, it should be able to compute the grid neighbors for a specific validator index, the algorithm is implemented here. Should return a Grid Neighbor type, which is a representation of all valid row and column neighbors for the given validator.

Grid Neighbor

The type should holds 4 informations:

    1. row validators neighbors
    1. row peer IDs neighbors
    1. column validators neighbors
    1. column peer IDs neighbors

functionalities:

  • routing: Given an message originator, peer ID or Validator Index, return the direction we should route this message.
    • IF the message comes from a row neighbor: return Routing To Column Neighbors
    • IF the message comes from a column neighbor: return Routing To Row Neighbors

Topology Peer Info

The topology peer info represents a peer in the grid and it should contains:

  • vector of peer ids (usually the validator might have more than one peer ID)
  • validator index (the index of the validator in the set of current validators)\
  • authority discovery id (the authority public ID used to identify the authority in the current session, also used by Authority Discovery mechanism)

Other information and links

Acceptance criteria

  • New code is 60% covered with unit tests
@EclesioMeloJunior EclesioMeloJunior added T-feat this issue/pr is a new feature or functionality. T-implementation this issue/pr is a new feature or functionality. labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feat this issue/pr is a new feature or functionality. T-implementation this issue/pr is a new feature or functionality.
Projects
None yet
Development

No branches or pull requests

1 participant