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

[consensus] Reconsider Performance Penalty on Empty Response #512

Open
patrick-ogrady opened this issue Feb 21, 2025 · 0 comments
Open

[consensus] Reconsider Performance Penalty on Empty Response #512

patrick-ogrady opened this issue Feb 21, 2025 · 0 comments
Milestone

Comments

@patrick-ogrady
Copy link
Contributor

If a peer doesn't reply with anything "useful", we don't adjust their performance score. This opens the door to an attack where some malicious peer is good and then only sends empty responses before the timeout (meaning that the node always makes a handful of requests to people that'll never give them something useful first).

We should instead penalize a peer for not giving us something interesting. We should only do this if the response is "empty" and not a response of data we no longer need (but asked for).

Related:

  • // Update performance
    let mut shuffle = false;
    if !notarizations_found.is_empty() || !nullifications_found.is_empty() {
    self.requester.resolve(request);
    debug!(
    sender = ?s,
    notarizations = ?notarizations_found,
    nullifications = ?nullifications_found,
    "response useful",
    );
    } else {
    // We don't reward a peer for sending us a response that doesn't help us
    shuffle = true;
    debug!(sender = ?s, "response not useful");
    }
  • // Update performance
    let mut shuffle = false;
    if !notarizations_found.is_empty() || !nullifications_found.is_empty() {
    self.requester.resolve(request);
    debug!(
    sender = ?s,
    notarizations = ?notarizations_found,
    nullifications = ?nullifications_found,
    "response useful",
    );
    } else {
    // We don't reward a peer for sending us a response that doesn't help us
    shuffle = true;
    debug!(sender = ?s, "response not useful");
    }
@patrick-ogrady patrick-ogrady added this to the Audit Ready milestone Feb 21, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Tracker Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant