From a809c18f0a3a59521e9224ac48393292855abd67 Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Tue, 19 Mar 2024 17:33:52 -0700 Subject: [PATCH 01/17] Update xmtp/openmls to latest --- Cargo.lock | 975 ++++++++++++++++++++++++----------------------------- 1 file changed, 444 insertions(+), 531 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1530a43ab..b0c3e8807 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,9 +39,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -88,9 +88,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arrayref" @@ -180,18 +180,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -207,14 +207,13 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.53", ] [[package]] @@ -234,7 +233,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "itoa", @@ -260,7 +259,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "mime", "rustversion", @@ -303,9 +302,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -351,9 +350,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -387,9 +386,9 @@ dependencies = [ [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "sha2 0.10.8", "tinyvec", @@ -397,9 +396,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-slice-cast" @@ -454,9 +453,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -477,9 +476,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ "jobserver", "libc", @@ -517,16 +516,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] @@ -542,9 +541,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.14" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -552,9 +551,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.14" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -564,21 +563,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coins-bip32" @@ -618,7 +617,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bech32", "bs58", "digest 0.10.7", @@ -640,9 +639,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "const-hex" -version = "1.10.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" dependencies = [ "cfg-if", "cpufeatures", @@ -690,9 +689,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -775,12 +774,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -794,9 +793,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -817,7 +816,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -869,9 +868,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" +checksum = "03fc05c17098f21b89bc7d98fe1dd3cce2c11c2ad8e145f2a44fe08ed28eb559" dependencies = [ "diesel_derives", "libsqlite3-sys", @@ -881,14 +880,14 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44" +checksum = "5d02eecb814ae714ffe61ddc2db2dd03e6c49a42e269b5001355500d431cce0c" dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -908,15 +907,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.48", + "syn 2.0.53", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "difflib" version = "0.4.0" @@ -1036,9 +1029,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", @@ -1051,9 +1044,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -1117,11 +1110,11 @@ dependencies = [ [[package]] name = "enr" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", "hex", "k256 0.13.3", @@ -1135,9 +1128,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1154,9 +1147,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388979d208a049ffdfb22fa33b9c81942215b940910bccfe258caeb25d125cb3" +checksum = "2b73807008a3c7f171cc40312f37d95ef0396e048b5848d775f54b1a4dd4a0d3" dependencies = [ "serde", ] @@ -1243,9 +1236,9 @@ dependencies = [ [[package]] name = "ethers" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c7cd562832e2ff584fa844cd2f6e5d4f35bbe11b28c7c9b8df957b2e1d0c701" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1259,9 +1252,9 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35dc9a249c066d17e8947ff52a4116406163cf92c7f0763cb8c001760b26403f" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" dependencies = [ "ethers-core", "once_cell", @@ -1271,9 +1264,9 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43304317c7f776876e47f2f637859f6d0701c1ec7930a150f169d5fbe7d76f5a" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" dependencies = [ "const-hex", "ethers-contract-abigen", @@ -1290,9 +1283,9 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f96502317bf34f6d71a3e3d270defaa9485d754d789e15a8e04a84161c95eb" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" dependencies = [ "Inflector", "const-hex", @@ -1307,16 +1300,16 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.48", - "toml 0.8.8", + "syn 2.0.53", + "toml 0.8.12", "walkdir", ] [[package]] name = "ethers-contract-derive" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452ff6b0a64507ce8d67ffd48b1da3b42f03680dcf5382244e9c93822cbbf5de" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" dependencies = [ "Inflector", "const-hex", @@ -1325,14 +1318,14 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "ethers-core" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aab3cef6cc1c9fd7f787043c81ad3052eff2b96a3878ef1526aa446311bdbfc9" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" dependencies = [ "arrayvec", "bytes", @@ -1351,7 +1344,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn 2.0.48", + "syn 2.0.53", "tempfile", "thiserror", "tiny-keccak", @@ -1360,9 +1353,9 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d45b981f5fa769e1d0343ebc2a44cfa88c9bc312eb681b676318b40cef6fb1" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" dependencies = [ "chrono", "ethers-core", @@ -1376,9 +1369,9 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145211f34342487ef83a597c1e69f0d3e01512217a7c72cc8a25931854c7dca0" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" dependencies = [ "async-trait", "auto_impl", @@ -1403,13 +1396,13 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b15393996e3b8a78ef1332d6483c11d839042c17be58decc92fa8b1c3508a" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.6", + "base64 0.21.7", "bytes", "const-hex", "enr", @@ -1419,7 +1412,7 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "http 0.2.11", + "http 0.2.12", "instant", "jsonwebtoken", "once_cell", @@ -1441,9 +1434,9 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b125a103b56aef008af5d5fb48191984aa326b50bfd2557d231dc499833de3" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" dependencies = [ "async-trait", "coins-bip32", @@ -1460,9 +1453,9 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d21df08582e0a43005018a858cc9b465c5fff9cf4056651be64f844e57d1f55f" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" dependencies = [ "cfg-if", "const-hex", @@ -1492,9 +1485,9 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ "indenter", "once_cell", @@ -1544,9 +1537,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" [[package]] name = "fixed-hash" @@ -1700,7 +1693,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -1717,9 +1710,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" dependencies = [ "gloo-timers", "send_wrapper 0.4.0", @@ -1778,9 +1771,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -1834,17 +1827,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.1.0", + "http 0.2.12", + "indexmap 2.2.5", "slab", "tokio", "tokio-util", @@ -1878,10 +1871,10 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", "headers-core", - "http 0.2.11", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -1893,7 +1886,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http 0.2.11", + "http 0.2.12", ] [[package]] @@ -1902,11 +1895,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -2004,9 +2003,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2015,9 +2014,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2031,7 +2030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] @@ -2042,7 +2041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.0.0", + "http 1.1.0", ] [[package]] @@ -2074,7 +2073,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", @@ -2089,14 +2088,13 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" dependencies = [ "bytes", - "http 1.0.0", + "http 1.1.0", "http-body 1.0.0", - "pin-project-lite", "tokio", ] @@ -2107,7 +2105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", "rustls 0.21.10", "tokio", @@ -2128,9 +2126,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2215,9 +2213,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2249,12 +2247,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys 0.52.0", ] @@ -2293,84 +2291,48 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" -dependencies = [ - "jsonrpsee-core 0.21.0", - "jsonrpsee-proc-macros 0.21.0", - "jsonrpsee-server 0.21.0", - "jsonrpsee-types 0.21.0", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a95f7cc23d5fab0cdeeaf6bad8c8f5e7a3aa7f0d211957ea78232b327ab27b0" -dependencies = [ - "jsonrpsee-core 0.22.0", - "jsonrpsee-proc-macros 0.22.0", - "jsonrpsee-server 0.22.0", - "jsonrpsee-types 0.22.0", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.21.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" +checksum = "87f3ae45a64cfc0882934f963be9431b2a165d667f53140358181f262aca0702" dependencies = [ - "anyhow", - "async-trait", - "beef", - "futures-util", - "hyper 0.14.28", - "jsonrpsee-types 0.21.0", - "parking_lot", - "rand", - "rustc-hash", - "serde", - "serde_json", - "thiserror", + "jsonrpsee-core", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", "tokio", "tracing", ] [[package]] name = "jsonrpsee-core" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82030d038658974732103e623ba2e0abec03bbbe175b39c0a2fafbada60c5868" +checksum = "b75568f4f9696e3a47426e1985b548e1a9fcb13372a5e320372acaf04aca30d1" dependencies = [ "anyhow", "async-trait", "beef", "futures-util", "hyper 0.14.28", - "jsonrpsee-types 0.22.0", + "jsonrpsee-types", "parking_lot", "rand", "rustc-hash", @@ -2383,65 +2345,28 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" -dependencies = [ - "heck", - "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fc56131589f82e57805f7338b87023db4aafef813555708b159787e34ad6bc" +checksum = "30ca066e73dd70294aebc5c2675d8ffae43be944af027c857ce0d4c51785f014" dependencies = [ - "heck", - "proc-macro-crate 3.0.0", + "heck 0.4.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.53", ] [[package]] name = "jsonrpsee-server" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7c6d1a2c58f6135810284a390d9f823d0f508db74cd914d8237802de80f98" -dependencies = [ - "futures-util", - "http 0.2.11", - "hyper 0.14.28", - "jsonrpsee-core 0.21.0", - "jsonrpsee-types 0.21.0", - "pin-project", - "route-recognizer", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-server" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85be77fe5b2a94589e3164fb780017f7aff7d646b49278c0d0346af16975c8e" +checksum = "0e29c1bd1f9bba83c864977c73404e505f74f730fa0db89dd490ec174e36d7f0" dependencies = [ "futures-util", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", - "jsonrpsee-core 0.22.0", - "jsonrpsee-types 0.22.0", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "route-recognizer", "serde", @@ -2457,22 +2382,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3266dfb045c9174b24c77c2dfe0084914bb23a6b2597d70c9dc6018392e1cd1b" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a48fdc1202eafc51c63e00406575e59493284ace8b8b61aa16f3a6db5d64f1a" +checksum = "3467fd35feeee179f71ab294516bdf3a81139e7aeebdd860e46897c12e1a3368" dependencies = [ "anyhow", "beef", @@ -2487,7 +2399,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "pem", "ring 0.16.20", "serde", @@ -2525,9 +2437,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -2543,31 +2455,33 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", "string_cache", "term", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.6", +] [[package]] name = "lazy_static" @@ -2578,15 +2492,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lib-didethresolver" version = "0.1.0" -source = "git+https://github.com/xmtp/didethresolver?branch=main#05b7e66372fdac703bebc51d01afcbce0e460908" +source = "git+https://github.com/xmtp/didethresolver?branch=main#f5053c1f0c0e23d62755518898605e69745b5620" dependencies = [ "async-trait", - "base64 0.21.6", + "base64 0.21.7", "bs58", "chrono", "ethers", "hex", - "jsonrpsee 0.21.0", + "jsonrpsee", "log", "peg", "percent-encoding", @@ -2604,20 +2518,21 @@ dependencies = [ [[package]] name = "lib-xps" version = "0.1.0" -source = "git+https://github.com/xmtp/xps-gateway?branch=main#d01fe2b34a2f85b2c2f6493e6e1538ac4bbb0669" +source = "git+https://github.com/xmtp/xps-gateway?branch=main#5efa948f1179b8969dbf85f03b3a22e5d96f1213" dependencies = [ "anyhow", "async-trait", "ctor", "ethers", "hex", - "jsonrpsee 0.22.0", + "jsonrpsee", "lib-didethresolver", "log", "messaging", "rand", "registry", "serde", + "serde_json", "thiserror", "tokio", "tokio-stream", @@ -2628,9 +2543,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -2644,7 +2559,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "libc", "redox_syscall", ] @@ -2711,9 +2626,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -2727,9 +2642,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "serde", "value-bag", @@ -2769,7 +2684,7 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "messaging" version = "0.1.0" -source = "git+https://github.com/xmtp/xps-gateway?branch=main#d01fe2b34a2f85b2c2f6493e6e1538ac4bbb0669" +source = "git+https://github.com/xmtp/xps-gateway?branch=main#5efa948f1179b8969dbf85f03b3a22e5d96f1213" dependencies = [ "async-trait", "ethers", @@ -2820,18 +2735,18 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", @@ -2846,7 +2761,7 @@ dependencies = [ "env_logger", "ethers", "hex", - "hyper 1.1.0", + "hyper 1.2.0", "log", "openmls", "openmls_basic_credential", @@ -2898,7 +2813,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 0.2.11", + "http 0.2.12", "httparse", "log", "memchr", @@ -2924,9 +2839,9 @@ dependencies = [ [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "normalize-line-endings" @@ -2955,21 +2870,26 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -3000,10 +2920,10 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 3.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3023,9 +2943,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open-fastrlp" @@ -3137,18 +3057,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.1+3.2.0" +version = "300.2.3+3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -3273,7 +3193,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "serde", ] @@ -3283,7 +3203,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbb7b706f2afc610f3853550cdbbf6372fd324824a087806bd4480ea4996e24" dependencies = [ - "heck", + "heck 0.4.1", "itertools 0.10.5", "prost 0.11.9", "prost-types 0.11.9", @@ -3295,7 +3215,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" dependencies = [ - "heck", + "heck 0.4.1", "itertools 0.11.0", "prost 0.12.3", "prost-types 0.12.3", @@ -3411,7 +3331,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.5", ] [[package]] @@ -3454,7 +3374,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3477,22 +3397,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3529,9 +3449,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" @@ -3552,9 +3472,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -3627,7 +3547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3674,42 +3594,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.21.0", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit 0.21.1", ] [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -3720,7 +3616,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand", @@ -3757,7 +3653,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -3779,7 +3675,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.11.0", "log", "multimap", @@ -3789,7 +3685,7 @@ dependencies = [ "prost 0.12.3", "prost-types 0.12.3", "regex", - "syn 2.0.48", + "syn 2.0.53", "tempfile", "which", ] @@ -3817,7 +3713,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -3905,9 +3801,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -3915,9 +3811,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -3945,13 +3841,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -3966,9 +3862,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -3981,12 +3877,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -3996,7 +3886,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "registry" version = "0.1.0" -source = "git+https://github.com/xmtp/xps-gateway?branch=main#d01fe2b34a2f85b2c2f6493e6e1538ac4bbb0669" +source = "git+https://github.com/xmtp/xps-gateway?branch=main#5efa948f1179b8969dbf85f03b3a22e5d96f1213" dependencies = [ "async-trait", "ethers", @@ -4011,17 +3901,17 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", "h2", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "hyper-rustls", @@ -4037,6 +3927,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-rustls 0.24.1", @@ -4045,7 +3936,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.3", + "webpki-roots 0.25.4", "winreg", ] @@ -4087,16 +3978,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4202,11 +4094,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -4220,7 +4112,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] @@ -4232,7 +4124,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.2", "subtle", @@ -4246,7 +4138,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.0", + "rustls-pemfile 2.1.1", "rustls-pki-types", "schannel", "security-framework", @@ -4258,24 +4150,24 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", ] [[package]] name = "rustls-pemfile" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c333bb734fcdedcea57de1602543590f545f127dc8b533324318fd492c5c70b" +checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" +checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" [[package]] name = "rustls-webpki" @@ -4293,7 +4185,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -4303,7 +4195,7 @@ version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", ] @@ -4316,9 +4208,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "salsa20" @@ -4340,9 +4232,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "2ef2175c2907e7c8bc0a9c3f86aeb5ec1f3b275300ad58a44d0c3ae379a5e52e" dependencies = [ "cfg-if", "derive_more", @@ -4352,9 +4244,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "634d9b8eb8fd61c5cdd3390d9b2132300a7e7618955b98b8416f118c1b4e144f" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -4410,7 +4302,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -4467,9 +4359,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -4488,22 +4380,22 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -4662,9 +4554,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smart-default" @@ -4674,17 +4566,17 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4696,7 +4588,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http 0.2.11", + "http 0.2.12", "httparse", "log", "rand", @@ -4773,30 +4665,30 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -4885,9 +4777,9 @@ dependencies = [ [[package]] name = "svm-rs" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20689c7d03b6461b502d0b95d6c24874c7d24dea2688af80486a130a06af3b07" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" dependencies = [ "dirs", "fs2", @@ -4916,9 +4808,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -4960,13 +4852,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] @@ -4984,9 +4875,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -4999,29 +4890,29 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -5029,12 +4920,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -5049,10 +4941,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -5092,9 +4985,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tls_codec" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38a1d5fcfa859f0ec2b5e111dc903890bd7dac7f34713232bf9aa4fd7cad7b2" +checksum = "b5e78c9c330f8c85b2bae7c8368f2739157db9991235123aa1b15ef9502bfb6a" dependencies = [ "serde", "tls_codec_derive", @@ -5103,20 +4996,20 @@ dependencies = [ [[package]] name = "tls_codec_derive" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e00e3e7a54e0f1c8834ce72ed49c8487fbd3f801d8cfe1a0ad0640382f8e15" +checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -5149,7 +5042,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -5175,9 +5068,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -5197,7 +5090,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tungstenite", - "webpki-roots 0.25.3", + "webpki-roots 0.25.4", ] [[package]] @@ -5229,14 +5122,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.22.8", ] [[package]] @@ -5254,11 +5147,11 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -5267,22 +5160,33 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.5", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.5", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +dependencies = [ + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.5", ] [[package]] @@ -5294,10 +5198,10 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.6", + "base64 0.21.7", "bytes", "h2", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", "hyper-timeout", @@ -5305,7 +5209,7 @@ dependencies = [ "pin-project", "prost 0.12.3", "rustls-native-certs", - "rustls-pemfile 2.1.0", + "rustls-pemfile 2.1.1", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", @@ -5369,7 +5273,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] @@ -5436,7 +5340,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 0.2.11", + "http 0.2.12", "httparse", "log", "rand", @@ -5482,9 +5386,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -5494,9 +5398,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -5565,9 +5469,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", ] @@ -5580,9 +5484,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" +checksum = "74797339c3b98616c009c7c3eb53a0ce41e85c8ec66bd3db96ed132d20cfdee8" dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -5590,9 +5494,9 @@ dependencies = [ [[package]] name = "value-bag-serde1" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede32f342edc46e84bd41fd394ce2192b553de11725dd83b6223150610c21b44" +checksum = "cc35703541cbccb5278ef7b589d79439fc808ff0b5867195a3230f9a47421d39" dependencies = [ "erased-serde", "serde", @@ -5601,9 +5505,9 @@ dependencies = [ [[package]] name = "value-bag-sval2" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0024e44b25144c2f4d0ed35d39688e0090d57753e20fef38d08e0c1a40bdf23d" +checksum = "285b43c29d0b4c0e65aad24561baee67a1b69dc9be9375d4a85138cbf556f7f8" dependencies = [ "sval", "sval_buffer", @@ -5628,9 +5532,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -5655,7 +5559,7 @@ dependencies = [ "futures-channel", "futures-util", "headers", - "http 0.2.11", + "http 0.2.12", "hyper 0.14.28", "log", "mime", @@ -5684,9 +5588,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "serde", @@ -5696,24 +5600,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -5723,9 +5627,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5733,28 +5637,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -5771,9 +5675,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" @@ -5833,7 +5737,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -5851,7 +5755,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -5871,17 +5775,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -5892,9 +5796,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -5904,9 +5808,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -5916,9 +5820,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -5928,9 +5832,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -5940,9 +5844,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -5952,9 +5856,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -5964,15 +5868,24 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" -version = "0.5.33" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -6017,9 +5930,9 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ "curve25519-dalek", "rand_core", @@ -6032,7 +5945,7 @@ name = "xmtp_api_grpc" version = "0.1.0" dependencies = [ "async-stream", - "base64 0.21.6", + "base64 0.21.7", "futures", "hex", "http-body 0.4.6", @@ -6046,7 +5959,7 @@ dependencies = [ "tokio", "tonic", "tower", - "uuid 1.6.1", + "uuid 1.8.0", "webpki-roots 0.23.1", "xmtp_proto", "xmtp_v2", @@ -6156,7 +6069,7 @@ dependencies = [ name = "xmtp_user_preferences" version = "0.1.0" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "libsecp256k1", "once_cell", "prost 0.12.3", @@ -6203,10 +6116,10 @@ dependencies = [ [[package]] name = "xps-types" version = "0.1.0" -source = "git+https://github.com/xmtp/xps-gateway?branch=main#d01fe2b34a2f85b2c2f6493e6e1538ac4bbb0669" +source = "git+https://github.com/xmtp/xps-gateway?branch=main#5efa948f1179b8969dbf85f03b3a22e5d96f1213" dependencies = [ "ethers", - "jsonrpsee 0.22.0", + "jsonrpsee", "lib-didethresolver", "serde", "thiserror", @@ -6235,7 +6148,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.53", ] [[package]] From 66e94ded350cd069428b22420df2927ec4ab603c Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Wed, 20 Mar 2024 14:37:09 -0700 Subject: [PATCH 02/17] Intermediate Commit with TLS Naming Fixes --- Cargo.lock | 114 ++++++++++++++++++++------- Cargo.toml | 8 +- bindings_ffi/Cargo.lock | 86 +++++++++++++++++--- xmtp_mls/src/client.rs | 18 ++--- xmtp_mls/src/groups/intents.rs | 4 +- xmtp_mls/src/groups/sync.rs | 16 ++-- xmtp_mls/src/hpke.rs | 6 +- xmtp_mls/src/identity.rs | 4 +- xmtp_mls/src/verified_key_package.rs | 2 +- 9 files changed, 188 insertions(+), 70 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b0c3e8807..e4e1bc81e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -637,6 +637,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + [[package]] name = "const-hex" version = "1.11.3" @@ -1537,9 +1547,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "fixed-hash" @@ -1970,7 +1980,7 @@ dependencies = [ "hpke-rs-crypto", "log", "serde", - "tls_codec", + "tls_codec 0.4.1", "zeroize", ] @@ -2309,9 +2319,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3ae45a64cfc0882934f963be9431b2a165d667f53140358181f262aca0702" +checksum = "3cdbb7cb6f3ba28f5b212dd250ab4483105efc3e381f5c8bb90340f14f0a2cc3" dependencies = [ "jsonrpsee-core", "jsonrpsee-proc-macros", @@ -2323,9 +2333,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75568f4f9696e3a47426e1985b548e1a9fcb13372a5e320372acaf04aca30d1" +checksum = "71962a1c49af43adf81d337e4ebc93f3c915faf6eccaa14d74e255107dfd7723" dependencies = [ "anyhow", "async-trait", @@ -2345,9 +2355,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca066e73dd70294aebc5c2675d8ffae43be944af027c857ce0d4c51785f014" +checksum = "1d7c2416c400c94b2e864603c51a5bbd5b103386da1f5e58cbf01e7bb3ef0833" dependencies = [ "heck 0.4.1", "proc-macro-crate 3.1.0", @@ -2358,9 +2368,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e29c1bd1f9bba83c864977c73404e505f74f730fa0db89dd490ec174e36d7f0" +checksum = "4882e640e70c2553e3d9487e6f4dddd5fd11918f25e40fa45218f9fe29ed2152" dependencies = [ "futures-util", "http 0.2.12", @@ -2382,9 +2392,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467fd35feeee179f71ab294516bdf3a81139e7aeebdd860e46897c12e1a3368" +checksum = "1e53c72de6cd2ad6ac1aa6e848206ef8b736f92ed02354959130373dfa5b3cbd" dependencies = [ "anyhow", "beef", @@ -2975,7 +2985,7 @@ dependencies = [ [[package]] name = "openmls" version = "0.5.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "backtrace", "itertools 0.10.5", @@ -2990,26 +3000,27 @@ dependencies = [ "serde", "serde_json", "thiserror", - "tls_codec", + "tls_codec 0.4.2-pre.1", + "wasm-bindgen-test", ] [[package]] name = "openmls_basic_credential" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "ed25519-dalek", "openmls_traits", "p256", "rand", "serde", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] name = "openmls_memory_keystore" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "openmls_traits", "serde_json", @@ -3019,7 +3030,7 @@ dependencies = [ [[package]] name = "openmls_rust_crypto" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "aes-gcm", "chacha20poly1305", @@ -3037,16 +3048,16 @@ dependencies = [ "serde", "sha2 0.10.8", "thiserror", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] name = "openmls_traits" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "serde", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] @@ -4554,9 +4565,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smart-default" @@ -4990,7 +5001,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e78c9c330f8c85b2bae7c8368f2739157db9991235123aa1b15ef9502bfb6a" dependencies = [ "serde", - "tls_codec_derive", + "tls_codec_derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize", +] + +[[package]] +name = "tls_codec" +version = "0.4.2-pre.1" +source = "git+https://github.com/rustcrypto/formats#ef837bce43803eebc99922c6552b1cb9b2a01a03" +dependencies = [ + "serde", + "tls_codec_derive 0.4.1 (git+https://github.com/rustcrypto/formats)", "zeroize", ] @@ -5005,6 +5026,16 @@ dependencies = [ "syn 2.0.53", ] +[[package]] +name = "tls_codec_derive" +version = "0.4.1" +source = "git+https://github.com/rustcrypto/formats#ef837bce43803eebc99922c6552b1cb9b2a01a03" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + [[package]] name = "tokio" version = "1.36.0" @@ -5129,7 +5160,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.8", + "toml_edit 0.22.9", ] [[package]] @@ -5178,9 +5209,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.8" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap 2.2.5", "serde", @@ -5654,6 +5685,31 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasm-bindgen-test" +version = "0.3.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" +dependencies = [ + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -6039,7 +6095,7 @@ dependencies = [ "smart-default", "tempfile", "thiserror", - "tls_codec", + "tls_codec 0.4.1", "tokio", "toml 0.7.8", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 336e61a6c..fef00f4cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,10 +30,10 @@ futures = "0.3.30" futures-core = "0.3.30" hex = "0.4.3" log = "0.4.20" -openmls = { git = "https://github.com/xmtp/openmls", rev = "0da7dcb" } -openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "0da7dcb" } -openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "0da7dcb" } -openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "0da7dcb" } +openmls = { git = "https://github.com/xmtp/openmls", rev = "4eee1fc" } +openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "4eee1fc" } +openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "4eee1fc" } +openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "4eee1fc" } prost = "^0.12" prost-types = "^0.12" rand = "0.8.5" diff --git a/bindings_ffi/Cargo.lock b/bindings_ffi/Cargo.lock index f5f08b14c..e1448f380 100644 --- a/bindings_ffi/Cargo.lock +++ b/bindings_ffi/Cargo.lock @@ -700,6 +700,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + [[package]] name = "const-hex" version = "1.10.0" @@ -1901,7 +1911,7 @@ dependencies = [ "hpke-rs-crypto", "log", "serde", - "tls_codec", + "tls_codec 0.4.0", "zeroize", ] @@ -2556,7 +2566,7 @@ dependencies = [ [[package]] name = "openmls" version = "0.5.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "backtrace", "itertools 0.10.5", @@ -2571,26 +2581,27 @@ dependencies = [ "serde", "serde_json", "thiserror", - "tls_codec", + "tls_codec 0.4.2-pre.1", + "wasm-bindgen-test", ] [[package]] name = "openmls_basic_credential" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "ed25519-dalek", "openmls_traits", "p256", "rand", "serde", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] name = "openmls_memory_keystore" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "openmls_traits", "serde_json", @@ -2600,7 +2611,7 @@ dependencies = [ [[package]] name = "openmls_rust_crypto" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "aes-gcm", "chacha20poly1305", @@ -2618,16 +2629,16 @@ dependencies = [ "serde", "sha2", "thiserror", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] name = "openmls_traits" version = "0.2.0" -source = "git+https://github.com/xmtp/openmls?rev=0da7dcb#0da7dcb79d7f66e520041b54c34f82a10216cd72" +source = "git+https://github.com/xmtp/openmls?rev=4eee1fc#4eee1fc51acd70d267e7d208ed69f47dd32db115" dependencies = [ "serde", - "tls_codec", + "tls_codec 0.4.2-pre.1", ] [[package]] @@ -3787,6 +3798,12 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -4342,7 +4359,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38a1d5fcfa859f0ec2b5e111dc903890bd7dac7f34713232bf9aa4fd7cad7b2" dependencies = [ "serde", - "tls_codec_derive", + "tls_codec_derive 0.4.0", + "zeroize", +] + +[[package]] +name = "tls_codec" +version = "0.4.2-pre.1" +source = "git+https://github.com/rustcrypto/formats#ef837bce43803eebc99922c6552b1cb9b2a01a03" +dependencies = [ + "serde", + "tls_codec_derive 0.4.1", "zeroize", ] @@ -4357,6 +4384,16 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "tls_codec_derive" +version = "0.4.1" +source = "git+https://github.com/rustcrypto/formats#ef837bce43803eebc99922c6552b1cb9b2a01a03" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "tokio" version = "1.35.1" @@ -5020,6 +5057,31 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +[[package]] +name = "wasm-bindgen-test" +version = "0.3.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139bd73305d50e1c1c4333210c0db43d989395b64a237bd35c10ef3832a7f70c" +dependencies = [ + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70072aebfe5da66d2716002c729a14e4aec4da0e23cc2ea66323dac541c93928" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "web-sys" version = "0.3.67" @@ -5374,7 +5436,7 @@ dependencies = [ "serde_json", "smart-default", "thiserror", - "tls_codec", + "tls_codec 0.4.0", "tokio", "toml 0.7.8", "tracing", diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index 8c91dda0f..ba1932594 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -1,15 +1,16 @@ use std::{collections::HashSet, mem::Discriminant}; -use openmls::{ - framing::{MlsMessageIn, MlsMessageInBody}, - group::GroupEpoch, +use openmls:: { + framing::{MlsMessageBodyIn, MlsMessageIn}, + group:: GroupEpoch, messages::Welcome, - prelude::TlsSerializeTrait, + prelude::tls_codec::Serialize, }; + use openmls_traits::OpenMlsProvider; +use openmls::prelude::tls_codec::{Deserialize, Error as TlsSerializationError}; use prost::EncodeError; use thiserror::Error; -use tls_codec::{Deserialize, Error as TlsSerializationError}; use xmtp_proto::{ api_client::XmtpMlsClient, @@ -108,7 +109,7 @@ pub enum MessageProcessingError { #[error("tls deserialization: {0}")] TlsDeserialization(#[from] tls_codec::Error), #[error("unsupported message type: {0:?}")] - UnsupportedMessageType(Discriminant), + UnsupportedMessageType(Discriminant), #[error("commit validation")] CommitValidation(#[from] CommitValidationError), #[error("codec")] @@ -266,8 +267,7 @@ where let kp = self .identity .new_key_package(&self.mls_provider(&connection))?; - let kp_bytes = kp.tls_serialize_detached()?; - + let kp_bytes = kp.tls_serialize_detached().unwrap(); self.api_client.upload_key_package(kp_bytes).await?; Ok(()) @@ -486,7 +486,7 @@ pub fn deserialize_welcome(welcome_bytes: &Vec) -> Result Ok(welcome), + MlsMessageBodyIn::Welcome(welcome) => Ok(welcome), _ => Err(ClientError::Generic( "unexpected message type in welcome".to_string(), )), diff --git a/xmtp_mls/src/groups/intents.rs b/xmtp_mls/src/groups/intents.rs index 3baee0bdf..a39328630 100644 --- a/xmtp_mls/src/groups/intents.rs +++ b/xmtp_mls/src/groups/intents.rs @@ -1,7 +1,7 @@ use openmls::prelude::MlsMessageOut; use prost::{DecodeError, Message}; use thiserror::Error; -use tls_codec::Serialize; +use openmls::prelude::tls_codec::Serialize; use xmtp_proto::xmtp::mls::database::{ add_members_data::{Version as AddMembersVersion, V1 as AddMembersV1}, @@ -318,7 +318,7 @@ impl PostCommitAction { welcome: MlsMessageOut, installations: Vec, ) -> Result { - let welcome_bytes = welcome.tls_serialize_detached()?; + let welcome_bytes = welcome.tls_serialize_detached().unwrap(); Ok(Self::SendWelcomes(SendWelcomesAction::new( installations, diff --git a/xmtp_mls/src/groups/sync.rs b/xmtp_mls/src/groups/sync.rs index dc379dfb6..3b499332f 100644 --- a/xmtp_mls/src/groups/sync.rs +++ b/xmtp_mls/src/groups/sync.rs @@ -5,14 +5,14 @@ use openmls::{ framing::ProtocolMessage, group::MergePendingCommitError, prelude::{ - LeafNodeIndex, MlsGroup as OpenMlsGroup, MlsMessageIn, MlsMessageInBody, PrivateMessageIn, + LeafNodeIndex, MlsGroup as OpenMlsGroup, MlsMessageIn, MlsMessageBodyIn, PrivateMessageIn, ProcessedMessage, ProcessedMessageContent, Sender, }, prelude_test::KeyPackage, }; use openmls_traits::OpenMlsProvider; use prost::Message; -use tls_codec::{Deserialize, Serialize}; +use openmls::prelude::tls_codec::{Deserialize, Serialize}; use xmtp_proto::{ api_client::XmtpMlsClient, @@ -300,10 +300,10 @@ where envelope: &GroupMessageV1, allow_epoch_increment: bool, ) -> Result<(), MessageProcessingError> { - let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data)?; + let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data).unwrap(); let message = match mls_message_in.extract() { - MlsMessageInBody::PrivateMessage(message) => Ok(message), + MlsMessageBodyIn::PrivateMessage(message) => Ok(message), other => Err(MessageProcessingError::UnsupportedMessageType( discriminant(&other), )), @@ -517,7 +517,7 @@ where intent_data.message.as_slice(), )?; - let msg_bytes = msg.tls_serialize_detached()?; + let msg_bytes = msg.tls_serialize_detached().unwrap(); Ok((msg_bytes, None)) } IntentKind::AddMembers => { @@ -542,7 +542,7 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached()?; + let commit_bytes = commit.tls_serialize_detached().unwrap(); let installations = key_packages .iter() @@ -595,7 +595,7 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached()?; + let commit_bytes = commit.tls_serialize_detached().unwrap(); Ok((commit_bytes, None)) } @@ -603,7 +603,7 @@ where let (commit, _, _) = openmls_group.self_update(provider, &self.client.identity.installation_keys)?; - Ok((commit.tls_serialize_detached()?, None)) + Ok((commit.tls_serialize_detached().unwrap(), None)) } } } diff --git a/xmtp_mls/src/hpke.rs b/xmtp_mls/src/hpke.rs index 497e28905..274f0cb23 100644 --- a/xmtp_mls/src/hpke.rs +++ b/xmtp_mls/src/hpke.rs @@ -6,7 +6,7 @@ use openmls_traits::types::HpkeCiphertext; use openmls_traits::OpenMlsProvider; use openmls_traits::{key_store::OpenMlsKeyStore, types::HpkePrivateKey}; use thiserror::Error; -use tls_codec::{Deserialize, Serialize}; +use openmls::prelude::tls_codec::{Deserialize, Serialize}; use crate::{ configuration::{CIPHERSUITE, WELCOME_HPKE_LABEL}, @@ -34,7 +34,7 @@ pub fn encrypt_welcome(welcome_payload: &[u8], hpke_key: &[u8]) -> Result(hpke_public_key) .ok_or(HpkeError::KeyNotFound)?; - let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext)?; + let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext).unwrap(); Ok(decrypt_with_label( private_key.to_vec().as_slice(), diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index 5098ec33b..ca7bed2e7 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -15,7 +15,7 @@ use openmls_basic_credential::SignatureKeyPair; use openmls_traits::{types::CryptoError, OpenMlsProvider}; use prost::Message; use thiserror::Error; -use tls_codec::Serialize; +use openmls::prelude::tls_codec::Serialize; use xmtp_cryptography::signature::SignatureError; use xmtp_proto::{ api_client::XmtpMlsClient, xmtp::mls::message_contents::MlsCredential as CredentialProto, @@ -143,7 +143,7 @@ impl Identity { // Register the installation with the server let kp = self.new_key_package(provider)?; - let kp_bytes = kp.tls_serialize_detached()?; + let kp_bytes = kp.tls_serialize_detached().unwrap(); api_client.register_installation(kp_bytes).await?; // Only persist the installation keys if the registration was successful diff --git a/xmtp_mls/src/verified_key_package.rs b/xmtp_mls/src/verified_key_package.rs index 5fff73eb1..895d72f97 100644 --- a/xmtp_mls/src/verified_key_package.rs +++ b/xmtp_mls/src/verified_key_package.rs @@ -1,7 +1,7 @@ use openmls::prelude::{KeyPackage, KeyPackageIn, KeyPackageVerifyError}; use openmls_rust_crypto::RustCrypto; use thiserror::Error; -use tls_codec::{Deserialize, Error as TlsSerializationError}; +use openmls::prelude::tls_codec::{Deserialize, Error as TlsSerializationError}; use crate::{ configuration::MLS_PROTOCOL_VERSION, From 82bb5b15ad2502179fccdef33bc6aa2e65a02b67 Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Wed, 20 Mar 2024 16:32:22 -0700 Subject: [PATCH 03/17] Resolve errors in identity.rs --- xmtp_mls/src/identity.rs | 7 +++---- xmtp_mls/src/verified_key_package.rs | 9 +++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index ca7bed2e7..4f931ce9d 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -7,7 +7,7 @@ use openmls::{ prelude::{ Capabilities, Credential as OpenMlsCredential, CredentialType, CredentialWithKey, CryptoConfig, Extension, ExtensionType, Extensions, KeyPackage, KeyPackageNewError, - Lifetime, + Lifetime, tls_codec::Serialize, }, versions::ProtocolVersion, }; @@ -15,7 +15,6 @@ use openmls_basic_credential::SignatureKeyPair; use openmls_traits::{types::CryptoError, OpenMlsProvider}; use prost::Message; use thiserror::Error; -use openmls::prelude::tls_codec::Serialize; use xmtp_cryptography::signature::SignatureError; use xmtp_proto::{ api_client::XmtpMlsClient, xmtp::mls::message_contents::MlsCredential as CredentialProto, @@ -99,7 +98,7 @@ impl Identity { Credential::create_from_legacy(&signature_keys, legacy_signed_private_key)?; let credential_proto: CredentialProto = credential.into(); let mls_credential = - OpenMlsCredential::new(credential_proto.encode_to_vec(), CredentialType::Basic)?; + OpenMlsCredential::new(CredentialType::Basic, credential_proto.encode_to_vec()); info!("Successfully created identity from legacy key"); Ok(Self { account_address, @@ -137,7 +136,7 @@ impl Identity { )? .into(); let credential = - OpenMlsCredential::new(credential_proto.encode_to_vec(), CredentialType::Basic)?; + OpenMlsCredential::new(CredentialType::Basic, credential_proto.encode_to_vec()); self.set_credential(credential)?; } diff --git a/xmtp_mls/src/verified_key_package.rs b/xmtp_mls/src/verified_key_package.rs index 895d72f97..f3500359a 100644 --- a/xmtp_mls/src/verified_key_package.rs +++ b/xmtp_mls/src/verified_key_package.rs @@ -1,7 +1,12 @@ -use openmls::prelude::{KeyPackage, KeyPackageIn, KeyPackageVerifyError}; +use openmls::prelude::{ + KeyPackage, KeyPackageIn, KeyPackageVerifyError, + tls_codec::{ + Deserialize, Error as TlsSerializationError + }, + }; + use openmls_rust_crypto::RustCrypto; use thiserror::Error; -use openmls::prelude::tls_codec::{Deserialize, Error as TlsSerializationError}; use crate::{ configuration::MLS_PROTOCOL_VERSION, From bc911c4c15258f072498d01cbf31e9b1cc5e362b Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Thu, 21 Mar 2024 15:21:02 -0700 Subject: [PATCH 04/17] Update to New BasicCredential API --- xmtp_mls/src/client.rs | 3 +++ xmtp_mls/src/groups/members.rs | 9 +++++-- xmtp_mls/src/groups/sync.rs | 16 +++++++++++-- xmtp_mls/src/groups/validated_commit.rs | 20 ++++++++++++---- xmtp_mls/src/verified_key_package.rs | 31 +++++++++++++++++-------- 5 files changed, 61 insertions(+), 18 deletions(-) diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index ba1932594..98b31e10f 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -1,6 +1,7 @@ use std::{collections::HashSet, mem::Discriminant}; use openmls:: { + credentials::errors::BasicCredentialError, framing::{MlsMessageBodyIn, MlsMessageIn}, group:: GroupEpoch, messages::Welcome, @@ -120,6 +121,8 @@ pub enum MessageProcessingError { EpochIncrementNotAllowed, #[error("Welcome processing error: {0}")] WelcomeProcessing(String), + #[error("wrong credential type")] + WrongCredentialType(#[from] BasicCredentialError), } impl crate::retry::RetryableError for MessageProcessingError { diff --git a/xmtp_mls/src/groups/members.rs b/xmtp_mls/src/groups/members.rs index 3f03a01a5..19e21dd92 100644 --- a/xmtp_mls/src/groups/members.rs +++ b/xmtp_mls/src/groups/members.rs @@ -1,6 +1,10 @@ use std::collections::HashMap; -use openmls::group::MlsGroup as OpenMlsGroup; +use openmls::{ + credentials::BasicCredential, + group::MlsGroup as OpenMlsGroup +}; + use xmtp_proto::api_client::XmtpMlsClient; use super::{GroupError, MlsGroup}; @@ -37,8 +41,9 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result = openmls_group .members() .filter_map(|member| { + let basic_credential = BasicCredential::try_from(&member.credential).unwrap(); Identity::get_validated_account_address( - member.credential.identity(), + basic_credential.identity(), &member.signature_key, ) .ok() diff --git a/xmtp_mls/src/groups/sync.rs b/xmtp_mls/src/groups/sync.rs index 3b499332f..1a757751c 100644 --- a/xmtp_mls/src/groups/sync.rs +++ b/xmtp_mls/src/groups/sync.rs @@ -2,6 +2,10 @@ use std::{collections::HashMap, mem::discriminant}; use log::debug; use openmls::{ + credentials::{ + BasicCredential, + errors::BasicCredentialError, + }, framing::ProtocolMessage, group::MergePendingCommitError, prelude::{ @@ -773,8 +777,12 @@ fn validate_message_sender( if let Sender::Member(leaf_node_index) = decrypted_message.sender() { if let Some(member) = openmls_group.member_at(*leaf_node_index) { if member.credential.eq(decrypted_message.credential()) { + let basic_credential = + BasicCredential::try_from(&member.credential) + .map_err(|_| BasicCredentialError::WrongCredentialType)?; + sender_account_address = Identity::get_validated_account_address( - member.credential.identity(), + basic_credential.identity(), &member.signature_key, ) .ok(); @@ -784,9 +792,13 @@ fn validate_message_sender( } if sender_account_address.is_none() { + let basic_credential = + BasicCredential::try_from(decrypted_message.credential()) + .map_err(|_| BasicCredentialError::WrongCredentialType)?; + return Err(MessageProcessingError::InvalidSender { message_time_ns: message_created_ns, - credential: decrypted_message.credential().identity().to_vec(), + credential: basic_credential.identity().to_vec(), }); } Ok(( diff --git a/xmtp_mls/src/groups/validated_commit.rs b/xmtp_mls/src/groups/validated_commit.rs index 4fb72de36..e7f806ce6 100644 --- a/xmtp_mls/src/groups/validated_commit.rs +++ b/xmtp_mls/src/groups/validated_commit.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use openmls::{ - credentials::CredentialType, + credentials::{BasicCredential, errors::BasicCredentialError, CredentialType}, group::{QueuedAddProposal, QueuedRemoveProposal}, prelude::{LeafNodeIndex, MlsGroup as OpenMlsGroup, Sender, StagedCommit}, }; @@ -47,6 +47,8 @@ pub enum CommitValidationError { GroupMetadata(#[from] GroupMetadataError), #[error("invalid application id")] InvalidApplicationId, + #[error("wrong credential type")] + WrongCredentialType(#[from] BasicCredentialError), } // A participant in a commit. Could be the actor or the subject of a proposal @@ -164,8 +166,13 @@ fn extract_actor( ) -> Result { if let Some(leaf_node) = group.member_at(leaf_index) { let signature_key = leaf_node.signature_key.as_slice(); + + let basic_credential = + BasicCredential::try_from(&leaf_node.credential) + .map_err(|_| BasicCredentialError::WrongCredentialType)?; + let account_address = - Identity::get_validated_account_address(leaf_node.credential.identity(), signature_key) + Identity::get_validated_account_address(basic_credential.identity(), signature_key) .map_err(|_| CommitValidationError::InvalidActorCredential)?; let is_creator = account_address.eq(&group_metadata.creator_account_address); @@ -215,8 +222,13 @@ fn extract_identity_from_remove( if let Some(member) = group.member_at(leaf_index) { let signature_key = member.signature_key.as_slice(); + + let basic_credential = + BasicCredential::try_from(&member.credential) + .map_err(|_| BasicCredentialError::WrongCredentialType)?; + let account_address = - Identity::get_validated_account_address(member.credential.identity(), signature_key) + Identity::get_validated_account_address(basic_credential.identity(), signature_key) .map_err(|_| CommitValidationError::InvalidSubjectCredential)?; let is_creator = account_address.eq(&group_metadata.creator_account_address); @@ -503,7 +515,7 @@ mod tests { &bola.identity.installation_keys, CredentialWithKey { // Broken credential - credential: Credential::new(vec![1, 2, 3], CredentialType::Basic).unwrap(), + credential: Credential::new(CredentialType::Basic, vec![1, 2, 3]), signature_key: bola.identity.installation_keys.to_public_vec().into(), }, ) diff --git a/xmtp_mls/src/verified_key_package.rs b/xmtp_mls/src/verified_key_package.rs index f3500359a..9e58af1c5 100644 --- a/xmtp_mls/src/verified_key_package.rs +++ b/xmtp_mls/src/verified_key_package.rs @@ -1,17 +1,20 @@ -use openmls::prelude::{ - KeyPackage, KeyPackageIn, KeyPackageVerifyError, +use openmls::{ + credentials::{ + BasicCredential, errors::BasicCredentialError + }, + prelude::{ tls_codec::{ - Deserialize, Error as TlsSerializationError - }, - }; + Deserialize, Error as TlsSerializationError + }, + KeyPackage, KeyPackageIn, KeyPackageVerifyError + } +}; use openmls_rust_crypto::RustCrypto; use thiserror::Error; use crate::{ - configuration::MLS_PROTOCOL_VERSION, - identity::{Identity, IdentityError}, - types::Address, + configuration::MLS_PROTOCOL_VERSION, identity::{Identity, IdentityError}, types::Address }; #[derive(Debug, Error)] @@ -26,10 +29,14 @@ pub enum KeyPackageVerificationError { InvalidApplicationId, #[error("application id ({0}) does not match the credential address ({1}).")] ApplicationIdCredentialMismatch(String, String), + #[error("invalid credential")] + InvalidCredential, #[error("invalid lifetime")] InvalidLifetime, #[error("generic: {0}")] Generic(String), + #[error("wrong credential type")] + WrongCredentialType(#[from] BasicCredentialError), } #[derive(Debug, Clone, PartialEq)] @@ -49,9 +56,13 @@ impl VerifiedKeyPackage { // Validates starting with a KeyPackage (which is already validated by OpenMLS) pub fn from_key_package(kp: KeyPackage) -> Result { let leaf_node = kp.leaf_node(); - let identity_bytes = leaf_node.credential().identity(); + + let basic_credential = + BasicCredential::try_from(leaf_node.credential()) + .map_err(|_| BasicCredentialError::WrongCredentialType)?; + let pub_key_bytes = leaf_node.signature_key().as_slice(); - let account_address = identity_to_account_address(identity_bytes, pub_key_bytes)?; + let account_address = identity_to_account_address(basic_credential.identity(), pub_key_bytes)?; let application_id = extract_application_id(&kp)?; if !account_address.eq(&application_id) { return Err( From ca6b63dd50392407204e273cd83adab575900e5b Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Fri, 22 Mar 2024 12:05:20 -0700 Subject: [PATCH 05/17] Standardize Errors Passed --- xmtp_mls/src/client.rs | 5 +++-- xmtp_mls/src/groups/intents.rs | 7 +++++-- xmtp_mls/src/groups/mod.rs | 2 +- xmtp_mls/src/groups/sync.rs | 16 +++++++++++----- xmtp_mls/src/hpke.rs | 10 ++++++---- xmtp_mls/src/identity.rs | 8 +++++--- 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index 98b31e10f..f3f57b0e8 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -108,7 +108,7 @@ pub enum MessageProcessingError { #[error("storage error: {0}")] Storage(#[from] crate::storage::StorageError), #[error("tls deserialization: {0}")] - TlsDeserialization(#[from] tls_codec::Error), + TlsDeserialization(#[from] openmls::prelude::Error), #[error("unsupported message type: {0:?}")] UnsupportedMessageType(Discriminant), #[error("commit validation")] @@ -270,7 +270,8 @@ where let kp = self .identity .new_key_package(&self.mls_provider(&connection))?; - let kp_bytes = kp.tls_serialize_detached().unwrap(); + let kp_bytes = kp.tls_serialize_detached() + .map_err(|e| ClientError::Serialization(e))?; self.api_client.upload_key_package(kp_bytes).await?; Ok(()) diff --git a/xmtp_mls/src/groups/intents.rs b/xmtp_mls/src/groups/intents.rs index a39328630..be901f160 100644 --- a/xmtp_mls/src/groups/intents.rs +++ b/xmtp_mls/src/groups/intents.rs @@ -1,4 +1,4 @@ -use openmls::prelude::MlsMessageOut; +use openmls::prelude::{MlsMessageOut, tls_codec::Error as TlsSerializationError,}; use prost::{DecodeError, Message}; use thiserror::Error; use openmls::prelude::tls_codec::Serialize; @@ -32,6 +32,8 @@ pub enum IntentError { TlsCodec(#[from] tls_codec::Error), #[error("generic: {0}")] Generic(String), + #[error("serialization error: {0}")] + TlsSerialization(#[from] TlsSerializationError), } #[derive(Debug, Clone)] @@ -318,7 +320,8 @@ impl PostCommitAction { welcome: MlsMessageOut, installations: Vec, ) -> Result { - let welcome_bytes = welcome.tls_serialize_detached().unwrap(); + let welcome_bytes = welcome.tls_serialize_detached() + .map_err(|e| IntentError::TlsSerialization(e))?; Ok(Self::SendWelcomes(SendWelcomesAction::new( installations, diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 450287ba2..863d24413 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -68,7 +68,7 @@ pub enum GroupError { #[error("create message: {0}")] CreateMessage(#[from] openmls::prelude::CreateMessageError), #[error("tls serialization: {0}")] - TlsSerialization(#[from] tls_codec::Error), + TlsSerialization(#[from] openmls::prelude::Error), #[error("add members: {0}")] AddMembers(#[from] openmls::prelude::AddMembersError), #[error("remove members: {0}")] diff --git a/xmtp_mls/src/groups/sync.rs b/xmtp_mls/src/groups/sync.rs index 1a757751c..de1a33643 100644 --- a/xmtp_mls/src/groups/sync.rs +++ b/xmtp_mls/src/groups/sync.rs @@ -304,7 +304,8 @@ where envelope: &GroupMessageV1, allow_epoch_increment: bool, ) -> Result<(), MessageProcessingError> { - let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data).unwrap(); + let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data) + .map_err(|e| MessageProcessingError::TlsDeserialization(e))?; let message = match mls_message_in.extract() { MlsMessageBodyIn::PrivateMessage(message) => Ok(message), @@ -521,7 +522,8 @@ where intent_data.message.as_slice(), )?; - let msg_bytes = msg.tls_serialize_detached().unwrap(); + let msg_bytes = msg.tls_serialize_detached() + .map_err(|e| GroupError::TlsSerialization(e))?; Ok((msg_bytes, None)) } IntentKind::AddMembers => { @@ -546,7 +548,8 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached().unwrap(); + let commit_bytes = commit.tls_serialize_detached() + .map_err(|e| GroupError::TlsSerialization(e))?; let installations = key_packages .iter() @@ -599,7 +602,8 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached().unwrap(); + let commit_bytes = commit.tls_serialize_detached() + .map_err(|e| GroupError::TlsSerialization(e))?; Ok((commit_bytes, None)) } @@ -607,7 +611,9 @@ where let (commit, _, _) = openmls_group.self_update(provider, &self.client.identity.installation_keys)?; - Ok((commit.tls_serialize_detached().unwrap(), None)) + Ok((commit.tls_serialize_detached() + .map_err(|e| GroupError::TlsSerialization(e))?, + None)) } } } diff --git a/xmtp_mls/src/hpke.rs b/xmtp_mls/src/hpke.rs index 274f0cb23..d462f2f18 100644 --- a/xmtp_mls/src/hpke.rs +++ b/xmtp_mls/src/hpke.rs @@ -17,8 +17,8 @@ use crate::{ pub enum HpkeError { #[error("OpenMLS HPKE error: {0}")] Hpke(#[from] OpenmlsHpkeError), - #[error("TLS codec error: {0}")] - Tls(#[from] tls_codec::Error), + #[error("tls error: {0}")] + TlsError(#[from] openmls::prelude::Error), #[error("Key not found")] KeyNotFound, } @@ -34,7 +34,8 @@ pub fn encrypt_welcome(welcome_payload: &[u8], hpke_key: &[u8]) -> Result(hpke_public_key) .ok_or(HpkeError::KeyNotFound)?; - let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext).unwrap(); + let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext) + .map_err(|e| HpkeError::TlsError(e))?; Ok(decrypt_with_label( private_key.to_vec().as_slice(), diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index 4f931ce9d..10b04d7d1 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -52,7 +52,7 @@ pub enum IdentityError { #[error("wallet signature required - please sign the text produced by text_to_sign()")] WalletSignatureRequired, #[error("tls serialization: {0}")] - TlsSerialization(#[from] tls_codec::Error), + TlsSerialization(#[from] openmls::prelude::Error), #[error("api error: {0}")] ApiError(#[from] xmtp_proto::api_client::Error), #[error("OpenMLS credential error: {0}")] @@ -93,7 +93,8 @@ impl Identity { legacy_signed_private_key: Vec, ) -> Result { info!("Creating identity from legacy key"); - let signature_keys = SignatureKeyPair::new(CIPHERSUITE.signature_algorithm()).unwrap(); + let signature_keys = SignatureKeyPair::new(CIPHERSUITE.signature_algorithm()) + .map_err(|e| IdentityError::KeyGenerationError(e))?; let credential = Credential::create_from_legacy(&signature_keys, legacy_signed_private_key)?; let credential_proto: CredentialProto = credential.into(); @@ -142,7 +143,8 @@ impl Identity { // Register the installation with the server let kp = self.new_key_package(provider)?; - let kp_bytes = kp.tls_serialize_detached().unwrap(); + let kp_bytes = kp.tls_serialize_detached() + .map_err(|e| IdentityError::TlsSerialization(e))?; api_client.register_installation(kp_bytes).await?; // Only persist the installation keys if the registration was successful From 7b721cb2a552430b69463560e46bc0a4d9a0a643 Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Mon, 25 Mar 2024 17:36:36 -0700 Subject: [PATCH 06/17] Use StagedWelcome + Other Fixes --- mls_validation_service/src/handlers.rs | 36 +++++++++++++------------- xmtp_mls/src/groups/mod.rs | 15 +++++++---- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/mls_validation_service/src/handlers.rs b/mls_validation_service/src/handlers.rs index 448b483df..03522dae0 100644 --- a/mls_validation_service/src/handlers.rs +++ b/mls_validation_service/src/handlers.rs @@ -1,4 +1,4 @@ -use openmls::prelude::{MlsMessageIn, ProtocolMessage, TlsDeserializeTrait}; +use openmls::{credentials::BasicCredential, prelude::{tls_codec::Deserialize, MlsMessageIn, ProtocolMessage}}; use openmls_rust_crypto::RustCrypto; use tonic::{Request, Response, Status}; @@ -86,9 +86,10 @@ struct ValidateGroupMessageResult { fn validate_group_message(message: Vec) -> Result { let msg_result = MlsMessageIn::tls_deserialize(&mut message.as_slice()) - .map_err(|_| "failed to decode".to_string())?; + .map_err(|e| e.to_string())?; - let protocol_message: ProtocolMessage = msg_result.into(); + let protocol_message: ProtocolMessage = msg_result.try_into_protocol_message() + .map_err(|e| e.to_string())?; Ok(ValidateGroupMessageResult { group_id: serialize_group_id(protocol_message.group_id().as_slice()), @@ -108,15 +109,18 @@ fn validate_key_package(key_package_bytes: Vec) -> Result) -> Result Result { - let mut mls_group = - OpenMlsGroup::new_from_welcome(provider, &build_group_join_config(), welcome, None)?; - mls_group.save(provider.key_store())?; - let group_id = mls_group.group_id().to_vec(); + let mut mls_welcome = + // EM: Fix error handling here + StagedWelcome::new_from_welcome(provider, &build_group_join_config(), welcome, None) + .expect("Error creating staged join from Welcome") + .into_group(provider) + .expect("Error creating group from staged join"); + + mls_welcome.save(provider.key_store())?; + let group_id = mls_welcome.group_id().to_vec(); let to_store = StoredGroup::new(group_id, now_ns(), GroupMembershipState::Pending); let stored_group = provider.conn().insert_or_ignore_group(to_store)?; From 574322413c3dd17d9623e7979decccd4d831d966 Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Tue, 26 Mar 2024 10:50:22 -0700 Subject: [PATCH 07/17] Remove use of `.map_err` where appropriate --- xmtp_mls/src/client.rs | 14 +++++------ xmtp_mls/src/groups/intents.rs | 14 ++++------- xmtp_mls/src/groups/mod.rs | 6 ++--- xmtp_mls/src/groups/sync.rs | 31 +++++++------------------ xmtp_mls/src/groups/validated_commit.rs | 22 +++++++----------- xmtp_mls/src/hpke.rs | 12 ++++------ xmtp_mls/src/identity.rs | 12 ++++------ xmtp_mls/src/verified_key_package.rs | 11 ++++----- 8 files changed, 46 insertions(+), 76 deletions(-) diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index f3f57b0e8..abe75fc8e 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -5,11 +5,10 @@ use openmls:: { framing::{MlsMessageBodyIn, MlsMessageIn}, group:: GroupEpoch, messages::Welcome, - prelude::tls_codec::Serialize, + prelude::tls_codec::{Deserialize, Serialize, Error as TlsCodecError}, }; use openmls_traits::OpenMlsProvider; -use openmls::prelude::tls_codec::{Deserialize, Error as TlsSerializationError}; use prost::EncodeError; use thiserror::Error; @@ -64,8 +63,8 @@ pub enum ClientError { QueryError(#[from] xmtp_proto::api_client::Error), #[error("identity error: {0}")] Identity(#[from] crate::identity::IdentityError), - #[error("serialization error: {0}")] - Serialization(#[from] TlsSerializationError), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("key package verification: {0}")] KeyPackageVerification(#[from] KeyPackageVerificationError), #[error("syncing errors: {0:?}")] @@ -107,8 +106,8 @@ pub enum MessageProcessingError { Intent(#[from] IntentError), #[error("storage error: {0}")] Storage(#[from] crate::storage::StorageError), - #[error("tls deserialization: {0}")] - TlsDeserialization(#[from] openmls::prelude::Error), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("unsupported message type: {0:?}")] UnsupportedMessageType(Discriminant), #[error("commit validation")] @@ -270,8 +269,7 @@ where let kp = self .identity .new_key_package(&self.mls_provider(&connection))?; - let kp_bytes = kp.tls_serialize_detached() - .map_err(|e| ClientError::Serialization(e))?; + let kp_bytes = kp.tls_serialize_detached()?; self.api_client.upload_key_package(kp_bytes).await?; Ok(()) diff --git a/xmtp_mls/src/groups/intents.rs b/xmtp_mls/src/groups/intents.rs index be901f160..fee9a9732 100644 --- a/xmtp_mls/src/groups/intents.rs +++ b/xmtp_mls/src/groups/intents.rs @@ -1,7 +1,6 @@ -use openmls::prelude::{MlsMessageOut, tls_codec::Error as TlsSerializationError,}; +use openmls::prelude::{MlsMessageOut, tls_codec::{Error as TlsCodecError, Serialize}}; use prost::{DecodeError, Message}; use thiserror::Error; -use openmls::prelude::tls_codec::Serialize; use xmtp_proto::xmtp::mls::database::{ add_members_data::{Version as AddMembersVersion, V1 as AddMembersV1}, @@ -28,12 +27,10 @@ pub enum IntentError { Decode(#[from] DecodeError), #[error("key package verification: {0}")] KeyPackageVerification(#[from] KeyPackageVerificationError), - #[error("tls codec: {0}")] - TlsCodec(#[from] tls_codec::Error), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("generic: {0}")] - Generic(String), - #[error("serialization error: {0}")] - TlsSerialization(#[from] TlsSerializationError), + Generic(String) } #[derive(Debug, Clone)] @@ -320,8 +317,7 @@ impl PostCommitAction { welcome: MlsMessageOut, installations: Vec, ) -> Result { - let welcome_bytes = welcome.tls_serialize_detached() - .map_err(|e| IntentError::TlsSerialization(e))?; + let welcome_bytes = welcome.tls_serialize_detached()?; Ok(Self::SendWelcomes(SendWelcomesAction::new( installations, diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 634d9dd35..3d8c37f3b 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -40,7 +40,7 @@ use openmls::{ extensions::{Extension, Extensions, Metadata}, group::{MlsGroupCreateConfig, MlsGroupJoinConfig, StagedWelcome}, prelude::{ - CredentialWithKey, CryptoConfig, GroupId, MlsGroup as OpenMlsGroup, Welcome as MlsWelcome, + CredentialWithKey, CryptoConfig, Error as TlsCodecError, GroupId, MlsGroup as OpenMlsGroup, Welcome as MlsWelcome, WireFormatPolicy, }, }; @@ -67,8 +67,8 @@ pub enum GroupError { Intent(#[from] IntentError), #[error("create message: {0}")] CreateMessage(#[from] openmls::prelude::CreateMessageError), - #[error("tls serialization: {0}")] - TlsSerialization(#[from] openmls::prelude::Error), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("add members: {0}")] AddMembers(#[from] openmls::prelude::AddMembersError), #[error("remove members: {0}")] diff --git a/xmtp_mls/src/groups/sync.rs b/xmtp_mls/src/groups/sync.rs index de1a33643..cd00f7283 100644 --- a/xmtp_mls/src/groups/sync.rs +++ b/xmtp_mls/src/groups/sync.rs @@ -2,21 +2,18 @@ use std::{collections::HashMap, mem::discriminant}; use log::debug; use openmls::{ - credentials::{ - BasicCredential, - errors::BasicCredentialError, - }, + credentials::BasicCredential, framing::ProtocolMessage, group::MergePendingCommitError, prelude::{ LeafNodeIndex, MlsGroup as OpenMlsGroup, MlsMessageIn, MlsMessageBodyIn, PrivateMessageIn, ProcessedMessage, ProcessedMessageContent, Sender, + tls_codec::{Deserialize,Serialize} }, prelude_test::KeyPackage, }; use openmls_traits::OpenMlsProvider; use prost::Message; -use openmls::prelude::tls_codec::{Deserialize, Serialize}; use xmtp_proto::{ api_client::XmtpMlsClient, @@ -304,8 +301,7 @@ where envelope: &GroupMessageV1, allow_epoch_increment: bool, ) -> Result<(), MessageProcessingError> { - let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data) - .map_err(|e| MessageProcessingError::TlsDeserialization(e))?; + let mls_message_in = MlsMessageIn::tls_deserialize_exact(&envelope.data)?; let message = match mls_message_in.extract() { MlsMessageBodyIn::PrivateMessage(message) => Ok(message), @@ -522,8 +518,7 @@ where intent_data.message.as_slice(), )?; - let msg_bytes = msg.tls_serialize_detached() - .map_err(|e| GroupError::TlsSerialization(e))?; + let msg_bytes = msg.tls_serialize_detached()?; Ok((msg_bytes, None)) } IntentKind::AddMembers => { @@ -548,8 +543,7 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached() - .map_err(|e| GroupError::TlsSerialization(e))?; + let commit_bytes = commit.tls_serialize_detached()?; let installations = key_packages .iter() @@ -602,8 +596,7 @@ where ValidatedCommit::from_staged_commit(staged_commit, openmls_group)?; } - let commit_bytes = commit.tls_serialize_detached() - .map_err(|e| GroupError::TlsSerialization(e))?; + let commit_bytes = commit.tls_serialize_detached()?; Ok((commit_bytes, None)) } @@ -611,9 +604,7 @@ where let (commit, _, _) = openmls_group.self_update(provider, &self.client.identity.installation_keys)?; - Ok((commit.tls_serialize_detached() - .map_err(|e| GroupError::TlsSerialization(e))?, - None)) + Ok((commit.tls_serialize_detached()?,None)) } } } @@ -784,9 +775,7 @@ fn validate_message_sender( if let Some(member) = openmls_group.member_at(*leaf_node_index) { if member.credential.eq(decrypted_message.credential()) { let basic_credential = - BasicCredential::try_from(&member.credential) - .map_err(|_| BasicCredentialError::WrongCredentialType)?; - + BasicCredential::try_from(&member.credential)?; sender_account_address = Identity::get_validated_account_address( basic_credential.identity(), &member.signature_key, @@ -799,9 +788,7 @@ fn validate_message_sender( if sender_account_address.is_none() { let basic_credential = - BasicCredential::try_from(decrypted_message.credential()) - .map_err(|_| BasicCredentialError::WrongCredentialType)?; - + BasicCredential::try_from(decrypted_message.credential())?; return Err(MessageProcessingError::InvalidSender { message_time_ns: message_created_ns, credential: basic_credential.identity().to_vec(), diff --git a/xmtp_mls/src/groups/validated_commit.rs b/xmtp_mls/src/groups/validated_commit.rs index e7f806ce6..6a11e24ae 100644 --- a/xmtp_mls/src/groups/validated_commit.rs +++ b/xmtp_mls/src/groups/validated_commit.rs @@ -16,7 +16,7 @@ use super::{ members::aggregate_member_list, }; use crate::{ - identity::Identity, + identity::{Identity, IdentityError}, types::Address, verified_key_package::{KeyPackageVerificationError, VerifiedKeyPackage}, }; @@ -45,10 +45,12 @@ pub enum CommitValidationError { ListMembers(String), #[error("Failed to parse group metadata: {0}")] GroupMetadata(#[from] GroupMetadataError), + #[error("Failed to validate identity: {0}")] + IdentityValidation(#[from] IdentityError), #[error("invalid application id")] InvalidApplicationId, - #[error("wrong credential type")] - WrongCredentialType(#[from] BasicCredentialError), + #[error("Credential error")] + CredentialError(#[from] BasicCredentialError), } // A participant in a commit. Could be the actor or the subject of a proposal @@ -168,12 +170,9 @@ fn extract_actor( let signature_key = leaf_node.signature_key.as_slice(); let basic_credential = - BasicCredential::try_from(&leaf_node.credential) - .map_err(|_| BasicCredentialError::WrongCredentialType)?; - + BasicCredential::try_from(&leaf_node.credential)?; let account_address = - Identity::get_validated_account_address(basic_credential.identity(), signature_key) - .map_err(|_| CommitValidationError::InvalidActorCredential)?; + Identity::get_validated_account_address(basic_credential.identity(), signature_key)?; let is_creator = account_address.eq(&group_metadata.creator_account_address); @@ -224,12 +223,9 @@ fn extract_identity_from_remove( let signature_key = member.signature_key.as_slice(); let basic_credential = - BasicCredential::try_from(&member.credential) - .map_err(|_| BasicCredentialError::WrongCredentialType)?; - + BasicCredential::try_from(&member.credential)?; let account_address = - Identity::get_validated_account_address(basic_credential.identity(), signature_key) - .map_err(|_| CommitValidationError::InvalidSubjectCredential)?; + Identity::get_validated_account_address(basic_credential.identity(), signature_key)?; let is_creator = account_address.eq(&group_metadata.creator_account_address); Ok(CommitParticipant { diff --git a/xmtp_mls/src/hpke.rs b/xmtp_mls/src/hpke.rs index d462f2f18..a5653a30a 100644 --- a/xmtp_mls/src/hpke.rs +++ b/xmtp_mls/src/hpke.rs @@ -6,7 +6,7 @@ use openmls_traits::types::HpkeCiphertext; use openmls_traits::OpenMlsProvider; use openmls_traits::{key_store::OpenMlsKeyStore, types::HpkePrivateKey}; use thiserror::Error; -use openmls::prelude::tls_codec::{Deserialize, Serialize}; +use openmls::prelude::tls_codec::{Deserialize, Error as TlsCodecError, Serialize}; use crate::{ configuration::{CIPHERSUITE, WELCOME_HPKE_LABEL}, @@ -17,8 +17,8 @@ use crate::{ pub enum HpkeError { #[error("OpenMLS HPKE error: {0}")] Hpke(#[from] OpenmlsHpkeError), - #[error("tls error: {0}")] - TlsError(#[from] openmls::prelude::Error), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("Key not found")] KeyNotFound, } @@ -34,8 +34,7 @@ pub fn encrypt_welcome(welcome_payload: &[u8], hpke_key: &[u8]) -> Result(hpke_public_key) .ok_or(HpkeError::KeyNotFound)?; - let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext) - .map_err(|e| HpkeError::TlsError(e))?; + let ciphertext = HpkeCiphertext::tls_deserialize_exact(ciphertext)?; Ok(decrypt_with_label( private_key.to_vec().as_slice(), diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index 10b04d7d1..466c510b1 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -7,7 +7,7 @@ use openmls::{ prelude::{ Capabilities, Credential as OpenMlsCredential, CredentialType, CredentialWithKey, CryptoConfig, Extension, ExtensionType, Extensions, KeyPackage, KeyPackageNewError, - Lifetime, tls_codec::Serialize, + Lifetime, tls_codec::{Error as TlsCodecError, Serialize} }, versions::ProtocolVersion, }; @@ -51,8 +51,8 @@ pub enum IdentityError { UninitializedIdentity, #[error("wallet signature required - please sign the text produced by text_to_sign()")] WalletSignatureRequired, - #[error("tls serialization: {0}")] - TlsSerialization(#[from] openmls::prelude::Error), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("api error: {0}")] ApiError(#[from] xmtp_proto::api_client::Error), #[error("OpenMLS credential error: {0}")] @@ -93,8 +93,7 @@ impl Identity { legacy_signed_private_key: Vec, ) -> Result { info!("Creating identity from legacy key"); - let signature_keys = SignatureKeyPair::new(CIPHERSUITE.signature_algorithm()) - .map_err(|e| IdentityError::KeyGenerationError(e))?; + let signature_keys = SignatureKeyPair::new(CIPHERSUITE.signature_algorithm())?; let credential = Credential::create_from_legacy(&signature_keys, legacy_signed_private_key)?; let credential_proto: CredentialProto = credential.into(); @@ -143,8 +142,7 @@ impl Identity { // Register the installation with the server let kp = self.new_key_package(provider)?; - let kp_bytes = kp.tls_serialize_detached() - .map_err(|e| IdentityError::TlsSerialization(e))?; + let kp_bytes = kp.tls_serialize_detached()?; api_client.register_installation(kp_bytes).await?; // Only persist the installation keys if the registration was successful diff --git a/xmtp_mls/src/verified_key_package.rs b/xmtp_mls/src/verified_key_package.rs index 9e58af1c5..9f57e6ad4 100644 --- a/xmtp_mls/src/verified_key_package.rs +++ b/xmtp_mls/src/verified_key_package.rs @@ -4,7 +4,7 @@ use openmls::{ }, prelude::{ tls_codec::{ - Deserialize, Error as TlsSerializationError + Deserialize, Error as TlsCodecError }, KeyPackage, KeyPackageIn, KeyPackageVerifyError } @@ -19,8 +19,8 @@ use crate::{ #[derive(Debug, Error)] pub enum KeyPackageVerificationError { - #[error("serialization error: {0}")] - Serialization(#[from] TlsSerializationError), + #[error("TLS Codec error: {0}")] + TlsError(#[from] TlsCodecError), #[error("mls validation: {0}")] MlsValidation(#[from] KeyPackageVerifyError), #[error("identity: {0}")] @@ -56,11 +56,8 @@ impl VerifiedKeyPackage { // Validates starting with a KeyPackage (which is already validated by OpenMLS) pub fn from_key_package(kp: KeyPackage) -> Result { let leaf_node = kp.leaf_node(); - let basic_credential = - BasicCredential::try_from(leaf_node.credential()) - .map_err(|_| BasicCredentialError::WrongCredentialType)?; - + BasicCredential::try_from(leaf_node.credential())?; let pub_key_bytes = leaf_node.signature_key().as_slice(); let account_address = identity_to_account_address(basic_credential.identity(), pub_key_bytes)?; let application_id = extract_application_id(&kp)?; From 2fb883455a78c4a6aedc390f3bb60284b8d8833e Mon Sep 17 00:00:00 2001 From: tuddman Date: Tue, 26 Mar 2024 21:38:12 +0100 Subject: [PATCH 08/17] fix: fixes error handling --- xmtp_mls/src/groups/members.rs | 2 +- xmtp_mls/src/groups/mod.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xmtp_mls/src/groups/members.rs b/xmtp_mls/src/groups/members.rs index 19e21dd92..59a59e574 100644 --- a/xmtp_mls/src/groups/members.rs +++ b/xmtp_mls/src/groups/members.rs @@ -41,7 +41,7 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result = openmls_group .members() .filter_map(|member| { - let basic_credential = BasicCredential::try_from(&member.credential).unwrap(); + let basic_credential = BasicCredential::try_from(&member.credential).ok()?; Identity::get_validated_account_address( basic_credential.identity(), &member.signature_key, diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 3d8c37f3b..37023e598 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -208,8 +208,7 @@ where // EM: Fix error handling here StagedWelcome::new_from_welcome(provider, &build_group_join_config(), welcome, None) .expect("Error creating staged join from Welcome") - .into_group(provider) - .expect("Error creating group from staged join"); + .into_group(provider)?; mls_welcome.save(provider.key_store())?; let group_id = mls_welcome.group_id().to_vec(); From 2b03bcdda6f632e7fb470cff42df15a808773169 Mon Sep 17 00:00:00 2001 From: tuddman Date: Tue, 26 Mar 2024 21:50:16 +0100 Subject: [PATCH 09/17] fix: fixes imports formatting --- mls_validation_service/src/handlers.rs | 30 ++++++++++++++----------- xmtp_mls/src/groups/intents.rs | 7 ++++-- xmtp_mls/src/groups/members.rs | 5 +---- xmtp_mls/src/groups/sync.rs | 15 ++++++------- xmtp_mls/src/groups/validated_commit.rs | 9 ++++---- xmtp_mls/src/hpke.rs | 2 +- xmtp_mls/src/identity.rs | 5 +++-- xmtp_mls/src/verified_key_package.rs | 22 +++++++++--------- 8 files changed, 48 insertions(+), 47 deletions(-) diff --git a/mls_validation_service/src/handlers.rs b/mls_validation_service/src/handlers.rs index 03522dae0..73add4eb8 100644 --- a/mls_validation_service/src/handlers.rs +++ b/mls_validation_service/src/handlers.rs @@ -1,4 +1,7 @@ -use openmls::{credentials::BasicCredential, prelude::{tls_codec::Deserialize, MlsMessageIn, ProtocolMessage}}; +use openmls::{ + credentials::BasicCredential, + prelude::{tls_codec::Deserialize, MlsMessageIn, ProtocolMessage}, +}; use openmls_rust_crypto::RustCrypto; use tonic::{Request, Response, Status}; @@ -85,10 +88,11 @@ struct ValidateGroupMessageResult { } fn validate_group_message(message: Vec) -> Result { - let msg_result = MlsMessageIn::tls_deserialize(&mut message.as_slice()) - .map_err(|e| e.to_string())?; + let msg_result = + MlsMessageIn::tls_deserialize(&mut message.as_slice()).map_err(|e| e.to_string())?; - let protocol_message: ProtocolMessage = msg_result.try_into_protocol_message() + let protocol_message: ProtocolMessage = msg_result + .try_into_protocol_message() .map_err(|e| e.to_string())?; Ok(ValidateGroupMessageResult { @@ -109,13 +113,9 @@ fn validate_key_package(key_package_bytes: Vec) -> Result) -> Result Result { let leaf_node = kp.leaf_node(); - let basic_credential = - BasicCredential::try_from(leaf_node.credential())?; + let basic_credential = BasicCredential::try_from(leaf_node.credential())?; let pub_key_bytes = leaf_node.signature_key().as_slice(); - let account_address = identity_to_account_address(basic_credential.identity(), pub_key_bytes)?; + let account_address = + identity_to_account_address(basic_credential.identity(), pub_key_bytes)?; let application_id = extract_application_id(&kp)?; if !account_address.eq(&application_id) { return Err( From ef47a3f12052aba52f153cc356f2c341e5be88f6 Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Tue, 26 Mar 2024 16:07:50 -0700 Subject: [PATCH 10/17] Cleanup StagedWelcome --- bindings_ffi/Cargo.lock | 4 +--- xmtp_mls/src/groups/mod.rs | 14 ++++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/bindings_ffi/Cargo.lock b/bindings_ffi/Cargo.lock index e1448f380..ce3dade1a 100644 --- a/bindings_ffi/Cargo.lock +++ b/bindings_ffi/Cargo.lock @@ -5415,7 +5415,6 @@ dependencies = [ name = "xmtp_mls" version = "0.1.0" dependencies = [ - "anyhow", "async-trait", "chrono", "diesel", @@ -5438,8 +5437,7 @@ dependencies = [ "thiserror", "tls_codec 0.4.0", "tokio", - "toml 0.7.8", - "tracing", + "toml 0.8.8", "xmtp_cryptography", "xmtp_proto", "xmtp_v2", diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index ba45718e6..1fe82434e 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -215,15 +215,13 @@ where provider: &XmtpOpenMlsProvider, welcome: MlsWelcome, ) -> Result { - let mut mls_welcome = - // EM: Fix error handling here - StagedWelcome::new_from_welcome(provider, &build_group_join_config(), welcome, None) - .expect("Error creating staged join from Welcome") - .into_group(provider)?; - - mls_welcome.save(provider.key_store())?; - let group_id = mls_welcome.group_id().to_vec(); + let mls_welcome = + StagedWelcome::new_from_welcome(provider, &build_group_join_config(), welcome, None)?; + let mut mls_group = mls_welcome.into_group(provider)?; + mls_group.save(provider.key_store())?; + + let group_id = mls_group.group_id().to_vec(); let to_store = StoredGroup::new(group_id, now_ns(), GroupMembershipState::Pending); let stored_group = provider.conn().insert_or_ignore_group(to_store)?; From 4d04bf675d63abd894fce515ad5be1e5e824fb1d Mon Sep 17 00:00:00 2001 From: Ethan Mateja Date: Tue, 26 Mar 2024 17:05:00 -0700 Subject: [PATCH 11/17] Update aggregate_member_list() .filter_map --- xmtp_mls/src/groups/members.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xmtp_mls/src/groups/members.rs b/xmtp_mls/src/groups/members.rs index 1cc79cd92..acd31d5dc 100644 --- a/xmtp_mls/src/groups/members.rs +++ b/xmtp_mls/src/groups/members.rs @@ -38,7 +38,11 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result = openmls_group .members() .filter_map(|member| { - let basic_credential = BasicCredential::try_from(&member.credential).ok()?; + let basic_credential = BasicCredential::try_from( + &member.credential + ) + .ok() + .map(|basic_credential| (basic_credential))?; Identity::get_validated_account_address( basic_credential.identity(), &member.signature_key, From 0ae906044dbc040d14075b7141a1d46948d966e9 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:13:46 -0700 Subject: [PATCH 12/17] Create basic credentials directly --- mls_validation_service/src/handlers.rs | 2 +- xmtp_mls/src/identity.rs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mls_validation_service/src/handlers.rs b/mls_validation_service/src/handlers.rs index 73add4eb8..e036f3368 100644 --- a/mls_validation_service/src/handlers.rs +++ b/mls_validation_service/src/handlers.rs @@ -196,7 +196,7 @@ mod tests { async fn test_validate_key_packages_happy_path() { let (identity, keypair, account_address) = generate_identity(); - let credential = OpenMlsCredential::new(CredentialType::Basic, identity); + let credential: OpenMlsCredential = BasicCredential::new(identity).unwrap().into(); let credential_with_key = CredentialWithKey { credential, signature_key: keypair.to_public_vec().into(), diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index 44d7e01b7..ab061b0d3 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -2,7 +2,10 @@ use std::sync::RwLock; use log::info; use openmls::{ - credentials::errors::CredentialError, + credentials::{ + errors::{BasicCredentialError, CredentialError}, + BasicCredential, + }, extensions::{errors::InvalidExtensionError, ApplicationIdExtension, LastResortExtension}, prelude::{ tls_codec::{Error as TlsCodecError, Serialize}, @@ -58,6 +61,8 @@ pub enum IdentityError { ApiError(#[from] xmtp_proto::api_client::Error), #[error("OpenMLS credential error: {0}")] OpenMlsCredentialError(#[from] CredentialError), + #[error("Basic Credential error: {0}")] + BasicCredential(#[from] BasicCredentialError), } #[derive(Debug)] @@ -136,8 +141,8 @@ impl Identity { recoverable_wallet_signature.unwrap(), )? .into(); - let credential = - OpenMlsCredential::new(CredentialType::Basic, credential_proto.encode_to_vec()); + let credential: OpenMlsCredential = + BasicCredential::new(credential_proto.encode_to_vec())?.into(); self.set_credential(credential)?; } From de668c2b4dee427c3bad4e9fbbf08a2c1585282c Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:20:23 -0700 Subject: [PATCH 13/17] One more case of Credential::new() --- xmtp_mls/src/groups/validated_commit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmtp_mls/src/groups/validated_commit.rs b/xmtp_mls/src/groups/validated_commit.rs index a03124666..1c6498d03 100644 --- a/xmtp_mls/src/groups/validated_commit.rs +++ b/xmtp_mls/src/groups/validated_commit.rs @@ -363,7 +363,7 @@ impl From for GroupMembershipChanges { #[cfg(test)] mod tests { use openmls::{ - credentials::{Credential, CredentialType, CredentialWithKey}, + credentials::{BasicCredential, Credential, CredentialType, CredentialWithKey}, group::config::CryptoConfig, prelude_test::KeyPackage, versions::ProtocolVersion, @@ -510,7 +510,7 @@ mod tests { &bola.identity.installation_keys, CredentialWithKey { // Broken credential - credential: Credential::new(CredentialType::Basic, vec![1, 2, 3]), + credential: BasicCredential::new(vec![1, 2, 3]).unwrap().into(), signature_key: bola.identity.installation_keys.to_public_vec().into(), }, ) From 1ca60bd24a31d7e4047c4e35d92266237b45b53b Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:25:38 -0700 Subject: [PATCH 14/17] One more --- mls_validation_service/src/handlers.rs | 2 +- xmtp_mls/src/groups/validated_commit.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mls_validation_service/src/handlers.rs b/mls_validation_service/src/handlers.rs index e036f3368..7067bb7cb 100644 --- a/mls_validation_service/src/handlers.rs +++ b/mls_validation_service/src/handlers.rs @@ -226,7 +226,7 @@ mod tests { let (identity, keypair, account_address) = generate_identity(); let (_, other_keypair, _) = generate_identity(); - let credential = OpenMlsCredential::new(CredentialType::Basic, identity); + let credential: OpenMlsCredential = BasicCredential::new(identity).unwrap().into(); let credential_with_key = CredentialWithKey { credential, // Use the wrong signature key to make the validation fail diff --git a/xmtp_mls/src/groups/validated_commit.rs b/xmtp_mls/src/groups/validated_commit.rs index 1c6498d03..7e6076934 100644 --- a/xmtp_mls/src/groups/validated_commit.rs +++ b/xmtp_mls/src/groups/validated_commit.rs @@ -363,7 +363,7 @@ impl From for GroupMembershipChanges { #[cfg(test)] mod tests { use openmls::{ - credentials::{BasicCredential, Credential, CredentialType, CredentialWithKey}, + credentials::{BasicCredential, CredentialWithKey}, group::config::CryptoConfig, prelude_test::KeyPackage, versions::ProtocolVersion, From 6c2830f92b5566d384787384fb25dfd1d2a706f2 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:46:13 -0700 Subject: [PATCH 15/17] Fix legacy credential --- xmtp_mls/src/identity.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index ab061b0d3..34eba58cf 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -103,8 +103,8 @@ impl Identity { let credential = Credential::create_from_legacy(&signature_keys, legacy_signed_private_key)?; let credential_proto: CredentialProto = credential.into(); - let mls_credential = - OpenMlsCredential::new(CredentialType::Basic, credential_proto.encode_to_vec()); + let mls_credential: OpenMlsCredential = + BasicCredential::new(credential_proto.encode_to_vec())?.into(); info!("Successfully created identity from legacy key"); Ok(Self { account_address, From 5930a5b892362336baa6cf20559d64dee0560cdd Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:46:35 -0700 Subject: [PATCH 16/17] Lint --- mls_validation_service/src/handlers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mls_validation_service/src/handlers.rs b/mls_validation_service/src/handlers.rs index 7067bb7cb..10191b9c0 100644 --- a/mls_validation_service/src/handlers.rs +++ b/mls_validation_service/src/handlers.rs @@ -131,8 +131,8 @@ mod tests { use openmls::{ extensions::{ApplicationIdExtension, Extension, Extensions}, prelude::{ - tls_codec::Serialize, Ciphersuite, Credential as OpenMlsCredential, CredentialType, - CredentialWithKey, CryptoConfig, + tls_codec::Serialize, Ciphersuite, Credential as OpenMlsCredential, CredentialWithKey, + CryptoConfig, }, prelude_test::KeyPackage, versions::ProtocolVersion, From cf40586147ea36c166ef1ee6bccbd8ff00decf77 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:52:10 -0700 Subject: [PATCH 17/17] One last lint --- xmtp_mls/src/groups/members.rs | 8 +++----- xmtp_mls/src/groups/mod.rs | 2 +- xmtp_mls/src/identity.rs | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/xmtp_mls/src/groups/members.rs b/xmtp_mls/src/groups/members.rs index acd31d5dc..6f80650c2 100644 --- a/xmtp_mls/src/groups/members.rs +++ b/xmtp_mls/src/groups/members.rs @@ -38,11 +38,9 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result = openmls_group .members() .filter_map(|member| { - let basic_credential = BasicCredential::try_from( - &member.credential - ) - .ok() - .map(|basic_credential| (basic_credential))?; + let basic_credential = BasicCredential::try_from(&member.credential) + .ok() + .map(|basic_credential| (basic_credential))?; Identity::get_validated_account_address( basic_credential.identity(), &member.signature_key, diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 1fe82434e..f10814fe7 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -220,7 +220,7 @@ where let mut mls_group = mls_welcome.into_group(provider)?; mls_group.save(provider.key_store())?; - + let group_id = mls_group.group_id().to_vec(); let to_store = StoredGroup::new(group_id, now_ns(), GroupMembershipState::Pending); let stored_group = provider.conn().insert_or_ignore_group(to_store)?; diff --git a/xmtp_mls/src/identity.rs b/xmtp_mls/src/identity.rs index 34eba58cf..68d3d0ba9 100644 --- a/xmtp_mls/src/identity.rs +++ b/xmtp_mls/src/identity.rs @@ -9,9 +9,8 @@ use openmls::{ extensions::{errors::InvalidExtensionError, ApplicationIdExtension, LastResortExtension}, prelude::{ tls_codec::{Error as TlsCodecError, Serialize}, - Capabilities, Credential as OpenMlsCredential, CredentialType, CredentialWithKey, - CryptoConfig, Extension, ExtensionType, Extensions, KeyPackage, KeyPackageNewError, - Lifetime, + Capabilities, Credential as OpenMlsCredential, CredentialWithKey, CryptoConfig, Extension, + ExtensionType, Extensions, KeyPackage, KeyPackageNewError, Lifetime, }, versions::ProtocolVersion, };