Skip to content

Improve staked node information for QUIC streamer #9107

@lijunwangs

Description

@lijunwangs

In turbine we prefetch staked nodes map for both epochs, and pick which one to use based on the slot in the shred we are looking at. Here we could apply a similar logic but instead of having 2 maps and trying to pick the correct one, we could have one map which stores the maximum of the stakes in the two epochs (current + next). This way we might admit slightly more nodes than strictly necessary, but we will never get confused about who can / can not connect. We can then update the map when root bank clears the epoch boundary. To avoid nodes with zero stake getting stuck in the map for the entire epoch, we could hold 2 maps, and only compute maximum when root bank is < 32 slots away from the boundary. This way nodes aquiring stake have ample time to connect, and we will not disconnect anyone too early.

Originally posted by @alexpyattaev in #8836 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions