Unverified Commit 31fb8fed authored by Andronik Ordian's avatar Andronik Ordian Committed by GitHub
Browse files

update most of the dependencies (#1946)

* update tiny-keccak to 0.2

* update deps except bitvec and shared_memory

* fix some warning after futures upgrade

* remove useless package rename caused by bug in cargo-upgrade

* revert parity-util-mem *

* remove unused import

* cargo update

* remove all renames on parity-scale-codec

* remove the leftovers

* remove unused dep
parent 120d5dde
......@@ -22,7 +22,7 @@
use std::{any::{TypeId, Any}, path::PathBuf};
use crate::primitives::{ValidationParams, ValidationResult};
use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use sp_core::{storage::{ChildInfo, TrackedStorageKey}, traits::{CallInWasm, SpawnNamed}};
use sp_externalities::Extensions;
use sp_wasm_interface::HostFunctions as _;
......
......@@ -17,7 +17,7 @@
#![cfg(not(any(target_os = "android", target_os = "unknown")))]
use std::{process, env, sync::Arc, sync::atomic, path::PathBuf};
use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use crate::primitives::{ValidationParams, ValidationResult};
use super::{
validate_candidate_internal, ValidationError, InvalidCandidate, InternalError,
......
......@@ -6,8 +6,8 @@ description = "Integration tests using the test-parachains"
edition = "2018"
[dependencies]
tiny-keccak = "1.5.0"
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
tiny-keccak = "2.0.2"
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
parachain = { package = "polkadot-parachain", path = ".." }
adder = { package = "test-parachain-adder", path = "adder" }
......
......@@ -8,9 +8,9 @@ build = "build.rs"
[dependencies]
parachain = { package = "polkadot-parachain", path = "../../", default-features = false, features = [ "wasm-api" ] }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
tiny-keccak = "1.5.0"
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
dlmalloc = { version = "0.1.3", features = [ "global" ] }
# We need to make sure the global allocator is disabled until we have support of full substrate externalities
......
......@@ -10,11 +10,11 @@ name = "adder-collator"
path = "src/main.rs"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
futures = "0.3.4"
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
futures = "0.3.8"
futures-timer = "3.0.2"
log = "0.4.8"
structopt = "0.3.8"
log = "0.4.11"
structopt = "0.3.20"
test-parachain-adder = { path = ".." }
polkadot-primitives = { path = "../../../../primitives" }
......
......@@ -21,7 +21,7 @@ use test_parachain_adder::{hash_state, BlockData, HeadData, execute};
use futures_timer::Delay;
use polkadot_primitives::v1::{PoV, CollatorId, CollatorPair};
use polkadot_node_primitives::{Collation, CollatorFn};
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
use sp_core::Pair;
/// The amount we add when producing a new block.
......@@ -168,7 +168,7 @@ mod tests {
use futures::executor::block_on;
use polkadot_parachain::{primitives::ValidationParams, wasm_executor::IsolationStrategy};
use polkadot_primitives::v1::{ValidationData, PersistedValidationData};
use codec::Decode;
use parity_scale_codec::Decode;
#[test]
fn collator_works() {
......
......@@ -20,7 +20,8 @@
#![cfg_attr(not(feature = "std"), feature(core_intrinsics, lang_items, core_panic_info, alloc_error_handler))]
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
use tiny_keccak::{Hasher as _, Keccak};
#[cfg(not(feature = "std"))]
mod wasm_validation;
......@@ -33,6 +34,14 @@ static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
fn keccak256(input: &[u8]) -> [u8; 32] {
let mut out = [0u8; 32];
let mut keccak256 = Keccak::v256();
keccak256.update(input);
keccak256.finalize(&mut out);
out
}
/// Wasm binary unwrapped. If built with `BUILD_DUMMY_WASM_BINARY`, the function panics.
#[cfg(feature = "std")]
pub fn wasm_binary_unwrap() -> &'static [u8] {
......@@ -53,7 +62,7 @@ pub struct HeadData {
impl HeadData {
pub fn hash(&self) -> [u8; 32] {
tiny_keccak::keccak256(&self.encode())
keccak256(&self.encode())
}
}
......@@ -67,7 +76,7 @@ pub struct BlockData {
}
pub fn hash_state(state: u64) -> [u8; 32] {
tiny_keccak::keccak256(state.encode().as_slice())
keccak256(state.encode().as_slice())
}
/// Start state mismatched with parent header's state hash.
......
......@@ -20,7 +20,7 @@ use crate::{HeadData, BlockData};
use core::panic;
use sp_std::vec::Vec;
use parachain::primitives::{ValidationResult, HeadData as GenericHeadData};
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
#[no_mangle]
pub extern "C" fn validate_block(params: *const u8, len: usize) -> u64 {
......@@ -31,7 +31,7 @@ pub extern "C" fn validate_block(params: *const u8, len: usize) -> u64 {
let block_data = BlockData::decode(&mut &params.block_data.0[..])
.expect("invalid block data format.");
let parent_hash = tiny_keccak::keccak256(&params.parent_head.0[..]);
let parent_hash = crate::keccak256(&params.parent_head.0[..]);
let new_head = crate::execute(parent_hash, parent_head, &block_data).expect("Executes block");
parachain::write_result(
......
......@@ -27,7 +27,7 @@ use parachain::{
},
wasm_executor::{ValidationPool, IsolationStrategy}
};
use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use adder::{HeadData, BlockData, hash_state};
fn isolation_strategy() -> IsolationStrategy {
......
......@@ -5,8 +5,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
serde = { version = "1.0.102", optional = true, features = ["derive"] }
parity-scale-codec = { version = "1.3.4", default-features = false, features = ["bit-vec", "derive"] }
serde = { version = "1.0.117", optional = true, features = ["derive"] }
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["bit-vec", "derive"] }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
application-crypto = { package = "sp-application-crypto", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
......@@ -26,7 +26,7 @@ frame-system = { git = "https://github.com/paritytech/substrate", branch = "mast
[dev-dependencies]
sp-serializer = { git = "https://github.com/paritytech/substrate", branch = "master" }
pretty_assertions = "0.5.1"
pretty_assertions = "0.6.1"
[features]
default = ["std"]
......
......@@ -26,5 +26,5 @@ sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch =
txpool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
parity-scale-codec = { version = "1.3.5", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
......@@ -6,11 +6,11 @@ edition = "2018"
[dependencies]
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
log = { version = "0.3.9", optional = true }
rustc-hex = { version = "2.0.1", default-features = false }
serde = { version = "1.0.102", default-features = false }
serde_derive = { version = "1.0.102", optional = true }
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
log = { version = "0.4.11", optional = true }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.117", default-features = false }
serde_derive = { version = "1.0.117", optional = true }
static_assertions = "1.1.0"
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
......@@ -36,11 +36,11 @@ pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "m
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
libsecp256k1 = { version = "0.3.2", default-features = false, optional = true }
libsecp256k1 = { version = "0.3.5", default-features = false, optional = true }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
[dev-dependencies]
hex-literal = "0.2.1"
hex-literal = "0.3.1"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
......@@ -48,16 +48,16 @@ sp-application-crypto = { git = "https://github.com/paritytech/substrate", branc
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie-db = "0.22.0"
serde_json = "1.0.41"
libsecp256k1 = "0.3.2"
trie-db = "0.22.1"
serde_json = "1.0.59"
libsecp256k1 = "0.3.5"
[features]
default = ["std"]
no_std = []
std = [
"bitvec/std",
"codec/std",
"parity-scale-codec/std",
"log",
"rustc-hex/std",
"serde_derive",
......
......@@ -23,7 +23,7 @@ use frame_support::{
traits::{Currency, Get, VestingSchedule, EnsureOrigin, IsSubType}, weights::{Pays, DispatchClass}
};
use frame_system::{ensure_signed, ensure_root, ensure_none};
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
#[cfg(feature = "std")]
use serde::{self, Serialize, Deserialize, Serializer, Deserializer};
#[cfg(feature = "std")]
......@@ -633,7 +633,7 @@ mod tests {
use secp_utils::*;
use sp_core::H256;
use codec::Encode;
use parity_scale_codec::Encode;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup, Identity}, testing::Header};
......
......@@ -77,7 +77,7 @@ use sp_runtime::{ModuleId,
traits::{AccountIdConversion, Hash, Saturating, Zero, CheckedAdd}
};
use crate::slots;
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
use sp_std::vec::Vec;
use primitives::v1::{Id as ParaId, HeadData};
......
......@@ -16,7 +16,7 @@
//! Module to process purchase of DOTs.
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
use sp_runtime::{Permill, RuntimeDebug, DispatchResult, DispatchError, AnySignature};
use sp_runtime::traits::{Zero, CheckedAdd, Verify, Saturating};
use frame_support::{decl_event, decl_storage, decl_module, decl_error, ensure};
......
......@@ -19,7 +19,7 @@
use sp_std::{result, ops::Add, convert::{TryFrom, TryInto}};
use sp_runtime::traits::CheckedSub;
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
/// Total number of possible sub ranges of slots.
pub const SLOT_RANGE_COUNT: usize = 10;
......
......@@ -22,7 +22,7 @@ use sp_std::{prelude::*, mem::swap, convert::TryInto};
use sp_runtime::traits::{
CheckedSub, StaticLookup, Zero, One, CheckedConversion, Hash, AccountIdConversion,
};
use codec::{Encode, Decode, Codec};
use parity_scale_codec::{Encode, Decode, Codec};
use frame_support::{
decl_module, decl_storage, decl_event, decl_error, ensure, dispatch::DispatchResult,
traits::{Currency, ReservableCurrency, WithdrawReasons, ExistenceRequirement, Get, Randomness},
......
......@@ -7,13 +7,13 @@ build = "build.rs"
[dependencies]
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
log = { version = "0.3.9", optional = true }
rustc-hex = { version = "2.0.1", default-features = false }
serde = { version = "1.0.102", default-features = false }
serde_derive = { version = "1.0.102", optional = true }
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
log = { version = "0.4.11", optional = true }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.117", default-features = false }
serde_derive = { version = "1.0.117", optional = true }
static_assertions = "1.1.0"
smallvec = "1.4.1"
smallvec = "1.4.2"
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
......@@ -68,19 +68,19 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch =
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
hex-literal = { version = "0.2.1", optional = true }
hex-literal = { version = "0.3.1", optional = true }
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
[dev-dependencies]
hex-literal = "0.2.1"
libsecp256k1 = "0.3.2"
tiny-keccak = "1.5.0"
hex-literal = "0.3.1"
libsecp256k1 = "0.3.5"
tiny-keccak = "2.0.2"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
separator = "0.4.1"
serde_json = "1.0.41"
serde_json = "1.0.59"
[build-dependencies]
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "2.0.0" }
......@@ -95,7 +95,7 @@ std = [
"bitvec/std",
"primitives/std",
"rustc-hex/std",
"codec/std",
"parity-scale-codec/std",
"inherents/std",
"sp-core/std",
"sp-api/std",
......
......@@ -24,7 +24,7 @@ use pallet_transaction_payment::CurrencyAdapter;
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use sp_core::u32_trait::{_1, _2, _3, _5};
use codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
CoreState, GroupRotationInfo, Hash, Id, Moment, Nonce, OccupiedCoreAssumption,
......@@ -1149,7 +1149,7 @@ sp_api::impl_runtime_apis! {
_set_id: fg_primitives::SetId,
authority_id: fg_primitives::AuthorityId,
) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
use codec::Encode;
use parity_scale_codec::Encode;
Historical::prove((fg_primitives::KEY_TYPE, authority_id))
.map(|p| p.encode())
......@@ -1182,7 +1182,7 @@ sp_api::impl_runtime_apis! {
_slot_number: babe_primitives::SlotNumber,
authority_id: babe_primitives::AuthorityId,
) -> Option<babe_primitives::OpaqueKeyOwnershipProof> {
use codec::Encode;
use parity_scale_codec::Encode;
Historical::prove((babe_primitives::KEY_TYPE, authority_id))
.map(|p| p.encode())
......@@ -1304,7 +1304,7 @@ mod test_fees {
use frame_support::storage::StorageValue;
use sp_runtime::FixedPointNumber;
use frame_support::weights::GetDispatchInfo;
use codec::Encode;
use parity_scale_codec::Encode;
use pallet_transaction_payment::Multiplier;
use separator::Separatable;
......
......@@ -6,11 +6,11 @@ edition = "2018"
[dependencies]
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "1.3.5", default-features = false, features = ["derive"] }
log = "0.4.11"
rustc-hex = { version = "2.0.1", default-features = false }
serde = { version = "1.0.102", features = [ "derive" ], optional = true }
derive_more = { version = "0.99.11" }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.117", features = [ "derive" ], optional = true }
derive_more = "0.99.11"
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
......@@ -36,14 +36,14 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch =
xcm = { package = "xcm", path = "../../xcm", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
libsecp256k1 = { version = "0.3.2", default-features = false, optional = true }
libsecp256k1 = { version = "0.3.5", default-features = false, optional = true }
rand = { version = "0.7", default-features = false }
rand = { version = "0.7.3", default-features = false }
rand_chacha = { version = "0.2.2", default-features = false }
[dev-dependencies]
futures = "0.3.4"
hex-literal = "0.2.1"
futures = "0.3.8"
hex-literal = "0.3.1"
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
......@@ -51,8 +51,8 @@ sp-application-crypto = { git = "https://github.com/paritytech/substrate", branc
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" }
serde_json = "1.0.41"
libsecp256k1 = "0.3.2"
serde_json = "1.0.59"
libsecp256k1 = "0.3.5"
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master"}
......@@ -62,7 +62,7 @@ default = ["std"]
no_std = []
std = [
"bitvec/std",
"codec/std",
"parity-scale-codec/std",
"rustc-hex/std",
"serde",
"primitives/std",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment