From 411fab4d04de1c96492335ceb57586eb13f0c117 Mon Sep 17 00:00:00 2001 From: galactus <96341601+godmodegalactus@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:56:33 +0100 Subject: [PATCH] Production into main (#303) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: panic on geyser close, multiplex bug https://github.com/blockworks-foundation/geyser-grpc-connector/issues/3 * update Cargo.lock * reverting cargo.lock * Fix issues with grpc and postgres * Solving merge issues * Fixing cargo fmt * Increase finish quic timeout (#280) (#281) * integrate geyser slot subscription (#283) * Increase finish quic timeout (#280) * Moving geyser slot subscription from stream to channels (#282) * Moving geyser slot subscription from stream to channels * Closing all the slot subscription tasks incase of restart * Making slot channel unbounded (bug) * remove block_debug_listen caused a panic - need more time to investigate 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] thread 'tokio-runtime-worker' panicked at cluster-endpoints/src/grpc_inspect.rs:59:21: 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] Error receiving block: Closed 2024-01-17T20:31:42.922 app[683d392fd45368] ams [info] 2024-01-17T20:31:42.912597Z ERROR lite_rpc: Services quit unexpectedly Err(cluster endpoint failure (Err(JoinError::Panic(Id(20), ...)), 1, [JoinHandle { id: Id(19) }, JoinHandle { id: Id(23) }]) * Update cargolock file * Fixing clippy removing grpc_inspect * merging main with production (#290) * remove block_debug_listen (#286) * remove block_debug_listen caused a panic - need more time to investigate 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] thread 'tokio-runtime-worker' panicked at cluster-endpoints/src/grpc_inspect.rs:59:21: 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] Error receiving block: Closed 2024-01-17T20:31:42.922 app[683d392fd45368] ams [info] 2024-01-17T20:31:42.912597Z ERROR lite_rpc: Services quit unexpectedly Err(cluster endpoint failure (Err(JoinError::Panic(Id(20), ...)), 1, [JoinHandle { id: Id(19) }, JoinHandle { id: Id(23) }]) * clippy * Fixing message too long and overflow panics (#288) * Update geyser grpc connector commit (#289) --------- Co-authored-by: Groovie | Mango <95291500+grooviegermanikus@users.noreply.github.com> * Merging MTU changes and setting up transportation config (#293) * remove block_debug_listen (#286) * remove block_debug_listen caused a panic - need more time to investigate 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] thread 'tokio-runtime-worker' panicked at cluster-endpoints/src/grpc_inspect.rs:59:21: 2024-01-17T20:31:42.913 app[683d392fd45368] ams [info] Error receiving block: Closed 2024-01-17T20:31:42.922 app[683d392fd45368] ams [info] 2024-01-17T20:31:42.912597Z ERROR lite_rpc: Services quit unexpectedly Err(cluster endpoint failure (Err(JoinError::Panic(Id(20), ...)), 1, [JoinHandle { id: Id(19) }, JoinHandle { id: Id(23) }]) * clippy * Fixing message too long and overflow panics (#288) * Update geyser grpc connector commit (#289) * Updating the transport config to match with solana endpoint (#292) * Updating the transport config to match with solana endpoint * Setting max MTU after groovies comments --------- Co-authored-by: Groovie | Mango <95291500+grooviegermanikus@users.noreply.github.com> * Making block subscription processed and moving confirmed block subscr… (#291) * Making block subscription processed and moving confirmed block subscription to meta * Sending both processed and confirmed blocks, if block has already been confirmed * Minor bug, subscribing to processed blocks instead of confirmed (#295) --------- Co-authored-by: Groovie | Mango <95291500+grooviegermanikus@users.noreply.github.com> Co-authored-by: GroovieGermanikus --- history/src/postgres/postgres_config.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/history/src/postgres/postgres_config.rs b/history/src/postgres/postgres_config.rs index 58d4d7db..702f0867 100644 --- a/history/src/postgres/postgres_config.rs +++ b/history/src/postgres/postgres_config.rs @@ -22,6 +22,11 @@ impl PostgresSessionConfig { return Ok(None); } + let enable_pg = env::var("PG_ENABLED").context("PG_ENABLED")?; + if enable_pg != *"true" { + return Ok(None); + } + let env_pg_config = env::var("PG_CONFIG").context("PG_CONFIG not found")?; let ssl_config = if env_pg_config