mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Optimizations, disable val client sync check & additional lcli tools (#834)
* Start adding interop genesis state to lcli * Use more efficient method to generate genesis state * Remove duplicate int_to_bytes32 * Add lcli command to change state genesis time * Add option to allow VC to start with unsynced BN * Set VC to do parallel key loading * Don't default to dummy eth1 backend * Add endpoint to dump operation pool * Add metrics for op pool * Remove state clone for slot notifier * Add mem size approximation for tree hash cache * Avoid cloning tree hash when getting head * Fix failing API tests * Address Michael's comments * Add HashMap::from_par_iter
This commit is contained in:
@@ -18,3 +18,4 @@ eth2_ssz = { path = "../../../eth2/utils/ssz" }
|
||||
serde_json = "^1.0"
|
||||
eth2_config = { path = "../../../eth2/utils/eth2_config" }
|
||||
proto_array_fork_choice = { path = "../../../eth2/proto_array_fork_choice" }
|
||||
operation_pool = { path = "../../../eth2/operation_pool" }
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
use eth2_config::Eth2Config;
|
||||
use futures::{future, Future, IntoFuture};
|
||||
use proto_array_fork_choice::core::ProtoArray;
|
||||
use reqwest::{
|
||||
r#async::{Client, ClientBuilder, Response},
|
||||
StatusCode,
|
||||
@@ -20,6 +19,8 @@ use types::{
|
||||
};
|
||||
use url::Url;
|
||||
|
||||
pub use operation_pool::PersistedOperationPool;
|
||||
pub use proto_array_fork_choice::core::ProtoArray;
|
||||
pub use rest_api::{
|
||||
CanonicalHeadResponse, Committee, HeadBeaconBlock, ValidatorDutiesRequest, ValidatorDuty,
|
||||
ValidatorRequest, ValidatorResponse,
|
||||
@@ -560,6 +561,16 @@ impl<E: EthSpec> Advanced<E> {
|
||||
.into_future()
|
||||
.and_then(move |url| client.json_get(url, vec![]))
|
||||
}
|
||||
|
||||
/// Gets the core `PersistedOperationPool` struct from the node.
|
||||
pub fn get_operation_pool(
|
||||
&self,
|
||||
) -> impl Future<Item = PersistedOperationPool<E>, Error = Error> {
|
||||
let client = self.0.clone();
|
||||
self.url("operation_pool")
|
||||
.into_future()
|
||||
.and_then(move |url| client.json_get(url, vec![]))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user