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

[BUG] Investigate solutions to infinite misbehaviour reporting #617

Open
drewstone opened this issue May 22, 2023 · 2 comments
Open

[BUG] Investigate solutions to infinite misbehaviour reporting #617

drewstone opened this issue May 22, 2023 · 2 comments
Assignees

Comments

@drewstone
Copy link
Contributor

drewstone commented May 22, 2023

Overview

We don't want to get stuck in an infinite misbehaviour loop. Therefore, we need to think of workarounds here and begin to discuss them. The hope being that we will identify and implement new ideas to prevent these loops.

@drewstone drewstone converted this from a draft issue May 22, 2023
@drewstone drewstone changed the title [TASK] Investigate solutions to infinite misbehaviour reporting [BUG] Investigate solutions to infinite misbehaviour reporting May 22, 2023
@tbraun96
Copy link
Contributor

We need a way of capping how many misbehavior reports any given authority can submit and process.

Let's suppose there is a constant limit of Z misbehavior reports per authority per session.

Each node will locally keep track of how many misbehavior reports they've submitted per session. Of course, this can be abused, so, we will also need an on-chain hashmap HashMap<AuthorityId, usize> keeping track of how many misbehavior reports have been submitted for the current session (note: this will mean that once session rotation occurs on-chain, we will need to also clear this hashmap).

On-chain, if the number of misbehavior reports has been reached, then, we don't process the report. Since the local node also keeps track of how many misbehavior reports they've sent, then, we can assume that if a node tries to submit more than allowed, our on-chain logic can file a misbehaving report against the sender themself for trying to send over the limit (or possibly, even removing them from the set of best authorities). In short, this means we will have logic for preventing misuse of the misbehavior system.

@drewstone
Copy link
Contributor Author

drewstone commented May 23, 2023

Currently, misbehaviour reports never touch the chain until we have t+1 signed reports. Then we consider this a full report which we submit to the chain. Therefore, it is still entirely possible that a node will just spam another with reports off-chain.

@1xstj 1xstj removed their assignment Jun 19, 2023
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

No branches or pull requests

3 participants