diff --git a/Cargo.lock b/Cargo.lock index 9157579f..b51e9f8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,21 +70,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "allocator-api2" version = "0.2.16" @@ -398,22 +383,6 @@ dependencies = [ "futures-core", ] -[[package]] -name = "async-compression" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "zstd 0.13.0", - "zstd-safe 7.0.0", -] - [[package]] name = "async-graphql" version = "4.0.16" @@ -957,27 +926,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "brotli" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - [[package]] name = "bs58" version = "0.5.0" @@ -3019,7 +2967,6 @@ dependencies = [ "indexer-common", "jsonrpsee 0.20.2", "lazy_static", - "log", "reqwest", "serde", "serde_json", @@ -3031,8 +2978,6 @@ dependencies = [ "thiserror", "tokio", "toolshed", - "tower", - "tower-http 0.4.4", "tracing", "tracing-subscriber", "wiremock", @@ -6310,7 +6255,6 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "async-compression", "bitflags 2.4.1", "bytes", "futures-core", @@ -6319,8 +6263,6 @@ dependencies = [ "http-body", "http-range-header", "pin-project-lite", - "tokio", - "tokio-util", "tower-layer", "tower-service", "tracing", @@ -6983,7 +6925,7 @@ dependencies = [ "pbkdf2 0.11.0", "sha1", "time", - "zstd 0.11.2+zstd.1.5.2", + "zstd", ] [[package]] @@ -6992,16 +6934,7 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" -dependencies = [ - "zstd-safe 7.0.0", + "zstd-safe", ] [[package]] @@ -7014,15 +6947,6 @@ dependencies = [ "zstd-sys", ] -[[package]] -name = "zstd-safe" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" -dependencies = [ - "zstd-sys", -] - [[package]] name = "zstd-sys" version = "2.0.9+zstd.1.5.5" diff --git a/tap_agent/Cargo.toml b/tap_agent/Cargo.toml index bfd39aae..dcf63e78 100644 --- a/tap_agent/Cargo.toml +++ b/tap_agent/Cargo.toml @@ -21,7 +21,6 @@ eventuals = "0.6.7" indexer-common = { version = "0.1.0", path = "../common" } jsonrpsee = { version = "0.20.2", features = ["http-client", "macros"] } lazy_static = "1.4.0" -log = "0.4.19" reqwest = "0.11.20" serde = "1.0.188" serde_json = "1.0.104" @@ -32,8 +31,6 @@ tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol thiserror = "1.0.44" tokio = { version = "1.33.0" } toolshed = { git = "https://github.com/edgeandnode/toolshed", branch = "main", features = ["graphql"] } -tower = "0.4.13" -tower-http = { version = "0.4.4", features = ["compression-full", "decompression-full", "set-header"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3", features = [ "env-filter", diff --git a/tap_agent/src/main.rs b/tap_agent/src/main.rs index cbf92fa4..df4d3be2 100644 --- a/tap_agent/src/main.rs +++ b/tap_agent/src/main.rs @@ -3,8 +3,8 @@ use anyhow::Result; use lazy_static::lazy_static; -use log::{debug, info}; use tokio::signal::unix::{signal, SignalKind}; +use tracing::{debug, info}; use crate::config::Cli; diff --git a/tap_agent/src/tap/manager.rs b/tap_agent/src/tap/manager.rs index c3d33183..740dda0f 100644 --- a/tap_agent/src/tap/manager.rs +++ b/tap_agent/src/tap/manager.rs @@ -10,7 +10,6 @@ use ethereum_types::U256; use eventuals::Eventual; use indexer_common::subgraph_client::SubgraphClient; use jsonrpsee::{core::client::ClientT, http_client::HttpClientBuilder, rpc_params}; -use log::{error, warn}; use sqlx::PgPool; use tap_aggregator::jsonrpsee_helpers::JsonRpcResponse; use tap_core::{ @@ -22,6 +21,7 @@ use tokio::{ sync::{Mutex, MutexGuard}, task::JoinHandle, }; +use tracing::{error, warn}; use super::managers::NewReceiptNotification; use crate::{ @@ -555,7 +555,8 @@ mod tests { ); // Send a new receipt notification that has a lower ID than the last loaded from the DB. - // The last ID in the DB should be 10, since we added 10 receipts to the empty receipts table, + // The last ID in the DB should be 10, since we added 10 receipts to the empty receipts + // table let new_receipt_notification = NewReceiptNotification { allocation_id: *ALLOCATION_ID, sender_address: SENDER.1, diff --git a/tap_agent/src/tap/managers.rs b/tap_agent/src/tap/managers.rs index 5b7cb6e7..b1111f21 100644 --- a/tap_agent/src/tap/managers.rs +++ b/tap_agent/src/tap/managers.rs @@ -10,10 +10,10 @@ use anyhow::Result; use ethereum_types::U256; use eventuals::{Eventual, EventualExt, PipeHandle}; use indexer_common::prelude::{Allocation, SubgraphClient}; -use log::{error, warn}; use serde::Deserialize; use sqlx::{postgres::PgListener, PgPool}; use tokio::sync::RwLock; +use tracing::{error, warn}; use super::manager::Manager; use crate::config; diff --git a/tap_agent/src/tap/receipt_checks_adapter.rs b/tap_agent/src/tap/receipt_checks_adapter.rs index 31d87761..f2b15336 100644 --- a/tap_agent/src/tap/receipt_checks_adapter.rs +++ b/tap_agent/src/tap/receipt_checks_adapter.rs @@ -14,6 +14,7 @@ use tap_core::adapters::receipt_checks_adapter::ReceiptChecksAdapter as ReceiptC use tap_core::{eip_712_signed_message::EIP712SignedMessage, tap_receipt::Receipt}; use thiserror::Error; use tokio::{sync::RwLock, time::sleep}; +use tracing::error; use crate::config; @@ -213,11 +214,9 @@ impl ReceiptChecksAdapter { Ok(!response.transactions.is_empty()) }, move |error: String| { - log::error!( + error!( "Failed to check the escrow redeem status for allocation {} and sender {}: {}", - allocation_id, - sender_address, - error + allocation_id, sender_address, error ); sleep(Duration::from_secs(escrow_subgraph_polling_interval).div_f32(2.)) },