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

Commit 4922db4

Browse files
committed
Merge branch 'master' into dp/make-CallExecutors-generic-over-hasher-and-rlpcodec
* master: Revert "Install llvm-tools-preview component (#643)" (#644) Revert "fix wasm executor compile error (#631)" (#642) Fetch parity-common dependencies from crates (#617) limit retry count in OnDemand (#513) Minor refactor for staking module (#659)
2 parents 1c0b385 + 5a480d9 commit 4922db4

File tree

24 files changed

+509
-452
lines changed

24 files changed

+509
-452
lines changed

Cargo.lock

Lines changed: 204 additions & 221 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ build it. Ensure you have Rust and the support software installed:
120120
curl https://sh.rustup.rs -sSf | sh
121121
rustup update nightly
122122
rustup target add wasm32-unknown-unknown --toolchain nightly
123-
rustup component add llvm-tools-preview --toolchain=nightly
124123
rustup update stable
125124
cargo install --git https://github.com/alexcrichton/wasm-gc
126125
sudo apt install cmake pkg-config libssl-dev git

demo/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ error-chain = "0.12"
1414
hex-literal = "0.1"
1515
log = "0.3"
1616
tokio = "0.1.7"
17-
triehash = { git = "https://github.com/paritytech/parity-common" }
17+
triehash = "0.2"
1818
substrate-client = { path = "../../substrate/client" }
1919
substrate-codec = { path = "../../substrate/codec" }
2020
substrate-extrinsic-pool = { path = "../../substrate/extrinsic-pool" }

demo/executor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "Substrate Demo node implementation in Rust."
66

77
[dependencies]
88
hex-literal = "0.1"
9-
triehash = { git = "https://github.com/paritytech/parity-common" }
9+
triehash = "0.2"
1010
ed25519 = { path = "../../substrate/ed25519" }
1111
substrate-codec = { path = "../../substrate/codec" }
1212
substrate-runtime-io = { path = "../../substrate/runtime-io" }

demo/runtime/wasm/Cargo.lock

Lines changed: 47 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/init.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ if [ -z $CI_PROJECT_NAME ] ; then
1010
fi
1111

1212
rustup target add wasm32-unknown-unknown --toolchain nightly
13-
rustup component add llvm-tools-preview --toolchain=nightly
1413

1514
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
1615
command -v wasm-gc || \

substrate/client/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ error-chain = "0.12"
88
fnv = "1.0"
99
log = "0.3"
1010
parking_lot = "0.4"
11+
triehash = "0.2"
1112
hex-literal = "0.1"
1213
futures = "0.1.17"
1314
ed25519 = { path = "../ed25519" }
@@ -23,10 +24,9 @@ substrate-runtime-primitives = { path = "../runtime/primitives" }
2324
substrate-state-machine = { path = "../state-machine" }
2425
substrate-keyring = { path = "../../substrate/keyring" }
2526
substrate-telemetry = { path = "../telemetry" }
26-
hashdb = { git = "https://github.com/paritytech/parity-common" }
27-
patricia-trie = { git = "https://github.com/paritytech/parity-common" }
28-
rlp = { git = "https://github.com/paritytech/parity-common", default-features = false }
29-
triehash = { git = "https://github.com/paritytech/parity-common" }
27+
hashdb = "0.2.1"
28+
patricia-trie = "0.2.1"
29+
rlp = "0.2.4"
3030

3131
[dev-dependencies]
3232
substrate-test-client = { path = "../test-client" }

substrate/client/db/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ authors = ["Parity Technologies <[email protected]>"]
66
[dependencies]
77
parking_lot = "0.4"
88
log = "0.3"
9-
kvdb = { git = "https://github.com/paritytech/parity-common" }
10-
kvdb-rocksdb = { git = "https://github.com/paritytech/parity-common" }
11-
hashdb = { git = "https://github.com/paritytech/parity-common" }
12-
memorydb = { git = "https://github.com/paritytech/parity-common" }
9+
kvdb = "0.1"
10+
kvdb-rocksdb = "0.1.3"
11+
hashdb = "0.2.1"
12+
memorydb = "0.2.1"
1313
substrate-primitives = { path = "../../../substrate/primitives" }
1414
substrate-runtime-primitives = { path = "../../../substrate/runtime/primitives" }
1515
substrate-client = { path = "../../../substrate/client" }
@@ -21,4 +21,4 @@ substrate-executor = { path = "../../../substrate/executor" }
2121
substrate-state-db = { path = "../../../substrate/state-db" }
2222

2323
[dev-dependencies]
24-
kvdb-memorydb = { git = "https://github.com/paritytech/parity-common" }
24+
kvdb-memorydb = "0.1"

substrate/client/src/light/backend.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ impl<Block, S, F, H, C> StateBackend<H, C> for OnDemandState<Block, S, F>
196196
block: self.block,
197197
header: header.expect("if block above guarantees that header is_some(); qed"),
198198
key: key.to_vec(),
199+
retry_count: None,
199200
})
200201
.into_future().wait()
201202
}

