Skip to content

Commit 909e322

Browse files
authored
chore(bin): Lifts the Ingress Binary to bin Directory (#125)
* chore(bin): lift binary to bin directory * chore(bin): lift binary to bin directory * fixes
1 parent 40db340 commit 909e322

18 files changed

Lines changed: 153 additions & 82 deletions

File tree

Cargo.lock

Lines changed: 39 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ homepage = "https://github.com/base/tips"
77
repository = "https://github.com/base/tips"
88

99
[workspace]
10-
members = ["crates/audit", "crates/ingress-rpc", "crates/core", "crates/account-abstraction-core", "crates/system-tests"]
1110
resolver = "2"
11+
members = ["crates/*", "bin/*"]
12+
default-members = ["bin/tips-ingress-rpc"]
1213

1314
[workspace.lints.rust]
1415
missing-debug-implementations = "warn"
@@ -31,7 +32,9 @@ redundant-clone = "warn"
3132
[workspace.dependencies]
3233
# local
3334
tips-core = { path = "crates/core" }
34-
tips-audit = { path = "crates/audit" }
35+
tips-audit = { path = "bin/tips-audit" }
36+
tips-audit-lib = { path = "crates/audit" }
37+
tips-ingress-rpc-lib = { path = "crates/ingress-rpc" }
3538
tips-system-tests = { path = "crates/system-tests" }
3639
account-abstraction-core = { path = "crates/account-abstraction-core" }
3740

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY . .
2121
RUN --mount=type=cache,target=/usr/local/cargo/registry \
2222
--mount=type=cache,target=/usr/local/cargo/git \
2323
--mount=type=cache,target=/app/target \
24-
cargo build && \
24+
cargo build -p tips-ingress-rpc -p tips-audit && \
2525
cp target/debug/tips-ingress-rpc /tmp/tips-ingress-rpc && \
2626
cp target/debug/tips-audit /tmp/tips-audit
2727

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ The project consists of several components:
1313
### 🗄️ Datastore (`crates/datastore`)
1414
Postgres storage layer that provides API's to persist and retrieve bundles.
1515

16-
### 📊 Audit (`crates/audit`)
16+
### 📊 Audit (`bin/tips-audit`)
1717
Event streaming and archival system that:
1818
- Provides an API to publish bundle events to Kafka
1919
- Archives bundle history to S3 for long-term storage
2020
- See [S3 Storage Format](docs/AUDIT_S3_FORMAT.md) for data structure details
2121

22-
### 🔌 Ingress RPC (`crates/ingress-rpc`)
22+
### 🔌 Ingress RPC (`bin/tips-ingress-rpc`)
2323
The main entry point that provides a JSON-RPC API for receiving transactions and bundles.
2424

2525
### 🖥️ UI (`ui`)

bin/tips-audit/Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "tips-audit"
3+
version.workspace = true
4+
rust-version.workspace = true
5+
license.workspace = true
6+
homepage.workspace = true
7+
repository.workspace = true
8+
edition.workspace = true
9+
10+
[dependencies]
11+
tips-core.workspace = true
12+
tips-audit-lib.workspace = true
13+
clap.workspace = true
14+
tokio.workspace = true
15+
anyhow.workspace = true
16+
tracing.workspace = true
17+
dotenvy.workspace = true
18+
rdkafka.workspace = true
19+
aws-config.workspace = true
20+
aws-sdk-s3.workspace = true
21+
aws-credential-types.workspace = true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use aws_sdk_s3::{Client as S3Client, config::Builder as S3ConfigBuilder};
55
use clap::{Parser, ValueEnum};
66
use rdkafka::consumer::Consumer;
77
use std::net::SocketAddr;
8-
use tips_audit::{
8+
use tips_audit_lib::{
99
KafkaAuditArchiver, KafkaAuditLogReader, S3EventReaderWriter, create_kafka_consumer,
1010
};
1111
use tips_core::logger::init_logger_with_format;

bin/tips-ingress-rpc/Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "tips-ingress-rpc"
3+
version.workspace = true
4+
rust-version.workspace = true
5+
license.workspace = true
6+
homepage.workspace = true
7+
repository.workspace = true
8+
edition.workspace = true
9+
10+
[dependencies]
11+
tips-core.workspace = true
12+
tips-audit-lib.workspace = true
13+
tips-ingress-rpc-lib.workspace = true
14+
account-abstraction-core.workspace = true
15+
clap.workspace = true
16+
tokio.workspace = true
17+
anyhow.workspace = true
18+
tracing.workspace = true
19+
dotenvy.workspace = true
20+
rdkafka.workspace = true
21+
jsonrpsee.workspace = true
22+
op-alloy-network.workspace = true
23+
alloy-provider.workspace = true
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ use jsonrpsee::server::Server;
55
use op_alloy_network::Optimism;
66
use rdkafka::ClientConfig;
77
use rdkafka::producer::FutureProducer;
8-
use tips_audit::{BundleEvent, KafkaBundleEventPublisher, connect_audit_to_publisher};
8+
use tips_audit_lib::{BundleEvent, KafkaBundleEventPublisher, connect_audit_to_publisher};
99
use tips_core::kafka::load_kafka_config_from_file;
1010
use tips_core::logger::init_logger_with_format;
1111
use tips_core::metrics::init_prometheus_exporter;
1212
use tips_core::{AcceptedBundle, MeterBundleResponse};
13-
use tips_ingress_rpc::Config;
14-
use tips_ingress_rpc::connect_ingress_to_builder;
15-
use tips_ingress_rpc::health::bind_health_server;
16-
use tips_ingress_rpc::queue::KafkaMessageQueue;
17-
use tips_ingress_rpc::service::{IngressApiServer, IngressService, Providers};
13+
use tips_ingress_rpc_lib::Config;
14+
use tips_ingress_rpc_lib::connect_ingress_to_builder;
15+
use tips_ingress_rpc_lib::health::bind_health_server;
16+
use tips_ingress_rpc_lib::queue::KafkaMessageQueue;
17+
use tips_ingress_rpc_lib::service::{IngressApiServer, IngressService, Providers};
1818
use tokio::sync::{broadcast, mpsc};
1919
use tracing::info;
2020

@@ -23,7 +23,6 @@ async fn main() -> anyhow::Result<()> {
2323
dotenvy::dotenv().ok();
2424

2525
let config = Config::parse();
26-
// clone once instead of cloning each field before passing to `IngressService::new`
2726
let cfg = config.clone();
2827

2928
init_logger_with_format(&config.log_level, config.log_format);

crates/account-abstraction-core/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ edition.workspace = true
99

1010
[dependencies]
1111
tips-core.workspace = true
12+
alloy-serde.workspace = true
13+
async-trait.workspace = true
14+
alloy-sol-types.workspace = true
15+
op-alloy-network.workspace = true
16+
reth-rpc-eth-types.workspace = true
1217
serde = { workspace = true, features = ["std", "derive"] }
1318
tokio = { workspace = true, features = ["full"] }
1419
tracing = { workspace = true, features = ["std"] }
1520
anyhow = { workspace = true, features = ["std"] }
16-
rdkafka = { workspace = true, features = ["tokio", "libz"] }
17-
jsonrpsee = { workspace = true, features = ["server", "macros"] }
1821
serde_json = { workspace = true, features = ["std"] }
19-
async-trait.workspace = true
20-
alloy-serde.workspace = true
21-
alloy-sol-types.workspace = true
22-
alloy-primitives = { workspace = true, features = ["map-foldhash", "serde"] }
22+
rdkafka = { workspace = true, features = ["tokio", "libz"] }
2323
alloy-rpc-types = { workspace = true, features = ["eth"] }
24+
jsonrpsee = { workspace = true, features = ["server", "macros"] }
2425
alloy-provider = { workspace = true, features = ["reqwest"] }
25-
op-alloy-network.workspace = true
26-
reth-rpc-eth-types.workspace = true
26+
alloy-primitives = { workspace = true, features = ["map-foldhash", "serde"] }
2727

2828
[dev-dependencies]
2929
wiremock.workspace = true

crates/audit/Cargo.toml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
[package]
2-
name = "tips-audit"
2+
name = "tips-audit-lib"
33
version.workspace = true
44
rust-version.workspace = true
55
license.workspace = true
66
homepage.workspace = true
77
repository.workspace = true
88
edition.workspace = true
99

10-
[[bin]]
11-
name = "tips-audit"
12-
path = "src/bin/main.rs"
13-
1410
[dependencies]
15-
tips-core = { workspace = true, features = ["test-utils"] }
1611
bytes.workspace = true
1712
metrics.workspace = true
1813
dotenvy.workspace = true
1914
async-trait.workspace = true
2015
metrics-derive.workspace = true
21-
alloy-primitives = { workspace = true, features = ["map-foldhash", "serde"] }
22-
tokio = { workspace = true, features = ["full"] }
16+
aws-credential-types.workspace = true
17+
tips-core = { workspace = true, features = ["test-utils"] }
2318
serde = { workspace = true, features = ["std", "derive"] }
19+
tokio = { workspace = true, features = ["full"] }
2420
uuid = { workspace = true, features = ["v4", "serde"] }
2521
tracing = { workspace = true, features = ["std"] }
2622
anyhow = { workspace = true, features = ["std"] }
2723
serde_json = { workspace = true, features = ["std"] }
2824
rdkafka = { workspace = true, features = ["tokio", "libz"] }
2925
alloy-consensus = { workspace = true, features = ["std"] }
3026
alloy-provider = { workspace = true, features = ["reqwest"] }
31-
op-alloy-consensus = { workspace = true, features = ["std", "k256", "serde"] }
3227
clap = { version = "4.5.47", features = ["std", "derive", "env"] }
28+
op-alloy-consensus = { workspace = true, features = ["std", "k256", "serde"] }
29+
alloy-primitives = { workspace = true, features = ["map-foldhash", "serde"] }
3330
tracing-subscriber = { workspace = true, features = ["std", "fmt", "env-filter", "json"] }
3431
aws-config = { workspace = true, features = ["default-https-client", "rt-tokio"] }
3532
aws-sdk-s3 = { workspace = true, features = ["rustls", "default-https-client", "rt-tokio"] }
36-
aws-credential-types.workspace = true
3733

3834
[dev-dependencies]
3935
testcontainers = { workspace = true, features = ["blocking"] }
40-
testcontainers-modules = { workspace = true, features = ["postgres", "kafka", "minio"] }
36+
testcontainers-modules = { workspace = true, features = ["postgres", "kafka", "minio"] }

0 commit comments

Comments
 (0)