Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt(torii): parallalize event processing #2385

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 78 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ tower = "0.4.13"
tower-http = "0.4.4"
tracing = "0.1.34"
tracing-subscriber = { version = "0.3.16", features = [ "env-filter", "json" ] }
tracing-test = "0.1"
url = { version = "2.4.0", features = [ "serde" ] }

# server
Expand Down
6 changes: 3 additions & 3 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
let provider: Arc<_> = JsonRpcClient::new(HttpTransport::new(args.rpc)).into();

// Get world address
let world = WorldContractReader::new(args.world_address, &provider);
let world = WorldContractReader::new(args.world_address, Arc::clone(&provider));

Check warning on line 173 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L173

Added line #L173 was not covered by tests

let db = Sql::new(pool.clone(), args.world_address).await?;

Expand All @@ -193,7 +193,7 @@
let mut engine = Engine::new(
world,
db.clone(),
&provider,
Arc::clone(&provider),

Check warning on line 196 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L196

Added line #L196 was not covered by tests
processors,
EngineConfig {
start_block: args.start_block,
Expand All @@ -217,7 +217,7 @@

let mut libp2p_relay_server = torii_relay::server::Relay::new(
db,
provider.clone(),
Arc::clone(&provider),

Check warning on line 220 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L220

Added line #L220 was not covered by tests
args.relay_port,
args.relay_webrtc_port,
args.relay_websocket_port,
Expand Down
1 change: 1 addition & 0 deletions crates/torii/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ thiserror.workspace = true
tokio = { version = "1.32.0", features = [ "sync" ], default-features = true }
tokio-stream = "0.1.11"
tokio-util = "0.7.7"
tracing-test.workspace = true
tracing.workspace = true

[dev-dependencies]
Expand Down
Loading
Loading