From 5577b03496cfe5b4d96c8403d92a82ec8895ec99 Mon Sep 17 00:00:00 2001 From: protocolwhisper Date: Thu, 10 Aug 2023 15:39:15 -0500 Subject: [PATCH 01/19] (fix): HTTP error handling in VC API --- validator_client/src/http_api/mod.rs | 113 ++++++++++++++++----------- 1 file changed, 67 insertions(+), 46 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index f654833cbb4..04732dbf9b1 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -21,6 +21,7 @@ use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; +use hyper::Body; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; @@ -39,10 +40,12 @@ use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; +use warp::http::response::Response as WarpResponse; +use warp::reply::{Reply, Response}; + use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, - response::Response, StatusCode, }, sse::Event, @@ -110,6 +113,24 @@ impl Default for Config { } } +/// Convert a warp `Rejection` into a `Response`. +/// +/// This function should *always* be used to convert rejections into responses. This prevents warp +/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 +pub async fn convert_rejection(res: Result) -> Response { + match res { + Ok(response) => response.into_response(), + Err(e) => match warp_utils::reject::handle_rejection(e).await { + Ok(reply) => reply.into_response(), + Err(_) => warp::reply::with_status( + warp::reply::json(&"unhandled error"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ) + .into_response(), + }, + } +} + /// Creates a server that will serve requests using information from `ctx`. /// /// The server will shut down gracefully when the `shutdown` future resolves. @@ -265,7 +286,7 @@ pub fn serve( .and(warp::path("version")) .and(warp::path::end()) .and(signer.clone()) - .and_then(|signer| { + .then(|signer| { blocking_signed_json_task(signer, move || { Ok(api_types::GenericResponse::from(api_types::VersionData { version: version_with_platform(), @@ -278,7 +299,7 @@ pub fn serve( .and(warp::path("health")) .and(warp::path::end()) .and(signer.clone()) - .and_then(|signer| { + .then(|signer| { blocking_signed_json_task(signer, move || { eth2::lighthouse::Health::observe() .map(api_types::GenericResponse::from) @@ -292,7 +313,7 @@ pub fn serve( .and(warp::path::end()) .and(spec_filter.clone()) .and(signer.clone()) - .and_then(|spec: Arc<_>, signer| { + .then(|spec: Arc<_>, signer| { blocking_signed_json_task(signer, move || { let config = ConfigAndPreset::from_chain_spec::(&spec, None); Ok(api_types::GenericResponse::from(config)) @@ -305,7 +326,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then(|validator_store: Arc>, signer| { + .then(|validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { let validators = validator_store .initialized_validators() @@ -330,7 +351,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { let validator = validator_store @@ -365,7 +386,7 @@ pub fn serve( .and(app_start_filter) .and(validator_dir_filter.clone()) .and(signer.clone()) - .and_then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { + .then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { blocking_signed_json_task(signer, move || { let app_uptime = app_start.elapsed().as_secs(); Ok(api_types::GenericResponse::from(observe_system_health_vc( @@ -383,7 +404,7 @@ pub fn serve( .and(graffiti_flag_filter) .and(signer.clone()) .and(log_filter.clone()) - .and_then( + .then( |validator_store: Arc>, graffiti_file: Option, graffiti_flag: Option, @@ -421,7 +442,7 @@ pub fn serve( .and(spec_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( move |body: Vec, validator_dir: PathBuf, secrets_dir: PathBuf, @@ -468,7 +489,7 @@ pub fn serve( .and(spec_filter) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( move |body: api_types::CreateValidatorsMnemonicRequest, validator_dir: PathBuf, secrets_dir: PathBuf, @@ -517,7 +538,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( move |body: api_types::KeystoreValidatorsPostRequest, validator_dir: PathBuf, secrets_dir: PathBuf, @@ -603,7 +624,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( |body: Vec, validator_store: Arc>, signer, @@ -656,7 +677,7 @@ pub fn serve( .and(graffiti_file_filter) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, body: api_types::ValidatorPatchRequest, validator_store: Arc>, @@ -726,7 +747,7 @@ pub fn serve( let get_auth = get_auth .and(signer.clone()) .and(api_token_path_filter) - .and_then(|signer, token_path: PathBuf| { + .then(|signer, token_path: PathBuf| { blocking_signed_json_task(signer, move || { Ok(AuthResponse { token_path: token_path.display().to_string(), @@ -743,7 +764,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) - .and_then( + .then( move |request, signer, validator_store, task_executor, log| { blocking_signed_json_task(signer, move || { if allow_keystore_export { @@ -770,7 +791,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { if validator_store @@ -810,7 +831,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, request: api_types::UpdateFeeRecipientRequest, validator_store: Arc>, @@ -850,7 +871,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { if validator_store @@ -887,7 +908,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { if validator_store @@ -919,7 +940,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, request: api_types::UpdateGasLimitRequest, validator_store: Arc>, @@ -959,7 +980,7 @@ pub fn serve( .and(warp::path::end()) .and(validator_store_filter.clone()) .and(signer.clone()) - .and_then( + .then( |validator_pubkey: PublicKey, validator_store: Arc>, signer| { blocking_signed_json_task(signer, move || { if validator_store @@ -1000,7 +1021,7 @@ pub fn serve( .and(log_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) - .and_then( + .then( |pubkey: PublicKey, query: api_types::VoluntaryExitQuery, validator_store: Arc>, @@ -1032,7 +1053,7 @@ pub fn serve( let get_std_keystores = std_keystores .and(signer.clone()) .and(validator_store_filter.clone()) - .and_then(|signer, validator_store: Arc>| { + .then(|signer, validator_store: Arc>| { blocking_signed_json_task(signer, move || Ok(keystores::list(validator_store))) }); @@ -1045,7 +1066,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) - .and_then( + .then( move |request, signer, validator_dir, @@ -1074,7 +1095,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) - .and_then(|request, signer, validator_store, task_executor, log| { + .then(|request, signer, validator_store, task_executor, log| { blocking_signed_json_task(signer, move || { keystores::delete(request, validator_store, task_executor, log) }) @@ -1084,7 +1105,7 @@ pub fn serve( let get_std_remotekeys = std_remotekeys .and(signer.clone()) .and(validator_store_filter.clone()) - .and_then(|signer, validator_store: Arc>| { + .then(|signer, validator_store: Arc>| { blocking_signed_json_task(signer, move || Ok(remotekeys::list(validator_store))) }); @@ -1095,7 +1116,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) - .and_then(|request, signer, validator_store, task_executor, log| { + .then(|request, signer, validator_store, task_executor, log| { blocking_signed_json_task(signer, move || { remotekeys::import(request, validator_store, task_executor, log) }) @@ -1108,7 +1129,7 @@ pub fn serve( .and(validator_store_filter) .and(task_executor_filter) .and(log_filter.clone()) - .and_then(|request, signer, validator_store, task_executor, log| { + .then(|request, signer, validator_store, task_executor, log| { blocking_signed_json_task(signer, move || { remotekeys::delete(request, validator_store, task_executor, log) }) @@ -1226,38 +1247,38 @@ pub fn serve( /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task( - signer: S, - func: F, -) -> Result +pub async fn blocking_signed_json_task(signer: S, func: F) -> Response where S: Fn(&[u8]) -> String, F: FnOnce() -> Result + Send + 'static, T: Serialize + Send + 'static, { - warp_utils::task::blocking_task(func) + let result = warp_utils::task::blocking_task(func) .await .map(|func_output| { - let mut response = match serde_json::to_vec(&func_output) { - Ok(body) => { - let mut res = Response::new(body); - res.headers_mut() - .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - res + let response_body = match serde_json::to_vec(&func_output) { + Ok(body) => body, + Err(_) => { + return WarpResponse::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(Body::from(vec![])) + .expect("can produce simple response from static values") } - Err(_) => Response::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(vec![]) - .expect("can produce simple response from static values"), }; - let body: &Vec = response.body(); - let signature = signer(body); + let signature = signer(&response_body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + let mut response = WarpResponse::builder() + .header(CONTENT_TYPE, HeaderValue::from_static("application/json")) + .body(Body::from(response_body)) + .unwrap(); + response.headers_mut().append("Signature", header_value); response - }) + }); + + convert_rejection(result).await } From edecf5aa5aa347e8eed41213a6667905bd6da5e4 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Thu, 17 Aug 2023 19:03:24 -0500 Subject: [PATCH 02/19] (rebase): HTTP error handling in VC API --- validator_client/src/http_api/mod.rs | 40 ++++++++-------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 04732dbf9b1..95ee6c079fb 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -21,10 +21,12 @@ use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; +use hyper::http::response; use hyper::Body; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; +use ring::signature; use serde::{Deserialize, Serialize}; use slog::{crit, info, warn, Logger}; use slot_clock::SlotClock; @@ -42,6 +44,7 @@ use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; use warp::http::response::Response as WarpResponse; use warp::reply::{Reply, Response}; +use warp::Rejection; use warp::{ http::{ @@ -1250,35 +1253,14 @@ pub fn serve( pub async fn blocking_signed_json_task(signer: S, func: F) -> Response where S: Fn(&[u8]) -> String, - F: FnOnce() -> Result + Send + 'static, + F: FnOnce() -> Result + Send + 'static, T: Serialize + Send + 'static, { - let result = warp_utils::task::blocking_task(func) - .await - .map(|func_output| { - let response_body = match serde_json::to_vec(&func_output) { - Ok(body) => body, - Err(_) => { - return WarpResponse::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(Body::from(vec![])) - .expect("can produce simple response from static values") - } - }; - - let signature = signer(&response_body); - let header_value = - HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - - let mut response = WarpResponse::builder() - .header(CONTENT_TYPE, HeaderValue::from_static("application/json")) - .body(Body::from(response_body)) - .unwrap(); - - response.headers_mut().append("Signature", header_value); - - response - }); - - convert_rejection(result).await + let result = warp_utils::task::blocking_task(func).await; + let response = convert_rejection(result).await; + let body: &Vec = response.body(); + let signature = signature(body); + let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + response.headers_mut().append("Signature", header_value); + response } From 24fa06bf78b7bb1a710ddb8a6fc083d38d96a17d Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Fri, 18 Aug 2023 23:43:03 -0500 Subject: [PATCH 03/19] (rebase) : Not working --- common/warp_utils/src/task.rs | 15 +- validator_client/src/http_api/mod.rs | 197 ++++++++------------------- 2 files changed, 65 insertions(+), 147 deletions(-) diff --git a/common/warp_utils/src/task.rs b/common/warp_utils/src/task.rs index 001231f2c6b..78b851c90f7 100644 --- a/common/warp_utils/src/task.rs +++ b/common/warp_utils/src/task.rs @@ -2,10 +2,9 @@ use serde::Serialize; use warp::reply::{Reply, Response}; /// A convenience wrapper around `blocking_task`. -pub async fn blocking_task(func: F) -> Result +pub async fn blocking_task(func: F) -> Result where - F: FnOnce() -> Result + Send + 'static, - T: Send + 'static, + F: FnOnce() -> Result + Send + 'static, { tokio::task::spawn_blocking(func) .await @@ -15,12 +14,11 @@ where /// A convenience wrapper around `blocking_task` that returns a `warp::reply::Response`. /// /// Using this method consistently makes it possible to simplify types using `.unify()` or `.uor()`. -pub async fn blocking_response_task(func: F) -> Result +pub async fn blocking_response_task(func: F) -> Result where - F: FnOnce() -> Result + Send + 'static, - T: Reply + Send + 'static, + F: FnOnce() -> Result + Send + 'static, { - blocking_task(func).await.map(Reply::into_response) + blocking_task(func).await } /// A convenience wrapper around `blocking_task` for use with `warp` JSON responses. @@ -31,7 +29,8 @@ where { blocking_response_task(|| { let response = func()?; - Ok(warp::reply::json(&response)) + let json_reply = warp::reply::json(&response); + Ok(json_reply.into_response()) }) .await } diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 95ee6c079fb..17bd1192fb0 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -5,8 +5,6 @@ mod keystores; mod remotekeys; mod tests; -pub mod test_utils; - use crate::http_api::create_signed_voluntary_exit::create_signed_voluntary_exit; use crate::{determine_graffiti, GraffitiFile, ValidatorStore}; use account_utils::{ @@ -14,19 +12,16 @@ use account_utils::{ validator_definitions::{SigningDefinition, ValidatorDefinition, Web3SignerDefinition}, }; pub use api_secret::ApiSecret; -use create_validator::{ - create_validators_mnemonic, create_validators_web3signer, get_voting_password_storage, -}; +use create_validator::{create_validators_mnemonic, create_validators_web3signer}; use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; +use hyper::header::OccupiedEntry; use hyper::http::response; -use hyper::Body; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; -use ring::signature; use serde::{Deserialize, Serialize}; use slog::{crit, info, warn, Logger}; use slot_clock::SlotClock; @@ -40,21 +35,19 @@ use sysinfo::{System, SystemExt}; use system_health::observe_system_health_vc; use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; +use types::typenum::private::BitDiffOut; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; -use warp::http::response::Response as WarpResponse; -use warp::reply::{Reply, Response}; -use warp::Rejection; - +use warp::reply::{Reply, Response as resp}; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, + response::Response, StatusCode, }, sse::Event, Filter, }; - #[derive(Debug)] pub enum Error { Warp(warp::Error), @@ -81,7 +74,6 @@ pub struct Context { pub api_secret: ApiSecret, pub validator_store: Option>>, pub validator_dir: Option, - pub secrets_dir: Option, pub graffiti_file: Option, pub graffiti_flag: Option, pub spec: ChainSpec, @@ -99,8 +91,6 @@ pub struct Config { pub listen_addr: IpAddr, pub listen_port: u16, pub allow_origin: Option, - pub allow_keystore_export: bool, - pub store_passwords_in_secrets_dir: bool, } impl Default for Config { @@ -110,30 +100,10 @@ impl Default for Config { listen_addr: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), listen_port: 5062, allow_origin: None, - allow_keystore_export: false, - store_passwords_in_secrets_dir: false, } } } -/// Convert a warp `Rejection` into a `Response`. -/// -/// This function should *always* be used to convert rejections into responses. This prevents warp -/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(res: Result) -> Response { - match res { - Ok(response) => response.into_response(), - Err(e) => match warp_utils::reject::handle_rejection(e).await { - Ok(reply) => reply.into_response(), - Err(_) => warp::reply::with_status( - warp::reply::json(&"unhandled error"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ) - .into_response(), - }, - } -} - /// Creates a server that will serve requests using information from `ctx`. /// /// The server will shut down gracefully when the `shutdown` future resolves. @@ -154,8 +124,6 @@ pub fn serve( shutdown: impl Future + Send + Sync + 'static, ) -> Result<(SocketAddr, impl Future), Error> { let config = &ctx.config; - let allow_keystore_export = config.allow_keystore_export; - let store_passwords_in_secrets_dir = config.store_passwords_in_secrets_dir; let log = ctx.log.clone(); // Configure CORS. @@ -198,38 +166,27 @@ pub fn serve( let signer = warp::any().map(move || signer.clone()); let inner_validator_store = ctx.validator_store.clone(); - let validator_store_filter = warp::any() - .map(move || inner_validator_store.clone()) - .and_then(|validator_store: Option<_>| async move { + let validator_store_filter = warp::any().map(move || inner_validator_store.clone()).then( + |validator_store: Option<_>| async move { validator_store.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator store is not initialized.".to_string(), ) }) - }); + }, + ); let inner_task_executor = ctx.task_executor.clone(); let task_executor_filter = warp::any().map(move || inner_task_executor.clone()); let inner_validator_dir = ctx.validator_dir.clone(); - let validator_dir_filter = warp::any() - .map(move || inner_validator_dir.clone()) - .and_then(|validator_dir: Option<_>| async move { + let validator_dir_filter = warp::any().map(move || inner_validator_dir.clone()).then( + |validator_dir: Option<_>| async move { validator_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator_dir directory is not initialized.".to_string(), ) }) - }); - - let inner_secrets_dir = ctx.secrets_dir.clone(); - let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).and_then( - |secrets_dir: Option<_>| async move { - secrets_dir.ok_or_else(|| { - warp_utils::reject::custom_not_found( - "secrets_dir directory is not initialized.".to_string(), - ) - }) }, ); @@ -440,21 +397,18 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) - .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(spec_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - move |body: Vec, - validator_dir: PathBuf, - secrets_dir: PathBuf, - validator_store: Arc>, - spec: Arc, - signer, - task_executor: TaskExecutor| { + |body: Vec, + validator_dir: PathBuf, + validator_store: Arc>, + spec: Arc, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { - let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); if let Some(handle) = task_executor.handle() { let (validators, mnemonic) = handle.block_on(create_validators_mnemonic( @@ -462,7 +416,6 @@ pub fn serve( None, &body, &validator_dir, - secrets_dir, &validator_store, &spec, ))?; @@ -487,21 +440,18 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) - .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(spec_filter) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - move |body: api_types::CreateValidatorsMnemonicRequest, - validator_dir: PathBuf, - secrets_dir: PathBuf, - validator_store: Arc>, - spec: Arc, - signer, - task_executor: TaskExecutor| { + |body: api_types::CreateValidatorsMnemonicRequest, + validator_dir: PathBuf, + validator_store: Arc>, + spec: Arc, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { - let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); if let Some(handle) = task_executor.handle() { let mnemonic = mnemonic_from_phrase(body.mnemonic.as_str()).map_err(|e| { @@ -516,7 +466,6 @@ pub fn serve( Some(body.key_derivation_path_offset), &body.validators, &validator_dir, - secrets_dir, &validator_store, &spec, ))?; @@ -537,17 +486,15 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) - .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - move |body: api_types::KeystoreValidatorsPostRequest, - validator_dir: PathBuf, - secrets_dir: PathBuf, - validator_store: Arc>, - signer, - task_executor: TaskExecutor| { + |body: api_types::KeystoreValidatorsPostRequest, + validator_dir: PathBuf, + validator_store: Arc>, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { // Check to ensure the password is correct. let keypair = body @@ -560,12 +507,7 @@ pub fn serve( )) })?; - let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); - let password_storage = - get_voting_password_storage(&secrets_dir, &body.keystore, &body.password)?; - let validator_dir = ValidatorDirBuilder::new(validator_dir.clone()) - .password_dir_opt(secrets_dir) .voting_keystore(body.keystore.clone(), body.password.as_ref()) .store_withdrawal_keystore(false) .build() @@ -579,6 +521,7 @@ pub fn serve( // Drop validator dir so that `add_validator_keystore` can re-lock the keystore. let voting_keystore_path = validator_dir.voting_keystore_path(); drop(validator_dir); + let voting_password = body.password.clone(); let graffiti = body.graffiti.clone(); let suggested_fee_recipient = body.suggested_fee_recipient; let gas_limit = body.gas_limit; @@ -589,7 +532,7 @@ pub fn serve( handle .block_on(validator_store.add_validator_keystore( voting_keystore_path, - password_storage, + voting_password, body.enable, graffiti, suggested_fee_recipient, @@ -758,29 +701,6 @@ pub fn serve( }) }); - // DELETE /lighthouse/keystores - let delete_lighthouse_keystores = warp::path("lighthouse") - .and(warp::path("keystores")) - .and(warp::path::end()) - .and(warp::body::json()) - .and(signer.clone()) - .and(validator_store_filter.clone()) - .and(task_executor_filter.clone()) - .and(log_filter.clone()) - .then( - move |request, signer, validator_store, task_executor, log| { - blocking_signed_json_task(signer, move || { - if allow_keystore_export { - keystores::export(request, validator_store, task_executor, log) - } else { - Err(warp_utils::reject::custom_bad_request( - "keystore export is disabled".to_string(), - )) - } - }) - }, - ); - // Standard key-manager endpoints. let eth_v1 = warp::path("eth").and(warp::path("v1")); let std_keystores = eth_v1.and(warp::path("keystores")).and(warp::path::end()); @@ -1065,28 +985,13 @@ pub fn serve( .and(warp::body::json()) .and(signer.clone()) .and(validator_dir_filter) - .and(secrets_dir_filter) .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) .then( - move |request, - signer, - validator_dir, - secrets_dir, - validator_store, - task_executor, - log| { - let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); + |request, signer, validator_dir, validator_store, task_executor, log| { blocking_signed_json_task(signer, move || { - keystores::import( - request, - validator_dir, - secrets_dir, - validator_store, - task_executor, - log, - ) + keystores::import(request, validator_dir, validator_store, task_executor, log) }) }, ); @@ -1144,7 +1049,7 @@ pub fn serve( .and(warp::path("logs")) .and(warp::path::end()) .and(sse_component_filter) - .and_then(|sse_component: Option| { + .then(|sse_component: Option| { warp_utils::task::blocking_task(move || { if let Some(logging_components) = sse_component { // Build a JSON stream @@ -1215,8 +1120,7 @@ pub fn serve( )) .or(warp::patch().and(patch_validators)) .or(warp::delete().and( - delete_lighthouse_keystores - .or(delete_fee_recipient) + delete_fee_recipient .or(delete_gas_limit) .or(delete_std_keystores) .or(delete_std_remotekeys), @@ -1246,21 +1150,36 @@ pub fn serve( Ok((listening_socket, server)) } - +/// Convert a warp `Rejection` into a `Response`. +/// +/// This function should *always* be used to convert rejections into responses. This prevents warp +/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 +pub async fn convert_rejection(res: Result) -> resp { + match res { + Ok(response) => response.into_response(), + Err(e) => match warp_utils::reject::handle_rejection(e).await { + Ok(reply) => reply.into_response(), + Err(_) => warp::reply::with_status( + warp::reply::json(&"unhandled error"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ) + .into_response(), + }, + } +} /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task(signer: S, func: F) -> Response +pub async fn blocking_signed_json_task(signer: S, func: F) -> resp where S: Fn(&[u8]) -> String, - F: FnOnce() -> Result + Send + 'static, - T: Serialize + Send + 'static, + F: FnOnce() -> resp + Send + 'static, { let result = warp_utils::task::blocking_task(func).await; - let response = convert_rejection(result).await; - let body: &Vec = response.body(); - let signature = signature(body); + let mut output = convert_rejection(result).await; + let body = serde_json::to_vec(&output).unwrap(); + let signature = signer(body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - response.headers_mut().append("Signature", header_value); - response + output.headers_mut().append("Signature", header_value); + output } From 166f0f5b9a36128c61cc6b4a9fbca56054b0e67d Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Fri, 18 Aug 2023 23:49:01 -0500 Subject: [PATCH 04/19] Revert "(rebase) : Not working" This reverts commit 24fa06bf78b7bb1a710ddb8a6fc083d38d96a17d. --- common/warp_utils/src/task.rs | 15 +- validator_client/src/http_api/mod.rs | 197 +++++++++++++++++++-------- 2 files changed, 147 insertions(+), 65 deletions(-) diff --git a/common/warp_utils/src/task.rs b/common/warp_utils/src/task.rs index 78b851c90f7..001231f2c6b 100644 --- a/common/warp_utils/src/task.rs +++ b/common/warp_utils/src/task.rs @@ -2,9 +2,10 @@ use serde::Serialize; use warp::reply::{Reply, Response}; /// A convenience wrapper around `blocking_task`. -pub async fn blocking_task(func: F) -> Result +pub async fn blocking_task(func: F) -> Result where - F: FnOnce() -> Result + Send + 'static, + F: FnOnce() -> Result + Send + 'static, + T: Send + 'static, { tokio::task::spawn_blocking(func) .await @@ -14,11 +15,12 @@ where /// A convenience wrapper around `blocking_task` that returns a `warp::reply::Response`. /// /// Using this method consistently makes it possible to simplify types using `.unify()` or `.uor()`. -pub async fn blocking_response_task(func: F) -> Result +pub async fn blocking_response_task(func: F) -> Result where - F: FnOnce() -> Result + Send + 'static, + F: FnOnce() -> Result + Send + 'static, + T: Reply + Send + 'static, { - blocking_task(func).await + blocking_task(func).await.map(Reply::into_response) } /// A convenience wrapper around `blocking_task` for use with `warp` JSON responses. @@ -29,8 +31,7 @@ where { blocking_response_task(|| { let response = func()?; - let json_reply = warp::reply::json(&response); - Ok(json_reply.into_response()) + Ok(warp::reply::json(&response)) }) .await } diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 17bd1192fb0..95ee6c079fb 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -5,6 +5,8 @@ mod keystores; mod remotekeys; mod tests; +pub mod test_utils; + use crate::http_api::create_signed_voluntary_exit::create_signed_voluntary_exit; use crate::{determine_graffiti, GraffitiFile, ValidatorStore}; use account_utils::{ @@ -12,16 +14,19 @@ use account_utils::{ validator_definitions::{SigningDefinition, ValidatorDefinition, Web3SignerDefinition}, }; pub use api_secret::ApiSecret; -use create_validator::{create_validators_mnemonic, create_validators_web3signer}; +use create_validator::{ + create_validators_mnemonic, create_validators_web3signer, get_voting_password_storage, +}; use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; -use hyper::header::OccupiedEntry; use hyper::http::response; +use hyper::Body; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; +use ring::signature; use serde::{Deserialize, Serialize}; use slog::{crit, info, warn, Logger}; use slot_clock::SlotClock; @@ -35,19 +40,21 @@ use sysinfo::{System, SystemExt}; use system_health::observe_system_health_vc; use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; -use types::typenum::private::BitDiffOut; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; -use warp::reply::{Reply, Response as resp}; +use warp::http::response::Response as WarpResponse; +use warp::reply::{Reply, Response}; +use warp::Rejection; + use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, - response::Response, StatusCode, }, sse::Event, Filter, }; + #[derive(Debug)] pub enum Error { Warp(warp::Error), @@ -74,6 +81,7 @@ pub struct Context { pub api_secret: ApiSecret, pub validator_store: Option>>, pub validator_dir: Option, + pub secrets_dir: Option, pub graffiti_file: Option, pub graffiti_flag: Option, pub spec: ChainSpec, @@ -91,6 +99,8 @@ pub struct Config { pub listen_addr: IpAddr, pub listen_port: u16, pub allow_origin: Option, + pub allow_keystore_export: bool, + pub store_passwords_in_secrets_dir: bool, } impl Default for Config { @@ -100,10 +110,30 @@ impl Default for Config { listen_addr: IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), listen_port: 5062, allow_origin: None, + allow_keystore_export: false, + store_passwords_in_secrets_dir: false, } } } +/// Convert a warp `Rejection` into a `Response`. +/// +/// This function should *always* be used to convert rejections into responses. This prevents warp +/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 +pub async fn convert_rejection(res: Result) -> Response { + match res { + Ok(response) => response.into_response(), + Err(e) => match warp_utils::reject::handle_rejection(e).await { + Ok(reply) => reply.into_response(), + Err(_) => warp::reply::with_status( + warp::reply::json(&"unhandled error"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ) + .into_response(), + }, + } +} + /// Creates a server that will serve requests using information from `ctx`. /// /// The server will shut down gracefully when the `shutdown` future resolves. @@ -124,6 +154,8 @@ pub fn serve( shutdown: impl Future + Send + Sync + 'static, ) -> Result<(SocketAddr, impl Future), Error> { let config = &ctx.config; + let allow_keystore_export = config.allow_keystore_export; + let store_passwords_in_secrets_dir = config.store_passwords_in_secrets_dir; let log = ctx.log.clone(); // Configure CORS. @@ -166,27 +198,38 @@ pub fn serve( let signer = warp::any().map(move || signer.clone()); let inner_validator_store = ctx.validator_store.clone(); - let validator_store_filter = warp::any().map(move || inner_validator_store.clone()).then( - |validator_store: Option<_>| async move { + let validator_store_filter = warp::any() + .map(move || inner_validator_store.clone()) + .and_then(|validator_store: Option<_>| async move { validator_store.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator store is not initialized.".to_string(), ) }) - }, - ); + }); let inner_task_executor = ctx.task_executor.clone(); let task_executor_filter = warp::any().map(move || inner_task_executor.clone()); let inner_validator_dir = ctx.validator_dir.clone(); - let validator_dir_filter = warp::any().map(move || inner_validator_dir.clone()).then( - |validator_dir: Option<_>| async move { + let validator_dir_filter = warp::any() + .map(move || inner_validator_dir.clone()) + .and_then(|validator_dir: Option<_>| async move { validator_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator_dir directory is not initialized.".to_string(), ) }) + }); + + let inner_secrets_dir = ctx.secrets_dir.clone(); + let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).and_then( + |secrets_dir: Option<_>| async move { + secrets_dir.ok_or_else(|| { + warp_utils::reject::custom_not_found( + "secrets_dir directory is not initialized.".to_string(), + ) + }) }, ); @@ -397,18 +440,21 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) + .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(spec_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - |body: Vec, - validator_dir: PathBuf, - validator_store: Arc>, - spec: Arc, - signer, - task_executor: TaskExecutor| { + move |body: Vec, + validator_dir: PathBuf, + secrets_dir: PathBuf, + validator_store: Arc>, + spec: Arc, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { + let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); if let Some(handle) = task_executor.handle() { let (validators, mnemonic) = handle.block_on(create_validators_mnemonic( @@ -416,6 +462,7 @@ pub fn serve( None, &body, &validator_dir, + secrets_dir, &validator_store, &spec, ))?; @@ -440,18 +487,21 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) + .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(spec_filter) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - |body: api_types::CreateValidatorsMnemonicRequest, - validator_dir: PathBuf, - validator_store: Arc>, - spec: Arc, - signer, - task_executor: TaskExecutor| { + move |body: api_types::CreateValidatorsMnemonicRequest, + validator_dir: PathBuf, + secrets_dir: PathBuf, + validator_store: Arc>, + spec: Arc, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { + let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); if let Some(handle) = task_executor.handle() { let mnemonic = mnemonic_from_phrase(body.mnemonic.as_str()).map_err(|e| { @@ -466,6 +516,7 @@ pub fn serve( Some(body.key_derivation_path_offset), &body.validators, &validator_dir, + secrets_dir, &validator_store, &spec, ))?; @@ -486,15 +537,17 @@ pub fn serve( .and(warp::path::end()) .and(warp::body::json()) .and(validator_dir_filter.clone()) + .and(secrets_dir_filter.clone()) .and(validator_store_filter.clone()) .and(signer.clone()) .and(task_executor_filter.clone()) .then( - |body: api_types::KeystoreValidatorsPostRequest, - validator_dir: PathBuf, - validator_store: Arc>, - signer, - task_executor: TaskExecutor| { + move |body: api_types::KeystoreValidatorsPostRequest, + validator_dir: PathBuf, + secrets_dir: PathBuf, + validator_store: Arc>, + signer, + task_executor: TaskExecutor| { blocking_signed_json_task(signer, move || { // Check to ensure the password is correct. let keypair = body @@ -507,7 +560,12 @@ pub fn serve( )) })?; + let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); + let password_storage = + get_voting_password_storage(&secrets_dir, &body.keystore, &body.password)?; + let validator_dir = ValidatorDirBuilder::new(validator_dir.clone()) + .password_dir_opt(secrets_dir) .voting_keystore(body.keystore.clone(), body.password.as_ref()) .store_withdrawal_keystore(false) .build() @@ -521,7 +579,6 @@ pub fn serve( // Drop validator dir so that `add_validator_keystore` can re-lock the keystore. let voting_keystore_path = validator_dir.voting_keystore_path(); drop(validator_dir); - let voting_password = body.password.clone(); let graffiti = body.graffiti.clone(); let suggested_fee_recipient = body.suggested_fee_recipient; let gas_limit = body.gas_limit; @@ -532,7 +589,7 @@ pub fn serve( handle .block_on(validator_store.add_validator_keystore( voting_keystore_path, - voting_password, + password_storage, body.enable, graffiti, suggested_fee_recipient, @@ -701,6 +758,29 @@ pub fn serve( }) }); + // DELETE /lighthouse/keystores + let delete_lighthouse_keystores = warp::path("lighthouse") + .and(warp::path("keystores")) + .and(warp::path::end()) + .and(warp::body::json()) + .and(signer.clone()) + .and(validator_store_filter.clone()) + .and(task_executor_filter.clone()) + .and(log_filter.clone()) + .then( + move |request, signer, validator_store, task_executor, log| { + blocking_signed_json_task(signer, move || { + if allow_keystore_export { + keystores::export(request, validator_store, task_executor, log) + } else { + Err(warp_utils::reject::custom_bad_request( + "keystore export is disabled".to_string(), + )) + } + }) + }, + ); + // Standard key-manager endpoints. let eth_v1 = warp::path("eth").and(warp::path("v1")); let std_keystores = eth_v1.and(warp::path("keystores")).and(warp::path::end()); @@ -985,13 +1065,28 @@ pub fn serve( .and(warp::body::json()) .and(signer.clone()) .and(validator_dir_filter) + .and(secrets_dir_filter) .and(validator_store_filter.clone()) .and(task_executor_filter.clone()) .and(log_filter.clone()) .then( - |request, signer, validator_dir, validator_store, task_executor, log| { + move |request, + signer, + validator_dir, + secrets_dir, + validator_store, + task_executor, + log| { + let secrets_dir = store_passwords_in_secrets_dir.then_some(secrets_dir); blocking_signed_json_task(signer, move || { - keystores::import(request, validator_dir, validator_store, task_executor, log) + keystores::import( + request, + validator_dir, + secrets_dir, + validator_store, + task_executor, + log, + ) }) }, ); @@ -1049,7 +1144,7 @@ pub fn serve( .and(warp::path("logs")) .and(warp::path::end()) .and(sse_component_filter) - .then(|sse_component: Option| { + .and_then(|sse_component: Option| { warp_utils::task::blocking_task(move || { if let Some(logging_components) = sse_component { // Build a JSON stream @@ -1120,7 +1215,8 @@ pub fn serve( )) .or(warp::patch().and(patch_validators)) .or(warp::delete().and( - delete_fee_recipient + delete_lighthouse_keystores + .or(delete_fee_recipient) .or(delete_gas_limit) .or(delete_std_keystores) .or(delete_std_remotekeys), @@ -1150,36 +1246,21 @@ pub fn serve( Ok((listening_socket, server)) } -/// Convert a warp `Rejection` into a `Response`. -/// -/// This function should *always* be used to convert rejections into responses. This prevents warp -/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(res: Result) -> resp { - match res { - Ok(response) => response.into_response(), - Err(e) => match warp_utils::reject::handle_rejection(e).await { - Ok(reply) => reply.into_response(), - Err(_) => warp::reply::with_status( - warp::reply::json(&"unhandled error"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ) - .into_response(), - }, - } -} + /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task(signer: S, func: F) -> resp +pub async fn blocking_signed_json_task(signer: S, func: F) -> Response where S: Fn(&[u8]) -> String, - F: FnOnce() -> resp + Send + 'static, + F: FnOnce() -> Result + Send + 'static, + T: Serialize + Send + 'static, { let result = warp_utils::task::blocking_task(func).await; - let mut output = convert_rejection(result).await; - let body = serde_json::to_vec(&output).unwrap(); - let signature = signer(body); + let response = convert_rejection(result).await; + let body: &Vec = response.body(); + let signature = signature(body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - output.headers_mut().append("Signature", header_value); - output + response.headers_mut().append("Signature", header_value); + response } From 09a0eb6d7f8ece911e558e567eef4eee9fb0da39 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Sat, 19 Aug 2023 21:59:16 -0500 Subject: [PATCH 05/19] (rebase) : Http vc api --- validator_client/src/http_api/mod.rs | 93 ++++++++++++++++------------ 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 95ee6c079fb..5096642cb2c 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -21,16 +21,14 @@ use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; -use hyper::http::response; -use hyper::Body; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; -use ring::signature; use serde::{Deserialize, Serialize}; use slog::{crit, info, warn, Logger}; use slot_clock::SlotClock; use std::collections::HashMap; +use std::convert; use std::future::Future; use std::marker::PhantomData; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; @@ -42,13 +40,11 @@ use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; -use warp::http::response::Response as WarpResponse; -use warp::reply::{Reply, Response}; -use warp::Rejection; - +use warp::reply::{Reply, Response as resp}; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, + response::Response, StatusCode, }, sse::Event, @@ -116,24 +112,6 @@ impl Default for Config { } } -/// Convert a warp `Rejection` into a `Response`. -/// -/// This function should *always* be used to convert rejections into responses. This prevents warp -/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(res: Result) -> Response { - match res { - Ok(response) => response.into_response(), - Err(e) => match warp_utils::reject::handle_rejection(e).await { - Ok(reply) => reply.into_response(), - Err(_) => warp::reply::with_status( - warp::reply::json(&"unhandled error"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ) - .into_response(), - }, - } -} - /// Creates a server that will serve requests using information from `ctx`. /// /// The server will shut down gracefully when the `shutdown` future resolves. @@ -198,32 +176,32 @@ pub fn serve( let signer = warp::any().map(move || signer.clone()); let inner_validator_store = ctx.validator_store.clone(); - let validator_store_filter = warp::any() - .map(move || inner_validator_store.clone()) - .and_then(|validator_store: Option<_>| async move { + let validator_store_filter = warp::any().map(move || inner_validator_store.clone()).then( + |validator_store: Option<_>| async move { validator_store.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator store is not initialized.".to_string(), ) }) - }); + }, + ); let inner_task_executor = ctx.task_executor.clone(); let task_executor_filter = warp::any().map(move || inner_task_executor.clone()); let inner_validator_dir = ctx.validator_dir.clone(); - let validator_dir_filter = warp::any() - .map(move || inner_validator_dir.clone()) - .and_then(|validator_dir: Option<_>| async move { + let validator_dir_filter = warp::any().map(move || inner_validator_dir.clone()).then( + |validator_dir: Option<_>| async move { validator_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator_dir directory is not initialized.".to_string(), ) }) - }); + }, + ); let inner_secrets_dir = ctx.secrets_dir.clone(); - let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).and_then( + let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).then( |secrets_dir: Option<_>| async move { secrets_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( @@ -1144,7 +1122,7 @@ pub fn serve( .and(warp::path("logs")) .and(warp::path::end()) .and(sse_component_filter) - .and_then(|sse_component: Option| { + .then(|sse_component: Option| { warp_utils::task::blocking_task(move || { if let Some(logging_components) = sse_component { // Build a JSON stream @@ -1247,20 +1225,53 @@ pub fn serve( Ok((listening_socket, server)) } +/// Convert a warp `Rejection` into a `Response`. +/// +/// This function should *always* be used to convert rejections into responses. This prevents warp +/// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 +pub async fn convert_with_header(res: Result) -> resp { + match res { + Ok(response) => { + // T Here + let mut response = match serde_json::to_vec(&func_output) { + Ok(body) => { + let mut res = resp::new(body); + res.headers_mut() + .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + res + } + Err(_) => resp::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(vec![]) + .expect("can produce simple response from static values"), + }; + } + Err(e) => match warp_utils::reject::handle_rejection(e).await { + Ok(reply) => reply.into_response(), + Err(_) => warp::reply::with_status( + warp::reply::json(&"unhandled error"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ) + .into_response(), + }, + } +} /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task(signer: S, func: F) -> Response +pub async fn blocking_signed_json_task( + signer: S, + func: F, +) -> Result where S: Fn(&[u8]) -> String, - F: FnOnce() -> Result + Send + 'static, + F: FnOnce() -> Result + Send + 'static, T: Serialize + Send + 'static, { let result = warp_utils::task::blocking_task(func).await; - let response = convert_rejection(result).await; + let conversion = convert_rejection(result).await; // It handles the rejection let body: &Vec = response.body(); - let signature = signature(body); + let signature = signer(body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - response.headers_mut().append("Signature", header_value); - response + result.headers_mut().append("Signature", header_value) } From 802e7ea32f6462fb1215591619efd58a80c0eb8b Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Mon, 21 Aug 2023 01:12:54 -0500 Subject: [PATCH 06/19] (rebase): block_signed_task , blocking_task --- common/warp_utils/src/task.rs | 12 +- validator_client/output.txt | 1966 ++++++++++++++++++++++++++ validator_client/src/http_api/mod.rs | 50 +- 3 files changed, 2000 insertions(+), 28 deletions(-) create mode 100644 validator_client/output.txt diff --git a/common/warp_utils/src/task.rs b/common/warp_utils/src/task.rs index 001231f2c6b..8e12c551e7f 100644 --- a/common/warp_utils/src/task.rs +++ b/common/warp_utils/src/task.rs @@ -2,14 +2,18 @@ use serde::Serialize; use warp::reply::{Reply, Response}; /// A convenience wrapper around `blocking_task`. -pub async fn blocking_task(func: F) -> Result +pub async fn blocking_task(func: F) -> Result where F: FnOnce() -> Result + Send + 'static, - T: Send + 'static, + T: Reply + Send + 'static, { - tokio::task::spawn_blocking(func) + let result = tokio::task::spawn_blocking(func) .await - .unwrap_or_else(|_| Err(warp::reject::reject())) + .unwrap_or_else(|_| Err(warp::reject::reject())); + match result { + Ok(reply) => Ok(reply.into_response()), + Err(rejection) => Err(rejection), + } } /// A convenience wrapper around `blocking_task` that returns a `warp::reply::Response`. diff --git a/validator_client/output.txt b/validator_client/output.txt new file mode 100644 index 00000000000..d34ab4c9f49 --- /dev/null +++ b/validator_client/output.txt @@ -0,0 +1,1966 @@ + Compiling validator_client v0.3.5 (/home/clippo/Documents/rustcontributions/lighthouse/validator_client) +warning: unused import: `futures::future::ok` + --> validator_client/src/http_api/mod.rs:24:5 + | +24 | use futures::future::ok; + | ^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(unused_imports)]` on by default + +warning: unused import: `hyper::body::to_bytes` + --> validator_client/src/http_api/mod.rs:25:5 + | +25 | use hyper::body::to_bytes; + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: unused imports: `convert`, `result` + --> validator_client/src/http_api/mod.rs:38:11 + | +38 | use std::{convert, result}; + | ^^^^^^^ ^^^^^^ + +warning: unused import: `warp::Rejection` + --> validator_client/src/http_api/mod.rs:46:5 + | +46 | use warp::Rejection; + | ^^^^^^^^^^^^^^^ + +warning: unused imports: `CONTENT_TYPE`, `StatusCode`, `response::Response` + --> validator_client/src/http_api/mod.rs:49:31 + | +49 | header::{HeaderValue, CONTENT_TYPE}, + | ^^^^^^^^^^^^ +50 | response::Response, + | ^^^^^^^^^^^^^^^^^^ +51 | StatusCode, + | ^^^^^^^^^^ + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:274:13 + | +274 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:288:13 + | +288 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:302:13 + | +302 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0277]: the trait bound `GenericResponse>: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:315:13 + | +315 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:314:10 + | +314 | .then(|validator_store: Arc>, signer| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:341:17 + | +341 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:339:10 + | +339 | .then( + | ^^^^ expected due to this +340 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:340:13: 340:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:375:13 + | +375 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:374:10 + | +374 | .then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { + | ^^^^ --------------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(Arc<_>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(Arc<_>, std::time::Instant, PathBuf, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:374:15: 374:72]` to implement `warp::generic::Func<(Arc>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `GenericResponse>>: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:398:17 + | +398 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>>` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:392:10 + | +392 | .then( + | ^^^^ expected due to this +393 | / |validator_store: Arc>, +394 | | graffiti_file: Option, +395 | | graffiti_flag: Option, +396 | | signer, +397 | | log| { + | |_________________- found signature defined here + | + = note: expected closure signature `fn(std::result::Result, Rejection>, std::option::Option<_>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>) -> _` + found closure signature `fn(Arc<_>, std::option::Option<_>, std::option::Option<_>, _, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:393:13: 397:18]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, std::option::Option, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:314:10 + | +314 | .then(|validator_store: Arc>, signer| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:339:10 + | +339 | .then( + | ^^^^ expected due to this +340 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:340:13: 340:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:374:10 + | +374 | .then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { + | ^^^^ --------------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(std::sync::Arc<_>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(std::sync::Arc<_>, std::time::Instant, std::path::PathBuf, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:374:15: 374:72]` to implement `warp::generic::Func<(std::sync::Arc>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:438:17 + | +438 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:430:10 + | +430 | .then( + | ^^^^ expected due to this +431 | / move |body: Vec, +432 | | validator_dir: PathBuf, +433 | | secrets_dir: PathBuf, +434 | | validator_store: Arc>, +435 | | spec: Arc, +436 | | signer, +437 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(Vec, PathBuf, PathBuf, Arc<_>, Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:431:13: 437:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `GenericResponse>>: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:398:17 + | +398 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>>` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:392:10 + | +392 | .then( + | ^^^^ expected due to this +393 | / |validator_store: Arc>, +394 | | graffiti_file: Option, +395 | | graffiti_flag: Option, +396 | | signer, +397 | | log| { + | |_________________- found signature defined here + | + = note: expected closure signature `fn(std::result::Result, Rejection>, std::option::Option<_>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>) -> _` + found closure signature `fn(std::sync::Arc<_>, std::option::Option<_>, std::option::Option<_>, _, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:393:13: 397:18]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, std::option::Option, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>)>` + +error[E0277]: the trait bound `GenericResponse>: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:485:17 + | +485 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:477:10 + | +477 | .then( + | ^^^^ expected due to this +478 | / move |body: api_types::CreateValidatorsMnemonicRequest, +479 | | validator_dir: PathBuf, +480 | | secrets_dir: PathBuf, +481 | | validator_store: Arc>, +482 | | spec: Arc, +483 | | signer, +484 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(eth2::lighthouse_vc::types::CreateValidatorsMnemonicRequest, PathBuf, PathBuf, Arc<_>, Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:478:13: 484:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:533:17 + | +533 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:526:10 + | +526 | .then( + | ^^^^ expected due to this +527 | / move |body: api_types::KeystoreValidatorsPostRequest, +528 | | validator_dir: PathBuf, +529 | | secrets_dir: PathBuf, +530 | | validator_store: Arc>, +531 | | signer, +532 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(eth2::lighthouse_vc::types::KeystoreValidatorsPostRequest, PathBuf, PathBuf, Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:527:13: 532:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:617:17 + | +617 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:612:10 + | +612 | .then( + | ^^^^ expected due to this +613 | / |body: Vec, +614 | | validator_store: Arc>, +615 | | signer, +616 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(Vec, Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:613:13: 616:42]` to implement `warp::generic::Func<(_, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:430:10 + | +430 | .then( + | ^^^^ expected due to this +431 | / move |body: Vec, +432 | | validator_dir: PathBuf, +433 | | secrets_dir: PathBuf, +434 | | validator_store: Arc>, +435 | | spec: Arc, +436 | | signer, +437 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, std::sync::Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(Vec, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, std::sync::Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:431:13: 437:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, std::sync::Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:672:17 + | +672 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:665:10 + | +665 | .then( + | ^^^^ expected due to this +666 | / |validator_pubkey: PublicKey, +667 | | body: api_types::ValidatorPatchRequest, +668 | | validator_store: Arc>, +669 | | graffiti_file: Option, +670 | | signer, +671 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `AuthResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:736:13 + | +736 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `AuthResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:477:10 + | +477 | .then( + | ^^^^ expected due to this +478 | / move |body: api_types::CreateValidatorsMnemonicRequest, +479 | | validator_dir: PathBuf, +480 | | secrets_dir: PathBuf, +481 | | validator_store: Arc>, +482 | | spec: Arc, +483 | | signer, +484 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, std::sync::Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(eth2::lighthouse_vc::types::CreateValidatorsMnemonicRequest, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, std::sync::Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:478:13: 484:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, std::sync::Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `ExportKeystoresResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:754:17 + | +754 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ExportKeystoresResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:752:10 + | +752 | .then( + | ^^^^ expected due to this +753 | move |request, signer, validator_store, task_executor, log| { + | ----------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteKeystoresRequest, _, Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:753:13: 753:72]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:781:17 + | +781 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:779:10 + | +779 | .then( + | ^^^^ expected due to this +780 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:780:13: 780:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:526:10 + | +526 | .then( + | ^^^^ expected due to this +527 | / move |body: api_types::KeystoreValidatorsPostRequest, +528 | | validator_dir: PathBuf, +529 | | secrets_dir: PathBuf, +530 | | validator_store: Arc>, +531 | | signer, +532 | | task_executor: TaskExecutor| { + | |______________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(eth2::lighthouse_vc::types::KeystoreValidatorsPostRequest, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:527:13: 532:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:824:17 + | +824 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:819:10 + | +819 | .then( + | ^^^^ expected due to this +820 | / |validator_pubkey: PublicKey, +821 | | request: api_types::UpdateFeeRecipientRequest, +822 | | validator_store: Arc>, +823 | | signer| { + | |____________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, UpdateFeeRecipientRequest, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:820:13: 823:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:612:10 + | +612 | .then( + | ^^^^ expected due to this +613 | / |body: Vec, +614 | | validator_store: Arc>, +615 | | signer, +616 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(_, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(Vec, std::sync::Arc<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:613:13: 616:42]` to implement `warp::generic::Func<(_, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:665:10 + | +665 | .then( + | ^^^^ expected due to this +666 | / |validator_pubkey: PublicKey, +667 | | body: api_types::ValidatorPatchRequest, +668 | | validator_store: Arc>, +669 | | graffiti_file: Option, +670 | | signer, +671 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, std::sync::Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:849:10 + | +811 | let post_fee_recipient = eth_v1 + | ______________________________- +812 | | .and(warp::path("validator")) +813 | | .and(warp::path::param::()) +814 | | .and(warp::path("feerecipient")) +... | +848 | | ) +849 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-8595461928439969746.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:752:10 + | +752 | .then( + | ^^^^ expected due to this +753 | move |request, signer, validator_store, task_executor, log| { + | ----------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteKeystoresRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:753:13: 753:72]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:861:17 + | +861 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:859:10 + | +859 | .then( + | ^^^^ expected due to this +860 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:860:13: 860:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:779:10 + | +779 | .then( + | ^^^^ expected due to this +780 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:780:13: 780:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:886:10 + | +852 | let delete_fee_recipient = eth_v1 + | ________________________________- +853 | | .and(warp::path("validator")) +854 | | .and(warp::path::param::()) +855 | | .and(warp::path("feerecipient")) +... | +885 | | ) +886 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-11718294443365172138.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` + +error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:898:17 + | +898 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:896:10 + | +896 | .then( + | ^^^^ expected due to this +897 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:897:13: 897:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:819:10 + | +819 | .then( + | ^^^^ expected due to this +820 | / |validator_pubkey: PublicKey, +821 | | request: api_types::UpdateFeeRecipientRequest, +822 | | validator_store: Arc>, +823 | | signer| { + | |____________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, UpdateFeeRecipientRequest, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:820:13: 823:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:933:17 + | +933 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:928:10 + | +928 | .then( + | ^^^^ expected due to this +929 | / |validator_pubkey: PublicKey, +930 | | request: api_types::UpdateGasLimitRequest, +931 | | validator_store: Arc>, +932 | | signer| { + | |____________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, UpdateGasLimitRequest, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:929:13: 932:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:958:10 + | +920 | let post_gas_limit = eth_v1 + | __________________________- +921 | | .and(warp::path("validator")) +922 | | .and(warp::path::param::()) +923 | | .and(warp::path("gas_limit")) +... | +957 | | ) +958 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-764829791462733142.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` + +error[E0277]: the trait bound `(): Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:970:17 + | +970 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` + | + = help: the trait `Reply` is implemented for `(T,)` +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:968:10 + | +968 | .then( + | ^^^^ expected due to this +969 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:969:13: 969:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:995:10 + | +961 | let delete_gas_limit = eth_v1 + | ____________________________- +962 | | .and(warp::path("validator")) +963 | | .and(warp::path::param::()) +964 | | .and(warp::path("gas_limit")) +... | +994 | | ) +995 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-15090605634825385487.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` + +error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:849:10 + | +811 | let post_fee_recipient = eth_v1 + | ______________________________- +812 | | .and(warp::path("validator")) +813 | | .and(warp::path::param::()) +814 | | .and(warp::path("feerecipient")) +... | +848 | | ) +849 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12724452031844297296.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` + +error[E0277]: the trait bound `SignedVoluntaryExit: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1017:17 + | +1017 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `SignedVoluntaryExit` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:859:10 + | +859 | .then( + | ^^^^ expected due to this +860 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:860:13: 860:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1009:10 + | +1009 | .then( + | ^^^^ expected due to this +1010 | / |pubkey: PublicKey, +1011 | | query: api_types::VoluntaryExitQuery, +1012 | | validator_store: Arc>, +1013 | | slot_clock: T, +1014 | | log, +1015 | | signer, +1016 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::result::Result, Rejection>, _, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, Arc<_>, _, Logger>>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1010:13: 1016:42]` to implement `warp::generic::Func<(GenericPublicKey, VoluntaryExitQuery, std::result::Result>, Rejection>, T, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0277]: the trait bound `ListKeystoresResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1042:13 + | +1042 | blocking_signed_json_task(signer, move || Ok(keystores::list(validator_store))) + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ListKeystoresResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1041:10 + | +1041 | .then(|signer, validator_store: Arc>| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` + found closure signature `fn(_, Arc<_>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1041:15: 1041:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` + +error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:886:10 + | +852 | let delete_fee_recipient = eth_v1 + | ________________________________- +853 | | .and(warp::path("validator")) +854 | | .and(warp::path::param::()) +855 | | .and(warp::path("feerecipient")) +... | +885 | | ) +886 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-7988710767728157714.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:896:10 + | +896 | .then( + | ^^^^ expected due to this +897 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:897:13: 897:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0277]: the trait bound `ImportKeystoresResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1063:17 + | +1063 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ImportKeystoresResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1054:10 + | +1054 | .then( + | ^^^^ expected due to this +1055 | / move |request, +1056 | | signer, +1057 | | validator_dir, +1058 | | secrets_dir, +1059 | | validator_store, +1060 | | task_executor, +1061 | | log| { + | |______________________- found signature defined here + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(ImportKeystoresRequest, _, PathBuf, PathBuf, Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1055:13: 1061:23]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:928:10 + | +928 | .then( + | ^^^^ expected due to this +929 | / |validator_pubkey: PublicKey, +930 | | request: api_types::UpdateGasLimitRequest, +931 | | validator_store: Arc>, +932 | | signer| { + | |____________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, UpdateGasLimitRequest, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:929:13: 932:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:958:10 + | +920 | let post_gas_limit = eth_v1 + | __________________________- +921 | | .and(warp::path("validator")) +922 | | .and(warp::path::param::()) +923 | | .and(warp::path("gas_limit")) +... | +957 | | ) +958 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-11366895387547330085.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` + +error[E0277]: the trait bound `DeleteKeystoresResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1084:13 + | +1084 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `DeleteKeystoresResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1083:10 + | +1083 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteKeystoresRequest, _, Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1083:15: 1083:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0277]: the trait bound `ListRemotekeysResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1094:13 + | +1094 | blocking_signed_json_task(signer, move || Ok(remotekeys::list(validator_store))) + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ListRemotekeysResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1093:10 + | +1093 | .then(|signer, validator_store: Arc>| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` + found closure signature `fn(_, Arc<_>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1093:15: 1093:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:968:10 + | +968 | .then( + | ^^^^ expected due to this +969 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { + | --------------------------------------------------------------------------------- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:969:13: 969:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + +error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:995:10 + | +961 | let delete_gas_limit = eth_v1 + | ____________________________- +962 | | .and(warp::path("validator")) +963 | | .and(warp::path::param::()) +964 | | .and(warp::path("gas_limit")) +... | +994 | | ) +995 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); + | | -^^^ method cannot be called due to unsatisfied trait bounds + | |_________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | doesn't satisfy `_: Iterator` + | doesn't satisfy `_: StreamExt` + | doesn't satisfy `_: Stream` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-16198603502018555708.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` + `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` + `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` + which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` + +error[E0277]: the trait bound `ImportRemotekeysResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1105:13 + | +1105 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ImportRemotekeysResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1104:10 + | +1104 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(ImportRemotekeysRequest, _, Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1104:15: 1104:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0277]: the trait bound `DeleteRemotekeysResponse: Reply` is not satisfied + --> validator_client/src/http_api/mod.rs:1118:13 + | +1118 | blocking_signed_json_task(signer, move || { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `DeleteRemotekeysResponse` + | + = help: the following other types implement trait `Reply`: + Box + Cow<'static, str> + log::internal::Logged + hyper::Response + trace::internal::Traced + warp::reply::Json + Html + warp::reply::sealed::Reply_ + and 14 others +note: required by a bound in `blocking_signed_json_task` + --> validator_client/src/http_api/mod.rs:1266:20 + | +1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp + | ------------------------- required by a bound in this function +... +1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + | ^^^^^ required by this bound in `blocking_signed_json_task` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1117:10 + | +1117 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteRemotekeysRequest, _, Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1117:15: 1117:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1009:10 + | +1009 | .then( + | ^^^^ expected due to this +1010 | / |pubkey: PublicKey, +1011 | | query: api_types::VoluntaryExitQuery, +1012 | | validator_store: Arc>, +1013 | | slot_clock: T, +1014 | | log, +1015 | | signer, +1016 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here + | + = note: expected closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::result::Result, Rejection>, _, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::sync::Arc<_>, _, Logger>>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1010:13: 1016:42]` to implement `warp::generic::Func<(GenericPublicKey, VoluntaryExitQuery, std::result::Result>, Rejection>, T, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1178:26 + | +314 | .then(|validator_store: Arc>, signer| { + | ---------------------------------------------------- found signature defined here +... +1178 | .or(get_lighthouse_validators) + | ^^ expected due to this + | + = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + = note: required for `Then>, Exact>>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-3906823655880936258.txt' + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1041:10 + | +1041 | .then(|signer, validator_store: Arc>| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` + found closure signature `fn(_, std::sync::Arc<_>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1041:15: 1041:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` + +error[E0599]: the method `or` exists for struct `Or>, Exact>>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1179:26 + | +1175 | / get_node_version +1176 | | .or(get_lighthouse_health) +1177 | | .or(get_lighthouse_spec) +1178 | | .or(get_lighthouse_validators) +1179 | | .or(get_lighthouse_validators_pubkey) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/or.rs:16:1 + | +16 | pub struct Or { + | ------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-4771350299114414337.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + +error[E0599]: the method `or` exists for struct `Then, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1189:26 + | +1188 | / post_validators +1189 | | .or(post_validators_keystore) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-3614709639453241739.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1198:35 + | +666 | / |validator_pubkey: PublicKey, +667 | | body: api_types::ValidatorPatchRequest, +668 | | validator_store: Arc>, +669 | | graffiti_file: Option, +670 | | signer, +671 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here +... +1198 | .or(warp::patch().and(patch_validators)) + | ^^^ expected due to this + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + = note: required for `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-11188398796661424827.txt' + +error[E0599]: the method `or` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1201:26 + | +1200 | / delete_lighthouse_keystores +1201 | | .or(delete_fee_recipient) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-14127784889754068231.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1054:10 + | +1054 | .then( + | ^^^^ expected due to this +1055 | / move |request, +1056 | | signer, +1057 | | validator_dir, +1058 | | secrets_dir, +1059 | | validator_store, +1060 | | task_executor, +1061 | | log| { + | |______________________- found signature defined here + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(ImportKeystoresRequest, _, std::path::PathBuf, std::path::PathBuf, std::sync::Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1055:13: 1061:23]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1083:10 + | +1083 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteKeystoresRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1083:15: 1083:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1093:10 + | +1093 | .then(|signer, validator_store: Arc>| { + | ^^^^ ---------------------------------------------------- found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` + found closure signature `fn(_, std::sync::Arc<_>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1093:15: 1093:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` + +error: cannot check whether the hidden type of opaque type satisfies auto traits + --> validator_client/src/http_api/test_utils.rs:149:22 + | +149 | tokio::spawn(server); + | ------------ ^^^^^^ + | | + | required by a bound introduced by this call + | +note: opaque type is declared here + --> validator_client/src/http_api/mod.rs:136:26 + | +136 | ) -> Result<(SocketAddr, impl Future), Error> { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule + --> validator_client/src/http_api/test_utils.rs:72:18 + | +72 | pub async fn new_with_http_config(http_config: HttpConfig) -> Self { + | ^^^^^^^^^^^^^^^^^^^^ +note: required by a bound in `tokio::spawn` + --> /home/clippo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.29.1/src/task/spawn.rs:166:21 + | +164 | pub fn spawn(future: T) -> JoinHandle + | ----- required by a bound in this function +165 | where +166 | T: Future + Send + 'static, + | ^^^^ required by this bound in `spawn` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1104:10 + | +1104 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(ImportRemotekeysRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1104:15: 1104:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1117:10 + | +1117 | .then(|request, signer, validator_store, task_executor, log| { + | ^^^^ ------------------------------------------------------ found signature defined here + | | + | expected due to this + | + = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` + found closure signature `fn(DeleteRemotekeysRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:1117:15: 1117:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1178:26 + | +314 | .then(|validator_store: Arc>, signer| { + | ---------------------------------------------------- found signature defined here +... +1178 | .or(get_lighthouse_validators) + | ^^ expected due to this + | + = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` + found closure signature `fn(std::sync::Arc<_>, _) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` + = note: required for `Then>, Exact>>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-17826282335143050859.txt' + +error[E0599]: the method `or` exists for struct `Or>, Exact>>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1179:26 + | +1175 | / get_node_version +1176 | | .or(get_lighthouse_health) +1177 | | .or(get_lighthouse_spec) +1178 | | .or(get_lighthouse_validators) +1179 | | .or(get_lighthouse_validators_pubkey) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/or.rs:16:1 + | +16 | pub struct Or { + | ------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12797299832639877060.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` + which is required by `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` + +error[E0599]: the method `or` exists for struct `Then, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1189:26 + | +1188 | / post_validators +1189 | | .or(post_validators_keystore) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12114042324687096208.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` + +error: cannot check whether the hidden type of opaque type satisfies auto traits + --> validator_client/src/lib.rs:598:37 + | +598 | .spawn_without_exit(server, "http-api"); + | ------------------ ^^^^^^ + | | + | required by a bound introduced by this call + | +note: opaque type is declared here + --> validator_client/src/http_api/mod.rs:136:26 + | +136 | ) -> Result<(SocketAddr, impl Future), Error> { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule + --> validator_client/src/lib.rs:525:12 + | +525 | pub fn start_service(&mut self) -> Result<(), String> { + | ^^^^^^^^^^^^^ +note: required by a bound in `TaskExecutor::spawn_without_exit` + --> /home/clippo/Documents/rustcontributions/lighthouse/common/task_executor/src/lib.rs:198:42 + | +196 | pub fn spawn_without_exit( + | ------------------ required by a bound in this associated function +197 | &self, +198 | task: impl Future + Send + 'static, + | ^^^^ required by this bound in `TaskExecutor::spawn_without_exit` + +error[E0631]: type mismatch in closure arguments + --> validator_client/src/http_api/mod.rs:1198:35 + | +666 | / |validator_pubkey: PublicKey, +667 | | body: api_types::ValidatorPatchRequest, +668 | | validator_store: Arc>, +669 | | graffiti_file: Option, +670 | | signer, +671 | | task_executor: TaskExecutor| { + | |_________________________________________- found signature defined here +... +1198 | .or(warp::patch().and(patch_validators)) + | ^^^ expected due to this + | + = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` + found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, std::sync::Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` + = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` + = note: required for `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-388915212221575498.txt' + +error[E0599]: the method `or` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied + --> validator_client/src/http_api/mod.rs:1201:26 + | +1200 | / delete_lighthouse_keystores +1201 | | .or(delete_fee_recipient) + | | -^^ method cannot be called due to unsatisfied trait bounds + | |_________________________| + | + | + ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 + | +11 | pub struct Then { + | --------------------- + | | + | doesn't satisfy `_: FilterBase` + | doesn't satisfy `_: Filter` + | + = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-10970351178299848214.txt' + = note: the following trait bounds were not satisfied: + `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` + which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` + +Some errors have detailed explanations: E0277, E0599, E0631. +For more information about an error, try `rustc --explain E0277`. +warning: `validator_client` (lib) generated 5 warnings +error: could not compile `validator_client` (lib) due to 61 previous errors; 5 warnings emitted +warning: build failed, waiting for other jobs to finish... +warning: `validator_client` (lib test) generated 5 warnings (5 duplicates) +error: could not compile `validator_client` (lib test) due to 61 previous errors; 5 warnings emitted diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 5096642cb2c..5074662d758 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -21,6 +21,8 @@ use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; +use futures::future::ok; +use hyper::body::to_bytes; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; @@ -28,12 +30,12 @@ use serde::{Deserialize, Serialize}; use slog::{crit, info, warn, Logger}; use slot_clock::SlotClock; use std::collections::HashMap; -use std::convert; use std::future::Future; use std::marker::PhantomData; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::path::PathBuf; use std::sync::Arc; +use std::{convert, result}; use sysinfo::{System, SystemExt}; use system_health::observe_system_health_vc; use task_executor::TaskExecutor; @@ -41,6 +43,7 @@ use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; use warp::reply::{Reply, Response as resp}; +use warp::Rejection; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, @@ -270,8 +273,9 @@ pub fn serve( .then(|signer| { blocking_signed_json_task(signer, move || { Ok(api_types::GenericResponse::from(api_types::VersionData { + // This will give me a response suppose to version: version_with_platform(), - })) + })) // This will weturn }) }); @@ -1232,19 +1236,15 @@ pub fn serve( pub async fn convert_with_header(res: Result) -> resp { match res { Ok(response) => { - // T Here - let mut response = match serde_json::to_vec(&func_output) { - Ok(body) => { - let mut res = resp::new(body); - res.headers_mut() - .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - res - } - Err(_) => resp::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(vec![]) - .expect("can produce simple response from static values"), - }; + // Convert the Reply (T) directly into a Response + let mut res = response.into_response(); + + // Set the content-type header + res.headers_mut().insert( + warp::http::header::CONTENT_TYPE, + HeaderValue::from_static("application/json"), + ); + res } Err(e) => match warp_utils::reject::handle_rejection(e).await { Ok(reply) => reply.into_response(), @@ -1259,19 +1259,21 @@ pub async fn convert_with_header(res: Result) -> r /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task( - signer: S, - func: F, -) -> Result +pub async fn blocking_signed_json_task(signer: S, func: F) -> resp where S: Fn(&[u8]) -> String, F: FnOnce() -> Result + Send + 'static, - T: Serialize + Send + 'static, + T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce { let result = warp_utils::task::blocking_task(func).await; - let conversion = convert_rejection(result).await; // It handles the rejection - let body: &Vec = response.body(); - let signature = signer(body); + let mut conversion = convert_with_header(result).await; + let body = conversion.body_mut(); + let bytes = hyper::body::to_bytes(body) + .await + .expect("Failed to read body"); + let body_vec = bytes.to_vec(); + let signature = signer(&body_vec); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - result.headers_mut().append("Signature", header_value) + conversion.headers_mut().append("Signature", header_value); + conversion } From a27b18ee128c0343b42f8a76177461baf94bcde3 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Mon, 21 Aug 2023 23:45:11 -0500 Subject: [PATCH 07/19] (Fix) : Rejection handling in VC API --- common/warp_utils/src/task.rs | 13 +- validator_client/output.txt | 1966 -------------------------- validator_client/src/http_api/mod.rs | 81 +- 3 files changed, 45 insertions(+), 2015 deletions(-) delete mode 100644 validator_client/output.txt diff --git a/common/warp_utils/src/task.rs b/common/warp_utils/src/task.rs index 8e12c551e7f..ad262810ac9 100644 --- a/common/warp_utils/src/task.rs +++ b/common/warp_utils/src/task.rs @@ -2,20 +2,15 @@ use serde::Serialize; use warp::reply::{Reply, Response}; /// A convenience wrapper around `blocking_task`. -pub async fn blocking_task(func: F) -> Result +pub async fn blocking_task(func: F) -> Result where F: FnOnce() -> Result + Send + 'static, - T: Reply + Send + 'static, + T: Send + 'static, { - let result = tokio::task::spawn_blocking(func) + tokio::task::spawn_blocking(func) .await - .unwrap_or_else(|_| Err(warp::reject::reject())); - match result { - Ok(reply) => Ok(reply.into_response()), - Err(rejection) => Err(rejection), - } + .unwrap_or_else(|_| Err(warp::reject::reject())) } - /// A convenience wrapper around `blocking_task` that returns a `warp::reply::Response`. /// /// Using this method consistently makes it possible to simplify types using `.unify()` or `.uor()`. diff --git a/validator_client/output.txt b/validator_client/output.txt deleted file mode 100644 index d34ab4c9f49..00000000000 --- a/validator_client/output.txt +++ /dev/null @@ -1,1966 +0,0 @@ - Compiling validator_client v0.3.5 (/home/clippo/Documents/rustcontributions/lighthouse/validator_client) -warning: unused import: `futures::future::ok` - --> validator_client/src/http_api/mod.rs:24:5 - | -24 | use futures::future::ok; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unused_imports)]` on by default - -warning: unused import: `hyper::body::to_bytes` - --> validator_client/src/http_api/mod.rs:25:5 - | -25 | use hyper::body::to_bytes; - | ^^^^^^^^^^^^^^^^^^^^^ - -warning: unused imports: `convert`, `result` - --> validator_client/src/http_api/mod.rs:38:11 - | -38 | use std::{convert, result}; - | ^^^^^^^ ^^^^^^ - -warning: unused import: `warp::Rejection` - --> validator_client/src/http_api/mod.rs:46:5 - | -46 | use warp::Rejection; - | ^^^^^^^^^^^^^^^ - -warning: unused imports: `CONTENT_TYPE`, `StatusCode`, `response::Response` - --> validator_client/src/http_api/mod.rs:49:31 - | -49 | header::{HeaderValue, CONTENT_TYPE}, - | ^^^^^^^^^^^^ -50 | response::Response, - | ^^^^^^^^^^^^^^^^^^ -51 | StatusCode, - | ^^^^^^^^^^ - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:274:13 - | -274 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:288:13 - | -288 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:302:13 - | -302 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0277]: the trait bound `GenericResponse>: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:315:13 - | -315 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:314:10 - | -314 | .then(|validator_store: Arc>, signer| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:341:17 - | -341 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:339:10 - | -339 | .then( - | ^^^^ expected due to this -340 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:340:13: 340:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:375:13 - | -375 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:374:10 - | -374 | .then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { - | ^^^^ --------------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(Arc<_>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(Arc<_>, std::time::Instant, PathBuf, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:374:15: 374:72]` to implement `warp::generic::Func<(Arc>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `GenericResponse>>: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:398:17 - | -398 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>>` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:392:10 - | -392 | .then( - | ^^^^ expected due to this -393 | / |validator_store: Arc>, -394 | | graffiti_file: Option, -395 | | graffiti_flag: Option, -396 | | signer, -397 | | log| { - | |_________________- found signature defined here - | - = note: expected closure signature `fn(std::result::Result, Rejection>, std::option::Option<_>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>) -> _` - found closure signature `fn(Arc<_>, std::option::Option<_>, std::option::Option<_>, _, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:393:13: 397:18]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, std::option::Option, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:314:10 - | -314 | .then(|validator_store: Arc>, signer| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:339:10 - | -339 | .then( - | ^^^^ expected due to this -340 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:340:13: 340:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:374:10 - | -374 | .then(|sysinfo, app_start: std::time::Instant, val_dir, signer| { - | ^^^^ --------------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(std::sync::Arc<_>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(std::sync::Arc<_>, std::time::Instant, std::path::PathBuf, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:374:15: 374:72]` to implement `warp::generic::Func<(std::sync::Arc>, std::time::Instant, std::result::Result, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:438:17 - | -438 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:430:10 - | -430 | .then( - | ^^^^ expected due to this -431 | / move |body: Vec, -432 | | validator_dir: PathBuf, -433 | | secrets_dir: PathBuf, -434 | | validator_store: Arc>, -435 | | spec: Arc, -436 | | signer, -437 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(Vec, PathBuf, PathBuf, Arc<_>, Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:431:13: 437:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `GenericResponse>>: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:398:17 - | -398 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>>` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:392:10 - | -392 | .then( - | ^^^^ expected due to this -393 | / |validator_store: Arc>, -394 | | graffiti_file: Option, -395 | | graffiti_flag: Option, -396 | | signer, -397 | | log| { - | |_________________- found signature defined here - | - = note: expected closure signature `fn(std::result::Result, Rejection>, std::option::Option<_>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>) -> _` - found closure signature `fn(std::sync::Arc<_>, std::option::Option<_>, std::option::Option<_>, _, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:393:13: 397:18]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, std::option::Option, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, Logger>>)>` - -error[E0277]: the trait bound `GenericResponse>: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:485:17 - | -485 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse>` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:477:10 - | -477 | .then( - | ^^^^ expected due to this -478 | / move |body: api_types::CreateValidatorsMnemonicRequest, -479 | | validator_dir: PathBuf, -480 | | secrets_dir: PathBuf, -481 | | validator_store: Arc>, -482 | | spec: Arc, -483 | | signer, -484 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(eth2::lighthouse_vc::types::CreateValidatorsMnemonicRequest, PathBuf, PathBuf, Arc<_>, Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:478:13: 484:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:533:17 - | -533 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:526:10 - | -526 | .then( - | ^^^^ expected due to this -527 | / move |body: api_types::KeystoreValidatorsPostRequest, -528 | | validator_dir: PathBuf, -529 | | secrets_dir: PathBuf, -530 | | validator_store: Arc>, -531 | | signer, -532 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(eth2::lighthouse_vc::types::KeystoreValidatorsPostRequest, PathBuf, PathBuf, Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:527:13: 532:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:617:17 - | -617 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:612:10 - | -612 | .then( - | ^^^^ expected due to this -613 | / |body: Vec, -614 | | validator_store: Arc>, -615 | | signer, -616 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(Vec, Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:613:13: 616:42]` to implement `warp::generic::Func<(_, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:430:10 - | -430 | .then( - | ^^^^ expected due to this -431 | / move |body: Vec, -432 | | validator_dir: PathBuf, -433 | | secrets_dir: PathBuf, -434 | | validator_store: Arc>, -435 | | spec: Arc, -436 | | signer, -437 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, std::sync::Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(Vec, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, std::sync::Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:431:13: 437:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, std::sync::Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:672:17 - | -672 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:665:10 - | -665 | .then( - | ^^^^ expected due to this -666 | / |validator_pubkey: PublicKey, -667 | | body: api_types::ValidatorPatchRequest, -668 | | validator_store: Arc>, -669 | | graffiti_file: Option, -670 | | signer, -671 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `AuthResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:736:13 - | -736 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `AuthResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:477:10 - | -477 | .then( - | ^^^^ expected due to this -478 | / move |body: api_types::CreateValidatorsMnemonicRequest, -479 | | validator_dir: PathBuf, -480 | | secrets_dir: PathBuf, -481 | | validator_store: Arc>, -482 | | spec: Arc, -483 | | signer, -484 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, std::sync::Arc<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(eth2::lighthouse_vc::types::CreateValidatorsMnemonicRequest, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, std::sync::Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:478:13: 484:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, std::sync::Arc, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `ExportKeystoresResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:754:17 - | -754 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ExportKeystoresResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:752:10 - | -752 | .then( - | ^^^^ expected due to this -753 | move |request, signer, validator_store, task_executor, log| { - | ----------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteKeystoresRequest, _, Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:753:13: 753:72]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:781:17 - | -781 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:779:10 - | -779 | .then( - | ^^^^ expected due to this -780 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:780:13: 780:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:526:10 - | -526 | .then( - | ^^^^ expected due to this -527 | / move |body: api_types::KeystoreValidatorsPostRequest, -528 | | validator_dir: PathBuf, -529 | | secrets_dir: PathBuf, -530 | | validator_store: Arc>, -531 | | signer, -532 | | task_executor: TaskExecutor| { - | |______________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, std::result::Result, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(eth2::lighthouse_vc::types::KeystoreValidatorsPostRequest, std::path::PathBuf, std::path::PathBuf, std::sync::Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:527:13: 532:47]` to implement `warp::generic::Func<(_, std::result::Result, std::result::Result, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:824:17 - | -824 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:819:10 - | -819 | .then( - | ^^^^ expected due to this -820 | / |validator_pubkey: PublicKey, -821 | | request: api_types::UpdateFeeRecipientRequest, -822 | | validator_store: Arc>, -823 | | signer| { - | |____________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, UpdateFeeRecipientRequest, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:820:13: 823:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:612:10 - | -612 | .then( - | ^^^^ expected due to this -613 | / |body: Vec, -614 | | validator_store: Arc>, -615 | | signer, -616 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(_, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(Vec, std::sync::Arc<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:613:13: 616:42]` to implement `warp::generic::Func<(_, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:665:10 - | -665 | .then( - | ^^^^ expected due to this -666 | / |validator_pubkey: PublicKey, -667 | | body: api_types::ValidatorPatchRequest, -668 | | validator_store: Arc>, -669 | | graffiti_file: Option, -670 | | signer, -671 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, std::sync::Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:849:10 - | -811 | let post_fee_recipient = eth_v1 - | ______________________________- -812 | | .and(warp::path("validator")) -813 | | .and(warp::path::param::()) -814 | | .and(warp::path("feerecipient")) -... | -848 | | ) -849 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-8595461928439969746.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:752:10 - | -752 | .then( - | ^^^^ expected due to this -753 | move |request, signer, validator_store, task_executor, log| { - | ----------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteKeystoresRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:753:13: 753:72]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:861:17 - | -861 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:859:10 - | -859 | .then( - | ^^^^ expected due to this -860 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:860:13: 860:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:779:10 - | -779 | .then( - | ^^^^ expected due to this -780 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:780:13: 780:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:886:10 - | -852 | let delete_fee_recipient = eth_v1 - | ________________________________- -853 | | .and(warp::path("validator")) -854 | | .and(warp::path::param::()) -855 | | .and(warp::path("feerecipient")) -... | -885 | | ) -886 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-11718294443365172138.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` - -error[E0277]: the trait bound `GenericResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:898:17 - | -898 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `GenericResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:896:10 - | -896 | .then( - | ^^^^ expected due to this -897 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:897:13: 897:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:819:10 - | -819 | .then( - | ^^^^ expected due to this -820 | / |validator_pubkey: PublicKey, -821 | | request: api_types::UpdateFeeRecipientRequest, -822 | | validator_store: Arc>, -823 | | signer| { - | |____________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, UpdateFeeRecipientRequest, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:820:13: 823:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:933:17 - | -933 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:928:10 - | -928 | .then( - | ^^^^ expected due to this -929 | / |validator_pubkey: PublicKey, -930 | | request: api_types::UpdateGasLimitRequest, -931 | | validator_store: Arc>, -932 | | signer| { - | |____________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, UpdateGasLimitRequest, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:929:13: 932:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:958:10 - | -920 | let post_gas_limit = eth_v1 - | __________________________- -921 | | .and(warp::path("validator")) -922 | | .and(warp::path::param::()) -923 | | .and(warp::path("gas_limit")) -... | -957 | | ) -958 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-764829791462733142.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` - -error[E0277]: the trait bound `(): Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:970:17 - | -970 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `()` - | - = help: the trait `Reply` is implemented for `(T,)` -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:968:10 - | -968 | .then( - | ^^^^ expected due to this -969 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:969:13: 969:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:995:10 - | -961 | let delete_gas_limit = eth_v1 - | ____________________________- -962 | | .and(warp::path("validator")) -963 | | .and(warp::path::param::()) -964 | | .and(warp::path("gas_limit")) -... | -994 | | ) -995 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-15090605634825385487.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` - -error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:849:10 - | -811 | let post_fee_recipient = eth_v1 - | ______________________________- -812 | | .and(warp::path("validator")) -813 | | .and(warp::path::param::()) -814 | | .and(warp::path("feerecipient")) -... | -848 | | ) -849 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12724452031844297296.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:820:13: 823:21]>: Iterator` - -error[E0277]: the trait bound `SignedVoluntaryExit: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1017:17 - | -1017 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `SignedVoluntaryExit` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:859:10 - | -859 | .then( - | ^^^^ expected due to this -860 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:860:13: 860:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1009:10 - | -1009 | .then( - | ^^^^ expected due to this -1010 | / |pubkey: PublicKey, -1011 | | query: api_types::VoluntaryExitQuery, -1012 | | validator_store: Arc>, -1013 | | slot_clock: T, -1014 | | log, -1015 | | signer, -1016 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::result::Result, Rejection>, _, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, Arc<_>, _, Logger>>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1010:13: 1016:42]` to implement `warp::generic::Func<(GenericPublicKey, VoluntaryExitQuery, std::result::Result>, Rejection>, T, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0277]: the trait bound `ListKeystoresResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1042:13 - | -1042 | blocking_signed_json_task(signer, move || Ok(keystores::list(validator_store))) - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ListKeystoresResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1041:10 - | -1041 | .then(|signer, validator_store: Arc>| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` - found closure signature `fn(_, Arc<_>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1041:15: 1041:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` - -error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:886:10 - | -852 | let delete_fee_recipient = eth_v1 - | ________________________________- -853 | | .and(warp::path("validator")) -854 | | .and(warp::path::param::()) -855 | | .and(warp::path("feerecipient")) -... | -885 | | ) -886 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-7988710767728157714.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:860:13: 860:94]>: Iterator` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:896:10 - | -896 | .then( - | ^^^^ expected due to this -897 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:897:13: 897:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0277]: the trait bound `ImportKeystoresResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1063:17 - | -1063 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ImportKeystoresResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1054:10 - | -1054 | .then( - | ^^^^ expected due to this -1055 | / move |request, -1056 | | signer, -1057 | | validator_dir, -1058 | | secrets_dir, -1059 | | validator_store, -1060 | | task_executor, -1061 | | log| { - | |______________________- found signature defined here - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(ImportKeystoresRequest, _, PathBuf, PathBuf, Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1055:13: 1061:23]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:928:10 - | -928 | .then( - | ^^^^ expected due to this -929 | / |validator_pubkey: PublicKey, -930 | | request: api_types::UpdateGasLimitRequest, -931 | | validator_store: Arc>, -932 | | signer| { - | |____________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, UpdateGasLimitRequest, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:929:13: 932:21]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0599]: the method `map` exists for struct `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:958:10 - | -920 | let post_gas_limit = eth_v1 - | __________________________- -921 | | .and(warp::path("validator")) -922 | | .and(warp::path::param::()) -923 | | .and(warp::path("gas_limit")) -... | -957 | | ) -958 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::ACCEPTED)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-11366895387547330085.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:929:13: 932:21]>: Iterator` - -error[E0277]: the trait bound `DeleteKeystoresResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1084:13 - | -1084 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `DeleteKeystoresResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1083:10 - | -1083 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteKeystoresRequest, _, Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1083:15: 1083:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0277]: the trait bound `ListRemotekeysResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1094:13 - | -1094 | blocking_signed_json_task(signer, move || Ok(remotekeys::list(validator_store))) - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ListRemotekeysResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1093:10 - | -1093 | .then(|signer, validator_store: Arc>| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` - found closure signature `fn(_, Arc<_>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1093:15: 1093:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:968:10 - | -968 | .then( - | ^^^^ expected due to this -969 | |validator_pubkey: PublicKey, validator_store: Arc>, signer| { - | --------------------------------------------------------------------------------- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(GenericPublicKey<_>, std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:969:13: 969:94]` to implement `warp::generic::Func<(GenericPublicKey, std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - -error[E0599]: the method `map` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:995:10 - | -961 | let delete_gas_limit = eth_v1 - | ____________________________- -962 | | .and(warp::path("validator")) -963 | | .and(warp::path::param::()) -964 | | .and(warp::path("gas_limit")) -... | -994 | | ) -995 | | .map(|reply| warp::reply::with_status(reply, warp::http::StatusCode::NO_CONTENT)); - | | -^^^ method cannot be called due to unsatisfied trait bounds - | |_________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | doesn't satisfy `_: Iterator` - | doesn't satisfy `_: StreamExt` - | doesn't satisfy `_: Stream` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-16198603502018555708.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Stream` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: tokio_stream::StreamExt` - `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: warp::Filter` - `warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` - which is required by `&mut warp::filter::then::Then>, Exact>>, Exact>>, impl warp::Filter + warp::filter::FilterBase,), Error = Rejection> + std::marker::Copy>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:969:13: 969:94]>: Iterator` - -error[E0277]: the trait bound `ImportRemotekeysResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1105:13 - | -1105 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `ImportRemotekeysResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1104:10 - | -1104 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(ImportRemotekeysRequest, _, Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1104:15: 1104:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0277]: the trait bound `DeleteRemotekeysResponse: Reply` is not satisfied - --> validator_client/src/http_api/mod.rs:1118:13 - | -1118 | blocking_signed_json_task(signer, move || { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Reply` is not implemented for `DeleteRemotekeysResponse` - | - = help: the following other types implement trait `Reply`: - Box - Cow<'static, str> - log::internal::Logged - hyper::Response - trace::internal::Traced - warp::reply::Json - Html - warp::reply::sealed::Reply_ - and 14 others -note: required by a bound in `blocking_signed_json_task` - --> validator_client/src/http_api/mod.rs:1266:20 - | -1262 | pub async fn blocking_signed_json_task(signer: S, func: F) -> resp - | ------------------------- required by a bound in this function -... -1266 | T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce - | ^^^^^ required by this bound in `blocking_signed_json_task` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1117:10 - | -1117 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteRemotekeysRequest, _, Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1117:15: 1117:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1009:10 - | -1009 | .then( - | ^^^^ expected due to this -1010 | / |pubkey: PublicKey, -1011 | | query: api_types::VoluntaryExitQuery, -1012 | | validator_store: Arc>, -1013 | | slot_clock: T, -1014 | | log, -1015 | | signer, -1016 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here - | - = note: expected closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::result::Result, Rejection>, _, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, VoluntaryExitQuery, std::sync::Arc<_>, _, Logger>>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1010:13: 1016:42]` to implement `warp::generic::Func<(GenericPublicKey, VoluntaryExitQuery, std::result::Result>, Rejection>, T, Logger>>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1178:26 - | -314 | .then(|validator_store: Arc>, signer| { - | ---------------------------------------------------- found signature defined here -... -1178 | .or(get_lighthouse_validators) - | ^^ expected due to this - | - = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - = note: required for `Then>, Exact>>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-3906823655880936258.txt' - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1041:10 - | -1041 | .then(|signer, validator_store: Arc>| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` - found closure signature `fn(_, std::sync::Arc<_>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1041:15: 1041:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` - -error[E0599]: the method `or` exists for struct `Or>, Exact>>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1179:26 - | -1175 | / get_node_version -1176 | | .or(get_lighthouse_health) -1177 | | .or(get_lighthouse_spec) -1178 | | .or(get_lighthouse_validators) -1179 | | .or(get_lighthouse_validators_pubkey) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/or.rs:16:1 - | -16 | pub struct Or { - | ------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-4771350299114414337.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - -error[E0599]: the method `or` exists for struct `Then, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1189:26 - | -1188 | / post_validators -1189 | | .or(post_validators_keystore) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-3614709639453241739.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1198:35 - | -666 | / |validator_pubkey: PublicKey, -667 | | body: api_types::ValidatorPatchRequest, -668 | | validator_store: Arc>, -669 | | graffiti_file: Option, -670 | | signer, -671 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here -... -1198 | .or(warp::patch().and(patch_validators)) - | ^^^ expected due to this - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - = note: required for `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-11188398796661424827.txt' - -error[E0599]: the method `or` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1201:26 - | -1200 | / delete_lighthouse_keystores -1201 | | .or(delete_fee_recipient) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-d523eba1c9d608f9.long-type-14127784889754068231.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1054:10 - | -1054 | .then( - | ^^^^ expected due to this -1055 | / move |request, -1056 | | signer, -1057 | | validator_dir, -1058 | | secrets_dir, -1059 | | validator_store, -1060 | | task_executor, -1061 | | log| { - | |______________________- found signature defined here - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(ImportKeystoresRequest, _, std::path::PathBuf, std::path::PathBuf, std::sync::Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1055:13: 1061:23]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, std::result::Result, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1083:10 - | -1083 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteKeystoresRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1083:15: 1083:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1093:10 - | -1093 | .then(|signer, validator_store: Arc>| { - | ^^^^ ---------------------------------------------------- found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result, Rejection>) -> _` - found closure signature `fn(_, std::sync::Arc<_>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1093:15: 1093:67]` to implement `warp::generic::Func<(impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>)>` - -error: cannot check whether the hidden type of opaque type satisfies auto traits - --> validator_client/src/http_api/test_utils.rs:149:22 - | -149 | tokio::spawn(server); - | ------------ ^^^^^^ - | | - | required by a bound introduced by this call - | -note: opaque type is declared here - --> validator_client/src/http_api/mod.rs:136:26 - | -136 | ) -> Result<(SocketAddr, impl Future), Error> { - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule - --> validator_client/src/http_api/test_utils.rs:72:18 - | -72 | pub async fn new_with_http_config(http_config: HttpConfig) -> Self { - | ^^^^^^^^^^^^^^^^^^^^ -note: required by a bound in `tokio::spawn` - --> /home/clippo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.29.1/src/task/spawn.rs:166:21 - | -164 | pub fn spawn(future: T) -> JoinHandle - | ----- required by a bound in this function -165 | where -166 | T: Future + Send + 'static, - | ^^^^ required by this bound in `spawn` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1104:10 - | -1104 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(ImportRemotekeysRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1104:15: 1104:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1117:10 - | -1117 | .then(|request, signer, validator_store, task_executor, log| { - | ^^^^ ------------------------------------------------------ found signature defined here - | | - | expected due to this - | - = note: expected closure signature `fn(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>) -> _` - found closure signature `fn(DeleteRemotekeysRequest, _, std::sync::Arc>, TaskExecutor, Logger>>) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:1117:15: 1117:69]` to implement `warp::generic::Func<(_, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, std::result::Result>, Rejection>, TaskExecutor, Logger>>)>` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1178:26 - | -314 | .then(|validator_store: Arc>, signer| { - | ---------------------------------------------------- found signature defined here -... -1178 | .or(get_lighthouse_validators) - | ^^ expected due to this - | - = note: expected closure signature `fn(std::result::Result, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone) -> _` - found closure signature `fn(std::sync::Arc<_>, _) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:314:15: 314:67]` to implement `warp::generic::Func<(std::result::Result>, Rejection>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone)>` - = note: required for `Then>, Exact>>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-17826282335143050859.txt' - -error[E0599]: the method `or` exists for struct `Or>, Exact>>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1179:26 - | -1175 | / get_node_version -1176 | | .or(get_lighthouse_health) -1177 | | .or(get_lighthouse_spec) -1178 | | .or(get_lighthouse_validators) -1179 | | .or(get_lighthouse_validators_pubkey) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/or.rs:16:1 - | -16 | pub struct Or { - | ------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12797299832639877060.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `&warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::filter::FilterBase` - which is required by `&mut warp::filter::or::Or>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:273:15: 273:23]>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:287:15: 287:23]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:301:15: 301:37]>>, warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, [closure@validator_client/src/http_api/mod.rs:314:15: 314:67]>>: warp::Filter` - -error[E0599]: the method `or` exists for struct `Then, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1189:26 - | -1188 | / post_validators -1189 | | .or(post_validators_keystore) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-12114042324687096208.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:196:48: 196:55]>, [closure@validator_client/src/http_api/mod.rs:197:9: 197:35]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:207:46: 207:53]>, [closure@validator_client/src/http_api/mod.rs:208:9: 208:33]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:230:39: 230:46]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, [closure@validator_client/src/http_api/mod.rs:431:13: 437:47]>: warp::Filter` - -error: cannot check whether the hidden type of opaque type satisfies auto traits - --> validator_client/src/lib.rs:598:37 - | -598 | .spawn_without_exit(server, "http-api"); - | ------------------ ^^^^^^ - | | - | required by a bound introduced by this call - | -note: opaque type is declared here - --> validator_client/src/http_api/mod.rs:136:26 - | -136 | ) -> Result<(SocketAddr, impl Future), Error> { - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule - --> validator_client/src/lib.rs:525:12 - | -525 | pub fn start_service(&mut self) -> Result<(), String> { - | ^^^^^^^^^^^^^ -note: required by a bound in `TaskExecutor::spawn_without_exit` - --> /home/clippo/Documents/rustcontributions/lighthouse/common/task_executor/src/lib.rs:198:42 - | -196 | pub fn spawn_without_exit( - | ------------------ required by a bound in this associated function -197 | &self, -198 | task: impl Future + Send + 'static, - | ^^^^ required by this bound in `TaskExecutor::spawn_without_exit` - -error[E0631]: type mismatch in closure arguments - --> validator_client/src/http_api/mod.rs:1198:35 - | -666 | / |validator_pubkey: PublicKey, -667 | | body: api_types::ValidatorPatchRequest, -668 | | validator_store: Arc>, -669 | | graffiti_file: Option, -670 | | signer, -671 | | task_executor: TaskExecutor| { - | |_________________________________________- found signature defined here -... -1198 | .or(warp::patch().and(patch_validators)) - | ^^^ expected due to this - | - = note: expected closure signature `fn(GenericPublicKey<_>, _, std::result::Result, Rejection>, std::option::Option<_>, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor) -> _` - found closure signature `fn(GenericPublicKey<_>, ValidatorPatchRequest, std::sync::Arc<_>, std::option::Option<_>, _, TaskExecutor) -> _` - = note: required for `[closure@validator_client/src/http_api/mod.rs:666:13: 671:42]` to implement `warp::generic::Func<(GenericPublicKey, _, std::result::Result>, Rejection>, std::option::Option, impl (for<'a> Fn(&'a [u8]) -> std::string::String) + Clone, TaskExecutor)>` - = note: required for `Then>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>, ...>` to implement `warp::filter::FilterBase` - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-388915212221575498.txt' - -error[E0599]: the method `or` exists for struct `Then>, Exact<...>>, ...>, ...>, ...>, ...>, ...>, ...>, ...>`, but its trait bounds were not satisfied - --> validator_client/src/http_api/mod.rs:1201:26 - | -1200 | / delete_lighthouse_keystores -1201 | | .or(delete_fee_recipient) - | | -^^ method cannot be called due to unsatisfied trait bounds - | |_________________________| - | - | - ::: /home/clippo/.cargo/git/checkouts/warp-e423c7de4eccaa31/7e75acc/src/filter/then.rs:11:1 - | -11 | pub struct Then { - | --------------------- - | | - | doesn't satisfy `_: FilterBase` - | doesn't satisfy `_: Filter` - | - = note: the full type name has been written to '/home/clippo/Documents/rustcontributions/lighthouse/target/debug/deps/validator_client-74104a002a9e4722.long-type-10970351178299848214.txt' - = note: the following trait bounds were not satisfied: - `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `&warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::filter::FilterBase` - which is required by `&mut warp::filter::then::Then>, Exact>>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, impl warp::Filter + warp::filter::FilterBase + std::marker::Copy>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:179:34: 179:41]>>, warp::filter::then::Then + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:182:50: 182:57]>, [closure@validator_client/src/http_api/mod.rs:183:9: 183:37]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:193:48: 193:55]>>, warp::filter::map::Map + std::marker::Copy, [closure@validator_client/src/http_api/mod.rs:224:38: 224:45]>>, [closure@validator_client/src/http_api/mod.rs:753:13: 753:72]>: warp::Filter` - -Some errors have detailed explanations: E0277, E0599, E0631. -For more information about an error, try `rustc --explain E0277`. -warning: `validator_client` (lib) generated 5 warnings -error: could not compile `validator_client` (lib) due to 61 previous errors; 5 warnings emitted -warning: build failed, waiting for other jobs to finish... -warning: `validator_client` (lib test) generated 5 warnings (5 duplicates) -error: could not compile `validator_client` (lib test) due to 61 previous errors; 5 warnings emitted diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 5074662d758..97849b62c18 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -21,8 +21,6 @@ use eth2::lighthouse_vc::{ std_types::{AuthResponse, GetFeeRecipientResponse, GetGasLimitResponse}, types::{self as api_types, GenericResponse, Graffiti, PublicKey, PublicKeyBytes}, }; -use futures::future::ok; -use hyper::body::to_bytes; use lighthouse_version::version_with_platform; use logging::SSELoggingComponents; use parking_lot::RwLock; @@ -35,15 +33,13 @@ use std::marker::PhantomData; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::path::PathBuf; use std::sync::Arc; -use std::{convert, result}; use sysinfo::{System, SystemExt}; use system_health::observe_system_health_vc; use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; -use warp::reply::{Reply, Response as resp}; -use warp::Rejection; +use warp::reply::Response as resp; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, @@ -179,32 +175,32 @@ pub fn serve( let signer = warp::any().map(move || signer.clone()); let inner_validator_store = ctx.validator_store.clone(); - let validator_store_filter = warp::any().map(move || inner_validator_store.clone()).then( - |validator_store: Option<_>| async move { + let validator_store_filter = warp::any() + .map(move || inner_validator_store.clone()) + .and_then(|validator_store: Option<_>| async move { validator_store.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator store is not initialized.".to_string(), ) }) - }, - ); + }); let inner_task_executor = ctx.task_executor.clone(); let task_executor_filter = warp::any().map(move || inner_task_executor.clone()); let inner_validator_dir = ctx.validator_dir.clone(); - let validator_dir_filter = warp::any().map(move || inner_validator_dir.clone()).then( - |validator_dir: Option<_>| async move { + let validator_dir_filter = warp::any() + .map(move || inner_validator_dir.clone()) + .and_then(|validator_dir: Option<_>| async move { validator_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( "validator_dir directory is not initialized.".to_string(), ) }) - }, - ); + }); let inner_secrets_dir = ctx.secrets_dir.clone(); - let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).then( + let secrets_dir_filter = warp::any().map(move || inner_secrets_dir.clone()).and_then( |secrets_dir: Option<_>| async move { secrets_dir.ok_or_else(|| { warp_utils::reject::custom_not_found( @@ -273,9 +269,8 @@ pub fn serve( .then(|signer| { blocking_signed_json_task(signer, move || { Ok(api_types::GenericResponse::from(api_types::VersionData { - // This will give me a response suppose to version: version_with_platform(), - })) // This will weturn + })) }) }); @@ -1126,7 +1121,7 @@ pub fn serve( .and(warp::path("logs")) .and(warp::path::end()) .and(sse_component_filter) - .then(|sse_component: Option| { + .and_then(|sse_component: Option| { warp_utils::task::blocking_task(move || { if let Some(logging_components) = sse_component { // Build a JSON stream @@ -1229,33 +1224,39 @@ pub fn serve( Ok((listening_socket, server)) } -/// Convert a warp `Rejection` into a `Response`. +// Convert a warp `Rejection` into a `Response`. /// /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_with_header(res: Result) -> resp { +pub async fn convert_with_header( + res: Result, +) -> Response { match res { - Ok(response) => { - // Convert the Reply (T) directly into a Response - let mut res = response.into_response(); - - // Set the content-type header - res.headers_mut().insert( - warp::http::header::CONTENT_TYPE, - HeaderValue::from_static("application/json"), - ); - res - } - Err(e) => match warp_utils::reject::handle_rejection(e).await { - Ok(reply) => reply.into_response(), - Err(_) => warp::reply::with_status( - warp::reply::json(&"unhandled error"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ) - .into_response(), + Ok(response) => match serde_json::to_vec(&response) { + Ok(body) => { + let mut res = Response::new(hyper::Body::from(body)); + res.headers_mut() + .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + return res; // Explicitly return here + } + Err(_) => { + let error = Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(hyper::Body::from(vec![])) + .expect("can produce simple response from static values"); + return error; // Explicitly return here + } }, + Err(_) => { + let error = Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + .body(hyper::Body::from(vec![])) + .expect("can produce simple response from static values"); + return error; // Explicitly return here + } } } + /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. @@ -1263,10 +1264,10 @@ pub async fn blocking_signed_json_task(signer: S, func: F) -> resp where S: Fn(&[u8]) -> String, F: FnOnce() -> Result + Send + 'static, - T: Serialize + Reply + Send + 'static, // Check the closure of ur FnOnce + T: Serialize + Send + 'static, // Check the closure of ur FnOnce { - let result = warp_utils::task::blocking_task(func).await; - let mut conversion = convert_with_header(result).await; + let result = warp_utils::task::blocking_task(func).await; // This produce a result + let mut conversion = convert_with_header(result).await; // We need to serialize it and turn it into a response let body = conversion.body_mut(); let bytes = hyper::body::to_bytes(body) .await From f05c3fbb76a970965af4cb198d7f7af03c6d81b4 Mon Sep 17 00:00:00 2001 From: protocol Date: Mon, 28 Aug 2023 20:51:19 +0300 Subject: [PATCH 08/19] (rebase) : Fix lint --- validator_client/src/http_api/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 97849b62c18..d684ad8a66a 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1237,14 +1237,14 @@ pub async fn convert_with_header( let mut res = Response::new(hyper::Body::from(body)); res.headers_mut() .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - return res; // Explicitly return here + res } Err(_) => { let error = Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - return error; // Explicitly return here + error } }, Err(_) => { @@ -1252,7 +1252,7 @@ pub async fn convert_with_header( .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - return error; // Explicitly return here + error } } } From b608d2e4308b6148183a4d56d4c6467c4468dc00 Mon Sep 17 00:00:00 2001 From: protocol Date: Mon, 28 Aug 2023 20:55:58 +0300 Subject: [PATCH 09/19] Revert "(rebase) : Fix lint" This reverts commit f05c3fbb76a970965af4cb198d7f7af03c6d81b4. --- validator_client/src/http_api/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index d684ad8a66a..97849b62c18 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1237,14 +1237,14 @@ pub async fn convert_with_header( let mut res = Response::new(hyper::Body::from(body)); res.headers_mut() .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - res + return res; // Explicitly return here } Err(_) => { let error = Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - error + return error; // Explicitly return here } }, Err(_) => { @@ -1252,7 +1252,7 @@ pub async fn convert_with_header( .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - error + return error; // Explicitly return here } } } From 195b9b3436f51a84b5929f196971c5000b76a5c7 Mon Sep 17 00:00:00 2001 From: protocolwhisper Date: Mon, 28 Aug 2023 21:01:05 +0300 Subject: [PATCH 10/19] (rebase): Fix Lint --- validator_client/src/http_api/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 97849b62c18..d684ad8a66a 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1237,14 +1237,14 @@ pub async fn convert_with_header( let mut res = Response::new(hyper::Body::from(body)); res.headers_mut() .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - return res; // Explicitly return here + res } Err(_) => { let error = Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - return error; // Explicitly return here + error } }, Err(_) => { @@ -1252,7 +1252,7 @@ pub async fn convert_with_header( .status(StatusCode::INTERNAL_SERVER_ERROR) .body(hyper::Body::from(vec![])) .expect("can produce simple response from static values"); - return error; // Explicitly return here + error } } } From 669c7ea42d2784cda5aacadc9abfe8cec991cfb7 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Tue, 3 Oct 2023 19:25:08 -0500 Subject: [PATCH 11/19] (rebase) : Convert Rejection into signed Response --- validator_client/src/http_api/mod.rs | 70 +++++++++++++--------------- 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index d684ad8a66a..3477986c9fe 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -39,7 +39,6 @@ use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; -use warp::reply::Response as resp; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, @@ -1228,53 +1227,50 @@ pub fn serve( /// /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_with_header( - res: Result, -) -> Response { + +pub async fn convert_rejection(res: Result) -> Response> +where + T: Serialize + Send + 'static, +{ match res { - Ok(response) => match serde_json::to_vec(&response) { - Ok(body) => { - let mut res = Response::new(hyper::Body::from(body)); - res.headers_mut() - .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - res - } - Err(_) => { - let error = Response::builder() + Ok(func_output) => { + let response = match serde_json::to_vec(&func_output) { + Ok(body) => { + let mut res = Response::new(body); + res.headers_mut() + .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + res + } + Err(_) => Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(hyper::Body::from(vec![])) - .expect("can produce simple response from static values"); - error - } - }, - Err(_) => { - let error = Response::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(hyper::Body::from(vec![])) - .expect("can produce simple response from static values"); - error + .body(vec![]) + .expect("can produce simple response from static values"), + }; + response } + Err(_) => Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body + .body(vec![]) + .expect("can produce simple response from static values"), } } - /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task(signer: S, func: F) -> resp +pub async fn blocking_signed_json_task(signer: S, func: F) -> Response> where S: Fn(&[u8]) -> String, F: FnOnce() -> Result + Send + 'static, - T: Serialize + Send + 'static, // Check the closure of ur FnOnce + T: Serialize + Send + 'static, { - let result = warp_utils::task::blocking_task(func).await; // This produce a result - let mut conversion = convert_with_header(result).await; // We need to serialize it and turn it into a response - let body = conversion.body_mut(); - let bytes = hyper::body::to_bytes(body) - .await - .expect("Failed to read body"); - let body_vec = bytes.to_vec(); - let signature = signer(&body_vec); + let response = warp_utils::task::blocking_task(func).await; + // Ownership cause you transform it to vec![u8] + let mut conv_res = convert_rejection(response).await; + // Here i should handle both of that shit + let body: &Vec = conv_res.body(); + let signature = signer(body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - conversion.headers_mut().append("Signature", header_value); - conversion + conv_res.headers_mut().append("Signature", header_value); + conv_res } From 66578b6af0bd5d8c9e587ed22ad9b3d375ffc8a7 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Sat, 7 Oct 2023 19:36:02 -0500 Subject: [PATCH 12/19] (rebase) : Improve rejection error handling --- validator_client/src/http_api/mod.rs | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 3477986c9fe..d935cb2ba3d 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -39,6 +39,7 @@ use task_executor::TaskExecutor; use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; +use warp::reply::Reply; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, @@ -1248,11 +1249,27 @@ where }; response } - Err(_) => Response::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body - .body(vec![]) - .expect("can produce simple response from static values"), + Err(e) => { + let resp = warp_utils::reject::handle_rejection(e).await; + match resp { + Ok(reply) => { + let mut response = reply.into_response(); + let (parts, body) = response.into_parts(); + let body_bytes = hyper::body::to_bytes(body).await.unwrap(); + Response::builder() + .status(StatusCode::BAD_REQUEST) + // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body + .body(body_bytes.to_vec()) + .expect("can produce simple response from static values") + // Delete the bytes import + } + Err(_) => Response::builder() + .status(StatusCode::INTERNAL_SERVER_ERROR) + // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body + .body(vec![]) + .expect("can produce simple response from static values"), + } + } } } /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). From 34d07e5d34e68623f36e4fb0d99c6f7338257ef0 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Sun, 8 Oct 2023 02:09:52 -0500 Subject: [PATCH 13/19] (rebase): Improving rejection error handling --- validator_client/src/http_api/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index d935cb2ba3d..65ec385ae83 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1251,23 +1251,21 @@ where } Err(e) => { let resp = warp_utils::reject::handle_rejection(e).await; + //Building the response with the Rejection match resp { Ok(reply) => { - let mut response = reply.into_response(); - let (parts, body) = response.into_parts(); + let response = reply.into_response(); + let (_parts, body) = response.into_parts(); let body_bytes = hyper::body::to_bytes(body).await.unwrap(); Response::builder() .status(StatusCode::BAD_REQUEST) - // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body .body(body_bytes.to_vec()) - .expect("can produce simple response from static values") - // Delete the bytes import + .expect("can't produce response from rejection") } Err(_) => Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) - // Try what happen if you change the body in order to be the Rejection inside the bdoy instead of empty body .body(vec![]) - .expect("can produce simple response from static values"), + .expect("unhandled error in blocking task"), } } } From 1516ff72a3661cba222ae5a9e10ab5c05e256eb4 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Sun, 8 Oct 2023 03:10:43 -0500 Subject: [PATCH 14/19] (rebase): Fixing comments --- validator_client/src/http_api/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 495a83f3d24..91b7bfd2ee8 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1284,9 +1284,7 @@ where T: Serialize + Send + 'static, { let response = warp_utils::task::blocking_task(func).await; - // Ownership cause you transform it to vec![u8] let mut conv_res = convert_rejection(response).await; - // Here i should handle both of that shit let body: &Vec = conv_res.body(); let signature = signer(body); let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); From 8e36053e8f7e5dbb0f4ca1c28768fbc7b8b1e7c5 Mon Sep 17 00:00:00 2001 From: Theprotocolwhisperer Date: Sat, 16 Dec 2023 21:00:26 -0300 Subject: [PATCH 15/19] (rebase) : empty lines --- common/warp_utils/src/task.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/common/warp_utils/src/task.rs b/common/warp_utils/src/task.rs index ad262810ac9..001231f2c6b 100644 --- a/common/warp_utils/src/task.rs +++ b/common/warp_utils/src/task.rs @@ -11,6 +11,7 @@ where .await .unwrap_or_else(|_| Err(warp::reject::reject())) } + /// A convenience wrapper around `blocking_task` that returns a `warp::reply::Response`. /// /// Using this method consistently makes it possible to simplify types using `.unify()` or `.uor()`. From d590201c9210a0738e2e83f8453072ee242b576a Mon Sep 17 00:00:00 2001 From: protocolwhisper Date: Wed, 17 Jan 2024 22:24:35 -0500 Subject: [PATCH 16/19] (rebase) : Changed output to Response --- validator_client/src/http_api/mod.rs | 45 ++++++++++++++++------------ 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 08d7322d873..d5e8affeb12 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -55,7 +55,7 @@ use warp::{ sse::Event, Filter, }; - +use warp::reply::Response as respuesta; #[derive(Debug)] pub enum Error { Warp(warp::Error), @@ -1322,23 +1322,22 @@ pub fn serve( /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(res: Result) -> Response> +pub async fn convert_rejection(res: Result) -> respuesta where T: Serialize + Send + 'static, { match res { - Ok(func_output) => { - let response = match serde_json::to_vec(&func_output) { + Ok(blockedtask) => { + let response = match serde_json::to_vec(&blockedtask) { Ok(body) => { - let mut res = Response::new(body); - res.headers_mut() - .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - res + let mut respuesta = respuesta::new(body); + respuesta.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + respuesta + // I need to change this } - Err(_) => Response::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(vec![]) - .expect("can produce simple response from static values"), + Err(_) =>warp::reply::with_status( + warp::reply::json(&"can produce simple response from static values"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, }; response } @@ -1348,6 +1347,8 @@ where match resp { Ok(reply) => { let response = reply.into_response(); + + // See if this part can be built with response builder from the reply of warp let (_parts, body) = response.into_parts(); let body_bytes = hyper::body::to_bytes(body).await.unwrap(); Response::builder() @@ -1355,24 +1356,30 @@ where .body(body_bytes.to_vec()) .expect("can't produce response from rejection") } - Err(_) => Response::builder() - .status(StatusCode::INTERNAL_SERVER_ERROR) - .body(vec![]) - .expect("unhandled error in blocking task"), + Err(_) => warp::reply::with_status( + warp::reply::json(&"unhandled error in blocking task"), + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ) + // This is infallible + .into_response(), } } - } + } // The response that we were previously using whas an struct called Response that has head and body + // Now we are gonna use the response from warp reply } + /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. pub async fn blocking_signed_json_task(signer: S, func: F) -> Response> where S: Fn(&[u8]) -> String, - F: FnOnce() -> Result + Send + 'static, + F: FnOnce() -> Result + Send + 'static, // This specify the function that recieves this function as a F parameter T: Serialize + Send + 'static, { - let response = warp_utils::task::blocking_task(func).await; + // I get the response from my blocking task + let response = warp_utils::task::blocking_task(func).await; // Here i do get what i want + let mut conv_res = convert_rejection(response).await; let body: &Vec = conv_res.body(); let signature = signer(body); From dd1149d411c2cb17b0c2ba6584f8a2dec01f3b92 Mon Sep 17 00:00:00 2001 From: protocolwhisper Date: Fri, 26 Jan 2024 00:07:55 -0500 Subject: [PATCH 17/19] (fix): logic & error handling --- validator_client/src/http_api/mod.rs | 105 ++++++++++++--------------- 1 file changed, 45 insertions(+), 60 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index d5e8affeb12..611eeb6881f 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -49,13 +49,11 @@ use warp::reply::Reply; use warp::{ http::{ header::{HeaderValue, CONTENT_TYPE}, - response::Response, - StatusCode, }, sse::Event, Filter, }; -use warp::reply::Response as respuesta; +use warp::reply::Response; #[derive(Debug)] pub enum Error { Warp(warp::Error), @@ -1044,7 +1042,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(graffiti_flag_filter) .and(signer.clone()) - .and_then( + .then( |pubkey: PublicKey, validator_store: Arc>, graffiti_flag: Option, @@ -1069,7 +1067,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(graffiti_file_filter.clone()) .and(signer.clone()) - .and_then( + .then( |pubkey: PublicKey, query: SetGraffitiRequest, validator_store: Arc>, @@ -1097,7 +1095,7 @@ pub fn serve( .and(validator_store_filter.clone()) .and(graffiti_file_filter.clone()) .and(signer.clone()) - .and_then( + .then( |pubkey: PublicKey, validator_store: Arc>, graffiti_file: Option, @@ -1322,68 +1320,55 @@ pub fn serve( /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(res: Result) -> respuesta -where - T: Serialize + Send + 'static, -{ - match res { - Ok(blockedtask) => { - let response = match serde_json::to_vec(&blockedtask) { - Ok(body) => { - let mut respuesta = respuesta::new(body); - respuesta.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - respuesta - // I need to change this - } - Err(_) =>warp::reply::with_status( - warp::reply::json(&"can produce simple response from static values"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - }; - response - } - Err(e) => { - let resp = warp_utils::reject::handle_rejection(e).await; - //Building the response with the Rejection - match resp { - Ok(reply) => { - let response = reply.into_response(); - - // See if this part can be built with response builder from the reply of warp - let (_parts, body) = response.into_parts(); - let body_bytes = hyper::body::to_bytes(body).await.unwrap(); - Response::builder() - .status(StatusCode::BAD_REQUEST) - .body(body_bytes.to_vec()) - .expect("can't produce response from rejection") - } - Err(_) => warp::reply::with_status( - warp::reply::json(&"unhandled error in blocking task"), - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ) - // This is infallible - .into_response(), - } - } - } // The response that we were previously using whas an struct called Response that has head and body - // Now we are gonna use the response from warp reply +pub async fn convert_rejection(e: warp::Rejection , signature : String) -> Response { + let mut resp = warp_utils::reject::handle_rejection(e).await.into_response(); // It's infallible + let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + resp.headers_mut().append("Signature", header_value); + resp } + /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. -pub async fn blocking_signed_json_task(signer: S, func: F) -> Response> +pub async fn blocking_signed_json_task(signer: S, func: F) -> Response where S: Fn(&[u8]) -> String, - F: FnOnce() -> Result + Send + 'static, // This specify the function that recieves this function as a F parameter + F: FnOnce() -> Result + Send + 'static, T: Serialize + Send + 'static, { - // I get the response from my blocking task - let response = warp_utils::task::blocking_task(func).await; // Here i do get what i want + match warp_utils::task::blocking_task(func).await { + Ok(blocked_task) => { + match serde_json::to_vec(&blocked_task) { + Ok(body) => { + let signature = signer(&body); + let mut response = Response::new(body.into()); + response.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + response.headers_mut().append("Signature", header_value); + response + } + Err(_) => { + let data = "error producing response from blocking task" ; + let body= warp::reply::json(&data); // This does not implement the trait serialize + let byte_slice: &[u8] = data.as_bytes(); + let mut rejection = warp::reply::with_status( + body, + eth2::StatusCode::INTERNAL_SERVER_ERROR, + ).into_response(); + let signature = signer(byte_slice); + let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + rejection.headers_mut().append("Signature", header_value); + rejection + } - let mut conv_res = convert_rejection(response).await; - let body: &Vec = conv_res.body(); - let signature = signer(body); - let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); - conv_res.headers_mut().append("Signature", header_value); - conv_res + } + } + Err(rejection) => { + let data = "error in blocking task" ; + let byte_slice: &[u8] = data.as_bytes(); + let signature = signer(byte_slice); + convert_rejection(rejection, signature).await + } + } } From 891e718622a587b7d9c4636d4bddadf837ef2a02 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue, 2 Apr 2024 11:10:55 +0900 Subject: [PATCH 18/19] Run cargo fmt --- validator_client/src/http_api/mod.rs | 39 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index 611eeb6881f..a4221f91e6b 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -46,14 +46,12 @@ use tokio_stream::{wrappers::BroadcastStream, StreamExt}; use types::{ChainSpec, ConfigAndPreset, EthSpec}; use validator_dir::Builder as ValidatorDirBuilder; use warp::reply::Reply; +use warp::reply::Response; use warp::{ - http::{ - header::{HeaderValue, CONTENT_TYPE}, - }, + http::header::{HeaderValue, CONTENT_TYPE}, sse::Event, Filter, }; -use warp::reply::Response; #[derive(Debug)] pub enum Error { Warp(warp::Error), @@ -1320,14 +1318,15 @@ pub fn serve( /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 -pub async fn convert_rejection(e: warp::Rejection , signature : String) -> Response { - let mut resp = warp_utils::reject::handle_rejection(e).await.into_response(); // It's infallible +pub async fn convert_rejection(e: warp::Rejection, signature: String) -> Response { + let mut resp = warp_utils::reject::handle_rejection(e) + .await + .into_response(); // It's infallible let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); resp.headers_mut().append("Signature", header_value); resp } - /// Executes `func` in blocking tokio task (i.e., where long-running tasks are permitted). /// JSON-encodes the return value of `func`, using the `signer` function to produce a signature of /// those bytes. @@ -1343,29 +1342,31 @@ where Ok(body) => { let signature = signer(&body); let mut response = Response::new(body.into()); - response.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); - let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + response + .headers_mut() + .insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); + let header_value = + HeaderValue::from_str(&signature).expect("hash can be encoded as header"); response.headers_mut().append("Signature", header_value); response } Err(_) => { - let data = "error producing response from blocking task" ; - let body= warp::reply::json(&data); // This does not implement the trait serialize + let data = "error producing response from blocking task"; + let body = warp::reply::json(&data); // This does not implement the trait serialize let byte_slice: &[u8] = data.as_bytes(); - let mut rejection = warp::reply::with_status( - body, - eth2::StatusCode::INTERNAL_SERVER_ERROR, - ).into_response(); + let mut rejection = + warp::reply::with_status(body, eth2::StatusCode::INTERNAL_SERVER_ERROR) + .into_response(); let signature = signer(byte_slice); - let header_value = HeaderValue::from_str(&signature).expect("hash can be encoded as header"); + let header_value = + HeaderValue::from_str(&signature).expect("hash can be encoded as header"); rejection.headers_mut().append("Signature", header_value); rejection - } - + } } } Err(rejection) => { - let data = "error in blocking task" ; + let data = "error in blocking task"; let byte_slice: &[u8] = data.as_bytes(); let signature = signer(byte_slice); convert_rejection(rejection, signature).await From b45c97eb2e13eec76bd9852d5a71444783cc611b Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue, 2 Apr 2024 11:17:05 +0900 Subject: [PATCH 19/19] Clean doc --- validator_client/src/http_api/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/validator_client/src/http_api/mod.rs b/validator_client/src/http_api/mod.rs index a4221f91e6b..1509ffa2ec4 100644 --- a/validator_client/src/http_api/mod.rs +++ b/validator_client/src/http_api/mod.rs @@ -1313,11 +1313,10 @@ pub fn serve( Ok((listening_socket, server)) } -// Convert a warp `Rejection` into a `Response`. +/// Convert a warp `Rejection` into a `Response`. /// /// This function should *always* be used to convert rejections into responses. This prevents warp /// from trying to backtrack in strange ways. See: https://github.com/sigp/lighthouse/issues/3404 - pub async fn convert_rejection(e: warp::Rejection, signature: String) -> Response { let mut resp = warp_utils::reject::handle_rejection(e) .await