substrate/client/src/light/blockchain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl<S, F, Block> BlockchainHeaderBackend<Block> for Blockchain<S, F> where Bloc
101101
.remote_header(RemoteHeaderRequest {
102102
cht_root: self.storage.cht_root(cht::SIZE, number)?,
103103
block: number,
104+
retry_count: None,
104105
})
105106
.into_future().wait()
106107
.map(Some)

substrate/client/src/light/call_executor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ where
7878
header: block_header,
7979
method: method.into(),
8080
call_data: call_data.to_vec(),
81+
retry_count: None,
8182
}).into_future().wait()
8283
}
8384

@@ -173,6 +174,7 @@ mod tests {
173174
},
174175
method: "authorities".into(),
175176
call_data: vec![],
177+
retry_count: None,
176178
}, remote_execution_proof).unwrap();
177179
}
178180
}

substrate/client/src/light/fetcher.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub struct RemoteCallRequest<Header: HeaderT> {
4343
pub method: String,
4444
/// Call data.
4545
pub call_data: Vec<u8>,
46+
/// Number of times to retry request. None means that default RETRY_COUNT is used.
47+
pub retry_count: Option<usize>,
4648
}
4749

4850
/// Remote canonical header request.
@@ -52,6 +54,8 @@ pub struct RemoteHeaderRequest<Header: HeaderT> {
5254
pub cht_root: Header::Hash,
5355
/// Number of the header to query.
5456
pub block: Header::Number,
57+
/// Number of times to retry request. None means that default RETRY_COUNT is used.
58+
pub retry_count: Option<usize>,
5559
}
5660

5761
/// Remote storage read request.
@@ -63,6 +67,8 @@ pub struct RemoteReadRequest<Header: HeaderT> {
6367
pub header: Header,
6468
/// Storage key to read.
6569
pub key: Vec<u8>,
70+
/// Number of times to retry request. None means that default RETRY_COUNT is used.
71+
pub retry_count: Option<usize>,
6672
}
6773

6874
/// Light client data fetcher. Implementations of this trait must check if remote data
@@ -264,6 +270,7 @@ pub mod tests {
264270
block: remote_block_header.hash(),
265271
header: remote_block_header,
266272
key: b":auth:len".to_vec(),
273+
retry_count: None,
267274
}, remote_read_proof).unwrap().unwrap()[0], authorities_len as u8);
268275
}
269276

@@ -273,6 +280,7 @@ pub mod tests {
273280
assert_eq!((&local_checker as &FetchChecker<Block>).check_header_proof(&RemoteHeaderRequest::<Header> {
274281
cht_root: local_cht_root,
275282
block: 1,
283+
retry_count: None,
276284
}, Some(remote_block_header.clone()), remote_header_proof).unwrap(), remote_block_header);
277285
}
278286

@@ -283,6 +291,7 @@ pub mod tests {
283291
assert!((&local_checker as &FetchChecker<Block>).check_header_proof(&RemoteHeaderRequest::<Header> {
284292
cht_root: Default::default(),
285293
block: 1,
294+
retry_count: None,
286295
}, Some(remote_block_header.clone()), remote_header_proof).is_err());
287296
}
288297

@@ -293,6 +302,7 @@ pub mod tests {
293302
assert!((&local_checker as &FetchChecker<Block>).check_header_proof(&RemoteHeaderRequest::<Header> {
294303
cht_root: local_cht_root,
295304
block: 1,
305+
retry_count: None,
296306
}, Some(remote_block_header.clone()), remote_header_proof).is_err());
297307
}
298308
}

substrate/executor/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ serde = "1.0"
1616
serde_derive = "1.0"
1717
wasmi = "0.4"
1818
byteorder = "1.1"
19-
triehash = { git = "https://github.com/paritytech/parity-common" }
19+
triehash = "0.2"
2020
twox-hash = "1.1.0"
2121
lazy_static = "1.0"
2222
parking_lot = "*"
2323
log = "0.3"
24-
hashdb = { git = "https://github.com/paritytech/parity-common" }
24+
hashdb = "0.2.1"
2525
tiny-keccak = "1.4"
2626

2727
[dev-dependencies]

substrate/executor/wasm/Cargo.lock

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

substrate/keystore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = ["Parity Technologies <[email protected]>"]
55

66
[dependencies]
7-
parity-crypto = { git = "https://github.com/paritytech/parity-common", default_features = false }
7+
parity-crypto = { version = "0.1", default_features = false }
88
ed25519 = { path = "../ed25519" }
99
error-chain = "0.12"
1010
hex = "0.3"

substrate/network-libp2p/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ unsigned-varint = { version = "0.2", features = ["codec"] }
2929

3030
[dev-dependencies]
3131
assert_matches = "1.2"
32-
parity-bytes = { git = "https://github.com/paritytech/parity-common" }
32+
parity-bytes = "0.1"
3333
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
3434
ethcore-logger = { git = "https://github.com/paritytech/parity.git" }

0 commit comments

Comments
 (0)