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

Introduce the intentional malicious operator #2302

Merged
merged 10 commits into from
Dec 13, 2023

Conversation

NingLin-P
Copy link
Member

This PR introduces the intentional malicious operator, which is used for testing purposes only to test the network's capability of handling malicious participants.

Please refer to README for how it works and how to use.

Code contributor checklist:

@NingLin-P NingLin-P added execution Subspace execution breaking-runtime This PR introduces breaking changes to the runtime labels Dec 11, 2023
Copy link
Member

@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.

Overall looks good. Will do another pass before approavl

crates/sp-domains/src/lib.rs Outdated Show resolved Hide resolved
crates/sp-domains/src/lib.rs Show resolved Hide resolved
… as argument

So the DomainBundleProducer can be reused to produce bundle for different operator
when different operator ID is pass

Signed-off-by: linning <linningde25@gmail.com>
This commit add some domain runtime API that required by the upcoming intentional
malicious operator

Signed-off-by: linning <linningde25@gmail.com>
…alicious operator

Signed-off-by: linning <linningde25@gmail.com>
This crate contains the minimal required infra for setup an operator node, most
of the code are ported from subspace-node, it will be used as the base of the
malicious operator

Signed-off-by: linning <linningde25@gmail.com>
It is will be used within the malicious operator to randomly temper normal bundle to
be invalid bundle and/or contains bad ER with probability

Signed-off-by: linning <linningde25@gmail.com>
The MaliciousBundleProducer act similar as the normal bundle producer except
it may randomly temper the bundle into a invalid bundle and/or contains bad
ER with probability before submitting it to the consensus chain

Signed-off-by: linning <linningde25@gmail.com>
…perator when it is slashed

This commit also enforce epoch transition immediately to accelerate the onboard
of the new malicious operator, also it increase the endowed balance of the sudo
account to ensure it always have enough balance to register operator

Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
@NingLin-P NingLin-P force-pushed the subspace-malicious-operator branch from 24160c0 to 44ee11f Compare December 12, 2023 16:03
@vedhavyas
Copy link
Member

:( you rebased all commits. would have preffered merging instead if there were conflicts

vedhavyas
vedhavyas previously approved these changes Dec 13, 2023
Copy link
Member

@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! But some non-blocking comments

  • I think we would also need to introduce bundle equivocation
  • Would be nice to reduce the duplicated code in to common crate that can be used across or else we have to worry about updating multiple different places

@NingLin-P NingLin-P added this pull request to the merge queue Dec 13, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 13, 2023
@NingLin-P
Copy link
Member Author

NingLin-P commented Dec 13, 2023

I think we would also need to introduce bundle equivocation

Yeah, the malicious operator will support more misbehavior in the future, including bundle equivocation and invalid fraud proof, I will create a fraud proof to track this.

Would be nice to reduce the duplicated code in to common crate that can be used across or else we have to worry about updating multiple different places

Ideally, we should reduce the duplicated code in subspace_malicious_operator.rs & subspace-node.rs, I didn't bother much since they are bin and not meant to be reuseable, but yeah it is a nice to have.

@NingLin-P NingLin-P added this pull request to the merge queue Dec 13, 2023
Merged via the queue into main with commit 591a50e Dec 13, 2023
10 checks passed
@NingLin-P NingLin-P deleted the subspace-malicious-operator branch December 13, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-runtime This PR introduces breaking changes to the runtime execution Subspace execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants