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

Skip operator in do_slash_operators if it is not found #2304

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

NingLin-P
Copy link
Member

The fraud proof will slash and remove the malicious operator immediately when the current epoch is ended while the same malicious operator may still get slashed due to invalid bundle later when the ER is confirmed. But at that time, since the malicious operator is already removed, the do_slash_operators will return UnknownOperator and cause any submit_bundle call fail during execution thus the domain chain is stopped forever.

This PR fixes the issue by simply skipping the operator in do_slash_operators if it is not found, this is okay since the operator has already slashed previously.

This also makes me think about another broader issue that there are staking related operations (i.e. slash/reward/withdraw/epoch transition) performed during the submit_bundle call, but the result of these operations is mostly unrelated to the content of the submit_bundle call, which means if the operation is failed it will fail for any bundle it is unrecoverable, so we must avoid any failure! I took a look at all the different operations and it seems to be fine now, but I could miss something, would be great to have @vedhavyas take a look.

Code contributor checklist:

Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me

@NingLin-P NingLin-P added this pull request to the merge queue Dec 11, 2023
Merged via the queue into main with commit d521915 Dec 11, 2023
10 checks passed
@NingLin-P NingLin-P deleted the fix-slash-operator branch December 11, 2023 11:13
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 this pull request may close these issues.

2 participants