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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into approval-voting-ove…
Browse files Browse the repository at this point in the history
…rlay-db
  • Loading branch information
Lldenaurois committed Jul 7, 2021
2 parents ef68ae1 + 3239775 commit ffabf96
Show file tree
Hide file tree
Showing 179 changed files with 5,831 additions and 2,500 deletions.
877 changes: 455 additions & 422 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ path = "src/main.rs"
name = "polkadot"
description = "Implementation of a https://polkadot.network node in Rust based on the Substrate framework."
license = "GPL-3.0-only"
version = "0.9.7"
version = "0.9.8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
readme = "README.md"
Expand Down Expand Up @@ -79,6 +79,7 @@ members = [
"parachain/test-parachains",
"parachain/test-parachains/adder",
"parachain/test-parachains/adder/collator",
"utils/staking-miner",
]

# We want to be able to build the bridge relayer without pulling it (and all of its
Expand Down
3 changes: 2 additions & 1 deletion bridges/bin/millau/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,9 @@ impl_runtime_apis! {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
block_hash: <Block as BlockT>::Hash,
) -> TransactionValidity {
Executive::validate_transaction(source, tx)
Executive::validate_transaction(source, tx, block_hash)
}
}

Expand Down
3 changes: 2 additions & 1 deletion bridges/bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,9 @@ impl_runtime_apis! {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
block_hash: <Block as BlockT>::Hash,
) -> TransactionValidity {
Executive::validate_transaction(source, tx)
Executive::validate_transaction(source, tx, block_hash)
}
}

Expand Down
4 changes: 1 addition & 3 deletions bridges/primitives/chain-millau/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bp-messages = { path = "../messages", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }
fixed-hash = { version = "0.7.0", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-codec = { version = "0.5.0", default-features = false }
impl-codec = { version = "0.5.1", default-features = false }
impl-serde = { version = "0.3.1", optional = true }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
Expand All @@ -23,7 +23,6 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] }

frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false, features = ["derive"] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
Expand All @@ -42,7 +41,6 @@ std = [
"hash256-std-hasher/std",
"impl-codec/std",
"impl-serde",
"max-encoded-len/std",
"parity-util-mem/std",
"serde",
"sp-api/std",
Expand Down
3 changes: 1 addition & 2 deletions bridges/primitives/chain-millau/src/millau_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.

use frame_support::traits::MaxEncodedLen;
use parity_util_mem::MallocSizeOf;
use sp_runtime::traits::CheckEqual;

Expand All @@ -23,7 +22,7 @@ use sp_runtime::traits::CheckEqual;

fixed_hash::construct_fixed_hash! {
/// Hash type used in Millau chain.
#[derive(MallocSizeOf, MaxEncodedLen)]
#[derive(MallocSizeOf)]
pub struct MillauHash(64);
}

Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-cli"
version = "0.9.7"
version = "0.9.8"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot Relay-chain Client Node"
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion cli/browser-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// Build our client.
log('Starting client');
let client = await start_client(chain_spec_text, 'info');
let client = start_client(chain_spec_text, 'info');
log('Client started');

client.rpcSubscribe('{"method":"chain_subscribeNewHead","params":[],"id":1,"jsonrpc":"2.0"}',
Expand Down
8 changes: 4 additions & 4 deletions cli/src/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ use wasm_bindgen::prelude::*;

/// Starts the client.
#[wasm_bindgen]
pub async fn start_client(chain_spec: String, log_level: String) -> Result<Client, JsValue> {
start_inner(chain_spec, log_level).await.map_err(|err| JsValue::from_str(&err.to_string()))
pub fn start_client(chain_spec: String, log_level: String) -> Result<Client, JsValue> {
start_inner(chain_spec, log_level).map_err(|err| JsValue::from_str(&err.to_string()))
}

async fn start_inner(chain_spec: String, log_directives: String) -> Result<Client, Box<dyn std::error::Error>> {
fn start_inner(chain_spec: String, log_directives: String) -> Result<Client, Box<dyn std::error::Error>> {
set_console_error_panic_hook();
init_logging(&log_directives)?;

let chain_spec =
service::PolkadotChainSpec::from_json_bytes(chain_spec.as_bytes().to_vec()).map_err(|e| format!("{:?}", e))?;
let config = browser_configuration(chain_spec).await?;
let config = browser_configuration(chain_spec)?;

info!("Polkadot browser node");
info!(" version {}", config.impl_version);
Expand Down
4 changes: 2 additions & 2 deletions core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-core-primitives"
version = "0.9.7"
version = "0.9.8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand All @@ -9,7 +9,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master",
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
parity-scale-codec = { version = "2.0.0", default-features = false, features = [ "derive" ] }
parity-util-mem = { version = "0.9.0", default-features = false, optional = true }
parity-util-mem = { version = "0.10.0", default-features = false, optional = true }

[features]
default = [ "std" ]
Expand Down
2 changes: 1 addition & 1 deletion erasure-coding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-erasure-coding"
version = "0.9.7"
version = "0.9.8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion node/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-client"
version = "0.9.3"
version = "0.9.8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand Down
16 changes: 16 additions & 0 deletions node/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,22 @@ impl sc_client_api::StorageProvider<Block, crate::FullBackend> for Client {
}
}

fn child_storage_keys_iter<'a>(
&self,
id: &BlockId<Block>,
child_info: ChildInfo,
prefix: Option<&'a StorageKey>,
start_key: Option<&StorageKey>,
) -> sp_blockchain::Result<KeyIterator<'a, <crate::FullBackend as sc_client_api::Backend<Block>>::State, Block>> {
with_client! {
self,
client,
{
client.child_storage_keys_iter(id, child_info, prefix, start_key)
}
}
}

fn child_storage_hash(
&self,
id: &BlockId<Block>,
Expand Down
4 changes: 2 additions & 2 deletions node/core/approval-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
lru = "0.6"
merlin = "2.0"
schnorrkel = "0.9.1"
kvdb = "0.9.0"
kvdb = "0.10.0"
derive_more = "0.99.14"

polkadot-node-subsystem = { path = "../../subsystem" }
Expand Down Expand Up @@ -41,4 +41,4 @@ sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch =
maplit = "1.0.2"
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
assert_matches = "1.4.0"
kvdb-memorydb = "0.9.0"
kvdb-memorydb = "0.10.0"
Loading

0 comments on commit ffabf96

Please sign in to comment.