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-recovery-try-connect
Browse files Browse the repository at this point in the history
* master:
  Bump tokio from 1.21.1 to 1.21.2 (#1698)
  Bump tracing from 0.1.36 to 0.1.37 (#1740)
  Enable collation via RPC relay chain node (#1585)
  Bump syn from 1.0.101 to 1.0.102 (#1746)
  • Loading branch information
ordian committed Oct 10, 2022
2 parents b19bf62 + 4454404 commit 3e0a4dd
Show file tree
Hide file tree
Showing 39 changed files with 1,968 additions and 125 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,35 @@ zombienet-0005-migrate_solo_to_para:
tags:
- zombienet-polkadot-integration-test

0006-rpc_collator_builds_blocks:
stage: integration-test
image: "${ZOMBIENET_IMAGE}"
<<: *zombienet-refs
needs:
- job: build-push-image-test-parachain
variables:
POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:master"
GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests"
COL_IMAGE: "docker.io/paritypr/test-parachain:${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"
before_script:
- echo "Zombie-net Tests Config"
- echo "${ZOMBIENET_IMAGE}"
- echo "${RELAY_IMAGE}"
- echo "${COL_IMAGE}"
- echo "${GH_DIR}"
- export DEBUG=zombie
- export RELAY_IMAGE=${POLKADOT_IMAGE}
- export COL_IMAGE=${COL_IMAGE}
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh
--github-remote-dir="${GH_DIR}"
--concurrency=1
--test="0006-rpc_collator_builds_blocks.feature"
allow_failure: true
retry: 2
tags:
- zombienet-polkadot-integration-test

#### stage: .post

# This job cancels the whole pipeline if any of provided jobs fail.
Expand Down
72 changes: 61 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"client/relay-chain-interface",
"client/relay-chain-inprocess-interface",
"client/relay-chain-rpc-interface",
"client/relay-chain-minimal-node",
"pallets/aura-ext",
"pallets/collator-selection",
"pallets/dmp-queue",
Expand Down
8 changes: 4 additions & 4 deletions client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ impl sc_cli::CliConfiguration for ExportGenesisWasmCommand {
fn validate_relay_chain_url(arg: &str) -> Result<Url, String> {
let url = Url::parse(arg).map_err(|e| e.to_string())?;

if url.scheme() == "ws" {
let scheme = url.scheme();
if scheme == "ws" || scheme == "wss" {
Ok(url)
} else {
Err(format!(
Expand All @@ -290,9 +291,8 @@ pub struct RunCmd {
/// EXPERIMENTAL: Specify an URL to a relay chain full node to communicate with.
#[clap(
long,
value_parser = validate_relay_chain_url,
conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one", "two"] )
]
value_parser = validate_relay_chain_url
)]
pub relay_chain_rpc_url: Option<Url>,
}

Expand Down
2 changes: 1 addition & 1 deletion client/consensus/aura/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
async-trait = "0.1.57"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
futures = "0.3.24"
tracing = "0.1.36"
tracing = "0.1.37"

# Substrate
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async-trait = "0.1.57"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
dyn-clone = "1.0.9"
futures = "0.3.24"
tracing = "0.1.36"
tracing = "0.1.37"

# Substrate
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/relay-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
async-trait = "0.1.57"
futures = "0.3.24"
parking_lot = "0.12.1"
tracing = "0.1.36"
tracing = "0.1.37"

# Substrate
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
4 changes: 2 additions & 2 deletions client/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "deriv
futures = "0.3.24"
futures-timer = "3.0.2"
parking_lot = "0.12.1"
tracing = "0.1.36"
tracing = "0.1.37"

# Substrate
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand All @@ -31,7 +31,7 @@ cumulus-relay-chain-interface = { path = "../relay-chain-interface" }

[dev-dependencies]
portpicker = "0.1.1"
tokio = { version = "1.21.1", features = ["macros"] }
tokio = { version = "1.21.2", features = ["macros"] }
url = "2.3.1"

# Substrate
Expand Down
2 changes: 1 addition & 1 deletion client/network/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl RelayChainInterface for DummyRelayChainInterface {
Ok(false)
}

fn overseer_handle(&self) -> RelayChainResult<Option<Handle>> {
fn overseer_handle(&self) -> RelayChainResult<Handle> {
unimplemented!("Not needed for test")
}

Expand Down
5 changes: 3 additions & 2 deletions client/pov-recovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "deriv
futures = "0.3.24"
futures-timer = "3.0.2"
rand = "0.8.5"
tracing = "0.1.36"
tracing = "0.1.37"

# Substrate
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand All @@ -30,7 +30,8 @@ cumulus-primitives-core = { path = "../../primitives/core" }
cumulus-relay-chain-interface = {path = "../relay-chain-interface"}

[dev-dependencies]
tokio = { version = "1.21.1", features = ["macros"] }
tokio = { version = "1.21.2", features = ["macros"] }
portpicker = "0.1.1"

# Cumulus
cumulus-test-service = { path = "../../test/service" }
Expand Down
12 changes: 8 additions & 4 deletions client/pov-recovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ where
Ok(_) => return,
Err(e) => {
tracing::debug!(
target: "cumulus-consensus",
target: LOG_TARGET,
error = ?e,
block_hash = ?hash,
"Failed to get block status",
Expand All @@ -190,6 +190,7 @@ where
},
}

tracing::debug!(target: LOG_TARGET, ?hash, "Adding pending candidate");
if self
.pending_candidates
.insert(
Expand Down Expand Up @@ -233,6 +234,7 @@ where
None => return,
};

tracing::debug!(target: LOG_TARGET, ?block_hash, "Issuing recovery request");
self.active_candidate_recovery
.recover_candidate(block_hash, pending_candidate)
.await;
Expand Down Expand Up @@ -301,7 +303,7 @@ where
Ok(BlockStatus::Unknown) => {
if self.active_candidate_recovery.is_being_recovered(&parent) {
tracing::debug!(
target: "cumulus-consensus",
target: LOG_TARGET,
?block_hash,
parent_hash = ?parent,
"Parent is still being recovered, waiting.",
Expand All @@ -311,7 +313,7 @@ where
return
} else {
tracing::debug!(
target: "cumulus-consensus",
target: LOG_TARGET,
?block_hash,
parent_hash = ?parent,
"Parent not found while trying to import recovered block.",
Expand All @@ -324,7 +326,7 @@ where
},
Err(error) => {
tracing::debug!(
target: "cumulus-consensus",
target: LOG_TARGET,
block_hash = ?parent,
?error,
"Error while checking block status",
Expand All @@ -346,6 +348,8 @@ where
/// This will also recursivley drain `waiting_for_parent` and import them as well.
async fn import_block(&mut self, block: Block) {
let mut blocks = VecDeque::new();

tracing::debug!(target: LOG_TARGET, hash = ?block.hash(), "Importing block retrieved using pov_recovery");
blocks.push_back(block);

let mut incoming_blocks = Vec::new();
Expand Down
Loading

0 comments on commit 3e0a4dd

Please sign in to comment.