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

Fix validator broadcast efficiency in feat-1.6 #4247

Closed
RitaMAllenCA opened this issue Aug 28, 2023 · 1 comment
Closed

Fix validator broadcast efficiency in feat-1.6 #4247

RitaMAllenCA opened this issue Aug 28, 2023 · 1 comment
Assignees
Labels
release blocker PR to be merged before releasing

Comments

@RitaMAllenCA
Copy link

The validator broadcast based on the ValidatorMatrix in feat-1.6 is currently not fixed and was recently tested with a workaround, causing the broadcast to reach all nodes:
rust
for peer_id in self.outgoing_manager.connected_peers() {
total_outgoing_manager_connected_peers += 1;

        if !self.validator_matrix.has_era(&era_id)
            || self.outgoing_limiter.is_validator_in_era(era_id, &peer_id)
        {
            total_connected_validators_in_era += 1;
            self.send_message(peer_id, msg.clone(), None)
        }
    }

(in the workaround, the if condition is prefixed with true ||)
The root cause for this code not working is that it does not check adjacent eras (past and future), causing it to break during switch blocks.
The code needs to be reexamined and reengineered to efficiently send at least to current and previous era validators, as well as potential future validators, all without introducing quadratic copies of validator IDs on every message send.

@marc-casperlabs
Copy link
Collaborator

marc-casperlabs commented Sep 11, 2023

The feature (selecting nodes based on their validator status) needs to be cleanly readded to the networking component, quick fixes are not going to cut it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release blocker PR to be merged before releasing
Projects
None yet
Development

No branches or pull requests

4 participants