Skip to content
Permalink
Browse files

use the correct algorithm

  • Loading branch information...
vincenthz committed May 15, 2019
1 parent 740f972 commit 9295e2137a5ac0fbf5138e538049ee84ea6bb04e
@@ -11,7 +11,7 @@ use crate::stake;
use crate::transaction::{AuthenticatedTransaction, NoExtra};
use chain_addr::Address;
use chain_crypto::{
Curve25519_2HashDH, Ed25519Extended, FakeMMM, SecretKey, VerifiableRandomFunction,
Curve25519_2HashDH, Ed25519Extended, SumEd25519_12, SecretKey, VerifiableRandomFunction,
};

pub struct BlockBuilder {
@@ -136,7 +136,7 @@ impl BlockBuilder {
pub fn make_genesis_praos_block(
mut self,
node_id: &stake::StakePoolId,
kes_signing_key: &mut SecretKey<FakeMMM>,
kes_signing_key: &mut SecretKey<SumEd25519_12>,
vrf_proof: <Curve25519_2HashDH as VerifiableRandomFunction>::VerifiedRandomOutput,
) -> Block {
assert_ne!(self.common.chain_length, ChainLength(0));
@@ -13,7 +13,7 @@ use chain_core::{
property,
};
use chain_crypto::{
self, Curve25519_2HashDH, Ed25519Extended, FakeMMM, Signature, VerifiableRandomFunction,
self, Curve25519_2HashDH, Ed25519Extended, Signature, SumEd25519_12, VerifiableRandomFunction,
};

pub type HeaderHash = Hash;
@@ -54,7 +54,7 @@ pub struct GenesisPraosProof {
}

#[derive(Debug, Clone)]
pub struct KESSignature(pub(crate) Signature<HeaderToSign, FakeMMM>);
pub struct KESSignature(pub(crate) Signature<HeaderToSign, SumEd25519_12>);

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Proof {
@@ -10,14 +10,14 @@ use crate::{
value::Value,
};
use chain_crypto::Verification as SigningVerification;
use chain_crypto::{Curve25519_2HashDH, FakeMMM, PublicKey, SecretKey};
use chain_crypto::{Curve25519_2HashDH, PublicKey, SecretKey, SumEd25519_12};
pub use vrfeval::{ActiveSlotsCoeff, ActiveSlotsCoeffError, Witness};
use vrfeval::{Nonce, PercentStake, VrfEvaluator};

/// Praos Leader consisting of the KES public key and VRF public key
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct GenesisPraosLeader {
pub kes_public_key: PublicKey<FakeMMM>,
pub kes_public_key: PublicKey<SumEd25519_12>,
pub vrf_public_key: PublicKey<Curve25519_2HashDH>,
}

@@ -154,7 +154,7 @@ mod test {
use chain_core::property::Transaction as T;
use chain_core::property::{BlockId, HasTransaction};
use chain_crypto::{
algorithms::{Ed25519, Ed25519Extended, FakeMMM},
algorithms::{Ed25519, Ed25519Extended, SumEd25519_12},
SecretKey,
};
use quickcheck::{Arbitrary, StdGen};
@@ -4,7 +4,7 @@ use crate::{
ledger::Ledger,
stake::StakePoolId,
};
use chain_crypto::{Curve25519_2HashDH, Ed25519Extended, FakeMMM, SecretKey};
use chain_crypto::{Curve25519_2HashDH, Ed25519Extended, SecretKey, SumEd25519_12};
use chain_time::era::TimeEra;

pub mod bft;
@@ -50,7 +50,7 @@ pub struct BftLeader {

pub struct GenesisLeader {
pub node_id: StakePoolId,
pub sig_key: SecretKey<FakeMMM>,
pub sig_key: SecretKey<SumEd25519_12>,
pub vrf_key: SecretKey<Curve25519_2HashDH>,
}

0 comments on commit 9295e21

Please sign in to comment.
You can’t perform that action at this time.