From fcc1843af0da11829f174b35a5e1cd45aed117d8 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 30 May 2023 21:37:58 -0700 Subject: [PATCH] put it back. duplication between cargo.toml isnt worth it --- Cargo.lock | 45 +++---------------- Cargo.toml | 1 - Dockerfile | 2 +- web3_proxy/Cargo.toml | 9 +++- .../examples/subscribe_blocks.rs | 0 .../examples/tracing.rs | 0 .../examples/watch_blocks.rs | 0 .../src/bin/curve_api_checks.rs | 0 .../src/bin/wait_for_sync.rs | 0 .../web3_proxy_cli}/change_admin_status.rs | 0 .../web3_proxy_cli}/change_user_address.rs | 0 .../bin/web3_proxy_cli}/change_user_tier.rs | 0 .../change_user_tier_by_address.rs | 0 .../change_user_tier_by_key.rs | 0 .../src/bin/web3_proxy_cli}/check_config.rs | 0 .../src/bin/web3_proxy_cli}/count_users.rs | 0 .../src/bin/web3_proxy_cli}/create_key.rs | 0 .../src/bin/web3_proxy_cli}/create_user.rs | 0 .../src/bin/web3_proxy_cli}/delete_user.rs | 0 .../web3_proxy_cli}/drop_migration_lock.rs | 0 .../src/bin/web3_proxy_cli}/example.rs | 0 .../bin/web3_proxy_cli}/list_recent_users.rs | 0 .../src/bin/web3_proxy_cli}/list_user_tier.rs | 0 .../src/bin/web3_proxy_cli}/main.rs | 0 .../web3_proxy_cli}/migrate_stats_to_v2.rs | 0 .../src/bin/web3_proxy_cli}/pagerduty.rs | 0 .../bin/web3_proxy_cli}/popularity_contest.rs | 0 .../src/bin/web3_proxy_cli}/proxyd.rs | 0 .../src/bin/web3_proxy_cli}/rpc_accounting.rs | 0 .../src/bin/web3_proxy_cli}/search_kafka.rs | 0 .../bin/web3_proxy_cli}/sentryd/compare.rs | 0 .../src/bin/web3_proxy_cli}/sentryd/mod.rs | 0 .../src/bin/web3_proxy_cli}/sentryd/simple.rs | 0 .../src/bin/web3_proxy_cli}/stat_age.rs | 0 .../src/bin/web3_proxy_cli}/transfer_key.rs | 0 .../src/bin/web3_proxy_cli}/user_export.rs | 0 .../src/bin/web3_proxy_cli}/user_import.rs | 0 web3_proxy_cli/Cargo.toml | 44 ------------------ 38 files changed, 15 insertions(+), 86 deletions(-) rename {web3_proxy_cli => web3_proxy}/examples/subscribe_blocks.rs (100%) rename {web3_proxy_cli => web3_proxy}/examples/tracing.rs (100%) rename {web3_proxy_cli => web3_proxy}/examples/watch_blocks.rs (100%) rename {web3_proxy_cli => web3_proxy}/src/bin/curve_api_checks.rs (100%) rename {web3_proxy_cli => web3_proxy}/src/bin/wait_for_sync.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/change_admin_status.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/change_user_address.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/change_user_tier.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/change_user_tier_by_address.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/change_user_tier_by_key.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/check_config.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/count_users.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/create_key.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/create_user.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/delete_user.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/drop_migration_lock.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/example.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/list_recent_users.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/list_user_tier.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/main.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/migrate_stats_to_v2.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/pagerduty.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/popularity_contest.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/proxyd.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/rpc_accounting.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/search_kafka.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/sentryd/compare.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/sentryd/mod.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/sentryd/simple.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/stat_age.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/transfer_key.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/user_export.rs (100%) rename {web3_proxy_cli/src => web3_proxy/src/bin/web3_proxy_cli}/user_import.rs (100%) delete mode 100644 web3_proxy_cli/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 7d87a561..e36a5a2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6501,10 +6501,12 @@ dependencies = [ "env_logger", "ethers", "ewma", + "fdlimit", "flume", "fstrings", "futures", "gethostname", + "glob", "handlebars", "hashbrown 0.13.2", "hostname", @@ -6519,17 +6521,21 @@ dependencies = [ "log", "migration", "mimalloc", + "num", "num-traits", "once_cell", "ordered-float", "pagerduty-rs", "parking_lot 0.12.1", + "prettytable", + "proctitle", "quick_cache_ttl", "rdkafka", "redis-rate-limiter", "regex", "reqwest", "rmp-serde", + "sentry", "serde", "serde_json", "serde_prometheus", @@ -6551,45 +6557,6 @@ dependencies = [ "uuid 1.3.3", ] -[[package]] -name = "web3_proxy_cli" -version = "0.1.0" -dependencies = [ - "anyhow", - "argh", - "chrono", - "entities", - "env_logger", - "ethers", - "fdlimit", - "futures", - "glob", - "hashbrown 0.13.2", - "influxdb2", - "influxdb2-structmap", - "log", - "migration", - "num", - "num-traits", - "pagerduty-rs", - "parking_lot 0.12.1", - "prettytable", - "proctitle", - "rdkafka", - "reqwest", - "rmp-serde", - "sentry", - "serde", - "serde_json", - "tokio", - "toml 0.7.4", - "tracing", - "tracing-subscriber 0.3.17", - "ulid", - "uuid 1.3.3", - "web3_proxy", -] - [[package]] name = "webpki" version = "0.22.0" diff --git a/Cargo.toml b/Cargo.toml index 6b35368b..12175b98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ members = [ "redis-rate-limiter", "thread-fast-rng", "web3_proxy", - "web3_proxy_cli", ] [profile.release] diff --git a/Dockerfile b/Dockerfile index 00e5f085..38349e55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ --features "$WEB3_PROXY_FEATURES" \ --locked \ --no-default-features \ - --path ./web3_proxy_cli \ + --path ./web3_proxy \ --profile faster_release \ --root /usr/local/bin \ ; diff --git a/web3_proxy/Cargo.toml b/web3_proxy/Cargo.toml index 3f29a9dc..02491241 100644 --- a/web3_proxy/Cargo.toml +++ b/web3_proxy/Cargo.toml @@ -2,6 +2,7 @@ name = "web3_proxy" version = "0.28.0" edition = "2021" +default-run = "web3_proxy_cli" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -45,12 +46,15 @@ chrono = "0.4.26" console-subscriber = { version = "0.1.9", optional = true } counter = "0.5.7" derive_more = "0.99.17" +env_logger = "0.10.0" ethers = { version = "2.0.6", default-features = false, features = ["rustls", "ws"] } ewma = "0.1.1" +fdlimit = "0.2.1" flume = "0.10.14" fstrings = "0.2" futures = { version = "0.3.28", features = ["thread-pool"] } gethostname = "0.4.3" +glob = "0.3.1" handlebars = "4.3.7" hashbrown = { version = "0.13.2", features = ["serde"] } hostname = "0.3.1" @@ -61,15 +65,19 @@ itertools = "0.10.5" listenfd = "1.0.1" log = "0.4.18" mimalloc = { version = "0.1.37", optional = true} +num = "0.4.0" num-traits = "0.2.15" once_cell = { version = "1.17.2" } ordered-float = "3.7.0" pagerduty-rs = { version = "0.1.6", default-features = false, features = ["async", "rustls", "sync"] } parking_lot = { version = "0.12.1", features = ["arc_lock", "nightly", "serde"] } +prettytable = "0.10.0" +proctitle = "0.1.1" rdkafka = { version = "0.31.0" } regex = "1.8.3" reqwest = { version = "0.11.18", default-features = false, features = ["deflate", "gzip", "json", "tokio-rustls"] } rmp-serde = "1.1.1" +sentry = { version = "0.31.3", default-features = false, features = ["backtrace", "contexts", "panic", "anyhow", "reqwest", "rustls", "log", "sentry-log"] } serde = { version = "1.0.163", features = [] } serde_json = { version = "1.0.96", default-features = false, features = ["alloc", "raw_value"] } serde_prometheus = "0.2.2" @@ -90,5 +98,4 @@ url = "2.3.1" uuid = { version = "1.3.3", default-features = false, features = ["fast-rng", "serde", "v4", "zerocopy"] } [dev-dependencies] -env_logger = "0.10.0" tokio = { version = "1.28.2", features = ["full", "test-util"] } diff --git a/web3_proxy_cli/examples/subscribe_blocks.rs b/web3_proxy/examples/subscribe_blocks.rs similarity index 100% rename from web3_proxy_cli/examples/subscribe_blocks.rs rename to web3_proxy/examples/subscribe_blocks.rs diff --git a/web3_proxy_cli/examples/tracing.rs b/web3_proxy/examples/tracing.rs similarity index 100% rename from web3_proxy_cli/examples/tracing.rs rename to web3_proxy/examples/tracing.rs diff --git a/web3_proxy_cli/examples/watch_blocks.rs b/web3_proxy/examples/watch_blocks.rs similarity index 100% rename from web3_proxy_cli/examples/watch_blocks.rs rename to web3_proxy/examples/watch_blocks.rs diff --git a/web3_proxy_cli/src/bin/curve_api_checks.rs b/web3_proxy/src/bin/curve_api_checks.rs similarity index 100% rename from web3_proxy_cli/src/bin/curve_api_checks.rs rename to web3_proxy/src/bin/curve_api_checks.rs diff --git a/web3_proxy_cli/src/bin/wait_for_sync.rs b/web3_proxy/src/bin/wait_for_sync.rs similarity index 100% rename from web3_proxy_cli/src/bin/wait_for_sync.rs rename to web3_proxy/src/bin/wait_for_sync.rs diff --git a/web3_proxy_cli/src/change_admin_status.rs b/web3_proxy/src/bin/web3_proxy_cli/change_admin_status.rs similarity index 100% rename from web3_proxy_cli/src/change_admin_status.rs rename to web3_proxy/src/bin/web3_proxy_cli/change_admin_status.rs diff --git a/web3_proxy_cli/src/change_user_address.rs b/web3_proxy/src/bin/web3_proxy_cli/change_user_address.rs similarity index 100% rename from web3_proxy_cli/src/change_user_address.rs rename to web3_proxy/src/bin/web3_proxy_cli/change_user_address.rs diff --git a/web3_proxy_cli/src/change_user_tier.rs b/web3_proxy/src/bin/web3_proxy_cli/change_user_tier.rs similarity index 100% rename from web3_proxy_cli/src/change_user_tier.rs rename to web3_proxy/src/bin/web3_proxy_cli/change_user_tier.rs diff --git a/web3_proxy_cli/src/change_user_tier_by_address.rs b/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_address.rs similarity index 100% rename from web3_proxy_cli/src/change_user_tier_by_address.rs rename to web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_address.rs diff --git a/web3_proxy_cli/src/change_user_tier_by_key.rs b/web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs similarity index 100% rename from web3_proxy_cli/src/change_user_tier_by_key.rs rename to web3_proxy/src/bin/web3_proxy_cli/change_user_tier_by_key.rs diff --git a/web3_proxy_cli/src/check_config.rs b/web3_proxy/src/bin/web3_proxy_cli/check_config.rs similarity index 100% rename from web3_proxy_cli/src/check_config.rs rename to web3_proxy/src/bin/web3_proxy_cli/check_config.rs diff --git a/web3_proxy_cli/src/count_users.rs b/web3_proxy/src/bin/web3_proxy_cli/count_users.rs similarity index 100% rename from web3_proxy_cli/src/count_users.rs rename to web3_proxy/src/bin/web3_proxy_cli/count_users.rs diff --git a/web3_proxy_cli/src/create_key.rs b/web3_proxy/src/bin/web3_proxy_cli/create_key.rs similarity index 100% rename from web3_proxy_cli/src/create_key.rs rename to web3_proxy/src/bin/web3_proxy_cli/create_key.rs diff --git a/web3_proxy_cli/src/create_user.rs b/web3_proxy/src/bin/web3_proxy_cli/create_user.rs similarity index 100% rename from web3_proxy_cli/src/create_user.rs rename to web3_proxy/src/bin/web3_proxy_cli/create_user.rs diff --git a/web3_proxy_cli/src/delete_user.rs b/web3_proxy/src/bin/web3_proxy_cli/delete_user.rs similarity index 100% rename from web3_proxy_cli/src/delete_user.rs rename to web3_proxy/src/bin/web3_proxy_cli/delete_user.rs diff --git a/web3_proxy_cli/src/drop_migration_lock.rs b/web3_proxy/src/bin/web3_proxy_cli/drop_migration_lock.rs similarity index 100% rename from web3_proxy_cli/src/drop_migration_lock.rs rename to web3_proxy/src/bin/web3_proxy_cli/drop_migration_lock.rs diff --git a/web3_proxy_cli/src/example.rs b/web3_proxy/src/bin/web3_proxy_cli/example.rs similarity index 100% rename from web3_proxy_cli/src/example.rs rename to web3_proxy/src/bin/web3_proxy_cli/example.rs diff --git a/web3_proxy_cli/src/list_recent_users.rs b/web3_proxy/src/bin/web3_proxy_cli/list_recent_users.rs similarity index 100% rename from web3_proxy_cli/src/list_recent_users.rs rename to web3_proxy/src/bin/web3_proxy_cli/list_recent_users.rs diff --git a/web3_proxy_cli/src/list_user_tier.rs b/web3_proxy/src/bin/web3_proxy_cli/list_user_tier.rs similarity index 100% rename from web3_proxy_cli/src/list_user_tier.rs rename to web3_proxy/src/bin/web3_proxy_cli/list_user_tier.rs diff --git a/web3_proxy_cli/src/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs similarity index 100% rename from web3_proxy_cli/src/main.rs rename to web3_proxy/src/bin/web3_proxy_cli/main.rs diff --git a/web3_proxy_cli/src/migrate_stats_to_v2.rs b/web3_proxy/src/bin/web3_proxy_cli/migrate_stats_to_v2.rs similarity index 100% rename from web3_proxy_cli/src/migrate_stats_to_v2.rs rename to web3_proxy/src/bin/web3_proxy_cli/migrate_stats_to_v2.rs diff --git a/web3_proxy_cli/src/pagerduty.rs b/web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs similarity index 100% rename from web3_proxy_cli/src/pagerduty.rs rename to web3_proxy/src/bin/web3_proxy_cli/pagerduty.rs diff --git a/web3_proxy_cli/src/popularity_contest.rs b/web3_proxy/src/bin/web3_proxy_cli/popularity_contest.rs similarity index 100% rename from web3_proxy_cli/src/popularity_contest.rs rename to web3_proxy/src/bin/web3_proxy_cli/popularity_contest.rs diff --git a/web3_proxy_cli/src/proxyd.rs b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs similarity index 100% rename from web3_proxy_cli/src/proxyd.rs rename to web3_proxy/src/bin/web3_proxy_cli/proxyd.rs diff --git a/web3_proxy_cli/src/rpc_accounting.rs b/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs similarity index 100% rename from web3_proxy_cli/src/rpc_accounting.rs rename to web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs diff --git a/web3_proxy_cli/src/search_kafka.rs b/web3_proxy/src/bin/web3_proxy_cli/search_kafka.rs similarity index 100% rename from web3_proxy_cli/src/search_kafka.rs rename to web3_proxy/src/bin/web3_proxy_cli/search_kafka.rs diff --git a/web3_proxy_cli/src/sentryd/compare.rs b/web3_proxy/src/bin/web3_proxy_cli/sentryd/compare.rs similarity index 100% rename from web3_proxy_cli/src/sentryd/compare.rs rename to web3_proxy/src/bin/web3_proxy_cli/sentryd/compare.rs diff --git a/web3_proxy_cli/src/sentryd/mod.rs b/web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs similarity index 100% rename from web3_proxy_cli/src/sentryd/mod.rs rename to web3_proxy/src/bin/web3_proxy_cli/sentryd/mod.rs diff --git a/web3_proxy_cli/src/sentryd/simple.rs b/web3_proxy/src/bin/web3_proxy_cli/sentryd/simple.rs similarity index 100% rename from web3_proxy_cli/src/sentryd/simple.rs rename to web3_proxy/src/bin/web3_proxy_cli/sentryd/simple.rs diff --git a/web3_proxy_cli/src/stat_age.rs b/web3_proxy/src/bin/web3_proxy_cli/stat_age.rs similarity index 100% rename from web3_proxy_cli/src/stat_age.rs rename to web3_proxy/src/bin/web3_proxy_cli/stat_age.rs diff --git a/web3_proxy_cli/src/transfer_key.rs b/web3_proxy/src/bin/web3_proxy_cli/transfer_key.rs similarity index 100% rename from web3_proxy_cli/src/transfer_key.rs rename to web3_proxy/src/bin/web3_proxy_cli/transfer_key.rs diff --git a/web3_proxy_cli/src/user_export.rs b/web3_proxy/src/bin/web3_proxy_cli/user_export.rs similarity index 100% rename from web3_proxy_cli/src/user_export.rs rename to web3_proxy/src/bin/web3_proxy_cli/user_export.rs diff --git a/web3_proxy_cli/src/user_import.rs b/web3_proxy/src/bin/web3_proxy_cli/user_import.rs similarity index 100% rename from web3_proxy_cli/src/user_import.rs rename to web3_proxy/src/bin/web3_proxy_cli/user_import.rs diff --git a/web3_proxy_cli/Cargo.toml b/web3_proxy_cli/Cargo.toml deleted file mode 100644 index 8b87c54f..00000000 --- a/web3_proxy_cli/Cargo.toml +++ /dev/null @@ -1,44 +0,0 @@ -[package] -name = "web3_proxy_cli" -version = "0.1.0" -edition = "2021" -default-run = "web3_proxy_cli" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -entities = { path = "../entities" } -migration = { path = "../migration" } -web3_proxy = { path = "../web3_proxy" } - -influxdb2 = { git = "https://github.com/llamanodes/influxdb2", features = ["rustls"] } -influxdb2-structmap = { git = "https://github.com/llamanodes/influxdb2/"} - -anyhow = "1.0.71" -argh = "0.1.10" -chrono = "0.4.26" -env_logger = "0.10.0" -ethers = "2.0.6" -fdlimit = "0.2.1" -futures = "0.3.28" -glob = "0.3.1" -hashbrown = "0.13.2" -log = "0.4.18" -num = "0.4.0" -num-traits = "0.2.15" -pagerduty-rs = "0.1.6" -parking_lot = "0.12.1" -prettytable = "0.10.0" -proctitle = "0.1.1" -rdkafka = { version = "0.31.0" } -reqwest = "0.11.18" -rmp-serde = "1.1.1" -sentry = { version = "0.31.3", default-features = false, features = ["backtrace", "contexts", "panic", "anyhow", "reqwest", "rustls", "log", "sentry-log"] } -serde = "1.0.163" -serde_json = "1.0.96" -tokio = "1.28.2" -toml = "0.7.4" -tracing = "0.1.37" -tracing-subscriber = "0.3.17" -ulid = "1.0.0" -uuid = "1.3.3"