mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 19:41:07 +00:00
Malus: improvements in dispute ancestor and suggest garbage candidate implementation (#5011)
* Implement fake validation results Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * refactor Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * cargo lock Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * spell check Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * spellcheck Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * typos Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Review feedback Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * move stuff around Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * chores Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Impl valid - still wip Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fixes Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Pull Ladi's implementation: https://github.com/paritytech/polkadot/pull/4711 Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com> Co-authored-by: Andrei Sandu <andrei-mihail@parity.io> Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix build Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Logs and comments Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * WIP: suggest garbage candidate + implement validation result caching Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Do commitment hash checks in candidate validation Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Minor refactor in approval, backing, dispute-coord Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Working version of suggest garbage candidate Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Dedup Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * cleanup #1 Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * remove debug leftovers Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Accidentally commited some local test Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * spellcheck Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * some more fixes Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Refactor and fix it Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * review feedback Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * typo Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * tests review feedback Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * refactor disputer Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix zombienet disputes test Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * spellcheck Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix ui tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * fix typo Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com>
This commit is contained in:
@@ -29,8 +29,8 @@ use polkadot_node_subsystem_types::{
|
||||
ActivatedLeaf, LeafStatus,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
CandidateHash, CollatorPair, InvalidDisputeStatementKind, ValidDisputeStatementKind,
|
||||
ValidatorIndex,
|
||||
CandidateHash, CandidateReceipt, CollatorPair, InvalidDisputeStatementKind,
|
||||
ValidDisputeStatementKind, ValidatorIndex,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
@@ -108,9 +108,14 @@ where
|
||||
let mut c: usize = 0;
|
||||
loop {
|
||||
if c < 10 {
|
||||
let candidate_receipt = CandidateReceipt {
|
||||
descriptor: dummy_candidate_descriptor(dummy_hash()),
|
||||
commitments_hash: Hash::zero(),
|
||||
};
|
||||
|
||||
let (tx, _) = oneshot::channel();
|
||||
ctx.send_message(CandidateValidationMessage::ValidateFromChainState(
|
||||
dummy_candidate_descriptor(dummy_hash()),
|
||||
candidate_receipt,
|
||||
PoV { block_data: BlockData(Vec::new()) }.into(),
|
||||
Default::default(),
|
||||
tx,
|
||||
@@ -792,8 +797,13 @@ where
|
||||
fn test_candidate_validation_msg() -> CandidateValidationMessage {
|
||||
let (sender, _) = oneshot::channel();
|
||||
let pov = Arc::new(PoV { block_data: BlockData(Vec::new()) });
|
||||
let candidate_receipt = CandidateReceipt {
|
||||
descriptor: dummy_candidate_descriptor(dummy_hash()),
|
||||
commitments_hash: Hash::zero(),
|
||||
};
|
||||
|
||||
CandidateValidationMessage::ValidateFromChainState(
|
||||
dummy_candidate_descriptor(dummy_hash()),
|
||||
candidate_receipt,
|
||||
pov,
|
||||
Duration::default(),
|
||||
sender,
|
||||
|
||||
Reference in New Issue
Block a user