From e0336626ae93010dfd65c283c39ee856826186c5 Mon Sep 17 00:00:00 2001 From: Sergei Shulepov <sergei@parity.io> Date: Wed, 28 Oct 2020 13:11:06 +0100 Subject: [PATCH] let go fees (#1867) --- polkadot/node/collation-generation/src/lib.rs | 2 -- polkadot/node/core/backing/src/lib.rs | 5 ----- polkadot/node/core/candidate-selection/src/lib.rs | 1 - polkadot/node/core/candidate-validation/src/lib.rs | 2 -- polkadot/node/primitives/src/lib.rs | 4 +--- polkadot/primitives/src/v1.rs | 4 ---- .../src/node/collators/collation-generation.md | 2 -- polkadot/roadmap/implementers-guide/src/types/candidate.md | 4 ---- 8 files changed, 1 insertion(+), 23 deletions(-) diff --git a/polkadot/node/collation-generation/src/lib.rs b/polkadot/node/collation-generation/src/lib.rs index f5cd7da2822..271d73999fc 100644 --- a/polkadot/node/collation-generation/src/lib.rs +++ b/polkadot/node/collation-generation/src/lib.rs @@ -272,7 +272,6 @@ async fn handle_new_activations<Context: SubsystemContext>( }; let commitments = CandidateCommitments { - fees: collation.fees, upward_messages: collation.upward_messages, new_validation_code: collation.new_validation_code, head_data: collation.head_data, @@ -381,7 +380,6 @@ mod tests { fn test_collation() -> Collation { Collation { - fees: Default::default(), upward_messages: Default::default(), new_validation_code: Default::default(), head_data: Default::default(), diff --git a/polkadot/node/core/backing/src/lib.rs b/polkadot/node/core/backing/src/lib.rs index ca17d26acfd..9b3102d97b9 100644 --- a/polkadot/node/core/backing/src/lib.rs +++ b/polkadot/node/core/backing/src/lib.rs @@ -677,7 +677,6 @@ impl CandidateBackingJob { let erasure_root = branches.root(); let commitments = CandidateCommitments { - fees: outputs.fees, upward_messages: outputs.upward_messages, erasure_root, new_validation_code: outputs.new_validation_code, @@ -1160,7 +1159,6 @@ mod tests { ValidationResult::Valid(ValidationOutputs { head_data: expected_head_data.clone(), upward_messages: Vec::new(), - fees: Default::default(), new_validation_code: None, processed_downward_messages: 0, }, test_state.validation_data.persisted), @@ -1280,7 +1278,6 @@ mod tests { ValidationResult::Valid(ValidationOutputs { head_data: expected_head_data.clone(), upward_messages: Vec::new(), - fees: Default::default(), new_validation_code: None, processed_downward_messages: 0, }, test_state.validation_data.persisted), @@ -1419,7 +1416,6 @@ mod tests { ValidationResult::Valid(ValidationOutputs { head_data: expected_head_data.clone(), upward_messages: Vec::new(), - fees: Default::default(), new_validation_code: None, processed_downward_messages: 0, }, test_state.validation_data.persisted), @@ -1575,7 +1571,6 @@ mod tests { ValidationResult::Valid(ValidationOutputs { head_data: expected_head_data.clone(), upward_messages: Vec::new(), - fees: Default::default(), new_validation_code: None, processed_downward_messages: 0, }, test_state.validation_data.persisted), diff --git a/polkadot/node/core/candidate-selection/src/lib.rs b/polkadot/node/core/candidate-selection/src/lib.rs index 8452558ec1a..4399a90f599 100644 --- a/polkadot/node/core/candidate-selection/src/lib.rs +++ b/polkadot/node/core/candidate-selection/src/lib.rs @@ -492,7 +492,6 @@ mod tests { ValidationOutputs { head_data: HeadData(head_data), upward_messages: Vec::new(), - fees: 0, new_validation_code: None, processed_downward_messages: 0, }, diff --git a/polkadot/node/core/candidate-validation/src/lib.rs b/polkadot/node/core/candidate-validation/src/lib.rs index 75cf8a67be3..360257ae32b 100644 --- a/polkadot/node/core/candidate-validation/src/lib.rs +++ b/polkadot/node/core/candidate-validation/src/lib.rs @@ -490,7 +490,6 @@ fn validate_candidate_exhaustive<B: ValidationBackend, S: SpawnNamed + 'static>( let outputs = ValidationOutputs { head_data: res.head_data, upward_messages: res.upward_messages, - fees: 0, new_validation_code: res.new_validation_code, processed_downward_messages: res.processed_downward_messages, }; @@ -850,7 +849,6 @@ mod tests { assert_matches!(v, ValidationResult::Valid(outputs, used_validation_data) => { assert_eq!(outputs.head_data, HeadData(vec![1, 1, 1])); assert_eq!(outputs.upward_messages, Vec::new()); - assert_eq!(outputs.fees, 0); assert_eq!(outputs.new_validation_code, Some(vec![2, 2, 2].into())); assert_eq!(used_validation_data, validation_data); }); diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index c8de99f4b89..ddcec114ebe 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -27,7 +27,7 @@ use parity_scale_codec::{Decode, Encode}; use polkadot_primitives::v1::{ Hash, CommittedCandidateReceipt, CandidateReceipt, CompactStatement, EncodeAs, Signed, SigningContext, ValidatorIndex, ValidatorId, - UpwardMessage, Balance, ValidationCode, PersistedValidationData, ValidationData, + UpwardMessage, ValidationCode, PersistedValidationData, ValidationData, HeadData, PoV, CollatorPair, Id as ParaId, ValidationOutputs, }; use polkadot_statement_table::{ @@ -253,8 +253,6 @@ impl std::convert::TryFrom<FromTableMisbehavior> for MisbehaviorReport { /// - contains a proof of validity. #[derive(Clone, Encode, Decode)] pub struct Collation { - /// Fees paid from the chain to the relay chain validators. - pub fees: Balance, /// Messages destined to be interpreted by the Relay chain itself. pub upward_messages: Vec<UpwardMessage>, /// New validation code. diff --git a/polkadot/primitives/src/v1.rs b/polkadot/primitives/src/v1.rs index 3fbb5957308..66a93a6bece 100644 --- a/polkadot/primitives/src/v1.rs +++ b/polkadot/primitives/src/v1.rs @@ -318,8 +318,6 @@ pub struct ValidationOutputs { pub head_data: HeadData, /// Upward messages to the relay chain. pub upward_messages: Vec<UpwardMessage>, - /// Fees paid to the validators of the relay-chain. - pub fees: Balance, /// The new validation code submitted by the execution, if any. pub new_validation_code: Option<ValidationCode>, /// The number of messages processed from the DMQ. @@ -330,8 +328,6 @@ pub struct ValidationOutputs { #[derive(PartialEq, Eq, Clone, Encode, Decode)] #[cfg_attr(feature = "std", derive(Debug, Default, Hash))] pub struct CandidateCommitments { - /// Fees paid from the chain to the relay chain validators. - pub fees: Balance, /// Messages destined to be interpreted by the Relay chain itself. pub upward_messages: Vec<UpwardMessage>, /// The root of a block's erasure encoding Merkle tree. diff --git a/polkadot/roadmap/implementers-guide/src/node/collators/collation-generation.md b/polkadot/roadmap/implementers-guide/src/node/collators/collation-generation.md index 5863a4989ef..15b510baeaa 100644 --- a/polkadot/roadmap/implementers-guide/src/node/collators/collation-generation.md +++ b/polkadot/roadmap/implementers-guide/src/node/collators/collation-generation.md @@ -22,8 +22,6 @@ The process of generating a collation for a parachain is very parachain-specific ```rust pub struct Collation { - /// Fees paid from the chain to the relay chain validators. - pub fees: Balance, /// Messages destined to be interpreted by the Relay chain itself. pub upward_messages: Vec<UpwardMessage>, /// New validation code. diff --git a/polkadot/roadmap/implementers-guide/src/types/candidate.md b/polkadot/roadmap/implementers-guide/src/types/candidate.md index 750f00865ef..9d6776332ba 100644 --- a/polkadot/roadmap/implementers-guide/src/types/candidate.md +++ b/polkadot/roadmap/implementers-guide/src/types/candidate.md @@ -247,8 +247,6 @@ The execution and validation of parachain or parathread candidates produces a nu #[derive(PartialEq, Eq, Clone, Encode, Decode)] #[cfg_attr(feature = "std", derive(Debug, Default))] struct CandidateCommitments { - /// Fees paid from the chain to the relay chain validators. - fees: Balance, /// Messages directed to other paras routed via the relay chain. horizontal_messages: Vec<OutboundHrmpMessage>, /// Messages destined to be interpreted by the Relay chain itself. @@ -293,8 +291,6 @@ struct ValidationOutputs { horizontal_messages: Vec<OutboundHrmpMessage>, /// Upwards messages to the relay chain. upwards_messages: Vec<UpwardsMessage>, - /// Fees paid to the validators of the relay-chain. - fees: Balance, /// The new validation code submitted by the execution, if any. new_validation_code: Option<ValidationCode>, /// The number of messages processed from the DMQ. -- GitLab