Transition to secp256k1 default peer id
This commit is contained in:
parent
ae983a9347
commit
8ee3523abd
@ -2,6 +2,7 @@ use crate::Multiaddr;
|
|||||||
use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder};
|
use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder};
|
||||||
use libp2p::secio;
|
use libp2p::secio;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
use types::Topic;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
/// Network configuration for lighthouse.
|
/// Network configuration for lighthouse.
|
||||||
@ -24,8 +25,9 @@ pub struct NetworkConfig {
|
|||||||
impl Default for NetworkConfig {
|
impl Default for NetworkConfig {
|
||||||
/// Generate a default network configuration.
|
/// Generate a default network configuration.
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
// TODO: Currently using ed25519 key pairs. Wire protocol specifies RSA. Waiting for this
|
// TODO: Currently using secp256k1 key pairs. Wire protocol specifies RSA. Waiting for this
|
||||||
// PR to be merged to generate RSA keys: https://github.com/briansmith/ring/pull/733
|
// PR to be merged to generate RSA keys: https://github.com/briansmith/ring/pull/733
|
||||||
|
|
||||||
NetworkConfig {
|
NetworkConfig {
|
||||||
listen_addresses: vec!["/ip4/127.0.0.1/tcp/9000"
|
listen_addresses: vec!["/ip4/127.0.0.1/tcp/9000"
|
||||||
.parse()
|
.parse()
|
||||||
@ -33,7 +35,7 @@ impl Default for NetworkConfig {
|
|||||||
listen_port: 9000,
|
listen_port: 9000,
|
||||||
gs_config: GossipsubConfigBuilder::new().build(),
|
gs_config: GossipsubConfigBuilder::new().build(),
|
||||||
boot_nodes: Vec::new(),
|
boot_nodes: Vec::new(),
|
||||||
local_private_key: secio::SecioKeyPair::ed25519_generated().unwrap(),
|
local_private_key: secio::SecioKeyPair::secp256k1_generated().unwrap(),
|
||||||
client_version: version::version(),
|
client_version: version::version(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,5 +73,6 @@ pub type AttesterMap = HashMap<(u64, u64), Vec<usize>>;
|
|||||||
pub type ProposerMap = HashMap<u64, usize>;
|
pub type ProposerMap = HashMap<u64, usize>;
|
||||||
|
|
||||||
pub use bls::{AggregatePublicKey, AggregateSignature, Keypair, PublicKey, Signature};
|
pub use bls::{AggregatePublicKey, AggregateSignature, Keypair, PublicKey, Signature};
|
||||||
|
pub use libp2p::floodsub::Topic;
|
||||||
pub use libp2p::multiaddr;
|
pub use libp2p::multiaddr;
|
||||||
pub use libp2p::Multiaddr;
|
pub use libp2p::Multiaddr;
|
||||||
|
Loading…
Reference in New Issue
Block a user