Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schnorrkel to 0.11.4 #2524

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update schnorrkel to 0.11.4
  • Loading branch information
andresilva committed Dec 8, 2023
commit 6feaeaf89813f2d281cf2983ebdbcdb389cdee84
70 changes: 49 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions polkadot/node/core/approval-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ parity-scale-codec = { version = "3.6.1", default-features = false, features = [
gum = { package = "tracing-gum", path = "../../gum" }
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
schnellru = "0.2.1"
merlin = "2.0"
schnorrkel = "0.9.1"
merlin = "3.0"
schnorrkel = "0.11.4"
kvdb = "0.13.0"
derive_more = "0.99.17"
thiserror = "1.0.48"
Expand All @@ -32,15 +32,14 @@ sp-consensus = { path = "../../../../substrate/primitives/consensus/common", def
sp-consensus-slots = { path = "../../../../substrate/primitives/consensus/slots", default-features = false }
sp-application-crypto = { path = "../../../../substrate/primitives/application-crypto", default-features = false, features = ["full_crypto"] }
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
rand_core = "0.5.1"
# should match schnorrkel
rand_core = "0.6.2"
rand_chacha = { version = "0.3.1" }
rand = "0.8.5"

[dev-dependencies]
async-trait = "0.1.57"
parking_lot = "0.12.0"
# rand_core should match schnorrkel
rand_core = "0.5.1"
sp-keyring = { path = "../../../../substrate/primitives/keyring" }
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
sp-core = { path = "../../../../substrate/primitives/core" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn dummy_assignment_cert(kind: AssignmentCertKind) -> AssignmentCert {
let mut prng = rand_core::OsRng;
let keypair = schnorrkel::Keypair::generate_with(&mut prng);
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
let preout = inout.to_output();
let preout = inout.to_preout();

AssignmentCert {
kind,
Expand Down
6 changes: 3 additions & 3 deletions polkadot/node/core/approval-voting/src/criteria.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ fn compute_relay_vrf_modulo_assignments_v1(
let cert = AssignmentCert {
kind: AssignmentCertKind::RelayVRFModulo { sample: rvm_sample },
vrf: VrfSignature {
pre_output: VrfPreOutput(vrf_in_out.to_output()),
pre_output: VrfPreOutput(vrf_in_out.to_preout()),
proof: VrfProof(vrf_proof),
},
};
Expand Down Expand Up @@ -541,7 +541,7 @@ fn compute_relay_vrf_modulo_assignments_v2(
core_bitfield: assignment_bitfield.clone(),
},
vrf: VrfSignature {
pre_output: VrfPreOutput(vrf_in_out.to_output()),
pre_output: VrfPreOutput(vrf_in_out.to_preout()),
proof: VrfProof(vrf_proof),
},
};
Expand Down Expand Up @@ -576,7 +576,7 @@ fn compute_relay_vrf_delay_assignments(
let cert = AssignmentCertV2 {
kind: AssignmentCertKindV2::RelayVRFDelay { core_index: core },
vrf: VrfSignature {
pre_output: VrfPreOutput(vrf_in_out.to_output()),
pre_output: VrfPreOutput(vrf_in_out.to_preout()),
proof: VrfProof(vrf_proof),
},
};
Expand Down
4 changes: 2 additions & 2 deletions polkadot/node/core/approval-voting/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ fn garbage_assignment_cert(kind: AssignmentCertKind) -> AssignmentCert {
let mut prng = rand_core::OsRng;
let keypair = schnorrkel::Keypair::generate_with(&mut prng);
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
let preout = inout.to_output();
let preout = inout.to_preout();

AssignmentCert {
kind,
Expand All @@ -429,7 +429,7 @@ fn garbage_assignment_cert_v2(kind: AssignmentCertKindV2) -> AssignmentCertV2 {
let mut prng = rand_core::OsRng;
let keypair = schnorrkel::Keypair::generate_with(&mut prng);
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
let preout = inout.to_output();
let preout = inout.to_preout();

AssignmentCertV2 {
kind,
Expand Down
4 changes: 2 additions & 2 deletions polkadot/node/network/approval-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" }

assert_matches = "1.4.0"
schnorrkel = { version = "0.9.1", default-features = false }
schnorrkel = { version = "0.11.4", default-features = false }
# rand_core should match schnorrkel
rand_core = "0.5.1"
rand_core = "0.6.2"
rand_chacha = "0.3.1"
env_logger = "0.9.0"
log = "0.4.17"
4 changes: 2 additions & 2 deletions polkadot/node/network/approval-distribution/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ fn fake_assignment_cert(block_hash: Hash, validator: ValidatorIndex) -> Indirect
let mut prng = rand_core::OsRng;
let keypair = schnorrkel::Keypair::generate_with(&mut prng);
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
let preout = inout.to_output();
let preout = inout.to_preout();

IndirectAssignmentCert {
block_hash,
Expand All @@ -320,7 +320,7 @@ fn fake_assignment_cert_v2(
let mut prng = rand_core::OsRng;
let keypair = schnorrkel::Keypair::generate_with(&mut prng);
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
let preout = inout.to_output();
let preout = inout.to_preout();

IndirectAssignmentCertV2 {
block_hash,
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sp-keystore = { path = "../../../substrate/primitives/keystore" }
sp-maybe-compressed-blob = { path = "../../../substrate/primitives/maybe-compressed-blob" }
sp-runtime = { path = "../../../substrate/primitives/runtime" }
polkadot-parachain-primitives = { path = "../../parachain", default-features = false }
schnorrkel = "0.9.1"
schnorrkel = "0.11.4"
thiserror = "1.0.48"
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
serde = { version = "1.0.193", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions substrate/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ array-bytes = { version = "6.1", optional = true }
ed25519-zebra = { version = "3.1.0", default-features = false, optional = true }
blake2 = { version = "0.10.4", default-features = false, optional = true }
libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true }
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false }
merlin = { version = "2.0", default-features = false }
schnorrkel = { version = "0.11.4", features = ["preaudit_deprecated"], default-features = false }
merlin = { version = "3.0", default-features = false }
secp256k1 = { version = "0.28.0", default-features = false, features = ["alloc", "recovery"], optional = true }
sp-core-hashing = { path = "hashing", default-features = false, optional = true }
sp-runtime-interface = { path = "../runtime-interface", default-features = false }
Expand Down
Loading
Loading