From 513236b3cec834e3f38939a1ce04574cf16bcbe1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 4 Dec 2024 00:00:00 +0000 Subject: [PATCH] bump ruma for async state-res optimizations Signed-off-by: Jason Volk --- Cargo.lock | 30 +++++++++---------- Cargo.toml | 2 +- .../rooms/event_handler/resolve_state.rs | 2 +- .../rooms/event_handler/state_at_incoming.rs | 1 + 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49c4127e..d787739e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -3171,7 +3171,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.10.1" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "assign", "js_int", @@ -3193,7 +3193,7 @@ dependencies = [ [[package]] name = "ruma-appservice-api" version = "0.10.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "js_int", "ruma-common", @@ -3205,7 +3205,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.18.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "as_variant", "assign", @@ -3228,7 +3228,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.13.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "as_variant", "base64 0.22.1", @@ -3258,7 +3258,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.28.1" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "as_variant", "indexmap 2.6.0", @@ -3282,7 +3282,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.9.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "bytes", "http", @@ -3300,7 +3300,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.9.5" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "js_int", "thiserror 2.0.3", @@ -3309,7 +3309,7 @@ dependencies = [ [[package]] name = "ruma-identity-service-api" version = "0.9.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "js_int", "ruma-common", @@ -3319,10 +3319,9 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.13.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "cfg-if", - "once_cell", "proc-macro-crate", "proc-macro2", "quote", @@ -3335,7 +3334,7 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.9.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "js_int", "ruma-common", @@ -3347,7 +3346,7 @@ dependencies = [ [[package]] name = "ruma-server-util" version = "0.3.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "headers", "http", @@ -3360,7 +3359,7 @@ dependencies = [ [[package]] name = "ruma-signatures" version = "0.15.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "base64 0.22.1", "ed25519-dalek", @@ -3376,10 +3375,9 @@ dependencies = [ [[package]] name = "ruma-state-res" version = "0.11.0" -source = "git+https://github.com/girlbossceo/ruwuma?rev=97e2fb6df13f65532d33fc2f0f097ad5a449dd70#97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +source = "git+https://github.com/girlbossceo/ruwuma?rev=1a550585bf025cce48ef8b734339245092bc986e#1a550585bf025cce48ef8b734339245092bc986e" dependencies = [ "futures-util", - "itertools 0.13.0", "js_int", "ruma-common", "ruma-events", diff --git a/Cargo.toml b/Cargo.toml index efb06a5b..673cab09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -334,7 +334,7 @@ version = "0.1.2" [workspace.dependencies.ruma] git = "https://github.com/girlbossceo/ruwuma" #branch = "conduwuit-changes" -rev = "97e2fb6df13f65532d33fc2f0f097ad5a449dd70" +rev = "1a550585bf025cce48ef8b734339245092bc986e" features = [ "compat", "rand", diff --git a/src/service/rooms/event_handler/resolve_state.rs b/src/service/rooms/event_handler/resolve_state.rs index dc0edd13..81cf7733 100644 --- a/src/service/rooms/event_handler/resolve_state.rs +++ b/src/service/rooms/event_handler/resolve_state.rs @@ -65,7 +65,6 @@ pub async fn resolve_state( .collect() }) .collect() - .boxed() .await; debug!("Resolving state"); @@ -74,6 +73,7 @@ pub async fn resolve_state( let event_fetch = |event_id| self.event_fetch(event_id); let event_exists = |event_id| self.event_exists(event_id); let state = state_res::resolve(room_version_id, &fork_states, &auth_chain_sets, &event_fetch, &event_exists) + .boxed() .await .map_err(|e| err!(Database(error!("State resolution failed: {e:?}"))))?; diff --git a/src/service/rooms/event_handler/state_at_incoming.rs b/src/service/rooms/event_handler/state_at_incoming.rs index 05a9d8ca..96ee9907 100644 --- a/src/service/rooms/event_handler/state_at_incoming.rs +++ b/src/service/rooms/event_handler/state_at_incoming.rs @@ -153,6 +153,7 @@ pub(super) async fn state_at_incoming_resolved( let event_fetch = |event_id| self.event_fetch(event_id); let event_exists = |event_id| self.event_exists(event_id); let result = state_res::resolve(room_version_id, &fork_states, &auth_chain_sets, &event_fetch, &event_exists) + .boxed() .await .map_err(|e| err!(Database(warn!(?e, "State resolution on prev events failed."))));