mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Update develop to patch-polkadot-sdk
Allows us to finally remove the old `serai-dex/substrate` repository _and_ should have CI pass without issue on `develop` again. The changes made here should be trivial and maintain all prior behavior/functionality. The most notable are to `chain_spec.rs`, in order to still use a SCALE-encoded `GenesisConfig` (avoiding `serde_json`).
This commit is contained in:
@@ -28,7 +28,7 @@ use messages::{
|
||||
};
|
||||
use serai_message_queue::{Service, Metadata, client::MessageQueue};
|
||||
|
||||
use serai_client::{primitives::Signature, Serai};
|
||||
use serai_client::Serai;
|
||||
|
||||
use dockertest::{PullPolicy, Image, TestBodySpecification, DockerOperations};
|
||||
|
||||
@@ -299,18 +299,16 @@ impl Processor {
|
||||
schnorrkel_key_pair[64 ..].copy_from_slice(
|
||||
&(<Ristretto as Ciphersuite>::generator() * *substrate_key).to_bytes(),
|
||||
);
|
||||
let signature = Signature(
|
||||
schnorrkel::keys::Keypair::from_bytes(&schnorrkel_key_pair)
|
||||
.unwrap()
|
||||
.sign_simple(b"substrate", &cosign_block_msg(block_number, block))
|
||||
.to_bytes(),
|
||||
);
|
||||
let signature = schnorrkel::keys::Keypair::from_bytes(&schnorrkel_key_pair)
|
||||
.unwrap()
|
||||
.sign_simple(b"substrate", &cosign_block_msg(block_number, block))
|
||||
.to_bytes();
|
||||
|
||||
send_message(
|
||||
messages::coordinator::ProcessorMessage::CosignedBlock {
|
||||
block_number,
|
||||
block,
|
||||
signature: signature.0.to_vec(),
|
||||
signature: signature.to_vec(),
|
||||
}
|
||||
.into(),
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ use dkg::Participant;
|
||||
use scale::Encode;
|
||||
|
||||
use serai_client::{
|
||||
primitives::{BlockHash, Signature},
|
||||
primitives::BlockHash,
|
||||
in_instructions::{
|
||||
primitives::{Batch, SignedBatch, batch_message},
|
||||
InInstructionsEvent,
|
||||
@@ -166,12 +166,11 @@ pub async fn batch(
|
||||
OsRng.fill_bytes(&mut schnorrkel_key_pair[32 .. 64]);
|
||||
schnorrkel_key_pair[64 ..]
|
||||
.copy_from_slice(&(<Ristretto as Ciphersuite>::generator() * **substrate_key).to_bytes());
|
||||
let signature = Signature(
|
||||
schnorrkel::keys::Keypair::from_bytes(&schnorrkel_key_pair)
|
||||
.unwrap()
|
||||
.sign_simple(b"substrate", &batch_message(&batch))
|
||||
.to_bytes(),
|
||||
);
|
||||
let signature = schnorrkel::keys::Keypair::from_bytes(&schnorrkel_key_pair)
|
||||
.unwrap()
|
||||
.sign_simple(b"substrate", &batch_message(&batch))
|
||||
.to_bytes()
|
||||
.into();
|
||||
|
||||
let batch = SignedBatch { batch, signature };
|
||||
|
||||
|
||||
@@ -14,10 +14,7 @@ use ciphersuite::{
|
||||
use ciphersuite_kp256::Secp256k1;
|
||||
use dkg::ThresholdParams;
|
||||
|
||||
use serai_client::{
|
||||
validator_sets::primitives::{ExternalValidatorSet, KeyPair, Session},
|
||||
Public,
|
||||
};
|
||||
use serai_client::validator_sets::primitives::{ExternalValidatorSet, KeyPair, Session};
|
||||
use messages::{key_gen::KeyGenId, CoordinatorMessage};
|
||||
|
||||
use crate::tests::*;
|
||||
@@ -207,7 +204,7 @@ pub async fn key_gen<C: Ciphersuite>(
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
KeyPair(Public(substrate_key), network_key.try_into().unwrap())
|
||||
KeyPair(substrate_key.into(), network_key.try_into().unwrap())
|
||||
);
|
||||
|
||||
for processor in &mut *processors {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
|
||||
use zeroize::Zeroizing;
|
||||
use rand_core::{RngCore, OsRng};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user