mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Make use of parity-codec "derive" crate feature (#1919)
* Make use of parity-codec "derive" crate feature * Bump impl_version * Update wasm files and Cargo.lock files * Transferred to parity_codec derive feature for the rest of the crates * Update wasm binaries and lock files * Update core and node wasm binaries
This commit is contained in:
committed by
Bastian Köcher
parent
755b53bd05
commit
128d164f2b
@@ -20,8 +20,7 @@ trie = { package = "substrate-trie", path = "../trie", optional = true }
|
||||
substrate-telemetry = { path = "../telemetry", optional = true }
|
||||
hash-db = { version = "0.11", optional = true }
|
||||
kvdb = { git = "https://github.com/paritytech/parity-common", optional = true, rev="b0317f649ab2c665b7987b8475878fc4d2e1f81d" }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
primitives = { package = "substrate-primitives", path = "../primitives", default-features = false }
|
||||
runtime-primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
|
||||
runtime-version = { package = "sr-version", path = "../sr-version", default-features = false }
|
||||
@@ -37,7 +36,6 @@ kvdb-memorydb = { git = "https://github.com/paritytech/parity-common", rev="b031
|
||||
default = ["std"]
|
||||
std = [
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"consensus",
|
||||
"primitives/std",
|
||||
"inherents/std",
|
||||
|
||||
@@ -17,8 +17,7 @@ primitives = { package = "substrate-primitives", path = "../../primitives" }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../../sr-primitives" }
|
||||
client = { package = "substrate-client", path = "../../client" }
|
||||
state-machine = { package = "substrate-state-machine", path = "../../state-machine" }
|
||||
parity-codec = "3.1"
|
||||
parity-codec-derive = "3.1"
|
||||
parity-codec = { version = "3.1", features = ["derive"] }
|
||||
executor = { package = "substrate-executor", path = "../../executor" }
|
||||
state_db = { package = "substrate-state-db", path = "../../state-db" }
|
||||
trie = { package = "substrate-trie", path = "../../trie" }
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
use client::error::Result as ClientResult;
|
||||
use runtime_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
use crate::cache::list_storage::{Storage};
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ use kvdb::{KeyValueDB, DBTransaction};
|
||||
use client::blockchain::Cache as BlockchainCache;
|
||||
use client::error::Result as ClientResult;
|
||||
use parity_codec::{Encode, Decode};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, As, AuthorityIdFor};
|
||||
use crate::utils::{self, COLUMN_META};
|
||||
|
||||
@@ -20,7 +20,7 @@ use runtime_primitives::{traits::Block as BlockT, ApplyResult, RuntimeString};
|
||||
use rstd::vec::Vec;
|
||||
use sr_api_macros::decl_runtime_apis;
|
||||
pub use inherents::{InherentData, CheckInherentsResult};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
|
||||
/// The old representation of the inherent data.
|
||||
#[doc(hide)]
|
||||
|
||||
@@ -7,8 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1.17"
|
||||
codec = { package = "parity-codec", version = "3.0" }
|
||||
parity-codec-derive = { version = "3.1" }
|
||||
codec = { package = "parity-codec", version = "3.1", features = ["derive"] }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives" }
|
||||
consensus = { package = "substrate-consensus-common", path = "../common" }
|
||||
client = { package = "substrate-client", path = "../../client" }
|
||||
|
||||
@@ -38,7 +38,6 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::time::{self, Instant, Duration};
|
||||
|
||||
use parity_codec::{Decode, Encode};
|
||||
use parity_codec_derive::{Decode, Encode};
|
||||
use consensus::offline_tracker::OfflineTracker;
|
||||
use consensus::error::{ErrorKind as CommonErrorKind};
|
||||
use consensus::{Authorities, BlockImport, Environment, Proposer as BaseProposer};
|
||||
|
||||
Generated
+1
-1
@@ -58,6 +58,7 @@ version = "3.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -186,7 +187,6 @@ dependencies = [
|
||||
"hash-db 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hash256-std-hasher 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
||||
@@ -11,8 +11,7 @@ log = "0.4"
|
||||
parking_lot = "0.7.1"
|
||||
tokio = "0.1.7"
|
||||
rand = "0.6"
|
||||
parity-codec = "3.1"
|
||||
parity-codec-derive = "3.1"
|
||||
parity-codec = { version = "3.1", features = ["derive"] }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../sr-primitives" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../consensus/common" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
|
||||
@@ -7,8 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
client = { package = "substrate-client", path = "../../client", default-features = false }
|
||||
substrate-primitives = { path = "../../primitives", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
sr-primitives = { path = "../../sr-primitives", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../sr-std", default-features = false }
|
||||
|
||||
@@ -18,7 +17,6 @@ std = [
|
||||
"substrate-primitives/std",
|
||||
"client/std",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"sr-primitives/std",
|
||||
"rstd/std",
|
||||
]
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate alloc;
|
||||
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use substrate_primitives::Ed25519AuthorityId;
|
||||
use sr_primitives::traits::{DigestFor, NumberFor};
|
||||
use client::decl_runtime_apis;
|
||||
|
||||
@@ -20,7 +20,7 @@ use fork_tree::ForkTree;
|
||||
use parking_lot::RwLock;
|
||||
use substrate_primitives::Ed25519AuthorityId;
|
||||
use grandpa::VoterSet;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use log::{debug, info};
|
||||
|
||||
use std::cmp::Ord;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::sync::Arc;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
|
||||
/// Consensus-related data changes tracker.
|
||||
#[derive(Clone, Debug, Encode, Decode)]
|
||||
|
||||
@@ -37,7 +37,6 @@ use client::{
|
||||
light::fetcher::RemoteCallRequest,
|
||||
};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use grandpa::BlockNumberOps;
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{
|
||||
|
||||
@@ -20,8 +20,7 @@ use client::{CallExecutor, Client};
|
||||
use client::backend::Backend;
|
||||
use client::blockchain::HeaderBackend;
|
||||
use client::error::{Error as ClientError, ErrorKind as ClientErrorKind};
|
||||
use parity_codec::Decode;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use grandpa::VoterSet;
|
||||
use grandpa::{Error as GrandpaError};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
|
||||
@@ -61,7 +61,6 @@ use client::{
|
||||
};
|
||||
use client::blockchain::HeaderBackend;
|
||||
use parity_codec::{Encode, Decode};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use runtime_primitives::traits::{
|
||||
NumberFor, Block as BlockT, Header as HeaderT, DigestFor, ProvideRuntimeApi, Hash as HashT,
|
||||
DigestItemFor, DigestItem,
|
||||
|
||||
@@ -7,8 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
parking_lot = { version = "0.7", optional = true }
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use parity_codec as codec;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
use rstd::{collections::btree_map::{BTreeMap, IntoIter, Entry}, vec::Vec};
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ primitives = { package = "substrate-primitives", path = "../../core/primitives"
|
||||
consensus = { package = "substrate-consensus-common", path = "../../core/consensus/common" }
|
||||
client = { package = "substrate-client", path = "../../core/client" }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitives" }
|
||||
parity-codec = "3.1"
|
||||
parity-codec-derive = "3.1"
|
||||
parity-codec = { version = "3.1", features = ["derive"] }
|
||||
network_libp2p = { package = "substrate-network-libp2p", path = "../../core/network-libp2p" }
|
||||
tokio = "0.1.11"
|
||||
keyring = { package = "substrate-keyring", path = "../../core/keyring", optional = true }
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
use bitflags::bitflags;
|
||||
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT};
|
||||
use parity_codec::{Encode, Decode, Input, Output};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
pub use self::generic::{
|
||||
BlockAnnounce, RemoteCallRequest, RemoteReadRequest,
|
||||
RemoteHeaderRequest, RemoteHeaderResponse,
|
||||
@@ -131,7 +130,6 @@ pub mod generic {
|
||||
use parity_codec::{Encode, Decode};
|
||||
use network_libp2p::{CustomMessage, CustomMessageId};
|
||||
use runtime_primitives::Justification;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::config::Roles;
|
||||
use super::{
|
||||
BlockAttributes, RemoteCallResponse, RemoteReadResponse,
|
||||
|
||||
@@ -6,8 +6,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
rustc-hex = { version = "2.0", default-features = false }
|
||||
serde = { version = "1.0", default-features = false }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Serializer, Deserialize, Deserializer};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use crate::H256;
|
||||
|
||||
/// An identifier for an authority in the consensus algorithm. The same size as ed25519::Public.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
|
||||
/// Substrate changes trie configuration.
|
||||
#[cfg_attr(any(feature = "std", test), derive(Serialize, Deserialize))]
|
||||
|
||||
@@ -23,7 +23,7 @@ use blake2_rfc;
|
||||
use ring::{rand, signature, signature::KeyPair};
|
||||
use crate::{hash::H512, Ed25519AuthorityId};
|
||||
use base58::{ToBase58, FromBase58};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{de, Serializer, Deserializer, Deserialize};
|
||||
|
||||
@@ -34,7 +34,7 @@ macro_rules! map {
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::ops::Deref;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
#[cfg(feature = "std")]
|
||||
use std::borrow::Cow;
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
|
||||
//! Definition of a sandbox environment.
|
||||
|
||||
#[cfg(test)]
|
||||
use parity_codec::Encode;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use rstd::vec::Vec;
|
||||
|
||||
/// Error error that can be returned from host function.
|
||||
|
||||
@@ -23,7 +23,7 @@ use blake2_rfc;
|
||||
use rand::rngs::OsRng;
|
||||
use schnorrkel::{signing_context, Keypair, MiniSecretKey, PublicKey};
|
||||
use sha2::Sha512;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use crate::hash::H512;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
@@ -9,8 +9,7 @@ num-traits = { version = "0.2", default-features = false }
|
||||
integer-sqrt = { version = "0.1.2" }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
substrate-primitives = { path = "../primitives", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
runtime_io = { package = "sr-io", path = "../sr-io", default-features = false }
|
||||
|
||||
@@ -23,8 +23,7 @@ use std::fmt;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::Codec;
|
||||
use crate::codec::{Codec, Encode, Decode};
|
||||
use crate::traits::{self, Member, Block as BlockT, Header as HeaderT, MaybeSerialize};
|
||||
use crate::Justification;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
use serde_derive::Serialize;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
|
||||
use crate::codec::{Decode, Encode, Codec, Input};
|
||||
use crate::traits::{self, Member, DigestItem as DigestItemT, MaybeHash};
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
use std::fmt;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Decode, Encode, Codec, Input, HasCompact};
|
||||
use crate::traits::{self, Member, SimpleArithmetic, MaybeDisplay, Lookup, Extrinsic};
|
||||
use super::CheckedExtrinsic;
|
||||
|
||||
@@ -190,7 +190,7 @@ impl<Address, Index, Call, Signature> fmt::Debug for UncheckedMortalCompactExtri
|
||||
mod tests {
|
||||
use super::*;
|
||||
use runtime_io::blake2_256;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
|
||||
struct TestContext;
|
||||
|
||||
@@ -189,7 +189,7 @@ impl<Address, Index, Call, Signature> fmt::Debug for UncheckedMortalExtrinsic<Ad
|
||||
mod tests {
|
||||
use super::*;
|
||||
use runtime_io::blake2_256;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
|
||||
struct TestContext;
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::collections::HashMap;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use substrate_primitives::hash::{H256, H512};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use substrate_primitives::hexdisplay::ascii_format;
|
||||
@@ -585,8 +585,7 @@ impl traits::Extrinsic for OpaqueExtrinsic {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use substrate_primitives::hash::H256;
|
||||
use crate::codec::{Encode as EncodeHidden, Decode as DecodeHidden};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use crate::traits::DigestItem;
|
||||
|
||||
pub trait RuntimeT {
|
||||
@@ -601,7 +600,7 @@ mod tests {
|
||||
|
||||
mod a {
|
||||
use super::RuntimeT;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use serde_derive::Serialize;
|
||||
pub type Log<R> = RawLog<<R as RuntimeT>::AuthorityId>;
|
||||
|
||||
@@ -611,7 +610,7 @@ mod tests {
|
||||
|
||||
mod b {
|
||||
use super::RuntimeT;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use serde_derive::Serialize;
|
||||
pub type Log<R> = RawLog<<R as RuntimeT>::AuthorityId>;
|
||||
|
||||
@@ -630,24 +629,24 @@ mod tests {
|
||||
// encode/decode regular item
|
||||
let b1: Log = b::RawLog::B1::<u64>(777).into();
|
||||
let encoded_b1 = b1.encode();
|
||||
let decoded_b1: Log = DecodeHidden::decode(&mut &encoded_b1[..]).unwrap();
|
||||
let decoded_b1: Log = Decode::decode(&mut &encoded_b1[..]).unwrap();
|
||||
assert_eq!(b1, decoded_b1);
|
||||
|
||||
// encode/decode system item
|
||||
let auth_change: Log = a::RawLog::AuthoritiesChange::<u64>(vec![100, 200, 300]).into();
|
||||
let encoded_auth_change = auth_change.encode();
|
||||
let decoded_auth_change: Log = DecodeHidden::decode(&mut &encoded_auth_change[..]).unwrap();
|
||||
let decoded_auth_change: Log = Decode::decode(&mut &encoded_auth_change[..]).unwrap();
|
||||
assert_eq!(auth_change, decoded_auth_change);
|
||||
|
||||
// interpret regular item using `generic::DigestItem`
|
||||
let generic_b1: super::generic::DigestItem<H256, u64> = DecodeHidden::decode(&mut &encoded_b1[..]).unwrap();
|
||||
let generic_b1: super::generic::DigestItem<H256, u64> = Decode::decode(&mut &encoded_b1[..]).unwrap();
|
||||
match generic_b1 {
|
||||
super::generic::DigestItem::Other(_) => (),
|
||||
_ => panic!("unexpected generic_b1: {:?}", generic_b1),
|
||||
}
|
||||
|
||||
// interpret system item using `generic::DigestItem`
|
||||
let generic_auth_change: super::generic::DigestItem<H256, u64> = DecodeHidden::decode(&mut &encoded_auth_change[..]).unwrap();
|
||||
let generic_auth_change: super::generic::DigestItem<H256, u64> = Decode::decode(&mut &encoded_auth_change[..]).unwrap();
|
||||
match generic_auth_change {
|
||||
super::generic::DigestItem::AuthoritiesChange::<H256, u64>(authorities) => assert_eq!(authorities, vec![100, 200, 300]),
|
||||
_ => panic!("unexpected generic_auth_change: {:?}", generic_auth_change),
|
||||
|
||||
@@ -24,13 +24,12 @@ use std::{fmt::Debug, ops::Deref, fmt};
|
||||
use crate::codec::{Codec, Encode, Decode};
|
||||
use crate::traits::{self, Checkable, Applyable, BlakeTwo256, Convert};
|
||||
use crate::generic::DigestItem as GenDigestItem;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
|
||||
pub use substrate_primitives::{H256, Ed25519AuthorityId};
|
||||
use substrate_primitives::U256;
|
||||
|
||||
/// Authority Id
|
||||
#[derive(Default, PartialEq, Eq, Clone, Decode, Encode, Debug)]
|
||||
#[derive(Default, PartialEq, Eq, Clone, Encode, Decode, Debug)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
pub struct UintAuthorityId(pub u64);
|
||||
impl Into<Ed25519AuthorityId> for UintAuthorityId {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Transaction validity interface.
|
||||
|
||||
use rstd::prelude::*;
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
|
||||
/// Priority for a transaction. Additive. Higher is better.
|
||||
pub type TransactionPriority = u64;
|
||||
|
||||
@@ -8,8 +8,7 @@ edition = "2018"
|
||||
impl-serde = { version = "0.1", optional = true }
|
||||
serde = { version = "1.0", default-features = false }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
runtime_primitives = { package = "sr-primitives", path = "../sr-primitives", default-features = false }
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ use std::collections::HashSet;
|
||||
#[cfg(feature = "std")]
|
||||
use runtime_primitives::traits::RuntimeApiInfo;
|
||||
|
||||
use parity_codec::Encode;
|
||||
#[cfg(feature = "std")]
|
||||
use parity_codec::Decode;
|
||||
use runtime_primitives::RuntimeString;
|
||||
pub use runtime_primitives::create_runtime_str;
|
||||
|
||||
@@ -59,8 +62,8 @@ macro_rules! create_apis_vec {
|
||||
/// This triplet have different semantics and mis-interpretation could cause problems.
|
||||
/// In particular: bug fixes should result in an increment of `spec_version` and possibly `authoring_version`,
|
||||
/// absolutely not `impl_version` since they change the semantics of the runtime.
|
||||
#[derive(Clone, PartialEq, Eq, parity_codec_derive::Encode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Serialize, parity_codec_derive::Decode))]
|
||||
#[derive(Clone, PartialEq, Eq, Encode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Serialize, Decode))]
|
||||
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
|
||||
pub struct RuntimeVersion {
|
||||
/// Identifies the different Substrate runtimes. There'll be at least polkadot and node.
|
||||
|
||||
@@ -8,8 +8,7 @@ edition = "2018"
|
||||
parking_lot = "0.7.1"
|
||||
log = "0.4"
|
||||
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
|
||||
parity-codec = "3.1"
|
||||
parity-codec-derive = "3.1"
|
||||
parity-codec = { version = "3.1", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.6"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
use std::fmt;
|
||||
use std::collections::{HashMap, VecDeque, hash_map::Entry};
|
||||
use super::{Error, DBValue, ChangeSet, CommitSet, MetaDb, Hash, to_meta_key};
|
||||
use crate::codec::{Decode, Encode};
|
||||
use parity_codec_derive::{Decode, Encode};
|
||||
use crate::codec::{Encode, Decode};
|
||||
use log::trace;
|
||||
|
||||
const NON_CANONICAL_JOURNAL: &[u8] = b"noncanonical_journal";
|
||||
|
||||
@@ -26,7 +26,6 @@ use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::mem;
|
||||
use crate::codec::{Encode, Decode};
|
||||
use crate::{CommitSet, Error, MetaDb, to_meta_key, Hash};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
use log::{trace, warn};
|
||||
|
||||
const LAST_PRUNED: &[u8] = b"last_pruned";
|
||||
|
||||
@@ -9,8 +9,7 @@ log = { version = "0.4", optional = true }
|
||||
hex-literal = { version = "0.1.0", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "3.1", default-features = false }
|
||||
parity-codec-derive = { version = "3.1", default-features = false }
|
||||
parity-codec = { version = "3.1", default-features = false, features = ["derive"] }
|
||||
keyring = { package = "substrate-keyring", path = "../keyring", optional = true }
|
||||
substrate-client = { path = "../client", default-features = false }
|
||||
primitives = { package = "substrate-primitives", path = "../primitives", default-features = false }
|
||||
|
||||
@@ -23,7 +23,6 @@ pub mod system;
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use parity_codec::{Encode, Decode, Input};
|
||||
use parity_codec_derive::{Encode, Decode};
|
||||
|
||||
use substrate_client::{
|
||||
runtime_api as client_api, block_builder::api as block_builder_api, decl_runtime_apis,
|
||||
|
||||
+1
-8
@@ -704,6 +704,7 @@ version = "3.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@@ -1179,7 +1180,6 @@ dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
@@ -1200,7 +1200,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-primitives 0.1.0",
|
||||
@@ -1212,7 +1211,6 @@ name = "srml-metadata"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-std 0.1.0",
|
||||
@@ -1226,7 +1224,6 @@ dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"paste 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1292,7 +1289,6 @@ dependencies = [
|
||||
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-api-macros 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
@@ -1361,7 +1357,6 @@ name = "substrate-inherents"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-std 0.1.0",
|
||||
@@ -1396,7 +1391,6 @@ dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"primitive-types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ring 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1461,7 +1455,6 @@ dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
|
||||
BIN
Binary file not shown.
@@ -5,5 +5,4 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
parity-codec = "3.1"
|
||||
parity-codec-derive = "3.1"
|
||||
parity-codec = { version = "3.1", features = ["derive"] }
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use std::fmt;
|
||||
use parity_codec_derive::{Decode, Encode};
|
||||
use parity_codec::{Decode, Encode};
|
||||
|
||||
/// Error occured when interating with the tree.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user