-
Notifications
You must be signed in to change notification settings - Fork 1.2k
check inherents and equivocations in import_block
#8446
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
base: master
Are you sure you want to change the base?
Changes from 14 commits
9ebf20c
4431bb1
0f9533b
e3e5846
dc09e64
610fd40
09a0896
73a9b0a
4eb7197
cc36b4a
eb14482
8966cbf
484579a
ea74fa2
9bc4f69
d59dc15
f9c046a
fc83d6b
d3f0bc7
a171009
2130887
4e9a465
ab5abde
c1c9e97
40fd334
ac54928
b8b9b72
2d800c0
50c8e9c
81d7d39
8566346
7a28d33
89642dc
6147815
07df2ee
55dcf7b
500d87a
171156c
4a77f23
8aae9f1
845db2b
ef58955
f90501f
8a755d5
507f3b2
5779e08
78ab1cc
b7e5656
2721f74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |||||
| //! | ||||||
| //! For more information about AuRa, the Substrate crate should be checked. | ||||||
|
|
||||||
| use super::ValidatingBlockImport; | ||||||
| use codec::{Codec, Decode}; | ||||||
| use cumulus_client_collator::{ | ||||||
| relay_chain_driven::CollationRequest, service::ServiceInterface as CollatorServiceInterface, | ||||||
|
|
@@ -39,8 +40,10 @@ use polkadot_primitives::{CollatorPair, Id as ParaId, ValidationCode}; | |||||
| use futures::{channel::mpsc::Receiver, prelude::*}; | ||||||
| use sc_client_api::{backend::AuxStore, BlockBackend, BlockOf}; | ||||||
| use sc_consensus::BlockImport; | ||||||
| use sc_consensus_slots::InherentDataProviderExt; | ||||||
| use sp_api::{CallApiAt, ProvideRuntimeApi}; | ||||||
| use sp_application_crypto::AppPublic; | ||||||
| use sp_block_builder::BlockBuilder; | ||||||
| use sp_blockchain::HeaderBackend; | ||||||
| use sp_consensus_aura::AuraApi; | ||||||
| use sp_core::crypto::Pair; | ||||||
|
|
@@ -101,14 +104,15 @@ where | |||||
| + Send | ||||||
| + Sync | ||||||
| + 'static, | ||||||
| Client::Api: AuraApi<Block, P::Public> + CollectCollationInfo<Block>, | ||||||
| Client::Api: BlockBuilder<Block> + AuraApi<Block, P::Public> + CollectCollationInfo<Block>, | ||||||
| RClient: RelayChainInterface + Send + Clone + 'static, | ||||||
| CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static, | ||||||
| CIDP::InherentDataProviders: Send, | ||||||
| CIDP: CreateInherentDataProviders<Block, ()> + Clone + Send + 'static, | ||||||
|
||||||
| CIDP: CreateInherentDataProviders<Block, ()> + Clone + Send + 'static, | |
| CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4a77f23 (and other constraints-related changes)
iulianbarbu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| create_inherent_data_providers: params.create_inherent_data_providers.clone(), | |
| create_inherent_data_providers: params.create_inherent_data_providers, |
The changes to this file seem unnecessary.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said below, this is not needed and can be deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ | |
| //! The main limitation is block propagation time - i.e. the new blocks created by an author | ||
| //! must be propagated to the next author before their turn. | ||
|
|
||
| use super::ValidatingBlockImport; | ||
| use codec::{Codec, Encode}; | ||
| use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface; | ||
| use cumulus_client_consensus_common::{self as consensus_common, ParachainBlockImportMarker}; | ||
|
|
@@ -46,6 +47,8 @@ use polkadot_overseer::Handle as OverseerHandle; | |
| use polkadot_primitives::{ | ||
| vstaging::DEFAULT_CLAIM_QUEUE_OFFSET, CollatorPair, Id as ParaId, OccupiedCoreAssumption, | ||
| }; | ||
| use sc_consensus_slots::InherentDataProviderExt; | ||
| use sp_block_builder::BlockBuilder; | ||
|
|
||
| use crate::{collator as collator_util, export_pov_to_path}; | ||
| use futures::prelude::*; | ||
|
|
@@ -114,17 +117,20 @@ where | |
| + Send | ||
| + Sync | ||
| + 'static, | ||
| Client::Api: | ||
| AuraApi<Block, P::Public> + CollectCollationInfo<Block> + AuraUnincludedSegmentApi<Block>, | ||
| Client::Api: BlockBuilder<Block> | ||
|
||
| + AuraApi<Block, P::Public> | ||
| + CollectCollationInfo<Block> | ||
| + AuraUnincludedSegmentApi<Block>, | ||
| Backend: sc_client_api::Backend<Block> + 'static, | ||
| RClient: RelayChainInterface + Clone + 'static, | ||
| CIDP: CreateInherentDataProviders<Block, ()> + 'static, | ||
| CIDP::InherentDataProviders: Send, | ||
| CIDP: CreateInherentDataProviders<Block, ()> + Clone + 'static, | ||
| CIDP::InherentDataProviders: InherentDataProviderExt + Send, | ||
| BI: BlockImport<Block> + ParachainBlockImportMarker + Send + Sync + 'static, | ||
| BI::Error: Into<sp_consensus::Error>, | ||
| Proposer: ProposerInterface<Block> + Send + Sync + 'static, | ||
| CS: CollatorServiceInterface<Block> + Send + Sync + 'static, | ||
| CHP: consensus_common::ValidationCodeHashProvider<Block::Hash> + Send + 'static, | ||
| P: Pair, | ||
| P: Pair + Send + Sync + 'static, | ||
| P::Public: AppPublic + Member + Codec, | ||
| P::Signature: TryFrom<Vec<u8>> + Member + Codec, | ||
| { | ||
|
|
@@ -166,17 +172,20 @@ where | |
| + Send | ||
| + Sync | ||
| + 'static, | ||
| Client::Api: | ||
| AuraApi<Block, P::Public> + CollectCollationInfo<Block> + AuraUnincludedSegmentApi<Block>, | ||
| Client::Api: BlockBuilder<Block> | ||
| + AuraApi<Block, P::Public> | ||
| + CollectCollationInfo<Block> | ||
| + AuraUnincludedSegmentApi<Block>, | ||
| Backend: sc_client_api::Backend<Block> + 'static, | ||
| RClient: RelayChainInterface + Clone + 'static, | ||
| CIDP: CreateInherentDataProviders<Block, ()> + 'static, | ||
| CIDP::InherentDataProviders: Send, | ||
| CIDP: CreateInherentDataProviders<Block, ()> + Clone + 'static, | ||
|
||
| CIDP::InherentDataProviders: InherentDataProviderExt + Send + Sync, | ||
| BI: BlockImport<Block> + ParachainBlockImportMarker + Send + Sync + 'static, | ||
| BI::Error: Into<sp_consensus::Error>, | ||
| Proposer: ProposerInterface<Block> + Send + Sync + 'static, | ||
| CS: CollatorServiceInterface<Block> + Send + Sync + 'static, | ||
| CHP: consensus_common::ValidationCodeHashProvider<Block::Hash> + Send + 'static, | ||
| P: Pair, | ||
| P: Pair + Send + Sync + 'static, | ||
| P::Public: AppPublic + Member + Codec, | ||
| P::Signature: TryFrom<Vec<u8>> + Member + Codec, | ||
| { | ||
|
|
@@ -205,8 +214,14 @@ where | |
|
|
||
| let mut collator = { | ||
| let params = collator_util::Params { | ||
| create_inherent_data_providers: params.create_inherent_data_providers, | ||
| block_import: params.block_import, | ||
| create_inherent_data_providers: params.create_inherent_data_providers.clone(), | ||
| block_import: ValidatingBlockImport::<_, _, _, _, P>::new( | ||
| params.block_import, | ||
| params.para_client.clone(), | ||
| params.create_inherent_data_providers.clone(), | ||
| true, | ||
| Default::default(), | ||
| ), | ||
| relay_client: params.relay_client.clone(), | ||
| keystore: params.keystore.clone(), | ||
| para_id: params.para_id, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.