From 5a54fc5e99913a32afd6ad380fc137512eb73aa8 Mon Sep 17 00:00:00 2001 From: yenicelik Date: Sat, 4 Mar 2023 21:19:39 +0100 Subject: [PATCH] lets modify web3 proxyd manually copy pasta --- Cargo.lock | 9 ------ web3_proxy/Cargo.toml | 8 ----- web3_proxy/src/bin/web3_proxy_cli/proxyd.rs | 35 +++++++++++---------- 3 files changed, 18 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5495b8e..7e90972a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1991,15 +1991,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "fstrings" version = "0.2.3" diff --git a/web3_proxy/Cargo.toml b/web3_proxy/Cargo.toml index f4aee03c..9111b862 100644 --- a/web3_proxy/Cargo.toml +++ b/web3_proxy/Cargo.toml @@ -27,11 +27,7 @@ thread-fast-rng = { path = "../thread-fast-rng" } anyhow = { version = "1.0.69", features = ["backtrace"] } argh = "0.1.10" -<<<<<<< HEAD axum = { version = "0.6.8", features = ["headers", "ws"] } -======= -axum = { version = "0.6.7", features = ["headers", "ws"] } ->>>>>>> 698d53d (cargo upgrade) axum-client-ip = "0.4.0" axum-macros = "0.3.4" chrono = "0.4.23" @@ -75,11 +71,7 @@ serde = { version = "1.0.152", features = [] } serde_json = { version = "1.0.93", default-features = false, features = ["alloc", "raw_value"] } serde_prometheus = "0.2.1" siwe = "0.5.0" -<<<<<<< HEAD time = "0.3.20" -======= -time = "0.3.19" ->>>>>>> 698d53d (cargo upgrade) tokio = { version = "1.25.0", features = ["full"] } tokio-stream = { version = "0.1.12", features = ["sync"] } tokio-uring = { version = "0.4.0", optional = true } diff --git a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs index b0c2138c..38fe591d 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs @@ -10,6 +10,7 @@ use tokio::sync::broadcast; use web3_proxy::app::{flatten_handle, flatten_handles, Web3ProxyApp}; use web3_proxy::config::TopConfig; use web3_proxy::{frontend, prometheus}; +use anyhow::Context; /// start the main proxy daemon #[derive(FromArgs, PartialEq, Debug, Eq)] @@ -113,23 +114,23 @@ async fn run( // wait until the app has seen its first consensus head block // if backups were included, wait a little longer - for _ in 0..3 { - let _ = spawned_app.consensus_connections_watcher.changed().await; - - let consensus = spawned_app - .consensus_connections_watcher - .borrow_and_update(); - - if *consensus.context("Channel closed!")?.backups_needed { - info!( - "waiting longer. found consensus with backups: {}", - *consensus.context("Channel closed!")?.head_block.as_ref().unwrap(), - ); - } else { - // TODO: also check that we have at least one archive node connected? - break; - } - } + // for _ in 0..3 { + // let _ = spawned_app.consensus_connections_watcher.changed().await; + // + // let consensus = spawned_app + // .consensus_connections_watcher + // .borrow_and_update(); + // + // if *consensus.context("Channel closed!")?.backups_needed { + // info!( + // "waiting longer. found consensus with backups: {}", + // *consensus.context("Channel closed!")?.head_block.as_ref().unwrap(), + // ); + // } else { + // // TODO: also check that we have at least one archive node connected? + // break; + // } + // } // start the frontend port let frontend_handle = tokio::spawn(frontend::serve(