From 0ac6da51d10fd2df61d81607f7c8755c59932de5 Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Wed, 7 Aug 2024 16:34:00 +0200 Subject: [PATCH] move to new crate --- Cargo.lock | 87 +++++++++++++++++++ Cargo.toml | 1 + chaindata_standalone/Cargo.toml | 25 ++++++ .../src}/main.rs | 1 - .../src}/router_impl.rs | 0 5 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 chaindata_standalone/Cargo.toml rename {connector/src/bin/chaindata_standalone => chaindata_standalone/src}/main.rs (98%) rename {connector/src/bin/chaindata_standalone => chaindata_standalone/src}/router_impl.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index b96a3ad..0cf032c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -805,6 +805,24 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chaindata_standalone" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-channel", + "async-trait", + "futures 0.3.30", + "itertools 0.10.5", + "log 0.4.21", + "mango-feeds-connector", + "solana-sdk", + "tokio", + "tokio-stream", + "tracing", + "tracing-subscriber", +] + [[package]] name = "chrono" version = "0.4.37" @@ -2331,6 +2349,8 @@ dependencies = [ "solana-sdk", "tokio", "tokio-stream", + "tracing", + "tracing-subscriber", "warp", "yellowstone-grpc-client", "yellowstone-grpc-proto", @@ -2567,6 +2587,16 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi 0.3.9", +] + [[package]] name = "num" version = "0.2.1" @@ -2820,6 +2850,12 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking_lot" version = "0.9.0" @@ -3993,6 +4029,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shell-words" version = "1.1.0" @@ -5156,6 +5201,16 @@ dependencies = [ "syn 2.0.58", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", +] + [[package]] name = "time" version = "0.1.45" @@ -5576,6 +5631,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log 0.4.21", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec 1.13.2", + "thread_local", + "tracing-core", + "tracing-log", ] [[package]] @@ -5762,6 +5843,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" diff --git a/Cargo.toml b/Cargo.toml index 662533f..716d98f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "connector", + "chaindata_standalone" ] resolver = "2" diff --git a/chaindata_standalone/Cargo.toml b/chaindata_standalone/Cargo.toml new file mode 100644 index 0000000..ade41c4 --- /dev/null +++ b/chaindata_standalone/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "chaindata_standalone" +version = "0.1.0" +edition = "2021" + +[dependencies] +tracing = "0.1" +tracing-subscriber = "0.3" + +tokio = { workspace = true } +tokio-stream = { workspace = true } + + +log = { workspace = true } +anyhow = { workspace = true } + +itertools = { workspace = true } +futures = { workspace = true } + +async-channel = { workspace = true } +async-trait = { workspace = true } + +mango-feeds-connector = { path = "../connector" } + +solana-sdk = { workspace = true } diff --git a/connector/src/bin/chaindata_standalone/main.rs b/chaindata_standalone/src/main.rs similarity index 98% rename from connector/src/bin/chaindata_standalone/main.rs rename to chaindata_standalone/src/main.rs index e76b176..3da6abe 100644 --- a/connector/src/bin/chaindata_standalone/main.rs +++ b/chaindata_standalone/src/main.rs @@ -3,7 +3,6 @@ use std::thread::sleep; use log::info; use tokio::sync::broadcast; -use warp::header::value; use mango_feeds_connector::chain_data::ChainData; use mango_feeds_connector::{AccountWrite, SlotUpdate}; diff --git a/connector/src/bin/chaindata_standalone/router_impl.rs b/chaindata_standalone/src/router_impl.rs similarity index 100% rename from connector/src/bin/chaindata_standalone/router_impl.rs rename to chaindata_standalone/src/router_impl.rs