From c652537e31b79892cbaad1f6bdee2c05ab3da515 Mon Sep 17 00:00:00 2001 From: Alex Coats Date: Mon, 22 Jan 2024 12:47:42 -0500 Subject: [PATCH 1/4] chore: update `iota_sdk` dependency to fix a validation bug --- Cargo.lock | 676 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 381 insertions(+), 295 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d226e51a3..bfae29eb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "getrandom", @@ -103,9 +103,9 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayref" @@ -138,18 +138,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -293,9 +293,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -326,9 +326,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -385,9 +385,9 @@ dependencies = [ [[package]] name = "bson" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58da0ae1e701ea752cc46c1bb9f39d5ecefc7395c3ecd526261a566d4f16e0c2" +checksum = "88c18b51216e1f74b9d769cead6ace2f82b965b807e3d73330aabe9faec31c84" dependencies = [ "ahash", "base64 0.13.1", @@ -514,7 +514,7 @@ dependencies = [ "rand", "regex", "ron", - "rust-argon2 2.0.0", + "rust-argon2 2.1.0", "serde", "serde_bytes", "serde_json", @@ -545,7 +545,7 @@ dependencies = [ "iana-time-zone", "num-traits", "serde", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -561,9 +561,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -571,9 +571,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstyle", "clap_lex", @@ -589,7 +589,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -600,9 +600,9 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -624,9 +624,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -634,27 +634,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -664,9 +661,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -731,7 +728,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -771,9 +768,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "decimal" @@ -800,9 +797,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -908,9 +905,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", "digest 0.10.7", @@ -942,7 +939,7 @@ dependencies = [ "curve25519-dalek 4.1.1", "der", "ed25519", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "pkcs8", "rand_core 0.6.4", @@ -959,9 +956,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", @@ -1007,19 +1004,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "eyre" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" dependencies = [ "indenter", "once_cell", @@ -1043,9 +1040,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "finl_unicode" @@ -1079,9 +1076,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1094,9 +1091,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1108,9 +1105,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1118,15 +1115,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1135,38 +1132,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -1192,9 +1189,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -1227,9 +1224,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gloo-timers" @@ -1256,9 +1253,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1266,7 +1263,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1281,9 +1278,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -1296,7 +1293,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "headers-core", "http", @@ -1322,9 +1319,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1334,9 +1331,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1352,11 +1349,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1372,9 +1369,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1383,9 +1380,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1428,9 +1425,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1443,7 +1440,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -1478,9 +1475,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1518,9 +1515,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1578,7 +1575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -1607,7 +1604,7 @@ checksum = "6ac96b3660efd0cde32b0b20bc86cc93f33269cd9f6c97e759e0b0259b2133fb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1633,15 +1630,15 @@ dependencies = [ [[package]] name = "iota-crypto" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d5a986d972c3a703d48ced24fdc0bf16fb2d02959ff4b152fa77b9132f6fb0" +checksum = "a5db0e2d85e258d6d0db66f4a6bf1e8bdf5b10c3353aa87d98b168778d13fdc1" dependencies = [ "aead", "aes", "aes-gcm", "autocfg", - "base64 0.21.5", + "base64 0.21.7", "blake2", "chacha20poly1305", "cipher", @@ -1668,22 +1665,22 @@ dependencies = [ [[package]] name = "iota-sdk" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "979b09988e91e83b6d1c70534f3f8d2c62a624b3b74b758fcf8c577d34f09b85" +checksum = "76d62d16468c4bc555cac621734b5aa4fa971341f8fe3938d4481f7f394b9167" dependencies = [ "bech32", - "bitflags 2.4.1", + "bitflags 2.4.2", "bytemuck", "derive_more", "getset", "gloo-timers", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "hex", "iota-crypto", "iota_stronghold", "iterator-sorted", - "itertools 0.11.0", + "itertools 0.12.0", "lazy_static", "once_cell", "packable", @@ -1723,7 +1720,7 @@ checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ "socket2 0.5.5", "widestring", - "windows-sys", + "windows-sys 0.48.0", "winreg", ] @@ -1750,24 +1747,24 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1778,7 +1775,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "ring 0.16.20", "serde", "serde_json", @@ -1786,9 +1783,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -1806,9 +1803,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.2", + "libc", + "redox_syscall", +] [[package]] name = "libsodium-sys" @@ -1830,9 +1838,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1904,9 +1912,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" @@ -1934,20 +1942,20 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "mongodb" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d517e7e678e1c9a2983ec704b43f3b22f38b1b7a247ea3ddb36d21578bf4e" +checksum = "46c30763a5c6c52079602be44fa360ca3bfacee55fca73f4734aecd23706a7f2" dependencies = [ "async-trait", "base64 0.13.1", @@ -2048,18 +2056,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -2091,7 +2099,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567693dd2f9a4339cb0a54adfcc0cb431c0ac88b2e46c6ddfb5f5d11a1cc4f" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2100,9 +2108,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -2114,11 +2122,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2142,9 +2150,9 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -2183,9 +2191,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" @@ -2214,7 +2222,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -2241,15 +2249,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "platforms" -version = "3.1.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "poly1305" @@ -2336,7 +2344,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -2365,9 +2383,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2434,9 +2452,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2483,15 +2501,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2503,24 +2512,24 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] [[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.4", "regex-syntax 0.8.2", ] @@ -2535,9 +2544,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick", "memchr", @@ -2558,11 +2567,11 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2633,16 +2642,16 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2651,8 +2660,8 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.21.7", + "bitflags 2.4.2", "serde", "serde_derive", ] @@ -2671,11 +2680,11 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e71971821b3ae0e769e4a4328dbcb517607b434db7697e9aba17203ec14e46a" +checksum = "9d9848531d60c9cbbcf9d166c885316c24bc0e2a9d3eba0956bb6cbbd79bc6e8" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "blake2b_simd", "constant_time_eq 0.3.0", ] @@ -2707,7 +2716,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] @@ -2722,36 +2731,36 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.8" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.7", "rustls-webpki", "sct", ] [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -2760,7 +2769,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -2772,9 +2781,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "salsa20" @@ -2817,7 +2826,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -2847,9 +2856,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "semver-parser" @@ -2859,38 +2868,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.12" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "indexmap 2.1.0", "itoa", @@ -2900,13 +2909,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3006,9 +3015,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -3025,9 +3034,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -3046,7 +3055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3063,9 +3072,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -3171,9 +3180,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3221,15 +3230,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.4.1", + "redox_syscall", "rustix", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -3239,27 +3248,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3274,9 +3283,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", @@ -3296,9 +3305,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -3329,9 +3338,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -3342,7 +3351,7 @@ dependencies = [ "signal-hook-registry", "socket2 0.5.5", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3357,13 +3366,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3404,9 +3413,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" @@ -3419,6 +3428,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.8.3" @@ -3509,7 +3529,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", @@ -3554,7 +3574,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -3579,9 +3599,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ "log", "once_cell", @@ -3590,9 +3610,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -3654,9 +3674,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" @@ -3689,9 +3709,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3732,20 +3752,20 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] [[package]] name = "uuid" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", "serde", @@ -3790,9 +3810,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3800,24 +3820,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -3827,9 +3847,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3837,28 +3857,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -3866,9 +3886,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "which" @@ -3934,11 +3954,11 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.0", ] [[package]] @@ -3947,7 +3967,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -3956,21 +3985,42 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.48.5", "windows_aarch64_msvc 0.48.5", "windows_i686_gnu 0.48.5", "windows_i686_msvc 0.48.5", "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.48.5", "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +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", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -3983,6 +4033,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -3995,6 +4051,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -4007,6 +4069,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -4019,12 +4087,24 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -4037,11 +4117,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.18" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -4053,7 +4139,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4090,29 +4176,29 @@ checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" [[package]] name = "zerocopy" -version = "0.7.21" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686b7e407015242119c33dab17b8f61ba6843534de936d94368856528eae4dcc" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.21" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020f3dfe25dfc38dfea49ce62d5d45ecdd7f0d8a724fa63eb36b6eba4ec76806" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "serde", "zeroize_derive", @@ -4126,5 +4212,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] From 3d96ce4a16f8c089de739704a38aeccb9aa5821f Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Mon, 22 Jan 2024 13:03:23 -0500 Subject: [PATCH 2/4] chore: release `v1.0.0-rc.3` (#1323) * chore: release v1.0.0-rc.3 * fix some deprecated method usage --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/model/block/payload/transaction/unlock.rs | 4 +--- src/model/signature.rs | 14 ++++++-------- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb5224860..02c6a3c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.0.0-rc.3](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2024-01-22) + +### Miscellaneous Chores + +* **deps:** update `iota-sdk` to fix validation bug + ## [1.0.0-rc.2](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2023-09-12) diff --git a/Cargo.lock b/Cargo.lock index bfae29eb6..b2fe947bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "chronicle" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "async-trait", "auth-helper", diff --git a/Cargo.toml b/Cargo.toml index 95d2f7797..cc612498c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chronicle" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["IOTA Stiftung"] edition = "2021" description = "IOTA permanode implemented as an IOTA Node Extension (INX)." diff --git a/src/model/block/payload/transaction/unlock.rs b/src/model/block/payload/transaction/unlock.rs index abe02aeb8..78b188f73 100644 --- a/src/model/block/payload/transaction/unlock.rs +++ b/src/model/block/payload/transaction/unlock.rs @@ -52,9 +52,7 @@ impl TryFrom for iota::Unlock { fn try_from(value: Unlock) -> Result { Ok(match value { - Unlock::Signature { signature } => { - iota::Unlock::Signature(iota::SignatureUnlock::new(signature.try_into()?)) - } + Unlock::Signature { signature } => iota::Unlock::Signature(iota::SignatureUnlock::new(signature.into())), Unlock::Reference { index } => iota::Unlock::Reference(iota::ReferenceUnlock::new(index)?), Unlock::Alias { index } => iota::Unlock::Alias(iota::AliasUnlock::new(index)?), Unlock::Nft { index } => iota::Unlock::Nft(iota::NftUnlock::new(index)?), diff --git a/src/model/signature.rs b/src/model/signature.rs index 20dbe711d..2864bcbf0 100644 --- a/src/model/signature.rs +++ b/src/model/signature.rs @@ -32,22 +32,20 @@ impl From<&iota::Signature> for Signature { fn from(value: &iota::Signature) -> Self { match value { iota::Signature::Ed25519(signature) => Self::Ed25519 { - public_key: signature.public_key().to_bytes(), + public_key: signature.public_key_bytes().to_bytes(), signature: signature.signature().to_bytes(), }, } } } -impl TryFrom for iota::Signature { - type Error = iota_sdk::types::block::Error; - - fn try_from(value: Signature) -> Result { - Ok(match value { +impl From for iota::Signature { + fn from(value: Signature) -> Self { + match value { Signature::Ed25519 { public_key, signature } => { - iota::Ed25519Signature::try_from_bytes(public_key, signature)?.into() + iota::Ed25519Signature::from_bytes(public_key, signature).into() } - }) + } } } From ca605a7e48b377c77a1064f83a1abe3a394b1315 Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Wed, 24 Jan 2024 09:13:14 -0500 Subject: [PATCH 3/4] Consider expiration return addresses for ledger updates (#1314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Consider expiration return addresses for ledger updates * fix import * update spent outputs in migration * Improve balance endpoint * fmt * optimized migration * DRY * update analytics * improve index usage for balance * fix balance calculation * invert expiration checks * more fixes for balance calculation * nor does not exist for aggregation 🤷‍♀️ * refine query more * update deps * update api spec --- documentation/api/api-explorer.yml | 12 +- src/analytics/ledger/active_addresses.rs | 4 +- src/analytics/ledger/address_balance.rs | 16 ++- src/analytics/ledger/base_token.rs | 4 +- src/analytics/mod.rs | 12 +- .../inx-chronicle/api/explorer/responses.rs | 2 +- src/bin/inx-chronicle/api/explorer/routes.rs | 10 +- src/bin/inx-chronicle/cli/analytics.rs | 9 +- src/bin/inx-chronicle/inx/influx/analytics.rs | 9 +- src/bin/inx-chronicle/migrations/migrate_2.rs | 122 ++++++++++++++++++ src/bin/inx-chronicle/migrations/mod.rs | 4 +- src/db/mongodb/collections/ledger_update.rs | 60 ++++----- src/db/mongodb/collections/outputs/mod.rs | 77 +++++++++-- .../payload/transaction/output/ledger.rs | 6 +- .../block/payload/transaction/output/mod.rs | 32 ++++- .../output/unlock_condition/expiration.rs | 4 +- 16 files changed, 297 insertions(+), 86 deletions(-) create mode 100644 src/bin/inx-chronicle/migrations/migrate_2.rs diff --git a/documentation/api/api-explorer.yml b/documentation/api/api-explorer.yml index 55e4b504b..c017b615d 100644 --- a/documentation/api/api-explorer.yml +++ b/documentation/api/api-explorer.yml @@ -275,13 +275,13 @@ components: totalBalance: type: string description: >- - The total value held in unspent outputs owned by the given address - (includes funds held in storage deposit). - sigLockedBalance: + The total value held in unspent outputs that is unlockable by the given address or currently timelocked. + Does not include funds held in storage deposit. + availableBalance: type: string description: >- - The sum of value held in unspent outputs owned by the given address - that are signature locked ("trivially unlockable"). + The total value held in unspent outputs that is immediately unlockable at ledgerIndex by the given address. + Does not include funds held in storage deposit. ledgerIndex: type: integer description: The ledger index for which the balance calculation was performed. @@ -585,7 +585,7 @@ components: balance-example: value: totalBalance: 100000 - sigLockedBalance: 99900 + availableBalance: 99900 ledgerIndex: 500000 ledger-updates-address-example: value: diff --git a/src/analytics/ledger/active_addresses.rs b/src/analytics/ledger/active_addresses.rs index b0fc50581..c16eb2247 100644 --- a/src/analytics/ledger/active_addresses.rs +++ b/src/analytics/ledger/active_addresses.rs @@ -43,7 +43,7 @@ impl IntervalAnalytics for AddressActivityMeasurement { impl Analytics for AddressActivityAnalytics { type Measurement = AddressActivityMeasurement; - fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], _ctx: &dyn AnalyticsContext) { + fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], ctx: &dyn AnalyticsContext) { for output in consumed { if let Some(a) = output.owning_address() { self.addresses.insert(*a); @@ -51,7 +51,7 @@ impl Analytics for AddressActivityAnalytics { } for output in created { - if let Some(a) = output.owning_address() { + if let Some(a) = output.output.owning_address(ctx.at().milestone_timestamp) { self.addresses.insert(*a); } } diff --git a/src/analytics/ledger/address_balance.rs b/src/analytics/ledger/address_balance.rs index afc4a41b2..a80ec4218 100644 --- a/src/analytics/ledger/address_balance.rs +++ b/src/analytics/ledger/address_balance.rs @@ -4,7 +4,10 @@ use std::collections::HashMap; use super::*; -use crate::model::utxo::{Address, TokenAmount}; +use crate::model::{ + payload::milestone::MilestoneTimestamp, + utxo::{Address, TokenAmount}, +}; #[derive(Debug)] pub(crate) struct AddressBalanceMeasurement { @@ -29,10 +32,13 @@ pub(crate) struct AddressBalancesAnalytics { impl AddressBalancesAnalytics { /// Initialize the analytics by reading the current ledger state. - pub(crate) fn init<'a>(unspent_outputs: impl IntoIterator) -> Self { + pub(crate) fn init<'a>( + unspent_outputs: impl IntoIterator, + milestone_timestamp: MilestoneTimestamp, + ) -> Self { let mut balances = HashMap::new(); for output in unspent_outputs { - if let Some(&a) = output.owning_address() { + if let Some(&a) = output.output.owning_address(milestone_timestamp) { *balances.entry(a).or_default() += output.amount(); } } @@ -43,7 +49,7 @@ impl AddressBalancesAnalytics { impl Analytics for AddressBalancesAnalytics { type Measurement = AddressBalanceMeasurement; - fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], _ctx: &dyn AnalyticsContext) { + fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], ctx: &dyn AnalyticsContext) { for output in consumed { if let Some(a) = output.owning_address() { // All inputs should be present in `addresses`. If not, we skip it's value. @@ -57,7 +63,7 @@ impl Analytics for AddressBalancesAnalytics { } for output in created { - if let Some(&a) = output.owning_address() { + if let Some(&a) = output.output.owning_address(ctx.at().milestone_timestamp) { // All inputs should be present in `addresses`. If not, we skip it's value. *self.balances.entry(a).or_default() += output.amount(); } diff --git a/src/analytics/ledger/base_token.rs b/src/analytics/ledger/base_token.rs index c3504cb3e..95aeef998 100644 --- a/src/analytics/ledger/base_token.rs +++ b/src/analytics/ledger/base_token.rs @@ -19,14 +19,14 @@ pub(crate) struct BaseTokenActivityMeasurement { impl Analytics for BaseTokenActivityMeasurement { type Measurement = Self; - fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], _ctx: &dyn AnalyticsContext) { + fn handle_transaction(&mut self, consumed: &[LedgerSpent], created: &[LedgerOutput], ctx: &dyn AnalyticsContext) { // The idea behind the following code is that we keep track of the deltas that are applied to each account that // is represented by an address. let mut balance_deltas: HashMap<&Address, i128> = HashMap::new(); // We first gather all tokens that have been moved to an individual address. for output in created { - if let Some(address) = output.owning_address() { + if let Some(address) = output.output.owning_address(ctx.at().milestone_timestamp) { *balance_deltas.entry(address).or_default() += output.amount().0 as i128; } } diff --git a/src/analytics/mod.rs b/src/analytics/mod.rs index 2f2a64308..7af647d6b 100644 --- a/src/analytics/mod.rs +++ b/src/analytics/mod.rs @@ -23,7 +23,7 @@ use crate::{ model::{ ledger::{LedgerOutput, LedgerSpent}, metadata::LedgerInclusionState, - payload::{Payload, TransactionEssence}, + payload::{milestone::MilestoneTimestamp, Payload, TransactionEssence}, protocol::ProtocolParameters, tangle::{MilestoneIndex, MilestoneIndexTimestamp}, utxo::Input, @@ -152,9 +152,12 @@ impl Analytic { choice: &AnalyticsChoice, protocol_params: &ProtocolParameters, unspent_outputs: impl IntoIterator, + milestone_timestamp: MilestoneTimestamp, ) -> Self { Self(match choice { - AnalyticsChoice::AddressBalance => Box::new(AddressBalancesAnalytics::init(unspent_outputs)) as _, + AnalyticsChoice::AddressBalance => { + Box::new(AddressBalancesAnalytics::init(unspent_outputs, milestone_timestamp)) as _ + } AnalyticsChoice::BaseTokenActivity => Box::::default() as _, AnalyticsChoice::BlockActivity => Box::::default() as _, AnalyticsChoice::ActiveAddresses => Box::::default() as _, @@ -396,7 +399,7 @@ mod test { ledger::{LedgerOutput, LedgerSpent}, metadata::BlockMetadata, node::NodeConfiguration, - payload::{MilestoneId, MilestonePayload}, + payload::{milestone::MilestoneTimestamp, MilestoneId, MilestonePayload}, protocol::ProtocolParameters, tangle::{MilestoneIndex, MilestoneIndexTimestamp}, }, @@ -444,10 +447,11 @@ mod test { fn init<'a>( protocol_params: ProtocolParameters, unspent_outputs: impl IntoIterator + Copy, + milestone_timestamp: MilestoneTimestamp, ) -> Self { Self { active_addresses: Default::default(), - address_balance: AddressBalancesAnalytics::init(unspent_outputs), + address_balance: AddressBalancesAnalytics::init(unspent_outputs, milestone_timestamp), base_tokens: Default::default(), ledger_outputs: LedgerOutputMeasurement::init(unspent_outputs), ledger_size: LedgerSizeAnalytics::init(protocol_params, unspent_outputs), diff --git a/src/bin/inx-chronicle/api/explorer/responses.rs b/src/bin/inx-chronicle/api/explorer/responses.rs index e2198f455..ca519aa8a 100644 --- a/src/bin/inx-chronicle/api/explorer/responses.rs +++ b/src/bin/inx-chronicle/api/explorer/responses.rs @@ -78,7 +78,7 @@ impl From for LedgerUpdateByMilestoneDto { #[serde(rename_all = "camelCase")] pub struct BalanceResponse { pub total_balance: String, - pub sig_locked_balance: String, + pub available_balance: String, pub ledger_index: MilestoneIndex, } diff --git a/src/bin/inx-chronicle/api/explorer/routes.rs b/src/bin/inx-chronicle/api/explorer/routes.rs index 76eb721af..2cb3283b8 100644 --- a/src/bin/inx-chronicle/api/explorer/routes.rs +++ b/src/bin/inx-chronicle/api/explorer/routes.rs @@ -155,22 +155,22 @@ async fn ledger_updates_by_milestone( } async fn balance(database: Extension, Path(address): Path) -> ApiResult { - let ledger_index = database + let ledger_ms = database .collection::() - .get_ledger_index() + .get_newest_milestone() .await? .ok_or(MissingError::NoResults)?; let address = Address::from_str(&address).map_err(RequestError::from)?; let res = database .collection::() - .get_address_balance(address, ledger_index) + .get_address_balance(address, ledger_ms) .await? .ok_or(MissingError::NoResults)?; Ok(BalanceResponse { total_balance: res.total_balance, - sig_locked_balance: res.sig_locked_balance, - ledger_index, + available_balance: res.available_balance, + ledger_index: ledger_ms.milestone_index, }) } diff --git a/src/bin/inx-chronicle/cli/analytics.rs b/src/bin/inx-chronicle/cli/analytics.rs index 3e29efea0..b2bf03d04 100644 --- a/src/bin/inx-chronicle/cli/analytics.rs +++ b/src/bin/inx-chronicle/cli/analytics.rs @@ -264,7 +264,14 @@ pub async fn fill_analytics( let analytics = analytics_choices .iter() - .map(|choice| Analytic::init(choice, &milestone.protocol_params, &ledger_state)) + .map(|choice| { + Analytic::init( + choice, + &milestone.protocol_params, + &ledger_state, + milestone.at.milestone_timestamp, + ) + }) .collect::>(); state = Some(AnalyticsState { analytics, diff --git a/src/bin/inx-chronicle/inx/influx/analytics.rs b/src/bin/inx-chronicle/inx/influx/analytics.rs index 02f76be58..8e837ed43 100644 --- a/src/bin/inx-chronicle/inx/influx/analytics.rs +++ b/src/bin/inx-chronicle/inx/influx/analytics.rs @@ -72,7 +72,14 @@ impl InxWorker { let analytics = analytics_choices .iter() - .map(|choice| Analytic::init(choice, &milestone.protocol_params, &ledger_state)) + .map(|choice| { + Analytic::init( + choice, + &milestone.protocol_params, + &ledger_state, + milestone.at.milestone_timestamp, + ) + }) .collect::>(); *state = Some(AnalyticsState { analytics, diff --git a/src/bin/inx-chronicle/migrations/migrate_2.rs b/src/bin/inx-chronicle/migrations/migrate_2.rs new file mode 100644 index 000000000..6875d5977 --- /dev/null +++ b/src/bin/inx-chronicle/migrations/migrate_2.rs @@ -0,0 +1,122 @@ +// Copyright 2023 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use async_trait::async_trait; +use chronicle::{ + db::{ + mongodb::collections::{LedgerUpdateCollection, OutputCollection}, + MongoDb, MongoDbCollection, MongoDbCollectionExt, + }, + model::{ + ledger::{LedgerOutput, LedgerSpent, RentStructureBytes}, + metadata::OutputMetadata, + utxo::{Output, OutputId}, + }, +}; +use futures::{prelude::stream::TryStreamExt, StreamExt}; +use mongodb::bson::doc; +use serde::Deserialize; +use tokio::{task::JoinSet, try_join}; + +use super::Migration; + +const INSERT_BATCH_SIZE: usize = 1000; + +pub struct Migrate; + +#[async_trait] +impl Migration for Migrate { + const ID: usize = 2; + const APP_VERSION: &'static str = "1.0.0-rc.3"; + const DATE: time::Date = time::macros::date!(2024 - 01 - 12); + + async fn migrate(db: &MongoDb) -> eyre::Result<()> { + db.collection::() + .collection() + .drop(None) + .await?; + + let outputs_stream = db + .collection::() + .find::(doc! {}, None) + .await?; + let mut batched_stream = outputs_stream.try_chunks(INSERT_BATCH_SIZE); + + let mut tasks = JoinSet::new(); + + while let Some(batch) = batched_stream.next().await { + let batch = batch?; + while tasks.len() >= 100 { + if let Some(res) = tasks.join_next().await { + res??; + } + } + let db = db.clone(); + tasks.spawn(async move { + let consumed = batch.iter().filter_map(Option::::from).collect::>(); + let created = batch.into_iter().map(LedgerOutput::from).collect::>(); + try_join! { + async { + db.collection::() + .insert_unspent_ledger_updates(&created) + .await + }, + async { + db.collection::().update_spent_outputs(&consumed).await + }, + async { + db.collection::().insert_spent_ledger_updates(&consumed).await + } + } + .and(Ok(())) + }); + } + + while let Some(res) = tasks.join_next().await { + res??; + } + + Ok(()) + } +} + +#[derive(Deserialize)] +pub struct OutputDocument { + #[serde(rename = "_id")] + output_id: OutputId, + output: Output, + metadata: OutputMetadata, + details: OutputDetails, +} + +#[derive(Deserialize)] +struct OutputDetails { + rent_structure: RentStructureBytes, +} + +impl From for LedgerOutput { + fn from(value: OutputDocument) -> Self { + Self { + output_id: value.output_id, + block_id: value.metadata.block_id, + booked: value.metadata.booked, + output: value.output, + rent_structure: value.details.rent_structure, + } + } +} + +impl From<&OutputDocument> for Option { + fn from(value: &OutputDocument) -> Self { + value.metadata.spent_metadata.map(|spent_metadata| LedgerSpent { + spent_metadata, + output: LedgerOutput { + output_id: value.output_id, + block_id: value.metadata.block_id, + booked: value.metadata.booked, + output: value.output.clone(), + rent_structure: value.details.rent_structure, + }, + }) + } +} diff --git a/src/bin/inx-chronicle/migrations/mod.rs b/src/bin/inx-chronicle/migrations/mod.rs index b15940316..0c268adbc 100644 --- a/src/bin/inx-chronicle/migrations/mod.rs +++ b/src/bin/inx-chronicle/migrations/mod.rs @@ -12,8 +12,9 @@ use eyre::bail; pub mod migrate_0; pub mod migrate_1; +pub mod migrate_2; -pub type LatestMigration = migrate_1::Migrate; +pub type LatestMigration = migrate_2::Migrate; /// The list of migrations, in order. const MIGRATIONS: &[&'static dyn DynMigration] = &[ @@ -21,6 +22,7 @@ const MIGRATIONS: &[&'static dyn DynMigration] = &[ // list. &migrate_0::Migrate, &migrate_1::Migrate, + &migrate_2::Migrate, ]; fn build_migrations(migrations: &[&'static dyn DynMigration]) -> HashMap, &'static dyn DynMigration> { diff --git a/src/db/mongodb/collections/ledger_update.rs b/src/db/mongodb/collections/ledger_update.rs index 791269da4..5bac08b63 100644 --- a/src/db/mongodb/collections/ledger_update.rs +++ b/src/db/mongodb/collections/ledger_update.rs @@ -110,23 +110,18 @@ impl LedgerUpdateCollection { I: IntoIterator, I::IntoIter: Send + Sync, { - let ledger_updates = outputs.into_iter().filter_map( - |LedgerSpent { - output: LedgerOutput { output_id, output, .. }, - spent_metadata, - }| { - // Ledger updates - output.owning_address().map(|&address| LedgerUpdateDocument { - _id: Id { - milestone_index: spent_metadata.spent.milestone_index, - output_id: *output_id, - is_spent: true, - }, - address, - milestone_timestamp: spent_metadata.spent.milestone_timestamp, - }) - }, - ); + let ledger_updates = outputs.into_iter().filter_map(|output| { + // Ledger updates + output.owning_address().map(|&address| LedgerUpdateDocument { + _id: Id { + milestone_index: output.spent_metadata.spent.milestone_index, + output_id: output.output_id(), + is_spent: true, + }, + address, + milestone_timestamp: output.spent_metadata.spent.milestone_timestamp, + }) + }); self.insert_many_ignore_duplicates(ledger_updates, InsertManyOptions::builder().ordered(false).build()) .await?; @@ -140,25 +135,18 @@ impl LedgerUpdateCollection { I: IntoIterator, I::IntoIter: Send + Sync, { - let ledger_updates = outputs.into_iter().filter_map( - |LedgerOutput { - output_id, - booked, - output, - .. - }| { - // Ledger updates - output.owning_address().map(|&address| LedgerUpdateDocument { - _id: Id { - milestone_index: booked.milestone_index, - output_id: *output_id, - is_spent: false, - }, - address, - milestone_timestamp: booked.milestone_timestamp, - }) - }, - ); + let ledger_updates = outputs.into_iter().filter_map(|output| { + // Ledger updates + output.owning_address().map(|&address| LedgerUpdateDocument { + _id: Id { + milestone_index: output.booked.milestone_index, + output_id: output.output_id, + is_spent: false, + }, + address, + milestone_timestamp: output.booked.milestone_timestamp, + }) + }); self.insert_many_ignore_duplicates(ledger_updates, InsertManyOptions::builder().ordered(false).build()) .await?; diff --git a/src/db/mongodb/collections/outputs/mod.rs b/src/db/mongodb/collections/outputs/mod.rs index 8ee3b6ab3..bc017d057 100644 --- a/src/db/mongodb/collections/outputs/mod.rs +++ b/src/db/mongodb/collections/outputs/mod.rs @@ -98,7 +98,7 @@ struct OutputDetails { impl From<&LedgerOutput> for OutputDocument { fn from(rec: &LedgerOutput) -> Self { - let address = rec.output.owning_address().copied(); + let address = rec.owning_address().copied(); let is_trivial_unlock = rec.output.is_trivial_unlock(); Self { @@ -141,6 +141,8 @@ impl From<&LedgerOutput> for OutputDocument { impl From<&LedgerSpent> for OutputDocument { fn from(rec: &LedgerSpent) -> Self { let mut res = Self::from(&rec.output); + // Update the address as the spending may have changed it + res.details.address = rec.owning_address().copied(); res.metadata.spent_metadata.replace(rec.spent_metadata); res } @@ -166,7 +168,7 @@ pub struct OutputWithMetadataResult { #[allow(missing_docs)] pub struct BalanceResult { pub total_balance: String, - pub sig_locked_balance: String, + pub available_balance: String, } #[derive(Clone, Debug, Default, Deserialize)] @@ -420,27 +422,80 @@ impl OutputCollection { pub async fn get_address_balance( &self, address: Address, - ledger_index: MilestoneIndex, + ledger_ms: MilestoneIndexTimestamp, ) -> Result, Error> { self .aggregate( [ // Look at all (at ledger index o'clock) unspent output documents for the given address. doc! { "$match": { - "details.address": &address, - "metadata.booked.milestone_index": { "$lte": ledger_index }, - "metadata.spent_metadata.spent.milestone_index": { "$not": { "$lte": ledger_index } } + "$or": [ + { "details.address": &address }, + { + "output.expiration_unlock_condition": { "$exists": true }, + "output.expiration_unlock_condition.return_address": &address + } + ], + "metadata.booked.milestone_index": { "$lte": ledger_ms.milestone_index }, + "metadata.spent_metadata.spent.milestone_index": { "$not": { "$lte": ledger_ms.milestone_index } } } }, + doc! { "$set": { "output_amount": { "$subtract": [ + { "$toDecimal": "$output.amount" }, + { "$ifNull": [{ "$toDecimal": "$output.storage_deposit_return_unlock_condition.amount" }, 0 ] }, + ] } } }, doc! { "$group": { "_id": null, - "total_balance": { "$sum": { "$toDecimal": "$output.amount" } }, - "sig_locked_balance": { "$sum": { - "$cond": [ { "$eq": [ "$details.is_trivial_unlock", true] }, { "$toDecimal": "$output.amount" }, 0 ] + "total_balance": { "$sum": { + "$cond": [ + // If this output is trivially unlocked by this address + { "$eq": [ "$details.address", &address ] }, + { "$cond": [ + // And the output has no expiration or is not expired + { "$or": [ + { "$lte": [ "$output.expiration_unlock_condition", null ] }, + { "$gt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] } + ] }, + { "$toDecimal": "$output_amount" }, 0 + ] }, + // Otherwise, if this output has expiring funds that will be returned to this address + { "$cond": [ + // And the output is expired + { "$lte": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] }, + { "$toDecimal": "$output_amount" }, 0 + ] } + ] + } }, + "available_balance": { "$sum": { + "$cond": [ + // If this output is trivially unlocked by this address + { "$eq": [ "$details.address", &address ] }, + { "$cond": [ + { "$and": [ + // And the output has no expiration or is not expired + { "$or": [ + { "$lte": [ "$output.expiration_unlock_condition", null ] }, + { "$gt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] } + ] }, + // and has no timelock or is past the lock period + { "$or": [ + { "$lte": [ "$output.timelock_unlock_condition", null ] }, + { "$lte": [ "$output.timelock_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] } + ] } + ] }, + { "$toDecimal": "$output_amount" }, 0 + ] }, + // Otherwise, if this output has expiring funds that will be returned to this address + { "$cond": [ + // And the output is expired + { "$lte": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] }, + { "$toDecimal": "$output_amount" }, 0 + ] } + ] } }, } }, doc! { "$project": { "total_balance": { "$toString": "$total_balance" }, - "sig_locked_balance": { "$toString": "$sig_locked_balance" }, + "available_balance": { "$toString": "$available_balance" }, } }, ], None, @@ -491,7 +546,7 @@ impl OutputCollection { } } - /// Get the address activity in a date + /// Get the address activity in a date range pub async fn get_address_activity_count_in_range( &self, start_date: time::Date, diff --git a/src/model/block/payload/transaction/output/ledger.rs b/src/model/block/payload/transaction/output/ledger.rs index 6c1e6a69b..97339474b 100644 --- a/src/model/block/payload/transaction/output/ledger.rs +++ b/src/model/block/payload/transaction/output/ledger.rs @@ -30,7 +30,7 @@ impl LedgerOutput { } pub fn owning_address(&self) -> Option<&Address> { - self.output.owning_address() + self.output.owning_address(None) } } @@ -53,7 +53,9 @@ impl LedgerSpent { } pub fn owning_address(&self) -> Option<&Address> { - self.output.owning_address() + self.output + .output + .owning_address(self.spent_metadata.spent.milestone_timestamp) } } /// The different number of bytes that are used for computing the rent cost. diff --git a/src/model/block/payload/transaction/output/mod.rs b/src/model/block/payload/transaction/output/mod.rs index 4e1797371..7cfa3c03d 100644 --- a/src/model/block/payload/transaction/output/mod.rs +++ b/src/model/block/payload/transaction/output/mod.rs @@ -34,7 +34,9 @@ pub use self::{ treasury::TreasuryOutput, }; use crate::model::{ - bytify, payload::TransactionId, stringify, ProtocolParameters, TryFromWithContext, TryIntoWithContext, + bytify, + payload::{milestone::MilestoneTimestamp, TransactionId}, + stringify, ProtocolParameters, TryFromWithContext, TryIntoWithContext, }; /// The amount of tokens associated with an output. @@ -142,13 +144,33 @@ pub enum Output { impl Output { /// Returns the [`Address`] that is in control of the output. - pub fn owning_address(&self) -> Option<&Address> { + /// The `milestone_timestamp` is used to determine which address currently owns the output if it contains an + /// [`ExpirationUnlockCondition`](self::unlock_condition::ExpirationUnlockCondition) + pub fn owning_address(&self, milestone_timestamp: impl Into>) -> Option<&Address> { Some(match self { Self::Treasury(_) => return None, Self::Basic(BasicOutput { address_unlock_condition, + expiration_unlock_condition, .. - }) => &address_unlock_condition.address, + }) + | Self::Nft(NftOutput { + address_unlock_condition, + expiration_unlock_condition, + .. + }) => { + if let (Some(spent_timestamp), Some(expiration_unlock_condition)) = + (milestone_timestamp.into(), expiration_unlock_condition) + { + if spent_timestamp >= expiration_unlock_condition.timestamp { + &expiration_unlock_condition.return_address + } else { + &address_unlock_condition.address + } + } else { + &address_unlock_condition.address + } + } Self::Alias(AliasOutput { state_controller_address_unlock_condition, .. @@ -157,10 +179,6 @@ impl Output { immutable_alias_address_unlock_condition, .. }) => &immutable_alias_address_unlock_condition.address, - Self::Nft(NftOutput { - address_unlock_condition, - .. - }) => &address_unlock_condition.address, }) } diff --git a/src/model/block/payload/transaction/output/unlock_condition/expiration.rs b/src/model/block/payload/transaction/output/unlock_condition/expiration.rs index 248322d80..5b73e19b3 100644 --- a/src/model/block/payload/transaction/output/unlock_condition/expiration.rs +++ b/src/model/block/payload/transaction/output/unlock_condition/expiration.rs @@ -14,8 +14,8 @@ use crate::model::{tangle::MilestoneTimestamp, utxo::Address}; /// After or at the unix time, only Return Address can unlock it. #[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct ExpirationUnlockCondition { - return_address: Address, - timestamp: MilestoneTimestamp, + pub(crate) return_address: Address, + pub(crate) timestamp: MilestoneTimestamp, } impl> From for ExpirationUnlockCondition { From 8668d4f6bd262bf309310eb9fd8ca46d383950d4 Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Wed, 24 Jan 2024 09:30:44 -0500 Subject: [PATCH 4/4] chore: release `v1.0.0-rc.4` (#1324) chore: release v1.0.0-rc.4 --- CHANGELOG.md | 11 +++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c6a3c51..f1c79099a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [1.0.0-rc.4](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2024-01-24) + +### Features + +* **api:** explorer balance endpoint now returns `availableBalance` ([#1314](https://github.com/iotaledger/inx-chronicle/issues/1314)) ([ca605a7](https://github.com/iotaledger/inx-chronicle/commit/ca605a7e48b377c77a1064f83a1abe3a394b1315)) + +### Bug Fixes + +* **db:** consider expiration return address for ledger updates ([#1314](https://github.com/iotaledger/inx-chronicle/issues/1314)) ([ca605a7](https://github.com/iotaledger/inx-chronicle/commit/ca605a7e48b377c77a1064f83a1abe3a394b1315)) +* **db:** fix balance calculation ([#1314](https://github.com/iotaledger/inx-chronicle/issues/1314)) ([ca605a7](https://github.com/iotaledger/inx-chronicle/commit/ca605a7e48b377c77a1064f83a1abe3a394b1315)) + ## [1.0.0-rc.3](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2024-01-22) ### Miscellaneous Chores diff --git a/Cargo.lock b/Cargo.lock index b2fe947bc..3d5a6d4f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "chronicle" -version = "1.0.0-rc.3" +version = "1.0.0-rc.4" dependencies = [ "async-trait", "auth-helper", diff --git a/Cargo.toml b/Cargo.toml index cc612498c..0c19cbd55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chronicle" -version = "1.0.0-rc.3" +version = "1.0.0-rc.4" authors = ["IOTA Stiftung"] edition = "2021" description = "IOTA permanode implemented as an IOTA Node Extension (INX)."