mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +00:00
Upgrade dependencies whenever “easy” (#3556)
* Update all dependencies * Upgrade dependencies whenever “easy” “easy” means that there are no major changes required. * Fix build and bump paste dependency to 0.1.6 * Remove dead code * Re-add = dependency for futures-preview * Add missing std features for runtime-io * Remove git dependencies as updated versions have been published to crates.io * try to debug bug * For sr-io, "std" should imply "no_oom" and "no_panic_handler". Otherwise, rustc complains (correctly) about duplicate lang items. * Add missing "runtime-io/std" features * Fix compilation errors * Prevent duplicate lang items Rust does not allow duplicate lang items. When compiled without the `std` feature, `sr-io` defines two lang items. Therefore, `sr-io` compiled without `feature = "std"` must not be linked with `std`. However, `pwasm-utils` and `wasmi-validation` both bring in `std` unless compiled with `default-features = "false"`. This caused a duplicate lang item error. Building both with `default-features = "false"` prevents this error. When building with `feature = "std"`, they should both be built with the `std` feature, so this feature needs to be explicitly depended on. * Bump `impl_version` * Make tests pass Three tests used 1 less gas than they had previously. * Try to un-break build * Add a Cargo.lock file * Revert offchain code * Revert "Revert offchain code" This reverts commit d216d08cc6ca0344614669c1d24cde3aa5c0d4e2. * Don’t try to send a body with a GET request without adding a Transfer-Encoding or Content-Length header. This has always been wrong, but hyperium/hyper#1925 hid the bug until hyper was upgraded to 0.12.35. * Change some more GET requests to POST requests * Fix excess line width and remove an `extern crate` * Delete commented-out extern crate Co-Authored-By: Sergei Pepyakin <sergei@parity.io> * Fix regression in Cargo.toml files dev-dependencies need `default-features = false`, too. * Bump parity-wasm dependency * Bump `futures-preview` * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update Cargo.lock files * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update core/service/src/chain_ops.rs Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
This commit is contained in:
@@ -7,37 +7,37 @@ edition = "2018"
|
||||
[dependencies]
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
rustc-hex = { version = "2.0", default-features = false }
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
twox-hash = { version = "1.2.0", optional = true }
|
||||
byteorder = { version = "1.3.1", default-features = false }
|
||||
rustc-hex = { version = "2.0.1", default-features = false }
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
twox-hash = { version = "1.5.0", optional = true }
|
||||
byteorder = { version = "1.3.2", default-features = false }
|
||||
primitive-types = { version = "0.5.1", default-features = false, features = ["codec"] }
|
||||
impl-serde = { version = "0.1", optional = true }
|
||||
log = { version = "0.4", optional = true }
|
||||
wasmi = { version = "0.5.0", optional = true }
|
||||
impl-serde = { version = "0.2.1", optional = true }
|
||||
log = { version = "0.4.8", optional = true }
|
||||
wasmi = { version = "0.5.1", optional = true }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
hash256-std-hasher = { version = "0.15.2", default-features = false }
|
||||
ed25519-dalek = { version = "1.0.0-pre.1", optional = true }
|
||||
base58 = { version = "0.1", optional = true }
|
||||
ed25519-dalek = { version = "0.9.1", optional = true }
|
||||
base58 = { version = "0.1.0", optional = true }
|
||||
blake2-rfc = { version = "0.2.18", optional = true }
|
||||
schnorrkel = { version = "0.8.4", features = ["preaudit_deprecated"], optional = true }
|
||||
rand = { version = "0.6", optional = true }
|
||||
sha2 = { version = "0.8", optional = true }
|
||||
schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true }
|
||||
rand = { version = "0.7.2", optional = true }
|
||||
sha2 = { version = "0.8.0", optional = true }
|
||||
substrate-bip39 = { version = "0.3.1", optional = true }
|
||||
tiny-bip39 = { version = "0.6.1", optional = true }
|
||||
hex = { version = "0.3", optional = true }
|
||||
regex = { version = "1.1", optional = true }
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
zeroize = { version = "0.9.2", default-features = false }
|
||||
lazy_static = { version = "1.3", optional = true }
|
||||
tiny-bip39 = { version = "0.6.2", optional = true }
|
||||
hex = { version = "0.3.2", optional = true }
|
||||
regex = { version = "1.3.1", optional = true }
|
||||
num-traits = { version = "0.2.8", default-features = false }
|
||||
zeroize = "0.10.1"
|
||||
lazy_static = { version = "1.4.0", optional = true }
|
||||
parking_lot = { version = "0.9.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-serializer = { path = "../serializer" }
|
||||
pretty_assertions = "0.6"
|
||||
hex-literal = "0.2"
|
||||
rand = "0.6"
|
||||
criterion = "0.2"
|
||||
pretty_assertions = "0.6.1"
|
||||
hex-literal = "0.2.1"
|
||||
rand = "0.7.2"
|
||||
criterion = "0.2.11"
|
||||
|
||||
[[bench]]
|
||||
name = "benches"
|
||||
@@ -79,5 +79,4 @@ std = [
|
||||
"schnorrkel",
|
||||
"regex",
|
||||
"num-traits/std",
|
||||
"zeroize/std"
|
||||
]
|
||||
|
||||
@@ -587,9 +587,8 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static {
|
||||
/// This is only for ephemeral keys really, since you won't have access to the secret key
|
||||
/// for storage. If you want a persistent key pair, use `generate_with_phrase` instead.
|
||||
fn generate() -> (Self, Self::Seed) {
|
||||
let mut csprng: OsRng = OsRng::new().expect("OS random generator works; qed");
|
||||
let mut seed = Self::Seed::default();
|
||||
csprng.fill_bytes(seed.as_mut());
|
||||
OsRng.fill_bytes(seed.as_mut());
|
||||
(Self::from_seed(&seed), seed)
|
||||
}
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ impl TraitPair for Pair {
|
||||
fn from_seed_slice(seed_slice: &[u8]) -> Result<Pair, SecretStringError> {
|
||||
let secret = ed25519_dalek::SecretKey::from_bytes(seed_slice)
|
||||
.map_err(|_| SecretStringError::InvalidSeedLength)?;
|
||||
let public = ed25519_dalek::PublicKey::from(&secret);
|
||||
let public = ed25519_dalek::PublicKey::from(secret.expand::<sha2::Sha512>());
|
||||
Ok(Pair(ed25519_dalek::Keypair { secret, public }))
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ impl TraitPair for Pair {
|
||||
|
||||
/// Sign a message.
|
||||
fn sign(&self, message: &[u8]) -> Signature {
|
||||
let r = self.0.sign(message).to_bytes();
|
||||
let r = self.0.sign::<sha2::Sha512>(message).to_bytes();
|
||||
Signature::from_raw(r)
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ impl TraitPair for Pair {
|
||||
Err(_) => return false
|
||||
};
|
||||
|
||||
match public_key.verify(message.as_ref(), &sig) {
|
||||
match public_key.verify::<sha2::Sha512>(message.as_ref(), &sig) {
|
||||
Ok(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user