mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Update testnet tooling (#1001)
* Add progress on new deposits * Add deposited command to account manager * Remove old lcli::helpers mod * Clean clap_utils * Refactor lcli deposit contract commands to use IPC * Make testnet optional for environment * Use dbg formatting for deploy address * Add command to generate bootnode enr * Ensure lcli returns with 1 on error * Ensure account manager returns 1 on error * Disallow deposits to the zero address * Update web3 in eth1 crate * Ensure correct lighthouse dir is created * Reduce deposit gas requirement * Update cargo.lock * Add progress on new deposits * Add deposited command to account manager * Remove old lcli::helpers mod * Clean clap_utils * Refactor lcli deposit contract commands to use IPC * Add command to generate bootnode enr * Ensure lcli returns with 1 on error * Ensure account manager returns 1 on error * Update web3 in eth1 crate * Update Cargo.lock * Move lcli out of main install script * Change --limit to --at-least * Change --datadir to --validator-dir * Remove duplication in docs
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
//! Helper functions and an extension trait for Ethereum 2 ENRs.
|
||||
|
||||
pub use libp2p::{core::identity::Keypair, discv5::enr::CombinedKey};
|
||||
|
||||
use super::ENR_FILENAME;
|
||||
use crate::types::{Enr, EnrBitfield};
|
||||
use crate::NetworkConfig;
|
||||
use libp2p::core::identity::Keypair;
|
||||
use libp2p::discv5::enr::{CombinedKey, EnrBuilder};
|
||||
use libp2p::discv5::enr::EnrBuilder;
|
||||
use slog::{debug, warn};
|
||||
use ssz::{Decode, Encode};
|
||||
use ssz_types::BitVector;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
pub(crate) mod enr;
|
||||
|
||||
// Allow external use of the lighthouse ENR builder
|
||||
pub use enr::build_enr;
|
||||
pub use enr::{build_enr, CombinedKey, Keypair};
|
||||
|
||||
use crate::metrics;
|
||||
use crate::{error, Enr, NetworkConfig, NetworkGlobals};
|
||||
use enr::{Eth2Enr, BITFIELD_ENR_KEY, ETH2_ENR_KEY};
|
||||
use futures::prelude::*;
|
||||
use libp2p::core::{identity::Keypair, ConnectedPoint, Multiaddr, PeerId};
|
||||
use libp2p::core::{ConnectedPoint, Multiaddr, PeerId};
|
||||
use libp2p::discv5::enr::NodeId;
|
||||
use libp2p::discv5::{Discv5, Discv5Event};
|
||||
use libp2p::multiaddr::Protocol;
|
||||
@@ -30,7 +30,7 @@ const MAX_TIME_BETWEEN_PEER_SEARCHES: u64 = 120;
|
||||
/// Initial delay between peer searches.
|
||||
const INITIAL_SEARCH_DELAY: u64 = 5;
|
||||
/// Local ENR storage filename.
|
||||
const ENR_FILENAME: &str = "enr.dat";
|
||||
pub const ENR_FILENAME: &str = "enr.dat";
|
||||
/// Number of peers we'd like to have connected to a given long-lived subnet.
|
||||
const TARGET_SUBNET_PEERS: u64 = 3;
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ pub use libp2p::{multiaddr, Multiaddr};
|
||||
pub use libp2p::{PeerId, Swarm};
|
||||
pub use peer_manager::{PeerDB, PeerInfo, PeerSyncStatus};
|
||||
pub use rpc::RPCEvent;
|
||||
pub use service::Service;
|
||||
pub use service::{Service, NETWORK_KEY_FILENAME};
|
||||
|
||||
@@ -27,7 +27,7 @@ use types::{EnrForkId, EthSpec};
|
||||
type Libp2pStream = Boxed<(PeerId, StreamMuxerBox), Error>;
|
||||
type Libp2pBehaviour<TSpec> = Behaviour<Substream<StreamMuxerBox>, TSpec>;
|
||||
|
||||
const NETWORK_KEY_FILENAME: &str = "key";
|
||||
pub const NETWORK_KEY_FILENAME: &str = "key";
|
||||
/// The time in milliseconds to wait before banning a peer. This allows for any Goodbye messages to be
|
||||
/// flushed and protocols to be negotiated.
|
||||
const BAN_PEER_WAIT_TIMEOUT: u64 = 200;
|
||||
|
||||
Reference in New Issue
Block a user