mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 11:39:35 +00:00
dalek 4.0
This commit is contained in:
parent
8e6e05ae2d
commit
23e1c9769c
34 changed files with 395 additions and 413 deletions
522
Cargo.lock
generated
522
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -79,5 +79,6 @@ panic = "unwind"
|
|||
|
||||
[patch.crates-io]
|
||||
# subxt *can* pull these off crates.io yet there's no benefit to this
|
||||
sp-core-hashing = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-core-hashing = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
snow = { git = "https://github.com/kayabaNerve/snow", branch = "0.9.2" }
|
||||
|
|
|
@ -31,7 +31,7 @@ crc = { version = "3", default-features = false }
|
|||
sha3 = { version = "0.10", default-features = false }
|
||||
pbkdf2 = { version = "0.12", features = ["simple"], default-features = false }
|
||||
|
||||
curve25519-dalek = { version = "^3.2", default-features = false }
|
||||
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize", "precomputed-tables"] }
|
||||
|
||||
# Used for the hash to curve, along with the more complicated proofs
|
||||
group = { version = "0.13", default-features = false }
|
||||
|
@ -90,8 +90,6 @@ std = [
|
|||
|
||||
"sha3/std",
|
||||
|
||||
"curve25519-dalek/std",
|
||||
|
||||
"multiexp/std",
|
||||
|
||||
"monero-generators/std",
|
||||
|
|
|
@ -18,7 +18,7 @@ subtle = { version = "^2.4", default-features = false }
|
|||
|
||||
sha3 = { version = "0.10", default-features = false }
|
||||
|
||||
curve25519-dalek = { version = "3", default-features = false }
|
||||
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize", "precomputed-tables"] }
|
||||
|
||||
group = { version = "0.13", default-features = false }
|
||||
dalek-ff-group = { path = "../../../crypto/dalek-ff-group", version = "0.3" }
|
||||
|
|
|
@ -179,7 +179,7 @@ pub struct Commitment {
|
|||
impl Commitment {
|
||||
/// A commitment to zero, defined with a mask of 1 (as to not be the identity).
|
||||
pub fn zero() -> Commitment {
|
||||
Commitment { mask: Scalar::one(), amount: 0 }
|
||||
Commitment { mask: Scalar::ONE, amount: 0 }
|
||||
}
|
||||
|
||||
pub fn new(mask: Scalar, amount: u64) -> Commitment {
|
||||
|
@ -188,7 +188,7 @@ impl Commitment {
|
|||
|
||||
/// Calculate a Pedersen commitment, as a point, from the transparent structure.
|
||||
pub fn calculate(&self) -> EdwardsPoint {
|
||||
(&self.mask * &ED25519_BASEPOINT_TABLE) + (Scalar::from(self.amount) * H())
|
||||
(&self.mask * ED25519_BASEPOINT_TABLE) + (Scalar::from(self.amount) * H())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,6 +210,6 @@ pub fn hash_to_scalar(data: &[u8]) -> Scalar {
|
|||
// This library acknowledges its practical impossibility of it occurring, and doesn't bother to
|
||||
// code in logic to handle it. That said, if it ever occurs, something must happen in order to
|
||||
// not generate/verify a proof we believe to be valid when it isn't
|
||||
assert!(scalar != Scalar::zero(), "ZERO HASH: {data:?}");
|
||||
assert!(scalar != Scalar::ZERO, "ZERO HASH: {data:?}");
|
||||
scalar
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ fn core(
|
|||
}
|
||||
|
||||
// Perform the core loop
|
||||
let mut c1 = CtOption::new(Scalar::zero(), Choice::from(0));
|
||||
let mut c1 = CtOption::new(Scalar::ZERO, Choice::from(0));
|
||||
for i in (start .. end).map(|i| i % n) {
|
||||
// This will only execute once and shouldn't need to be constant time. Making it constant time
|
||||
// removes the risk of branch prediction creating timing differences depending on ring index
|
||||
|
@ -179,7 +179,7 @@ fn core(
|
|||
let c_p = mu_P * c;
|
||||
let c_c = mu_C * c;
|
||||
|
||||
let L = (&s[i] * &ED25519_BASEPOINT_TABLE) + (c_p * P[i]) + (c_c * C[i]);
|
||||
let L = (&s[i] * ED25519_BASEPOINT_TABLE) + (c_p * P[i]) + (c_c * C[i]);
|
||||
let PH = hash_to_point(P[i]);
|
||||
// Shouldn't be an issue as all of the variables in this vartime statement are public
|
||||
let R = (s[i] * PH) + images_precomp.vartime_multiscalar_mul([c_p, c_c]);
|
||||
|
@ -241,7 +241,7 @@ impl Clsag {
|
|||
msg: [u8; 32],
|
||||
) -> Vec<(Clsag, EdwardsPoint)> {
|
||||
let mut res = Vec::with_capacity(inputs.len());
|
||||
let mut sum_pseudo_outs = Scalar::zero();
|
||||
let mut sum_pseudo_outs = Scalar::ZERO;
|
||||
for i in 0 .. inputs.len() {
|
||||
let mut mask = random_scalar(rng);
|
||||
if i == (inputs.len() - 1) {
|
||||
|
@ -257,7 +257,7 @@ impl Clsag {
|
|||
&inputs[i].2,
|
||||
mask,
|
||||
&msg,
|
||||
nonce.deref() * &ED25519_BASEPOINT_TABLE,
|
||||
nonce.deref() * ED25519_BASEPOINT_TABLE,
|
||||
nonce.deref() *
|
||||
hash_to_point(inputs[i].2.decoys.ring[usize::from(inputs[i].2.decoys.i)][0]),
|
||||
);
|
||||
|
|
|
@ -28,7 +28,7 @@ use crate::{
|
|||
|
||||
/// Generate a key image for a given key. Defined as `x * hash_to_point(xG)`.
|
||||
pub fn generate_key_image(secret: &Zeroizing<Scalar>) -> EdwardsPoint {
|
||||
hash_to_point(&ED25519_BASEPOINT_TABLE * secret.deref()) * secret.deref()
|
||||
hash_to_point(ED25519_BASEPOINT_TABLE * secret.deref()) * secret.deref()
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
|
|
|
@ -119,7 +119,7 @@ pub(crate) fn read_varint<R: Read>(r: &mut R) -> io::Result<u64> {
|
|||
// https://github.com/monero-project/monero/issues/8438, where some scalars had an archaic
|
||||
// reduction applied
|
||||
pub(crate) fn read_scalar<R: Read>(r: &mut R) -> io::Result<Scalar> {
|
||||
Scalar::from_canonical_bytes(read_bytes(r)?)
|
||||
Option::from(Scalar::from_canonical_bytes(read_bytes(r)?))
|
||||
.ok_or_else(|| io::Error::new(io::ErrorKind::Other, "unreduced scalar"))
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ fn featured() {
|
|||
[(Network::Mainnet, 'C'), (Network::Testnet, 'K'), (Network::Stagenet, 'F')]
|
||||
{
|
||||
for _ in 0 .. 100 {
|
||||
let spend = &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE;
|
||||
let view = &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE;
|
||||
let spend = &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE;
|
||||
let view = &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE;
|
||||
|
||||
for features in 0 .. (1 << 3) {
|
||||
const SUBADDRESS_FEATURE_BIT: u8 = 1;
|
||||
|
@ -143,9 +143,9 @@ fn featured_vectors() {
|
|||
_ => panic!("Unknown network"),
|
||||
};
|
||||
let spend =
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap()).decompress().unwrap();
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.spend).unwrap()).unwrap().decompress().unwrap();
|
||||
let view =
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap()).decompress().unwrap();
|
||||
CompressedEdwardsY::from_slice(&hex::decode(vector.view).unwrap()).unwrap().decompress().unwrap();
|
||||
|
||||
let addr = MoneroAddress::from_str(network, &vector.address).unwrap();
|
||||
assert_eq!(addr.spend, spend);
|
||||
|
|
|
@ -81,7 +81,7 @@ macro_rules! bulletproofs_tests {
|
|||
// Check Bulletproofs errors if we try to prove for too many outputs
|
||||
let mut commitments = vec![];
|
||||
for _ in 0 .. 17 {
|
||||
commitments.push(Commitment::new(Scalar::zero(), 0));
|
||||
commitments.push(Commitment::new(Scalar::ZERO, 0));
|
||||
}
|
||||
assert!(Bulletproofs::prove(&mut OsRng, &commitments, $plus).is_err());
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ fn clsag() {
|
|||
for real in 0 .. RING_LEN {
|
||||
let msg = [1; 32];
|
||||
|
||||
let mut secrets = (Zeroizing::new(Scalar::zero()), Scalar::zero());
|
||||
let mut secrets = (Zeroizing::new(Scalar::ZERO), Scalar::ZERO);
|
||||
let mut ring = vec![];
|
||||
for i in 0 .. RING_LEN {
|
||||
let dest = Zeroizing::new(random_scalar(&mut OsRng));
|
||||
|
@ -53,7 +53,7 @@ fn clsag() {
|
|||
amount = OsRng.next_u64();
|
||||
}
|
||||
ring
|
||||
.push([dest.deref() * &ED25519_BASEPOINT_TABLE, Commitment::new(mask, amount).calculate()]);
|
||||
.push([dest.deref() * ED25519_BASEPOINT_TABLE, Commitment::new(mask, amount).calculate()]);
|
||||
}
|
||||
|
||||
let image = generate_key_image(&secrets.0);
|
||||
|
@ -92,7 +92,7 @@ fn clsag_multisig() {
|
|||
let mask;
|
||||
let amount;
|
||||
if i != u64::from(RING_INDEX) {
|
||||
dest = &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE;
|
||||
dest = &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE;
|
||||
mask = random_scalar(&mut OsRng);
|
||||
amount = OsRng.next_u64();
|
||||
} else {
|
||||
|
|
|
@ -156,8 +156,8 @@ fn test_classic_seed() {
|
|||
let spend: [u8; 32] = hex::decode(vector.spend).unwrap().try_into().unwrap();
|
||||
// For classical seeds, Monero directly uses the entropy as a spend key
|
||||
assert_eq!(
|
||||
Scalar::from_canonical_bytes(*seed.entropy()),
|
||||
Scalar::from_canonical_bytes(spend)
|
||||
Option::<Scalar>::from(Scalar::from_canonical_bytes(*seed.entropy())),
|
||||
Option::<Scalar>::from(Scalar::from_canonical_bytes(spend)),
|
||||
);
|
||||
|
||||
let view: [u8; 32] = hex::decode(vector.view).unwrap().try_into().unwrap();
|
||||
|
|
|
@ -150,7 +150,7 @@ impl ViewPair {
|
|||
}
|
||||
|
||||
pub fn view(&self) -> EdwardsPoint {
|
||||
self.view.deref() * &ED25519_BASEPOINT_TABLE
|
||||
self.view.deref() * ED25519_BASEPOINT_TABLE
|
||||
}
|
||||
|
||||
fn subaddress_derivation(&self, index: SubaddressIndex) -> Scalar {
|
||||
|
@ -167,7 +167,7 @@ impl ViewPair {
|
|||
|
||||
fn subaddress_keys(&self, index: SubaddressIndex) -> (EdwardsPoint, EdwardsPoint) {
|
||||
let scalar = self.subaddress_derivation(index);
|
||||
let spend = self.spend + (&scalar * &ED25519_BASEPOINT_TABLE);
|
||||
let spend = self.spend + (&scalar * ED25519_BASEPOINT_TABLE);
|
||||
let view = self.view.deref() * spend;
|
||||
(spend, view)
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ impl ViewPair {
|
|||
/// Returns an address with the provided specification.
|
||||
pub fn address(&self, network: Network, spec: AddressSpec) -> MoneroAddress {
|
||||
let mut spend = self.spend;
|
||||
let mut view: EdwardsPoint = self.view.deref() * &ED25519_BASEPOINT_TABLE;
|
||||
let mut view: EdwardsPoint = self.view.deref() * ED25519_BASEPOINT_TABLE;
|
||||
|
||||
// construct the address meta
|
||||
let meta = match spec {
|
||||
|
|
|
@ -356,7 +356,7 @@ impl Scanner {
|
|||
// P - shared == spend
|
||||
let subaddress = self
|
||||
.subaddresses
|
||||
.get(&(output_key - (&shared_key * &ED25519_BASEPOINT_TABLE)).compress());
|
||||
.get(&(output_key - (&shared_key * ED25519_BASEPOINT_TABLE)).compress());
|
||||
if subaddress.is_none() {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -261,10 +261,11 @@ impl ClassicSeed {
|
|||
let (lang, entropy) = seed_to_bytes(&words)?;
|
||||
|
||||
// Make sure this is a valid scalar
|
||||
let mut scalar = Scalar::from_canonical_bytes(*entropy);
|
||||
if scalar.is_none() {
|
||||
let scalar = Scalar::from_canonical_bytes(*entropy);
|
||||
if scalar.is_none().into() {
|
||||
Err(SeedError::InvalidSeed)?;
|
||||
}
|
||||
let mut scalar = scalar.unwrap();
|
||||
scalar.zeroize();
|
||||
|
||||
// Call from_entropy so a trimmed seed becomes a full seed
|
||||
|
@ -272,7 +273,7 @@ impl ClassicSeed {
|
|||
}
|
||||
|
||||
pub fn from_entropy(lang: Language, entropy: Zeroizing<[u8; 32]>) -> Option<ClassicSeed> {
|
||||
Scalar::from_canonical_bytes(*entropy).map(|scalar| key_to_seed(lang, Zeroizing::new(scalar)))
|
||||
Option::from(Scalar::from_canonical_bytes(*entropy)).map(|scalar| key_to_seed(lang, Zeroizing::new(scalar)))
|
||||
}
|
||||
|
||||
pub(crate) fn to_string(&self) -> Zeroizing<String> {
|
||||
|
|
|
@ -83,7 +83,7 @@ impl SendOutput {
|
|||
SendOutput {
|
||||
R,
|
||||
view_tag,
|
||||
dest: ((&shared_key * &ED25519_BASEPOINT_TABLE) + output.0.spend),
|
||||
dest: ((&shared_key * ED25519_BASEPOINT_TABLE) + output.0.spend),
|
||||
commitment: Commitment::new(commitment_mask(shared_key), output.1),
|
||||
amount: amount_encryption(output.1, shared_key),
|
||||
},
|
||||
|
@ -105,7 +105,7 @@ impl SendOutput {
|
|||
output,
|
||||
r.deref() * address.view,
|
||||
if !address.is_subaddress() {
|
||||
r.deref() * &ED25519_BASEPOINT_TABLE
|
||||
r.deref() * ED25519_BASEPOINT_TABLE
|
||||
} else {
|
||||
r.deref() * address.spend
|
||||
},
|
||||
|
@ -577,7 +577,7 @@ impl SignableTransaction {
|
|||
|
||||
// Used for all non-subaddress outputs, or if there's only one subaddress output and a change
|
||||
let tx_key = Zeroizing::new(random_scalar(&mut rng));
|
||||
let mut tx_public_key = tx_key.deref() * &ED25519_BASEPOINT_TABLE;
|
||||
let mut tx_public_key = tx_key.deref() * ED25519_BASEPOINT_TABLE;
|
||||
|
||||
// If any of these outputs are to a subaddress, we need keys distinct to them
|
||||
// The only time this *does not* force having additional keys is when the only other output
|
||||
|
@ -597,7 +597,7 @@ impl SignableTransaction {
|
|||
InternalPayment::Change(_, _) => {}
|
||||
}
|
||||
}
|
||||
debug_assert!(tx_public_key != (tx_key.deref() * &ED25519_BASEPOINT_TABLE));
|
||||
debug_assert!(tx_public_key != (tx_key.deref() * ED25519_BASEPOINT_TABLE));
|
||||
}
|
||||
|
||||
// Actually create the outputs
|
||||
|
@ -810,7 +810,7 @@ impl SignableTransaction {
|
|||
let mut images = Vec::with_capacity(self.inputs.len());
|
||||
for (input, _) in &self.inputs {
|
||||
let mut offset = Zeroizing::new(spend.deref() + input.key_offset());
|
||||
if (offset.deref() * &ED25519_BASEPOINT_TABLE) != input.key() {
|
||||
if (offset.deref() * ED25519_BASEPOINT_TABLE) != input.key() {
|
||||
Err(TransactionError::WrongPrivateKey)?;
|
||||
}
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ impl SignMachine<Transaction> for TransactionSignMachine {
|
|||
sorted.sort_by(|x, y| key_image_sort(&x.0, &y.0));
|
||||
|
||||
let mut rng = ChaCha20Rng::from_seed(self.transcript.rng_seed(b"pseudo_out_masks"));
|
||||
let mut sum_pseudo_outs = Scalar::zero();
|
||||
let mut sum_pseudo_outs = Scalar::ZERO;
|
||||
while !sorted.is_empty() {
|
||||
let value = sorted.remove(0);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ use monero_serai::{
|
|||
|
||||
pub fn random_address() -> (Scalar, ViewPair, MoneroAddress) {
|
||||
let spend = random_scalar(&mut OsRng);
|
||||
let spend_pub = &spend * &ED25519_BASEPOINT_TABLE;
|
||||
let spend_pub = &spend * ED25519_BASEPOINT_TABLE;
|
||||
let view = Zeroizing::new(random_scalar(&mut OsRng));
|
||||
(
|
||||
spend,
|
||||
|
@ -29,7 +29,7 @@ pub fn random_address() -> (Scalar, ViewPair, MoneroAddress) {
|
|||
MoneroAddress {
|
||||
meta: AddressMeta::new(Network::Mainnet, AddressType::Standard),
|
||||
spend: spend_pub,
|
||||
view: view.deref() * &ED25519_BASEPOINT_TABLE,
|
||||
view: view.deref() * ED25519_BASEPOINT_TABLE,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ pub async fn rpc() -> Rpc<HttpRpc> {
|
|||
|
||||
let addr = MoneroAddress {
|
||||
meta: AddressMeta::new(Network::Mainnet, AddressType::Standard),
|
||||
spend: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
view: &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
spend: &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
view: &random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
}
|
||||
.to_string();
|
||||
|
||||
|
@ -193,7 +193,7 @@ macro_rules! test {
|
|||
let keys = key_gen::<_, Ed25519>(&mut OsRng);
|
||||
|
||||
let spend_pub = if !multisig {
|
||||
spend.deref() * &ED25519_BASEPOINT_TABLE
|
||||
spend.deref() * ED25519_BASEPOINT_TABLE
|
||||
} else {
|
||||
#[cfg(not(feature = "multisig"))]
|
||||
panic!("Multisig branch called without the multisig feature");
|
||||
|
@ -215,7 +215,7 @@ macro_rules! test {
|
|||
rpc.get_fee(protocol, FeePriority::Low).await.unwrap(),
|
||||
Some(Change::new(
|
||||
&ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng))
|
||||
),
|
||||
false
|
||||
|
|
|
@ -104,7 +104,7 @@ test!(
|
|||
use monero_serai::wallet::FeePriority;
|
||||
|
||||
let change_view = ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng)),
|
||||
);
|
||||
|
||||
|
@ -117,7 +117,7 @@ test!(
|
|||
|
||||
// Send to a subaddress
|
||||
let sub_view = ViewPair::new(
|
||||
&random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE,
|
||||
&random_scalar(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
Zeroizing::new(random_scalar(&mut OsRng)),
|
||||
);
|
||||
builder.add_payment(
|
||||
|
|
|
@ -29,7 +29,7 @@ frost = { package = "modular-frost", path = "../crypto/frost" }
|
|||
|
||||
scale = { package = "parity-scale-codec", version = "3", features = ["derive"] }
|
||||
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
rocksdb = "0.21"
|
||||
serai-db = { path = "../common/db", features = ["rocksdb"] }
|
||||
|
|
|
@ -27,9 +27,8 @@ group = { version = "0.13", default-features = false }
|
|||
|
||||
crypto-bigint = { version = "0.5", default-features = false }
|
||||
|
||||
sha2 = { version = "0.9", default-features = false }
|
||||
# The default features are ["std", "u64_backend"]
|
||||
curve25519-dalek = { version = "^3.2", default-features = false, features = ["alloc", "u64_backend"] }
|
||||
sha2 = { version = "0.10", default-features = false }
|
||||
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize", "digest", "precomputed-tables", "legacy_compatibility"] }
|
||||
|
||||
[dev-dependencies]
|
||||
rand_core = { version = "0.6", features = ["std"] }
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(deprecated)]
|
||||
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![no_std] // Prevents writing new code, in what should be a simple wrapper, which requires std
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
@ -234,12 +236,8 @@ impl Scalar {
|
|||
}
|
||||
|
||||
impl Field for Scalar {
|
||||
const ZERO: Scalar = Scalar(DScalar::from_bits([0; 32]));
|
||||
const ONE: Scalar = Scalar(DScalar::from_bits({
|
||||
let mut bytes = [0; 32];
|
||||
bytes[0] = 1;
|
||||
bytes
|
||||
}));
|
||||
const ZERO: Scalar = Scalar(DScalar::ZERO);
|
||||
const ONE: Scalar = Scalar(DScalar::ONE);
|
||||
|
||||
fn random(mut rng: impl RngCore) -> Self {
|
||||
let mut r = [0; 64];
|
||||
|
@ -321,7 +319,7 @@ impl PrimeField for Scalar {
|
|||
fn from_repr(bytes: [u8; 32]) -> CtOption<Self> {
|
||||
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_else(DScalar::zero)), choice(black_box(scalar).is_some()))
|
||||
CtOption::new(Scalar(scalar.unwrap_or(DScalar::ZERO)), black_box(scalar).is_some())
|
||||
}
|
||||
fn to_repr(&self) -> [u8; 32] {
|
||||
self.0.to_bytes()
|
||||
|
@ -357,7 +355,7 @@ impl PrimeFieldBits for Scalar {
|
|||
fn char_le_bits() -> FieldBits<Self::ReprBits> {
|
||||
let mut bytes = (Scalar::ZERO - Scalar::ONE).to_repr();
|
||||
bytes[0] += 1;
|
||||
debug_assert_eq!(DScalar::from_bytes_mod_order(bytes), DScalar::zero());
|
||||
debug_assert_eq!(DScalar::from_bytes_mod_order(bytes), DScalar::ZERO);
|
||||
bytes.into()
|
||||
}
|
||||
}
|
||||
|
@ -424,9 +422,12 @@ macro_rules! dalek_group {
|
|||
type Scalar = Scalar;
|
||||
fn random(mut rng: impl RngCore) -> Self {
|
||||
loop {
|
||||
let mut bytes = [0; 64];
|
||||
let mut bytes = [0; 32];
|
||||
rng.fill_bytes(&mut bytes);
|
||||
let point = $Point($DPoint::hash_from_bytes::<sha2::Sha512>(&bytes));
|
||||
let Some(point) = $DCompressed(bytes).decompress() else {
|
||||
continue;
|
||||
};
|
||||
let point = $Point(point);
|
||||
// Ban identity, per the trait specification
|
||||
if !bool::from(point.is_identity()) {
|
||||
return point;
|
||||
|
|
|
@ -24,7 +24,7 @@ ciphersuite = { path = "../ciphersuite", version = "0.3", features = ["std", "ri
|
|||
schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.4" }
|
||||
frost = { path = "../frost", package = "modular-frost", version = "0.7", features = ["ristretto"] }
|
||||
|
||||
schnorrkel = "0.10"
|
||||
schnorrkel = { version = "0.11", git = "https://github.com/serai-dex/schnorrkel" }
|
||||
|
||||
[dev-dependencies]
|
||||
frost = { path = "../frost", package = "modular-frost", features = ["tests"] }
|
||||
|
|
|
@ -39,7 +39,7 @@ frost = { package = "modular-frost", path = "../crypto/frost", features = ["rist
|
|||
frost-schnorrkel = { path = "../crypto/schnorrkel" }
|
||||
|
||||
# Substrate
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
# Bitcoin
|
||||
secp256k1 = { version = "0.27", features = ["global-context", "rand-std"], optional = true }
|
||||
|
|
|
@ -21,7 +21,7 @@ scale-info = { version = "2", optional = true }
|
|||
|
||||
serai-runtime = { path = "../runtime", version = "0.1" }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
subxt = { version = "0.29", default-features = false, features = ["jsonrpsee-ws"], optional = true }
|
||||
|
||||
bitcoin = { version = "0.30", optional = true }
|
||||
|
|
|
@ -17,11 +17,11 @@ thiserror = { version = "1", optional = true }
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
in-instructions-primitives = { package = "serai-in-instructions-primitives", path = "../primitives", default-features = false }
|
||||
|
|
|
@ -18,9 +18,9 @@ serde = { version = "1", default-features = false, features = ["derive", "alloc"
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
tokens-primitives = { package = "serai-tokens-primitives", path = "../../tokens/primitives", default-features = false }
|
||||
|
|
|
@ -17,47 +17,47 @@ clap = { version = "4", features = ["derive"] }
|
|||
futures = "0.3"
|
||||
jsonrpsee = { version = "0.16", features = ["server"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-keyring = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-inherents = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-timestamp = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-io = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-blockchain = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-api = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-block-builder = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-consensus-babe = { git = "https://github.com/serai-dex/substrate" }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-keyring = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-inherents = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-timestamp = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-io = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-blockchain = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-block-builder = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sp-consensus-babe = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
frame-benchmarking = { git = "https://github.com/serai-dex/substrate" }
|
||||
frame-benchmarking-cli = { git = "https://github.com/serai-dex/substrate" }
|
||||
frame-benchmarking = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
frame-benchmarking-cli = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
serai-runtime = { path = "../runtime", features = ["std"] }
|
||||
|
||||
sc-offchain = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-transaction-pool = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-transaction-pool-api = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-basic-authorship = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-executor = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-service = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-client-api = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-network-common = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-network = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-offchain = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-transaction-pool = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-transaction-pool-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-basic-authorship = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-executor = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-service = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-client-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-network-common = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-network = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
sc-consensus = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-consensus-babe = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-consensus-grandpa = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-authority-discovery = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-consensus = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-consensus-babe = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-consensus-grandpa = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-authority-discovery = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
sc-telemetry = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-cli = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-telemetry = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
sc-cli = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
sc-rpc-api = { git = "https://github.com/serai-dex/substrate" }
|
||||
sc-rpc-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
substrate-frame-rpc-system = { git = "https://github.com/serai-dex/substrate" }
|
||||
pallet-transaction-payment-rpc = { git = "https://github.com/serai-dex/substrate" }
|
||||
substrate-frame-rpc-system = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
pallet-transaction-payment-rpc = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-build-script-utils = { git = "https://github.com/serai-dex/substrate.git" }
|
||||
substrate-build-script-utils = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -21,8 +21,8 @@ serde = { version = "1", default-features = false, features = ["derive", "alloc"
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
[features]
|
||||
std = ["lazy_static", "zeroize", "scale/std", "scale-info/std", "serde/std", "sp-core/std", "sp-runtime/std"]
|
||||
|
|
|
@ -15,53 +15,53 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
sp-offchain = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-version = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-inherents = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-offchain = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-version = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-inherents = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
sp-session = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-consensus-babe = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-consensus-grandpa = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-session = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-consensus-babe = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-consensus-grandpa = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
sp-authority-discovery = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-authority-discovery = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
sp-transaction-pool = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-block-builder = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-transaction-pool = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-block-builder = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-executive = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-benchmarking = { git = "https://github.com/serai-dex/substrate", default-features = false, optional = true }
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-executive = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-benchmarking = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false, optional = true }
|
||||
|
||||
serai-primitives = { path = "../primitives", default-features = false }
|
||||
|
||||
pallet-timestamp = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-timestamp = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
pallet-balances = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-assets = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-transaction-payment = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-balances = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
pallet-assets = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
pallet-transaction-payment = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
tokens-pallet = { package = "serai-tokens-pallet", path = "../tokens/pallet", default-features = false }
|
||||
in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../in-instructions/pallet", default-features = false }
|
||||
|
||||
validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets/pallet", default-features = false }
|
||||
pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-babe = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-grandpa = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-session = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
pallet-babe = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
pallet-grandpa = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
pallet-authority-discovery = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-authority-discovery = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
frame-system-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-system-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { git = "https://github.com/serai-dex/substrate" }
|
||||
substrate-wasm-builder = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0" }
|
||||
|
||||
[features]
|
||||
std = [
|
||||
|
|
|
@ -15,10 +15,10 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
pallet-assets = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
pallet-assets = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
tokens-primitives = { package = "serai-tokens-primitives", path = "../primitives", default-features = false }
|
||||
|
|
|
@ -21,7 +21,7 @@ scale-info = { version = "2", default-features = false, features = ["derive"] }
|
|||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
[features]
|
||||
std = ["zeroize", "serde/std", "scale/std", "scale-info/std", "sp-runtime/std", "serai-primitives/std"]
|
||||
|
|
|
@ -17,13 +17,13 @@ hashbrown = { version = "0.14", default-features = false }
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
frame-system = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
frame-support = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
validator-sets-primitives = { package = "serai-validator-sets-primitives", path = "../primitives", default-features = false }
|
||||
|
|
|
@ -22,8 +22,8 @@ serde = { version = "1", default-features = false, features = ["derive", "alloc"
|
|||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
sp-std = { git = "https://github.com/serai-dex/substrate", branch = "dalek-4.0", default-features = false }
|
||||
|
||||
serai-primitives = { path = "../../primitives", default-features = false }
|
||||
|
||||
|
|
Loading…
Reference in a new issue