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

Not all functions operating on party_weights are safe for sum of weights > u64::MAX #13

Closed
matteojug opened this issue Sep 26, 2024 · 0 comments · Fixed by #18
Closed

Comments

@matteojug
Copy link

Not all functions operating on party_weights are safe for sum of weights > u64::MAX:

#[tokio::test]
async fn test_ballot_max_weight() {
    let weights = vec![u64::MAX, 1];
    let threshold = BPConConfig::compute_bft_threshold(weights.clone());
    let cfg = BPConConfig::with_default_timeouts(weights, threshold);

    let (parties, receivers, senders) = create_parties(cfg);
    let ballot_tasks = launch_parties(parties);
    let p2p_task = propagate_p2p(receivers, senders);
    let results = await_results(ballot_tasks).await;
    p2p_task.abort();

    analyze_ballot(results);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant