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

Commit

Permalink
Merge branch 'master' into ao-session-info-migration
Browse files Browse the repository at this point in the history
* master:
  Fix fmt on master (#4546)
  Support new version of zombienet (#4528)
  naming consistency (#4539)
  paras: add log target (#4478)
  • Loading branch information
ordian committed Dec 16, 2021
2 parents 0b3ae56 + 952d773 commit dacda5a
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ zombienet-tests-parachains-smoke-test:
- job: publish-adder-collator-image

variables:
GH_DIR: 'https://github.com/paritytech/polkadot/tree/master/zombienet_tests/parachains'
GH_DIR: 'https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/parachains'

before_script:
- echo "Zombie-net Tests Config"
Expand Down Expand Up @@ -658,7 +658,7 @@ zombienet-tests-malus-dispute-valid:
- job: publish-adder-collator-image

variables:
GH_DIR: 'https://github.com/paritytech/polkadot/tree/master/node/malus/integrationtests'
GH_DIR: 'https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/node/malus/integrationtests'

before_script:
- echo "Zombie-net Tests Config"
Expand Down
2 changes: 1 addition & 1 deletion bridges/bin/rialto/node/src/overseer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub use polkadot_node_core_chain_selection::ChainSelectionSubsystem;
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
pub use polkadot_node_core_provisioner::ProvisionerSubsystem;
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
pub use polkadot_statement_distribution::StatementDistribution as StatementDistributionSubsystem;
pub use polkadot_statement_distribution::StatementDistributionSubsystem;

/// Arguments passed for overseer construction.
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
Expand Down
12 changes: 6 additions & 6 deletions node/core/provisioner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl InherentAfter {
}

/// A per-relay-parent job for the provisioning subsystem.
pub struct ProvisioningJob {
pub struct ProvisionerJob {
leaf: ActivatedLeaf,
receiver: mpsc::Receiver<ProvisionerMessage>,
backed_candidates: Vec<CandidateReceipt>,
Expand Down Expand Up @@ -144,7 +144,7 @@ pub enum Error {
BackedCandidateOrderingProblem,
}

impl JobTrait for ProvisioningJob {
impl JobTrait for ProvisionerJob {
type ToJob = ProvisionerMessage;
type Error = Error;
type RunArgs = ();
Expand All @@ -164,7 +164,7 @@ impl JobTrait for ProvisioningJob {
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send>> {
async move {
let span = leaf.span.clone();
let job = ProvisioningJob::new(leaf, metrics, receiver);
let job = ProvisionerJob::new(leaf, metrics, receiver);

job.run_loop(sender.subsystem_sender(), PerLeafSpan::new(span, "provisioner"))
.await
Expand All @@ -173,7 +173,7 @@ impl JobTrait for ProvisioningJob {
}
}

impl ProvisioningJob {
impl ProvisionerJob {
fn new(
leaf: ActivatedLeaf,
metrics: Metrics,
Expand Down Expand Up @@ -626,5 +626,5 @@ async fn select_disputes(
.collect())
}

/// The provisioning subsystem.
pub type ProvisioningSubsystem<Spawner> = JobSubsystem<ProvisioningJob, Spawner>;
/// The provisioner subsystem.
pub type ProvisionerSubsystem<Spawner> = JobSubsystem<ProvisionerJob, Spawner>;
5 changes: 2 additions & 3 deletions node/malus/integrationtests/0001-dispute-valid-block.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ timeout = 1000
[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
chain = "wococo-local"
chain_spec_command = "polkadot build-spec --chain wococo-local --disable-default-bootnode --raw > /cfg/wococo-local.json"
command = "polkadot"

[[relaychain.nodes]]
Expand All @@ -23,7 +22,7 @@ command = "polkadot"
extra_args = [ "--charlie", "-lparachain=debug" ]

[[relaychain.nodes]]
name = "david"
name = "dave"
validator = true
command = "/usr/local/bin/malus dispute-ancestor"
extra_args = ["--dave", "-lparachain=debug"]
Expand All @@ -37,4 +36,4 @@ id = 100
name = "collator01"
image = "{{COL_IMAGE}}"
command = "/usr/local/bin/adder-collator"
args = ["-lparachain=debug"]
args = ["-lparachain=debug"]
12 changes: 6 additions & 6 deletions node/network/statement-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const LOG_TARGET: &str = "parachain::statement-distribution";
const MAX_LARGE_STATEMENTS_PER_SENDER: usize = 20;

/// The statement distribution subsystem.
pub struct StatementDistribution {
pub struct StatementDistributionSubsystem {
/// Pointer to a keystore, which is required for determining this node's validator index.
keystore: SyncCryptoStorePtr,
/// Receiver for incoming large statement requests.
Expand All @@ -113,7 +113,7 @@ pub struct StatementDistribution {
metrics: Metrics,
}

impl<Context> overseer::Subsystem<Context, SubsystemError> for StatementDistribution
impl<Context> overseer::Subsystem<Context, SubsystemError> for StatementDistributionSubsystem
where
Context: SubsystemContext<Message = StatementDistributionMessage>,
Context: overseer::SubsystemContext<Message = StatementDistributionMessage>,
Expand All @@ -131,14 +131,14 @@ where
}
}

impl StatementDistribution {
impl StatementDistributionSubsystem {
/// Create a new Statement Distribution Subsystem
pub fn new(
keystore: SyncCryptoStorePtr,
req_receiver: IncomingRequestReceiver<request_v1::StatementFetchingRequest>,
metrics: Metrics,
) -> StatementDistribution {
StatementDistribution { keystore, req_receiver: Some(req_receiver), metrics }
) -> Self {
Self { keystore, req_receiver: Some(req_receiver), metrics }
}
}

Expand Down Expand Up @@ -1535,7 +1535,7 @@ async fn handle_network_update(
}
}

impl StatementDistribution {
impl StatementDistributionSubsystem {
async fn run(
mut self,
mut ctx: (impl SubsystemContext<Message = StatementDistributionMessage>
Expand Down
8 changes: 4 additions & 4 deletions node/network/statement-distribution/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() {
let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();

let bg = async move {
let s = StatementDistribution::new(
let s = StatementDistributionSubsystem::new(
Arc::new(LocalKeystore::in_memory()),
statement_req_receiver,
Default::default(),
Expand Down Expand Up @@ -895,7 +895,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing(
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();

let bg = async move {
let s = StatementDistribution::new(
let s = StatementDistributionSubsystem::new(
make_ferdie_keystore(),
statement_req_receiver,
Default::default(),
Expand Down Expand Up @@ -1394,7 +1394,7 @@ fn share_prioritizes_backing_group() {
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();

let bg = async move {
let s = StatementDistribution::new(
let s = StatementDistributionSubsystem::new(
make_ferdie_keystore(),
statement_req_receiver,
Default::default(),
Expand Down Expand Up @@ -1679,7 +1679,7 @@ fn peer_cant_flood_with_large_statements() {

let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();
let bg = async move {
let s = StatementDistribution::new(
let s = StatementDistributionSubsystem::new(
make_ferdie_keystore(),
statement_req_receiver,
Default::default(),
Expand Down
4 changes: 2 additions & 2 deletions node/service/src/overseer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ pub use polkadot_node_core_candidate_validation::CandidateValidationSubsystem;
pub use polkadot_node_core_chain_api::ChainApiSubsystem;
pub use polkadot_node_core_chain_selection::ChainSelectionSubsystem;
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
pub use polkadot_node_core_provisioner::ProvisioningSubsystem as ProvisionerSubsystem;
pub use polkadot_node_core_provisioner::ProvisionerSubsystem;
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
pub use polkadot_statement_distribution::StatementDistribution as StatementDistributionSubsystem;
pub use polkadot_statement_distribution::StatementDistributionSubsystem;

/// Arguments passed for overseer construction.
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
Expand Down
17 changes: 5 additions & 12 deletions runtime/parachains/src/paras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ impl<T: Config> Pallet<T> {
Self::decrease_code_ref(&removed_code_hash);
} else {
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"Missing code for removed hash {:?}",
removed_code_hash,
);
Expand Down Expand Up @@ -1115,7 +1115,7 @@ impl<T: Config> Pallet<T> {
// `PvfActiveVoteMap`'s keys is always equal to the set of items found in
// `PvfActiveVoteList`.
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"The PvfActiveVoteMap is out of sync with PvfActiveVoteList!",
);
debug_assert!(false);
Expand Down Expand Up @@ -1452,10 +1452,7 @@ impl<T: Config> Pallet<T> {
//
// NOTE: we cannot set `UpgradeGoAheadSignal` signal here since this will be reset by
// the following call `note_new_head`
log::warn!(
target: "runtime::paras",
"ended up scheduling an upgrade while one is pending",
);
log::warn!(target: LOG_TARGET, "ended up scheduling an upgrade while one is pending",);
return weight
}

Expand All @@ -1470,7 +1467,7 @@ impl<T: Config> Pallet<T> {
// NOTE: we cannot set `UpgradeGoAheadSignal` signal here since this will be reset by
// the following call `note_new_head`
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"para tried to upgrade to the same code. Abort the upgrade",
);
return weight
Expand Down Expand Up @@ -1654,11 +1651,7 @@ impl<T: Config> Pallet<T> {
if let Err(e) = SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(
Call::include_pvf_check_statement { stmt, signature }.into(),
) {
log::error!(
target: "runtime::paras",
"Error submitting pvf check statement: {:?}",
e,
);
log::error!(target: LOG_TARGET, "Error submitting pvf check statement: {:?}", e,);
}
}

Expand Down
2 changes: 1 addition & 1 deletion zombienet_tests/parachains/0001-parachains-smoke-test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ timeout = 1000
[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
chain = "rococo-local"
chain_spec_command = "polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > /cfg/rococo-local.json"
command = "polkadot"

[[relaychain.nodes]]
Expand All @@ -17,6 +16,7 @@ command = "polkadot"

[[parachains]]
id = 100
addToGenesis = false

[parachains.collator]
name = "collator01"
Expand Down

0 comments on commit dacda5a

Please sign in to comment.