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 rh-find-potential-parents
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Jul 10, 2023
2 parents e2319c2 + e4a24a6 commit ce4c7b0
Show file tree
Hide file tree
Showing 57 changed files with 843 additions and 335 deletions.
49 changes: 25 additions & 24 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
clap = { version = "4.3.10", features = ["derive"] }
clap = { version = "4.3.11", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0" }
url = "2.4.0"

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 @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
async-trait = "0.1.70"
async-trait = "0.1.71"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
futures = "0.3.28"
tracing = "0.1.37"
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 @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
async-trait = "0.1.70"
async-trait = "0.1.71"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
dyn-clone = "1.0.11"
futures = "0.3.28"
Expand Down
4 changes: 2 additions & 2 deletions client/consensus/proposer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"

[dependencies]
anyhow = "1.0"
async-trait = "0.1.70"
thiserror = "1.0.40"
async-trait = "0.1.71"
thiserror = "1.0.43"

# Substrate
sp-consensus = { 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 @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
async-trait = "0.1.70"
async-trait = "0.1.71"
futures = "0.3.28"
parking_lot = "0.12.1"
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion client/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Cumulus-specific networking protocol"
edition = "2021"

[dependencies]
async-trait = "0.1.70"
async-trait = "0.1.71"
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
futures = "0.3.28"
futures-timer = "3.0.2"
Expand Down
9 changes: 6 additions & 3 deletions client/network/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,12 @@ impl RelayChainInterface for DummyRelayChainInterface {
async fn header(&self, block_id: BlockId) -> RelayChainResult<Option<PHeader>> {
let hash = match block_id {
BlockId::Hash(hash) => hash,
BlockId::Number(num) => self.relay_client.hash(num)?.ok_or_else(|| {
RelayChainError::GenericError(format!("block with number {num} not found"))
})?,
BlockId::Number(num) =>
if let Some(hash) = self.relay_client.hash(num)? {
hash
} else {
return Ok(None)
},
};
let header = self.relay_client.header(hash)?;

Expand Down
2 changes: 1 addition & 1 deletion client/pov-recovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch =
# Cumulus
cumulus-primitives-core = { path = "../../primitives/core" }
cumulus-relay-chain-interface = {path = "../relay-chain-interface"}
async-trait = "0.1.70"
async-trait = "0.1.71"

[dev-dependencies]
tokio = { version = "1.29.1", features = ["macros"] }
Expand Down
2 changes: 1 addition & 1 deletion client/relay-chain-inprocess-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
async-trait = "0.1.70"
async-trait = "0.1.71"
futures = "0.3.28"
futures-timer = "3.0.2"

Expand Down
10 changes: 6 additions & 4 deletions client/relay-chain-inprocess-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ impl RelayChainInterface for RelayChainInProcessInterface {
async fn header(&self, block_id: BlockId) -> RelayChainResult<Option<PHeader>> {
let hash = match block_id {
BlockId::Hash(hash) => hash,
BlockId::Number(num) => match self.full_client.hash(num)? {
None => return Ok(None),
Some(h) => h,
},
BlockId::Number(num) =>
if let Some(hash) = self.full_client.hash(num)? {
hash
} else {
return Ok(None)
},
};
let header = self.full_client.header(hash)?;

Expand Down
4 changes: 2 additions & 2 deletions client/relay-chain-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }

futures = "0.3.28"
async-trait = "0.1.70"
thiserror = "1.0.40"
async-trait = "0.1.71"
thiserror = "1.0.43"
jsonrpsee-core = "0.16.2"
parity-scale-codec = "3.6.3"
2 changes: 1 addition & 1 deletion client/relay-chain-minimal-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ cumulus-primitives-core = { path = "../../primitives/core" }
array-bytes = "6.1"
lru = "0.9"
tracing = "0.1.37"
async-trait = "0.1.70"
async-trait = "0.1.71"
futures = "0.3.28"
tokio = { version = "1.29.1", features = ["macros"] }
4 changes: 2 additions & 2 deletions client/relay-chain-rpc-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ futures-timer = "3.0.2"
parity-scale-codec = "3.6.3"
jsonrpsee = { version = "0.16.2", features = ["ws-client"] }
tracing = "0.1.37"
async-trait = "0.1.70"
async-trait = "0.1.71"
url = "2.4.0"
serde_json = "1.0.100"
serde = "1.0.166"
serde = "1.0.167"
lru = "0.9.0"
10 changes: 6 additions & 4 deletions client/relay-chain-rpc-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ impl RelayChainInterface for RelayChainRpcInterface {
async fn header(&self, block_id: BlockId) -> RelayChainResult<Option<PHeader>> {
let hash = match block_id {
BlockId::Hash(hash) => hash,
BlockId::Number(num) => match self.rpc_client.chain_get_block_hash(Some(num)).await? {
None => return Ok(None),
Some(h) => h,
},
BlockId::Number(num) =>
if let Some(hash) = self.rpc_client.chain_get_block_hash(Some(num)).await? {
hash
} else {
return Ok(None)
},
};
let header = self.rpc_client.chain_get_header(Some(hash)).await?;

Expand Down
Loading

0 comments on commit ce4c7b0

Please sign in to comment.