Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Malus: improvements in dispute ancestor and suggest garbage candidate implementation#5011

Merged
paritytech-processbot[bot] merged 46 commits intomasterfrom
sandreim/malus_improvement
Apr 13, 2022
Merged

Malus: improvements in dispute ancestor and suggest garbage candidate implementation#5011
paritytech-processbot[bot] merged 46 commits intomasterfrom
sandreim/malus_improvement

Conversation

@sandreim
Copy link
Copy Markdown
Contributor

@sandreim sandreim commented Mar 1, 2022

First step(s), see #4874

  • Implemented fake validation as a component that is reused in dispute_valid_candidate.rs and suggest garbage candidate.rs.
  • The fake validation is configurable to report valid candidates as invalid or report malicious candidates as valid to the backing/approval subsystems.
  • Implemented suggest garbage candidate using the draft from Malus: Implement storing invalid chunks #4711 as a starting point

These two malus nemesis implementations will be used in the parachain zombienet test suite:

  • malicious nodes initiate disputes of valid candidates (dispute_valid_candidate)
  • honest nodes initiate disputes of invalid candidates backed by malicious nodes

I attached some screenshots to show how suggest garbage candidate malus nodes perform in a zombienet test. The first image shows disputes for malicious candidates concluding as valid and the inclusion blocks being finalized. The next two show disputes concluding as invalid and chain reversions.

This shows up on honest validators when they run the PVF with a malicious PoV:

2022-03-30 14:02:30 panicked at 'invalid block data format.: Error', /home/sandreim/polkadot/parachain/test-parachains/undying/src/wasm_[validation.rs:30](http://validation.rs:30/):58

Screenshot 2022-03-30 at 17 04 47

Screenshot 2022-03-30 at 17 48 43

Screenshot 2022-03-30 at 17 59 32

@sandreim sandreim added A3-in_progress Pull request is in progress. No review needed at this stage. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Mar 1, 2022
sandreim added 5 commits March 1, 2022 12:14
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
@sandreim sandreim marked this pull request as ready for review March 2, 2022 14:49
@sandreim sandreim requested a review from Lldenaurois March 2, 2022 14:50
@github-actions github-actions bot removed the A3-in_progress Pull request is in progress. No review needed at this stage. label Mar 2, 2022
@sandreim sandreim requested a review from drahnr March 2, 2022 14:50
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Mar 2, 2022
Copy link
Copy Markdown
Contributor

@drahnr drahnr left a comment

Choose a reason for hiding this comment

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

A few nits, Valid should be implemented before merging. Besides that - 👍

sandreim and others added 7 commits March 23, 2022 14:16
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
#4711

Co-authored-by: Lldenaurois <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
@sandreim sandreim requested a review from eskimor April 1, 2022 11:53
sandreim added 2 commits April 1, 2022 11:57
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Copy link
Copy Markdown
Member

@eskimor eskimor left a comment

Choose a reason for hiding this comment

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

First pass, got half way through. Remaining review coming soon.

Copy link
Copy Markdown
Member

@eskimor eskimor left a comment

Choose a reason for hiding this comment

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

Looks good overall - code is clean and relatively easy to follow as well.

sandreim added 5 commits April 8, 2022 11:10
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
sandreim added 2 commits April 8, 2022 14:32
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
@sandreim sandreim requested a review from drahnr April 11, 2022 09:15
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
@sandreim
Copy link
Copy Markdown
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit c8c1933 into master Apr 13, 2022
@paritytech-processbot paritytech-processbot bot deleted the sandreim/malus_improvement branch April 13, 2022 13:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants