From aa724c06bcb61f72faf2823f88d9c8493f440275 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 12 Sep 2023 08:42:55 -0400 Subject: [PATCH] Start relying on curve25519-dalek's group feature Removes git dependency for schnorrkel as well, now that schnorrkel has updated. --- Cargo.lock | 227 ++++++++++++++++--------------- crypto/dalek-ff-group/Cargo.toml | 2 +- crypto/dalek-ff-group/src/lib.rs | 111 ++++----------- crypto/schnorrkel/Cargo.toml | 2 +- deny.toml | 1 - tests/coordinator/Cargo.toml | 2 +- 6 files changed, 144 insertions(+), 201 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 191220f8..a0c5c926 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,6 +1425,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", + "group", "platforms", "rand_core 0.6.4", "rustc_version", @@ -2635,7 +2636,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", ] @@ -2658,7 +2659,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-support-procedural", @@ -2683,7 +2684,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "Inflector", "array-bytes", @@ -2731,7 +2732,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-system", @@ -2772,7 +2773,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "bitflags 1.3.2", "environmental", @@ -2805,7 +2806,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "Inflector", "cfg-expr", @@ -2823,7 +2824,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2835,7 +2836,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "proc-macro2", "quote", @@ -2845,7 +2846,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "cfg-if", "frame-support", @@ -2864,7 +2865,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "sp-api", @@ -2873,7 +2874,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "parity-scale-codec", @@ -5408,7 +5409,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-benchmarking", "frame-support", @@ -5423,7 +5424,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-system", @@ -5439,7 +5440,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-system", @@ -5453,7 +5454,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-benchmarking", "frame-support", @@ -5477,7 +5478,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-benchmarking", "frame-support", @@ -5492,7 +5493,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-benchmarking", "frame-support", @@ -5515,7 +5516,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-system", @@ -5536,7 +5537,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-benchmarking", "frame-support", @@ -5554,7 +5555,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-support", "frame-system", @@ -5570,7 +5571,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5586,7 +5587,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6872,7 +6873,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "log", "sp-core", @@ -6883,7 +6884,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -6911,7 +6912,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "futures", "futures-timer", @@ -6934,7 +6935,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6949,7 +6950,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -6968,7 +6969,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6979,7 +6980,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "chrono", @@ -7018,7 +7019,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "fnv", "futures", @@ -7043,7 +7044,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "hash-db", "kvdb", @@ -7069,7 +7070,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -7094,7 +7095,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "fork-tree", @@ -7130,7 +7131,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7143,7 +7144,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "ahash", "array-bytes", @@ -7184,7 +7185,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -7207,7 +7208,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -7229,7 +7230,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -7241,7 +7242,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "anyhow", "cfg-if", @@ -7258,7 +7259,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "anstyle", "futures", @@ -7274,7 +7275,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -7288,7 +7289,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "async-channel", @@ -7330,7 +7331,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-channel", "cid", @@ -7350,7 +7351,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7367,7 +7368,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "ahash", "futures", @@ -7386,7 +7387,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "async-channel", @@ -7407,7 +7408,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "async-channel", @@ -7441,7 +7442,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "futures", @@ -7459,7 +7460,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "bytes", "fnv", @@ -7491,7 +7492,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7500,7 +7501,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "futures", "jsonrpsee", @@ -7530,7 +7531,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7549,7 +7550,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "http", "jsonrpsee", @@ -7564,7 +7565,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "futures", @@ -7590,7 +7591,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "directories", @@ -7653,7 +7654,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "log", "parity-scale-codec", @@ -7664,7 +7665,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "futures", "libc", @@ -7683,7 +7684,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "chrono", "futures", @@ -7702,7 +7703,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "anstyle", "chrono", @@ -7730,7 +7731,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7741,7 +7742,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -7767,7 +7768,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -7783,7 +7784,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-channel", "futures", @@ -7945,13 +7946,15 @@ dependencies = [ [[package]] name = "schnorrkel" -version = "0.11.0" -source = "git+https://github.com/serai-dex/schnorrkel#7967995d14f8c6bae1a49e0118da2985b29a292c" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064aaec4e66d5dfcb6ea6c91bec9dc282b3505b5dd897cf0601dea6ded7c9824" dependencies = [ "arrayref", "arrayvec", "curve25519-dalek 4.1.0", "merlin", + "rand", "rand_core 0.6.4", "serde_bytes", "sha2", @@ -8850,7 +8853,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "hash-db", "log", @@ -8871,7 +8874,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "Inflector", "blake2", @@ -8885,7 +8888,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "scale-info", @@ -8898,7 +8901,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "integer-sqrt", "num-traits", @@ -8912,7 +8915,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "scale-info", @@ -8924,7 +8927,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "sp-api", "sp-inherents", @@ -8935,7 +8938,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "futures", "log", @@ -8953,7 +8956,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "futures", @@ -8967,7 +8970,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "parity-scale-codec", @@ -8986,7 +8989,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "finality-grandpa", "log", @@ -9004,7 +9007,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "scale-info", @@ -9016,7 +9019,7 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "array-bytes", "bitflags 1.3.2", @@ -9059,7 +9062,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "blake2b_simd", "byteorder", @@ -9071,7 +9074,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "quote", "sp-core-hashing", @@ -9081,7 +9084,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -9090,7 +9093,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "proc-macro2", "quote", @@ -9100,7 +9103,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "environmental", "parity-scale-codec", @@ -9111,7 +9114,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9125,7 +9128,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "bytes", "ed25519", @@ -9147,7 +9150,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "lazy_static", "sp-core", @@ -9158,7 +9161,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9170,7 +9173,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9179,7 +9182,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", @@ -9190,7 +9193,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "sp-api", "sp-core", @@ -9200,7 +9203,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "backtrace", "lazy_static", @@ -9210,7 +9213,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "rustc-hash", "serde", @@ -9220,7 +9223,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "either", "hash256-std-hasher", @@ -9242,7 +9245,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -9260,7 +9263,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "Inflector", "proc-macro-crate", @@ -9272,7 +9275,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "scale-info", @@ -9287,7 +9290,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9301,7 +9304,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "hash-db", "log", @@ -9322,12 +9325,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9340,7 +9343,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "async-trait", "parity-scale-codec", @@ -9353,7 +9356,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "sp-std", @@ -9365,7 +9368,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "sp-api", "sp-runtime", @@ -9374,7 +9377,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "ahash", "hash-db", @@ -9397,7 +9400,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9414,7 +9417,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -9425,7 +9428,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -9438,7 +9441,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "parity-scale-codec", "scale-info", @@ -9620,7 +9623,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.4.4" -source = "git+https://github.com/serai-dex/substrate-bip39#4596f602481e08f62966063dcadb3f44aa70cbb8" +source = "git+https://github.com/serai-dex/substrate-bip39#37c349724fd8326b1321f193a660bee353b1fb9d" dependencies = [ "hmac", "pbkdf2 0.12.2", @@ -9632,12 +9635,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -9656,7 +9659,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "hyper", "log", @@ -9668,7 +9671,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/serai-dex/substrate#519d1b75e3f28b5cfd6aafdd00f87f6c016c5f32" +source = "git+https://github.com/serai-dex/substrate#7eae068e9f3849392a3105b98e73e6f9625beb38" dependencies = [ "anstyle", "build-helper", diff --git a/crypto/dalek-ff-group/Cargo.toml b/crypto/dalek-ff-group/Cargo.toml index aab1da7e..b8df8994 100644 --- a/crypto/dalek-ff-group/Cargo.toml +++ b/crypto/dalek-ff-group/Cargo.toml @@ -29,7 +29,7 @@ group = { version = "0.13", default-features = false } crypto-bigint = { version = "0.5", default-features = false } sha2 = { version = "0.10", default-features = false } -curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize", "digest", "precomputed-tables", "legacy_compatibility"] } +curve25519-dalek = { version = ">= 4.0, < 4.2", default-features = false, features = ["alloc", "zeroize", "digest", "group", "precomputed-tables"] } [dev-dependencies] rand_core = { version = "0.6", features = ["std"] } diff --git a/crypto/dalek-ff-group/src/lib.rs b/crypto/dalek-ff-group/src/lib.rs index b7ffe78c..84bdd67c 100644 --- a/crypto/dalek-ff-group/src/lib.rs +++ b/crypto/dalek-ff-group/src/lib.rs @@ -19,12 +19,10 @@ use digest::{consts::U64, Digest, HashMarker}; use subtle::{Choice, CtOption}; -use crypto_bigint::{Encoding, U256}; pub use curve25519_dalek as dalek; use dalek::{ constants, - traits::Identity, scalar::Scalar as DScalar, edwards::{EdwardsPoint as DEdwardsPoint, EdwardsBasepointTable, CompressedEdwardsY}, ristretto::{RistrettoPoint as DRistrettoPoint, RistrettoBasepointTable, CompressedRistretto}, @@ -32,7 +30,7 @@ use dalek::{ pub use constants::{ED25519_BASEPOINT_TABLE, RISTRETTO_BASEPOINT_TABLE}; use group::{ - ff::{Field, PrimeField, FieldBits, PrimeFieldBits, helpers::sqrt_ratio_generic}, + ff::{Field, PrimeField, FieldBits, PrimeFieldBits}, Group, GroupEncoding, prime::PrimeGroup, }; @@ -187,10 +185,6 @@ from_wrapper!(u32); from_wrapper!(u64); from_wrapper!(u128); -// Ed25519 order/scalar modulus -const MODULUS: U256 = - U256::from_be_hex("1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"); - impl Scalar { pub fn pow(&self, other: Scalar) -> Scalar { let mut table = [Scalar::ONE; 16]; @@ -239,109 +233,62 @@ impl Field for Scalar { const ZERO: Scalar = Scalar(DScalar::ZERO); const ONE: Scalar = Scalar(DScalar::ONE); - fn random(mut rng: impl RngCore) -> Self { - let mut r = [0; 64]; - rng.fill_bytes(&mut r); - Self(DScalar::from_bytes_mod_order_wide(&r)) + fn random(rng: impl RngCore) -> Self { + Self(::random(rng)) } fn square(&self) -> Self { - *self * self + Self(self.0.square()) } fn double(&self) -> Self { - *self + self + Self(self.0.double()) } fn invert(&self) -> CtOption { - CtOption::new(Self(self.0.invert()), !self.is_zero()) + ::invert(&self.0).map(Self) } fn sqrt(&self) -> CtOption { - let mod_3_8 = MODULUS.saturating_add(&U256::from_u8(3)).wrapping_div(&U256::from_u8(8)); - let mod_3_8 = Scalar::from_repr(mod_3_8.to_le_bytes()).unwrap(); - - let sqrt_m1 = MODULUS.saturating_sub(&U256::from_u8(1)).wrapping_div(&U256::from_u8(4)); - let sqrt_m1 = Scalar::from(2u8).pow(Scalar::from_repr(sqrt_m1.to_le_bytes()).unwrap()); - - let tv1 = self.pow(mod_3_8); - let tv2 = tv1 * sqrt_m1; - let candidate = Self::conditional_select(&tv2, &tv1, tv1.square().ct_eq(self)); - CtOption::new(candidate, candidate.square().ct_eq(self)) + self.0.sqrt().map(Self) } fn sqrt_ratio(num: &Self, div: &Self) -> (Choice, Self) { - sqrt_ratio_generic(num, div) + let (choice, res) = DScalar::sqrt_ratio(num, div); + (choice, Self(res)) } } impl PrimeField for Scalar { type Repr = [u8; 32]; - const MODULUS: &'static str = "1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"; + const MODULUS: &'static str = ::MODULUS; - const NUM_BITS: u32 = 253; - const CAPACITY: u32 = 252; + const NUM_BITS: u32 = ::NUM_BITS; + const CAPACITY: u32 = ::CAPACITY; - // 2.invert() - const TWO_INV: Scalar = Scalar(DScalar::from_bits([ - 247, 233, 122, 46, 141, 49, 9, 44, 107, 206, 123, 81, 239, 124, 111, 10, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, - ])); + const TWO_INV: Scalar = Scalar(::TWO_INV); - // This was calculated with the method from the ff crate docs - // SageMath GF(modulus).primitive_element() - const MULTIPLICATIVE_GENERATOR: Scalar = Scalar(DScalar::from_bits({ - let mut bytes = [0; 32]; - bytes[0] = 2; - bytes - })); - // This was set per the specification in the ff crate docs - // The number of leading zero bits in the little-endian bit representation of (modulus - 1) - const S: u32 = 2; + const MULTIPLICATIVE_GENERATOR: Scalar = + Scalar(::MULTIPLICATIVE_GENERATOR); + const S: u32 = ::S; - // This was calculated via the formula from the ff crate docs - // Self::MULTIPLICATIVE_GENERATOR ** ((modulus - 1) >> Self::S) - const ROOT_OF_UNITY: Scalar = Scalar(DScalar::from_bits([ - 212, 7, 190, 235, 223, 117, 135, 190, 254, 131, 206, 66, 83, 86, 240, 14, 122, 194, 193, 171, - 96, 109, 61, 125, 231, 129, 121, 224, 16, 115, 74, 9, - ])); - // Self::ROOT_OF_UNITY.invert() - const ROOT_OF_UNITY_INV: Scalar = Scalar(DScalar::from_bits([ - 25, 204, 55, 113, 58, 237, 138, 153, 215, 24, 41, 96, 139, 163, 238, 5, 134, 61, 62, 84, 159, - 146, 194, 130, 24, 126, 134, 31, 239, 140, 181, 6, - ])); + const ROOT_OF_UNITY: Scalar = Scalar(::ROOT_OF_UNITY); + const ROOT_OF_UNITY_INV: Scalar = Scalar(::ROOT_OF_UNITY_INV); - // This was calculated via the formula from the ff crate docs - // Self::MULTIPLICATIVE_GENERATOR ** (2 ** Self::S) - const DELTA: Scalar = Scalar(DScalar::from_bits([ - 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ])); + const DELTA: Scalar = Scalar(::DELTA); fn from_repr(bytes: [u8; 32]) -> CtOption { - let scalar = DScalar::from_canonical_bytes(bytes); - // TODO: This unwrap_or_else isn't constant time, yet we don't exactly have an alternative... - CtOption::new(Scalar(scalar.unwrap_or(DScalar::ZERO)), black_box(scalar).is_some()) + ::from_repr(bytes).map(Scalar) } fn to_repr(&self) -> [u8; 32] { - self.0.to_bytes() + self.0.to_repr() } fn is_odd(&self) -> Choice { - // This is probably overkill? Yet it's better safe than sorry since this is a complete - // decomposition of the scalar - let mut bits = self.to_le_bits(); - let res = choice(bits[0]); - // This shouldn't need mut since it should be a mutable reference - // Per the bitvec docs, writing through a derefence requires mut, writing through one of its - // methods does not - // We do not use one of its methods to ensure we write via zeroize - for mut bit in bits.iter_mut() { - bit.zeroize(); - } - res + self.0.is_odd() } fn from_u128(num: u128) -> Self { - Self::from(num) + Scalar(DScalar::from_u128(num)) } } @@ -424,10 +371,9 @@ macro_rules! dalek_group { loop { let mut bytes = [0; 32]; rng.fill_bytes(&mut bytes); - let Some(point) = $DCompressed(bytes).decompress() else { + let Some(point) = Option::<$Point>::from($Point::from_bytes(&bytes)) else { continue; }; - let point = $Point(point); // Ban identity, per the trait specification if !bool::from(point.is_identity()) { return point; @@ -444,7 +390,7 @@ macro_rules! dalek_group { self.0.ct_eq(&$DPoint::identity()) } fn double(&self) -> Self { - *self + self + Self(self.0.double()) } } @@ -466,7 +412,7 @@ macro_rules! dalek_group { } fn to_bytes(&self) -> Self::Repr { - self.0.compress().to_bytes() + self.0.to_bytes() } } @@ -518,11 +464,6 @@ dalek_group!( RISTRETTO_BASEPOINT_TABLE ); -#[test] -fn test_scalar_modulus() { - assert_eq!(MODULUS.to_le_bytes(), curve25519_dalek::constants::BASEPOINT_ORDER.to_bytes()); -} - #[test] fn test_ed25519_group() { ff_group_tests::group::test_prime_group_bits::<_, EdwardsPoint>(&mut rand_core::OsRng); diff --git a/crypto/schnorrkel/Cargo.toml b/crypto/schnorrkel/Cargo.toml index f14013fa..3d80037a 100644 --- a/crypto/schnorrkel/Cargo.toml +++ b/crypto/schnorrkel/Cargo.toml @@ -25,7 +25,7 @@ ciphersuite = { path = "../ciphersuite", version = "^0.4.1", features = ["std", schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "^0.5.1" } frost = { path = "../frost", package = "modular-frost", version = "^0.8.1", features = ["ristretto"] } -schnorrkel = { version = "0.11", git = "https://github.com/serai-dex/schnorrkel" } +schnorrkel = { version = "0.11" } [dev-dependencies] frost = { path = "../frost", package = "modular-frost", features = ["tests"] } diff --git a/deny.toml b/deny.toml index e6619986..595c6101 100644 --- a/deny.toml +++ b/deny.toml @@ -92,7 +92,6 @@ unknown-registry = "deny" unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-git = [ - "https://github.com/serai-dex/schnorrkel", "https://github.com/serai-dex/substrate-bip39", "https://github.com/serai-dex/substrate", "https://github.com/monero-rs/base58-monero", diff --git a/tests/coordinator/Cargo.toml b/tests/coordinator/Cargo.toml index c02e1a20..ced0d65e 100644 --- a/tests/coordinator/Cargo.toml +++ b/tests/coordinator/Cargo.toml @@ -20,7 +20,7 @@ zeroize = { version = "1", default-features = false } rand_core = { version = "0.6", default-features = false } ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["ristretto", "secp256k1"] } -schnorrkel = { git = "https://github.com/serai-dex/schnorrkel" } +schnorrkel = "0.11" dkg = { path = "../../crypto/dkg", default-features = false, features = ["tests"] } messages = { package = "serai-processor-messages", path = "../../processor/messages" }