ava-labs / ava-labs/Simplex

Update Communication Interface to Return Highest Validator Set

Open
#444 1 comment 0 reactions 1 assignee Claimed by @samliok View on GitHub
Dominant language
Go
Stars
22
Forks
4
Avg merge
2d 14h
Merged PRs (30d)
34

Description

We need to support grabbing validators for the highest `epoch` and also a specific `epoch`. Currently we use the same implementation for parts of the code that require two different implementations.

Ex.

Setting the validator set in the epoch instance, requires the validator set for that specific epoch
https://github.com/ava-labs/Simplex/blob/main/simplex/epoch.go#L208-L209

Non-validators require the latest validator set to know the threshold of votes to consider an epoch validated.
https://github.com/ava-labs/Simplex/blob/main/nonvalidator/epochs.go#L148-L149

Another note:

We cannot get the validator set from `GetMinimumHeight` or `GetCurrentHeight` because their returned P-Chain height may correspond to a validator set that has not yet been finalized.

Nodes that have fallen behind, whether they are current validators or no longer validators need the highest finalized validator set so they can send replication requests to peers that are actively validating the network.

**TODO:** Broadcast messages should be sent to all known nodes, not just the current validator set. Otherwise, a validator that goes offline briefly and wakes up after being removed from the validator set may never receive the finalization messages that tell it it has fallen behind and needs to begin recovery.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.