diff --git a/Cargo.lock b/Cargo.lock index a5f4583519..4b32cbe31a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9590,8 +9590,8 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "sp-ark-bls12-381", "sp-core", + "sp-crypto-ec-utils", "sp-io", "sp-keyring", "sp-keystore", @@ -16801,15 +16801,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-ark-bls12-381" -version = "0.4.2" -source = "git+https://github.com/paritytech/arkworks-substrate#f08093a5f7c32778eae1295430ec064dccd062a6" -dependencies = [ - "ark-bls12-381-ext", - "sp-crypto-ec-utils", -] - [[package]] name = "sp-authority-discovery" version = "37.0.0" diff --git a/Cargo.toml b/Cargo.toml index 05cea1d929..1d65a3cd5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -274,7 +274,6 @@ sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "p w3f-bls = { git = "https://github.com/opentensor/bls", branch = "fix-no-std", default-features = false } ark-crypto-primitives = { version = "0.4.0", default-features = false } ark-scale = { version = "0.0.11", default-features = false } -sp-ark-bls12-381 = { git = "https://github.com/paritytech/arkworks-substrate", package = "sp-ark-bls12-381", default-features = false } ark-bls12-381 = { version = "0.4.0", default-features = false } ark-serialize = { version = "0.4.0", default-features = false } ark-ff = { version = "0.4.0", default-features = false } diff --git a/pallets/drand/Cargo.toml b/pallets/drand/Cargo.toml index 269e993d02..6e3ad982f7 100644 --- a/pallets/drand/Cargo.toml +++ b/pallets/drand/Cargo.toml @@ -17,7 +17,7 @@ scale-info = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] } serde_json.workspace = true log.workspace = true -hex = { workspace = true, features = ["serde"] } +hex = { workspace = true, features = ["serde", "alloc"] } sha2.workspace = true anyhow.workspace = true # frame deps @@ -29,7 +29,7 @@ sp-io.workspace = true sp-runtime.workspace = true sp-std.workspace = true # arkworks dependencies -sp-ark-bls12-381.workspace = true +sp-crypto-ec-utils = { workspace = true, features = ["bls12-381"] } ark-bls12-381 = { workspace = true, features = ["curve"] } ark-serialize = { workspace = true, features = ["derive"] } ark-ff.workspace = true @@ -64,7 +64,7 @@ std = [ "serde/std", "serde_json/std", "hex/std", - "sp-ark-bls12-381/std", + "sp-crypto-ec-utils/std", "ark-bls12-381/std", "ark-serialize/std", "ark-ff/std", diff --git a/pallets/drand/src/bls12_381.rs b/pallets/drand/src/bls12_381.rs index 1415613ef6..e31118a3e4 100644 --- a/pallets/drand/src/bls12_381.rs +++ b/pallets/drand/src/bls12_381.rs @@ -16,7 +16,7 @@ use ark_ec::pairing::Pairing; use ark_std::{Zero, ops::Neg}; -use sp_ark_bls12_381::{ +use sp_crypto_ec_utils::bls12_381::{ Bls12_381 as Bls12_381Opt, G1Affine as G1AffineOpt, G2Affine as G2AffineOpt, }; diff --git a/pallets/drand/src/verifier.rs b/pallets/drand/src/verifier.rs index e24b82003a..36c212181a 100644 --- a/pallets/drand/src/verifier.rs +++ b/pallets/drand/src/verifier.rs @@ -27,7 +27,7 @@ use ark_ec::{AffineRepr, hashing::HashToCurve}; use ark_serialize::CanonicalSerialize; use codec::Decode; use sha2::{Digest, Sha256}; -use sp_ark_bls12_381::{G1Affine as G1AffineOpt, G2Affine as G2AffineOpt}; +use sp_crypto_ec_utils::bls12_381::{G1Affine as G1AffineOpt, G2Affine as G2AffineOpt}; use tle::curves::drand::TinyBLS381; use w3f_bls::engine::EngineBLS; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index e3230ae540..f10d7c067b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -237,7 +237,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 353, + spec_version: 354, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,