diff --git a/Cargo.lock b/Cargo.lock index 8037aa5..a60ca29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,9 +196,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "cc" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" dependencies = [ "jobserver", ] @@ -236,7 +236,7 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "conduit" -version = "0.1.0" +version = "0.2.0" dependencies = [ "base64 0.13.0", "bytes", @@ -248,7 +248,7 @@ dependencies = [ "jsonwebtoken", "lru-cache", "num_cpus", - "opentelemetry 0.16.0", + "opentelemetry", "opentelemetry-jaeger", "parking_lot", "pretty_env_logger", @@ -275,7 +275,7 @@ dependencies = [ "tracing-opentelemetry", "tracing-subscriber", "trust-dns-resolver", - "webpki", + "webpki 0.22.0", ] [[package]] @@ -657,9 +657,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" dependencies = [ "futures-channel", "futures-core", @@ -672,9 +672,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" dependencies = [ "futures-core", "futures-sink", @@ -682,15 +682,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" [[package]] name = "futures-executor" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" dependencies = [ "futures-core", "futures-task", @@ -699,15 +699,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" [[package]] name = "futures-macro" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ "autocfg", "proc-macro-hack", @@ -718,21 +718,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" [[package]] name = "futures-task" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" [[package]] name = "futures-util" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" dependencies = [ "autocfg", "futures-channel", @@ -1000,7 +1000,7 @@ dependencies = [ "rustls", "tokio", "tokio-rustls", - "webpki", + "webpki 0.21.4", ] [[package]] @@ -1026,7 +1026,7 @@ dependencies = [ "gif", "jpeg-decoder", "num-iter", - "num-rational 0.3.2", + "num-rational", "num-traits", "png", ] @@ -1203,9 +1203,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" dependencies = [ "scopeguard", ] @@ -1349,20 +1349,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint 0.4.0", - "num-complex", - "num-integer", - "num-iter", - "num-rational 0.4.0", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.2.6" @@ -1374,26 +1360,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" -dependencies = [ - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -1426,18 +1392,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" -dependencies = [ - "autocfg", - "num-bigint 0.4.0", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.14" @@ -1475,23 +1429,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" -[[package]] -name = "opentelemetry" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff27b33e30432e7b9854936693ca103d8591b0501f7ae9f633de48cda3bf2a67" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures", - "js-sys", - "lazy_static", - "percent-encoding", - "pin-project", - "rand 0.8.4", - "thiserror", -] - [[package]] name = "opentelemetry" version = "0.16.0" @@ -1519,7 +1456,7 @@ checksum = "db22f492873ea037bc267b35a0e8e4fb846340058cb7c864efe3d0bf23684593" dependencies = [ "async-trait", "lazy_static", - "opentelemetry 0.16.0", + "opentelemetry", "opentelemetry-semantic-conventions", "thiserror", "thrift", @@ -1532,7 +1469,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffeac823339e8b0f27b961f4385057bf9f97f2863bc745bd015fd6091f2270e9" dependencies = [ - "opentelemetry 0.16.0", + "opentelemetry", ] [[package]] @@ -1556,9 +1493,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", @@ -1567,9 +1504,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if 1.0.0", "instant", @@ -1726,9 +1663,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -2063,7 +2000,8 @@ dependencies = [ [[package]] name = "ruma" version = "0.4.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668031e3108d6a2cfbe6eca271d8698f4593440e71a44afdadcf67ce3cb93c1f" dependencies = [ "assign", "js_int", @@ -2084,7 +2022,8 @@ dependencies = [ [[package]] name = "ruma-api" version = "0.18.3" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5f1843792b6749ec1ece62595cf99ad30bf9589c96bb237515235e71da396ea" dependencies = [ "bytes", "http", @@ -2100,7 +2039,8 @@ dependencies = [ [[package]] name = "ruma-api-macros" version = "0.18.3" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18abda5cca94178d08b622bca042e1cbb5eb7d4ebf3a2a81590a3bb3c57008" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2111,7 +2051,8 @@ dependencies = [ [[package]] name = "ruma-appservice-api" version = "0.4.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49369332a5f299e832e19661f92d49e08c345c3c6c4ab16e09cb31c5ff6da878" dependencies = [ "ruma-api", "ruma-common", @@ -2125,7 +2066,8 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.12.2" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9568a222c12cf6220e751484ab78feec28071f85965113a5bb802936a2920ff0" dependencies = [ "assign", "bytes", @@ -2145,7 +2087,8 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.6.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d5b7605f58dc0d9cf1848cc7f1af2bae4e4bcd1d2b7a87bbb9864c8a785b91" dependencies = [ "indexmap", "js_int", @@ -2160,7 +2103,8 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.24.5" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87801e1207cfebdee02e7997ebf181a1c9837260b78c1b8ce96b896a2bcb3763" dependencies = [ "indoc", "js_int", @@ -2176,7 +2120,8 @@ dependencies = [ [[package]] name = "ruma-events-macros" version = "0.24.5" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da4498845347de88adf1b7da4578e2ca7355ad4ce47b0976f6594bacf958660" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2187,7 +2132,8 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.3.1" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa3d1db1a064ab26484df6ef5d96c384fc053022004f34d96c3b4939e13dc204" dependencies = [ "js_int", "ruma-api", @@ -2202,7 +2148,8 @@ dependencies = [ [[package]] name = "ruma-identifiers" version = "0.20.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb417d091e8dd5a633e4e5998231a156049d7fcc221045cfdc0642eb72067732" dependencies = [ "paste", "rand 0.8.4", @@ -2216,7 +2163,8 @@ dependencies = [ [[package]] name = "ruma-identifiers-macros" version = "0.20.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c708edad7f605638f26c951cbad7501fbf28ab01009e5ca65ea5a2db74a882b1" dependencies = [ "quote", "ruma-identifiers-validation", @@ -2226,15 +2174,14 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.5.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" -dependencies = [ - "thiserror", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42285e7fb5d5f2d5268e45bb683e36d5c6fd9fc1e11a4559ba3c3521f3bbb2cb" [[package]] name = "ruma-identity-service-api" version = "0.3.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e76e66e24f2d5a31511fbf6c79e79f67a7a6a98ebf48d72381b7d5bb6c09f035" dependencies = [ "js_int", "ruma-api", @@ -2247,7 +2194,8 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.3.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef5b29da7065efc5b1e1a8f61add7543c9ab4ecce5ee0dd1c1c5ecec83fbeec" dependencies = [ "js_int", "ruma-api", @@ -2262,7 +2210,8 @@ dependencies = [ [[package]] name = "ruma-serde" version = "0.5.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2b22aae842e7ecda695e42b7b39d4558959d9d9a27acc2a16acf4f4f7f00c3" dependencies = [ "bytes", "form_urlencoded", @@ -2276,7 +2225,8 @@ dependencies = [ [[package]] name = "ruma-serde-macros" version = "0.5.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243e9bef188b08f94c79bc2f8fd1eb307a9e636b2b8e4571acf8c7be16381d28" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2287,7 +2237,8 @@ dependencies = [ [[package]] name = "ruma-signatures" version = "0.9.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a4f64027165b59500162d10d435b1253898bf3ad4f5002cb0d56913fe7f76d7" dependencies = [ "base64 0.13.0", "ed25519-dalek", @@ -2303,8 +2254,9 @@ dependencies = [ [[package]] name = "ruma-state-res" -version = "0.4.0" -source = "git+https://github.com/timokoesters/ruma?rev=50c1db7e0a3a21fc794b0cce3b64285a4c750c71#50c1db7e0a3a21fc794b0cce3b64285a4c750c71" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518c1afbddfcc5ffac8818a5cf0902709e6eca11aca8f24f6479df6f0601f1ba" dependencies = [ "itertools 0.10.1", "js_int", @@ -2364,7 +2316,7 @@ dependencies = [ "log", "ring", "sct", - "webpki", + "webpki 0.21.4", ] [[package]] @@ -2425,23 +2377,22 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9bd29cdffb8875b04f71c51058f940cf4e390bbfd2ce669c4f22cd70b492a5" +checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" dependencies = [ "bitflags", "core-foundation", "core-foundation-sys", "libc", - "num", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.4.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19133a286e494cc3311c165c4676ccb1fd47bed45b55f9d71fbd784ad4cea6f8" +checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" dependencies = [ "core-foundation-sys", "libc", @@ -2464,18 +2415,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f72836d2aa753853178eda473a3b9d8e4eefdaf20523b919677e6de489f8f1" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57ae87ad533d9a56427558b516d0adac283614e347abf85b0dc0cbbf0a249f3" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -2484,9 +2435,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" dependencies = [ "itoa", "ryu", @@ -2567,7 +2518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4b" dependencies = [ "chrono", - "num-bigint 0.2.6", + "num-bigint", "num-traits", ] @@ -2781,18 +2732,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "283d5230e63df9608ac7d9691adc1dfb6e701225436eb64d0b9a7f0a5a04f6ec" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "fa3884228611f5cd3608e2d409bf7dce832e4eb3135e3f11addbd7e41bd68e71" dependencies = [ "proc-macro2", "quote", @@ -2895,9 +2846,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92036be488bb6594459f2e03b60e42df6f937fe6ca5c5ffdcb539c6b84dc40f5" +checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" dependencies = [ "autocfg", "bytes", @@ -2931,7 +2882,7 @@ checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ "rustls", "tokio", - "webpki", + "webpki 0.21.4", ] [[package]] @@ -3042,11 +2993,11 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c47440f2979c4cd3138922840eec122e3c0ba2148bc290f756bd7fd60fc97fff" +checksum = "599f388ecb26b28d9c1b2e4437ae019a7b336018b45ed911458cd9ebf91129f6" dependencies = [ - "opentelemetry 0.15.0", + "opentelemetry", "tracing", "tracing-core", "tracing-log", @@ -3148,9 +3099,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" [[package]] name = "ubyte" @@ -3350,6 +3301,16 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "weezl" version = "0.1.5" diff --git a/Cargo.toml b/Cargo.toml index ca802e9..a78307a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ authors = ["timokoesters "] homepage = "https://conduit.rs" repository = "https://gitlab.com/famedly/conduit" readme = "README.md" -version = "0.1.0" +version = "0.2.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -18,29 +18,29 @@ edition = "2018" rocket = { version = "0.5.0-rc.1", features = ["tls"] } # Used to handle requests # Used for matrix spec type definitions and helpers -#ruma = { version = "0.4.0", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } +ruma = { version = "0.4.0", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } #ruma = { git = "https://github.com/ruma/ruma", rev = "f5ab038e22421ed338396ece977b6b2844772ced", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } -ruma = { git = "https://github.com/timokoesters/ruma", rev = "50c1db7e0a3a21fc794b0cce3b64285a4c750c71", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } +#ruma = { git = "https://github.com/timokoesters/ruma", rev = "50c1db7e0a3a21fc794b0cce3b64285a4c750c71", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } #ruma = { path = "../ruma/crates/ruma", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] } # Used for long polling and federation sender, should be the same as rocket::tokio -tokio = "1.8.2" +tokio = "1.11.0" # Used for storing data permanently sled = { version = "0.34.6", features = ["compression", "no_metrics"], optional = true } #sled = { git = "https://github.com/spacejam/sled.git", rev = "e4640e0773595229f398438886f19bca6f7326a2", features = ["compression"] } # Used for the http request / response body type for Ruma endpoints used with reqwest -bytes = "1.0.1" +bytes = "1.1.0" # Used for rocket<->ruma conversions http = "0.2.4" # Used to find data directory for default db path directories = "3.0.2" # Used for ruma wrapper -serde_json = { version = "1.0.64", features = ["raw_value"] } +serde_json = { version = "1.0.67", features = ["raw_value"] } # Used for appservice registration files -serde_yaml = "0.8.17" +serde_yaml = "0.8.20" # Used for pdu definition -serde = "1.0.126" +serde = "1.0.130" # Used for secure identifiers rand = "0.8.4" # Used to hash passwords @@ -50,9 +50,9 @@ reqwest = { version = "0.11.4", default-features = false, features = ["rustls-tl # Custom TLS verifier rustls = { version = "0.19.1", features = ["dangerous_configuration"] } rustls-native-certs = "0.5.0" -webpki = "0.21.0" +webpki = "0.22.0" # Used for conduit::Error type -thiserror = "1.0.26" +thiserror = "1.0.28" # Used to generate thumbnails for images image = { version = "0.23.14", default-features = false, features = ["jpeg", "png", "gif"] } # Used to encode server public key @@ -67,15 +67,15 @@ regex = "1.5.4" jsonwebtoken = "7.2.0" # Performance measurements tracing = { version = "0.1.26", features = ["release_max_level_warn"] } -tracing-subscriber = "0.2.19" -tracing-opentelemetry = "0.14.0" +tracing-subscriber = "0.2.20" +tracing-opentelemetry = "0.15.0" tracing-flame = "0.1.0" opentelemetry = { version = "0.16.0", features = ["rt-tokio"] } opentelemetry-jaeger = { version = "0.15.0", features = ["rt-tokio"] } pretty_env_logger = "0.4.0" lru-cache = "0.1.2" rusqlite = { version = "0.25.3", optional = true, features = ["bundled"] } -parking_lot = { version = "0.11.1", optional = true } +parking_lot = { version = "0.11.2", optional = true } crossbeam = { version = "0.8.1", optional = true } num_cpus = "1.13.0" threadpool = "1.8.1" diff --git a/DEPLOY.md b/DEPLOY.md index 8218b45..3a81eb0 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -231,4 +231,15 @@ Set it to start automatically when your system boots with: $ sudo systemctl enable conduit ``` +## How do I know it works? + +You can open , enter your homeserver and try to register. + +You can also use these commands as a quick health check. + +```bash +$ curl https://your.server.name/_matrix/client/versions +$ curl https://your.server.name:8448/_matrix/client/versions +``` + If you want to set up an appservice, take a look at the [Appservice Guide](APPSERVICES.md). diff --git a/README.md b/README.md index 836f9c6..9d8de2b 100644 --- a/README.md +++ b/README.md @@ -3,90 +3,42 @@ #### What is the goal? -A fast Matrix homeserver that's easy to set up and just works. You can install +An efficient Matrix homeserver that's easy to set up and just works. You can install it on a mini-computer like the Raspberry Pi to host Matrix for your family, friends or company. #### Can I try it out? -Yes! Just open a Matrix client ( or Element Android for -example) and register on the `https://conduit.koesters.xyz` homeserver. +Yes! You can test our Conduit instance by opening a Matrix client ( or Element Android for +example) and registering on the `conduit.rs` homeserver. - -#### What is it built on? - -- [Ruma](https://www.ruma.io): Useful structures for endpoint requests and - responses that can be (de)serialized -- [Sled](https://github.com/spacejam/sled): A simple (key, value) database with - good performance -- [Rocket](https://rocket.rs): A flexible web framework +It is hosted on a ODROID HC 2 with 2GB RAM and a SAMSUNG Exynos 5422 CPU, which +was used in the Samsung Galaxy S5. It joined many big rooms including Matrix +HQ. #### What is the current status? -Conduit can already be used chat with other users on Conduit, chat with users -from other Matrix servers and even to chat with users on other platforms using -appservices. When chatting with users on the same Conduit server, everything -should work assuming you use a compatible client. - -**You should not join Matrix rooms without asking the admins first.** We do not -know whether Conduit is safe for general use yet, so you should assume there is -some chance that it breaks rooms permanently for all participating users. We -are not aware of such a bug today, but we would like to do more testing. +As of 2021-09-01, Conduit is Beta, meaning you can join and participate in most +Matrix rooms, but not all features are supported and you might run into bugs +from time to time. There are still a few important features missing: -- Database stability (currently you might have to do manual upgrades or even wipe the db for new versions) -- Edge cases for end-to-end encryption over federation -- Typing and presence over federation -- Lots of testing +- E2EE verification over federation +- Outgoing read receipts, typing, presence over federation Check out the [Conduit 1.0 Release Milestone](https://gitlab.com/famedly/conduit/-/milestones/3). #### How can I deploy my own? -##### Deploy +Simple install (this was tested the most): [DEPLOY.md](DEPLOY.md)\ +Debian package: [debian/README.Debian](debian/README.Debian)\ +Docker: [docker/README.md](docker/README.md) -Download or compile a Conduit binary, set up the config and call it from somewhere like a systemd script. [Read -more](DEPLOY.md) - -If you want to connect an Appservice to Conduit, take a look at the [Appservice Guide](APPSERVICES.md). - -##### Deploy using a Debian package - -You need to have the `deb` helper command installed that creates Debian packages from Cargo projects (see [cargo-deb](https://github.com/mmstick/cargo-deb/) for more info): - -```shell -$ cargo install cargo-deb -``` - -Then, you can create and install a Debian package at a whim: - -```shell -$ cargo deb -$ dpkg -i target/debian/matrix-conduit_0.1.0_amd64.deb -``` - -This will build, package, install, configure and start Conduit. [Read more](debian/README.Debian). - -Note that `cargo deb` supports [cross-compilation](https://github.com/mmstick/cargo-deb/#cross-compilation) too! -Official Debian packages will follow once Conduit starts to have stable releases. - -##### Deploy using Docker - -Pull and run the docker image with - -``` bash -docker pull matrixconduit/matrix-conduit:latest -docker run -d -p 8448:6167 -v ~/conduit.toml:/srv/conduit/conduit.toml -v db:/srv/conduit/.local/share/conduit matrixconduit/matrix-conduit:latest -``` - -> Note: You also need to supply a `conduit.toml` config file, you can find an example [here](./conduit-example.toml). -> Or you can pass in `-e CONDUIT_CONFIG=""` and configure Conduit purely with env vars. - -Or build and run it with docker or docker-compose. [Read more](docker/README.md) +If you want to connect an Appservice to Conduit, take a look at [APPSERVICES.md](APPSERVICES.md). #### How can I contribute? diff --git a/src/client_server/account.rs b/src/client_server/account.rs index 4b610a3..e9300b5 100644 --- a/src/client_server/account.rs +++ b/src/client_server/account.rs @@ -507,8 +507,8 @@ pub async fn register_route( PduBuilder { event_type: EventType::RoomMessage, content: serde_json::to_value(message::MessageEventContent::text_html( - "Thanks for trying out Conduit! This software is still in development, so expect many bugs and missing features. If you have federation enabled, you can join the Conduit chat room by typing `/join #conduit:matrix.org`. **Important: Please don't join any other Matrix rooms over federation without permission from the room's admins.** Some actions might trigger bugs in other server implementations, breaking the chat for everyone else.".to_owned(), - "Thanks for trying out Conduit! This software is still in development, so expect many bugs and missing features. If you have federation enabled, you can join the Conduit chat room by typing /join #conduit:matrix.org. Important: Please don't join any other Matrix rooms over federation without permission from the room's admins. Some actions might trigger bugs in other server implementations, breaking the chat for everyone else.".to_owned(), + "## Thank you for trying out Conduit!\n\nConduit is currently in Beta. This means you can join and participate in most Matrix rooms, but not all features are supported and you might run into bugs from time to time.\n\nHelpful links:\n> Website: https://conduit.rs\n> Git and Documentation: https://gitlab.com/famedly/conduit\n> Report issues: https://gitlab.com/famedly/conduit/-/issues\n\nHere are some rooms you can join (by typing the command):\n\nConduit room (Ask questions and get notified on updates):\n`/join #conduit:fachschaften.org`\n\nConduit lounge (Off-topic, only Conduit users are allowed to join)\n`/join #conduit-lounge:conduit.rs`".to_owned(), + "

Thank you for trying out Conduit!

\n

Conduit is currently in Beta. This means you can join and participate in most Matrix rooms, but not all features are supported and you might run into bugs from time to time.

\n

Helpful links:

\n
\n

Website: https://conduit.rs
Git and Documentation: https://gitlab.com/famedly/conduit
Report issues: https://gitlab.com/famedly/conduit/-/issues

\n
\n

Here are some rooms you can join (by typing the command):

\n

Conduit room (Ask questions and get notified on updates):
/join #conduit:fachschaften.org

\n

Conduit lounge (Off-topic, only Conduit users are allowed to join)
/join #conduit-lounge:conduit.rs

\n".to_owned(), )) .expect("event is valid, we just created it"), unsigned: None, diff --git a/src/ruma_wrapper.rs b/src/ruma_wrapper.rs index 5681194..fa28379 100644 --- a/src/ruma_wrapper.rs +++ b/src/ruma_wrapper.rs @@ -66,7 +66,11 @@ where let limit = db.globals.max_request_size(); let mut handle = data.open(ByteUnit::Byte(limit.into())); let mut body = Vec::new(); - handle.read_to_end(&mut body).await.unwrap(); + if let Err(_) = handle.read_to_end(&mut body).await { + // Client disconnected + // Missing Token + return Failure((Status::new(582), ())); + } let mut json_body = serde_json::from_slice::(&body).ok(); diff --git a/src/server_server.rs b/src/server_server.rs index 273203a..bac7203 100644 --- a/src/server_server.rs +++ b/src/server_server.rs @@ -1030,7 +1030,7 @@ pub(crate) async fn handle_incoming_pdu<'a>( if amount > 100 { // Max limit reached warn!("Max prev event limit reached!"); - graph.insert(prev_event_id.clone(), HashSet::new()); + graph.insert((*prev_event_id).clone(), HashSet::new()); continue; } @@ -1052,22 +1052,22 @@ pub(crate) async fn handle_incoming_pdu<'a>( } graph.insert( - prev_event_id.clone(), - pdu.prev_events.iter().cloned().map(Arc::new).collect(), + (*prev_event_id).clone(), + pdu.prev_events.iter().cloned().collect(), ); eventid_info.insert(prev_event_id.clone(), (pdu, json)); } else { // Time based check failed - graph.insert(prev_event_id.clone(), HashSet::new()); + graph.insert((*prev_event_id).clone(), HashSet::new()); eventid_info.insert(prev_event_id.clone(), (pdu, json)); } } else { // Get json failed - graph.insert(prev_event_id.clone(), HashSet::new()); + graph.insert((*prev_event_id).clone(), HashSet::new()); } } else { // Fetch and handle failed - graph.insert(prev_event_id.clone(), HashSet::new()); + graph.insert((*prev_event_id).clone(), HashSet::new()); } } @@ -1084,7 +1084,7 @@ pub(crate) async fn handle_incoming_pdu<'a>( .get(event_id) .map_or_else(|| uint!(0), |info| info.0.origin_server_ts), ), - Arc::new(ruma::event_id!("$notimportant")), + ruma::event_id!("$notimportant"), )) }) .map_err(|_| "Error sorting prev events".to_owned())?; @@ -1432,10 +1432,16 @@ async fn upgrade_outlier_to_timeline_pdu( db, ) .map_err(|_| "Failed to load auth chain.".to_owned())? + .map(|event_id| (*event_id).clone()) .collect(), ); } + let fork_states = &fork_states + .into_iter() + .map(|map| map.into_iter().map(|(k, id)| (k, (*id).clone())).collect()) + .collect::>(); + state_at_incoming_event = match state_res::StateResolution::resolve( &room_id, room_version_id, @@ -1457,7 +1463,7 @@ async fn upgrade_outlier_to_timeline_pdu( .rooms .get_or_create_shortstatekey(&event_type, &state_key, &db.globals) .map_err(|_| "Failed to get_or_create_shortstatekey".to_owned())?; - Ok((shortstatekey, event_id)) + Ok((shortstatekey, Arc::new(event_id))) }) .collect::>()?, ), @@ -1766,18 +1772,8 @@ async fn upgrade_outlier_to_timeline_pdu( // We do need to force an update to this room's state update_state = true; - let fork_states = &fork_states - .into_iter() - .map(|map| { - map.into_iter() - .map(|(k, id)| (db.rooms.get_statekey_from_short(k).map(|k| (k, id)))) - .collect::>>() - }) - .collect::>>() - .map_err(|_| "Failed to get_statekey_from_short.".to_owned())?; - let mut auth_chain_sets = Vec::new(); - for state in fork_states { + for state in &fork_states { auth_chain_sets.push( get_auth_chain( &room_id, @@ -1785,10 +1781,25 @@ async fn upgrade_outlier_to_timeline_pdu( db, ) .map_err(|_| "Failed to load auth chain.".to_owned())? + .map(|event_id| (*event_id).clone()) .collect(), ); } + let fork_states = &fork_states + .into_iter() + .map(|map| { + map.into_iter() + .map(|(k, id)| { + db.rooms + .get_statekey_from_short(k) + .map(|k| (k, (*id).clone())) + }) + .collect::>>() + }) + .collect::>>() + .map_err(|_| "Failed to get_statekey_from_short.".to_owned())?; + let state = match state_res::StateResolution::resolve( &room_id, room_version_id,