From fe7c2da00b8ca1165b6df3f11d59f543f187d631 Mon Sep 17 00:00:00 2001 From: Alex Coats Date: Thu, 15 Feb 2024 12:23:03 -0500 Subject: [PATCH] update dependencies and fix INX checks --- Cargo.lock | 195 ++++++++++---------- src/bin/inx-chronicle/api/error.rs | 5 - src/bin/inx-chronicle/inx/mod.rs | 24 ++- src/inx/ledger.rs | 127 +++++++++---- src/model/block_metadata.rs | 275 +++++++++++++++++------------ 5 files changed, 376 insertions(+), 250 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0dde59b6e..603ed47f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,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", @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom", @@ -97,9 +97,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anyhow" @@ -430,7 +430,7 @@ dependencies = [ "base64 0.13.1", "bitvec", "hex", - "indexmap 2.2.2", + "indexmap 2.2.3", "js-sys", "once_cell", "rand", @@ -565,9 +565,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -589,9 +589,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -599,9 +599,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstyle", "clap_lex", @@ -610,9 +610,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", @@ -622,9 +622,9 @@ dependencies = [ [[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 = "const-oid" @@ -733,9 +733,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", @@ -771,12 +771,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ - "darling_core 0.20.5", - "darling_macro 0.20.5", + "darling_core 0.20.6", + "darling_macro 0.20.6", ] [[package]] @@ -795,9 +795,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", @@ -820,11 +820,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ - "darling_core 0.20.5", + "darling_core 0.20.6", "quote", "syn 2.0.48", ] @@ -886,7 +886,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8ef033054e131169b8f0f9a7af8f5533a9436fadf3c500ed547f730f07090d" dependencies = [ - "darling 0.20.5", + "darling 0.20.6", "proc-macro2", "quote", "syn 2.0.48", @@ -998,7 +998,7 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "der", "ed25519", "hashbrown 0.14.3", @@ -1012,9 +1012,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" @@ -1102,9 +1102,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 = "finl_unicode" @@ -1325,7 +1325,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.2.2", + "indexmap 2.2.3", "slab", "tokio", "tokio-util", @@ -1344,7 +1344,7 @@ dependencies = [ "futures-sink", "futures-util", "http 1.0.0", - "indexmap 2.2.2", + "indexmap 2.2.3", "slab", "tokio", "tokio-util", @@ -1400,9 +1400,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -1619,9 +1619,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", @@ -1714,9 +1714,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1724,9 +1724,9 @@ dependencies = [ [[package]] name = "influxdb" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77763a6985cbf3f3251fd0725511b6eb81967bfb50763e7a88097ff8e8504fb0" +checksum = "601aa12a5876c044ea2a94a9443d0f086e6fc1f7bb4264bd7120e63c1462d1c8" dependencies = [ "chrono", "futures-util", @@ -1764,7 +1764,7 @@ dependencies = [ [[package]] name = "inx" version = "2.0.0" -source = "git+https://github.com/iotaledger/inx#1846f63205064899b3f5245b01312d879c8c92a2" +source = "git+https://github.com/iotaledger/inx#a6dd0abaab8d70108d5d098eddbcdfacc416f16e" dependencies = [ "prost", "tonic", @@ -1807,8 +1807,8 @@ dependencies = [ [[package]] name = "iota-sdk" -version = "1.1.3" -source = "git+https://github.com/iotaledger/iota-sdk?branch=2.0#fad3e45b7dad1cabe77e0c6422638bf907a4c4de" +version = "1.1.4" +source = "git+https://github.com/iotaledger/iota-sdk?branch=2.0#9db8a1c89c0eee4a3545dca92770012de4bcfea4" dependencies = [ "bech32", "bitflags 2.4.2", @@ -1901,9 +1901,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -2066,9 +2066,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[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", ] @@ -2086,9 +2086,9 @@ dependencies = [ [[package]] name = "mongodb" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c30763a5c6c52079602be44fa360ca3bfacee55fca73f4734aecd23706a7f2" +checksum = "de59562e5c71656c098d8e966641b31da87b89dc3dcb6e761d3b37dcdfa0cb72" dependencies = [ "async-trait", "base64 0.13.1", @@ -2167,9 +2167,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[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", ] @@ -2186,9 +2186,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -2342,7 +2342,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.2", + "indexmap 2.2.3", ] [[package]] @@ -2389,9 +2389,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" @@ -2860,9 +2860,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ "bitflags 2.4.2", "errno", @@ -3030,7 +3030,7 @@ version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", "itoa", "ryu", "serde", @@ -3302,18 +3302,18 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ "heck", "proc-macro2", @@ -3391,13 +3391,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] @@ -3414,18 +3413,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", @@ -3444,9 +3443,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.32" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe80ced77cbfb4cb91a94bf72b378b4b6791a0d9b7f09d0be747d1bdff4e68bd" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", @@ -3501,9 +3500,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[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", @@ -3586,7 +3585,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", "toml_datetime", "winnow", ] @@ -3597,7 +3596,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.2.2", + "indexmap 2.2.3", "toml_datetime", "winnow", ] @@ -3937,9 +3936,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3947,9 +3946,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", @@ -3962,9 +3961,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -3974,9 +3973,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3984,9 +3983,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", @@ -3997,15 +3996,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -4013,9 +4012,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 = "which" @@ -4252,9 +4251,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.36" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818ce546a11a9986bc24f93d0cdf38a8a1a400f1473ea8c82e59f6e0ffab9249" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] diff --git a/src/bin/inx-chronicle/api/error.rs b/src/bin/inx-chronicle/api/error.rs index 1eed00b21..8c1328795 100644 --- a/src/bin/inx-chronicle/api/error.rs +++ b/src/bin/inx-chronicle/api/error.rs @@ -17,11 +17,6 @@ pub type ApiResult = Result; pub trait ErrorStatus: std::error::Error { /// Gets the HTTP status code associated with this error. fn status(&self) -> StatusCode; - - /// Gets the u16 status code representation associated with this error. - fn code(&self) -> u16 { - self.status().as_u16() - } } #[derive(Debug, Error)] diff --git a/src/bin/inx-chronicle/inx/mod.rs b/src/bin/inx-chronicle/inx/mod.rs index 49efd1820..337c13b68 100644 --- a/src/bin/inx-chronicle/inx/mod.rs +++ b/src/bin/inx-chronicle/inx/mod.rs @@ -123,6 +123,10 @@ impl InxWorker { node_configuration.base_token.ticker_symbol ); + let pruning_slot = node_configuration + .latest_parameters() + .first_slot_of(node_status.pruning_epoch); + // Check if there is an unfixable gap in our node data. let start_index = if let Some(latest_committed_slot) = self .db @@ -130,13 +134,21 @@ impl InxWorker { .get_latest_committed_slot() .await? { - latest_committed_slot.slot_index + 1 + if pruning_slot > latest_committed_slot.slot_index { + bail!(InxWorkerError::SyncSlotGap { + start: latest_committed_slot.slot_index + 1, + end: pruning_slot, + }); + } else if node_status.last_confirmed_block_slot < latest_committed_slot.slot_index { + bail!(InxWorkerError::SyncSlotIndexMismatch { + node: node_status.last_confirmed_block_slot, + db: latest_committed_slot.slot_index, + }); + } else { + latest_committed_slot.slot_index + 1 + } } else { - self.config.sync_start_slot.max( - node_configuration - .latest_parameters() - .first_slot_of(node_status.pruning_epoch + 1), - ) + self.config.sync_start_slot.max(pruning_slot) }; if let Some(db_node_config) = self diff --git a/src/inx/ledger.rs b/src/inx/ledger.rs index 241a18254..79f91b2bb 100644 --- a/src/inx/ledger.rs +++ b/src/inx/ledger.rs @@ -219,16 +219,15 @@ impl ConvertFrom for Option BlockFailureReason::TooOldToIssue, ProtoState::ParentIsTooOld => BlockFailureReason::ParentTooOld, ProtoState::ParentNotFound => BlockFailureReason::ParentDoesNotExist, - ProtoState::ParentInvalid => BlockFailureReason::ParentInvalid, ProtoState::IssuerAccountNotFound => BlockFailureReason::IssuerAccountNotFound, - ProtoState::VersionInvalid => BlockFailureReason::VersionInvalid, ProtoState::ManaCostCalculationFailed => BlockFailureReason::ManaCostCalculationFailed, ProtoState::BurnedInsufficientMana => BlockFailureReason::BurnedInsufficientMana, - ProtoState::AccountInvalid => BlockFailureReason::AccountInvalid, + ProtoState::AccountLocked => BlockFailureReason::AccountLocked, + ProtoState::AccountExpired => BlockFailureReason::AccountLocked, ProtoState::SignatureInvalid => BlockFailureReason::SignatureInvalid, ProtoState::DroppedDueToCongestion => BlockFailureReason::DroppedDueToCongestion, ProtoState::PayloadInvalid => BlockFailureReason::PayloadInvalid, - ProtoState::FailureInvalid => BlockFailureReason::Invalid, + ProtoState::Invalid => BlockFailureReason::Invalid, }) } } @@ -238,45 +237,111 @@ impl ConvertFrom for Opti use proto::transaction_metadata::TransactionFailureReason as ProtoState; Some(match proto { ProtoState::None => return None, - ProtoState::UtxoInputAlreadySpent => TransactionFailureReason::InputUtxoAlreadySpent, - ProtoState::Conflicting => TransactionFailureReason::ConflictingWithAnotherTx, - ProtoState::UtxoInputInvalid => TransactionFailureReason::InvalidReferencedUtxo, - ProtoState::TxTypeInvalid => TransactionFailureReason::InvalidTransaction, - ProtoState::SumOfInputAndOutputValuesDoesNotMatch => { - TransactionFailureReason::SumInputsOutputsAmountMismatch + ProtoState::ConflictRejected => TransactionFailureReason::ConflictRejected, + ProtoState::InputAlreadySpent => TransactionFailureReason::InputAlreadySpent, + ProtoState::InputCreationAfterTxCreation => TransactionFailureReason::InputCreationAfterTxCreation, + ProtoState::UnlockSignatureInvalid => TransactionFailureReason::UnlockSignatureInvalid, + ProtoState::CommitmentInputReferenceInvalid => TransactionFailureReason::CommitmentInputReferenceInvalid, + ProtoState::BicInputReferenceInvalid => TransactionFailureReason::BicInputReferenceInvalid, + ProtoState::RewardInputReferenceInvalid => TransactionFailureReason::RewardInputReferenceInvalid, + ProtoState::StakingRewardCalculationFailure => TransactionFailureReason::StakingRewardCalculationFailure, + ProtoState::DelegationRewardCalculationFailure => { + TransactionFailureReason::DelegationRewardCalculationFailure } - ProtoState::UnlockBlockSignatureInvalid => TransactionFailureReason::InvalidUnlockBlockSignature, - ProtoState::ConfiguredTimelockNotYetExpired => TransactionFailureReason::TimelockNotExpired, - ProtoState::GivenNativeTokensInvalid => TransactionFailureReason::InvalidNativeTokens, - ProtoState::ReturnAmountNotFulfilled => TransactionFailureReason::StorageDepositReturnUnfulfilled, - ProtoState::InputUnlockInvalid => TransactionFailureReason::InvalidInputUnlock, - ProtoState::SenderNotUnlocked => TransactionFailureReason::SenderNotUnlocked, - ProtoState::ChainStateTransitionInvalid => TransactionFailureReason::InvalidChainStateTransition, - ProtoState::InputCreationAfterTxCreation => TransactionFailureReason::InvalidTransactionIssuingTime, - ProtoState::ManaAmountInvalid => TransactionFailureReason::InvalidManaAmount, - ProtoState::BicInputInvalid => TransactionFailureReason::InvalidBlockIssuanceCreditsAmount, - ProtoState::RewardInputInvalid => TransactionFailureReason::InvalidRewardContextInput, - ProtoState::CommitmentInputInvalid => TransactionFailureReason::InvalidCommitmentContextInput, - ProtoState::NoStakingFeature => TransactionFailureReason::MissingStakingFeature, - ProtoState::FailedToClaimStakingReward => TransactionFailureReason::FailedToClaimStakingReward, - ProtoState::FailedToClaimDelegationReward => TransactionFailureReason::FailedToClaimDelegationReward, + ProtoState::InputOutputBaseTokenMismatch => TransactionFailureReason::InputOutputBaseTokenMismatch, + ProtoState::ManaOverflow => TransactionFailureReason::ManaOverflow, + ProtoState::InputOutputManaMismatch => TransactionFailureReason::InputOutputManaMismatch, + ProtoState::ManaDecayCreationIndexExceedsTargetIndex => { + TransactionFailureReason::ManaDecayCreationIndexExceedsTargetIndex + } + ProtoState::NativeTokenSumUnbalanced => TransactionFailureReason::NativeTokenSumUnbalanced, + ProtoState::SimpleTokenSchemeMintedMeltedTokenDecrease => { + TransactionFailureReason::SimpleTokenSchemeMintedMeltedTokenDecrease + } + ProtoState::SimpleTokenSchemeMintingInvalid => TransactionFailureReason::SimpleTokenSchemeMintingInvalid, + ProtoState::SimpleTokenSchemeMeltingInvalid => TransactionFailureReason::SimpleTokenSchemeMeltingInvalid, + ProtoState::SimpleTokenSchemeMaximumSupplyChanged => { + TransactionFailureReason::SimpleTokenSchemeMaximumSupplyChanged + } + ProtoState::SimpleTokenSchemeGenesisInvalid => TransactionFailureReason::SimpleTokenSchemeGenesisInvalid, + ProtoState::MultiAddressLengthUnlockLengthMismatch => { + TransactionFailureReason::MultiAddressLengthUnlockLengthMismatch + } + ProtoState::MultiAddressUnlockThresholdNotReached => { + TransactionFailureReason::MultiAddressUnlockThresholdNotReached + } + ProtoState::SenderFeatureNotUnlocked => TransactionFailureReason::SenderFeatureNotUnlocked, + ProtoState::IssuerFeatureNotUnlocked => TransactionFailureReason::IssuerFeatureNotUnlocked, + ProtoState::StakingRewardInputMissing => TransactionFailureReason::StakingRewardInputMissing, + ProtoState::StakingBlockIssuerFeatureMissing => TransactionFailureReason::StakingBlockIssuerFeatureMissing, + ProtoState::StakingCommitmentInputMissing => TransactionFailureReason::StakingCommitmentInputMissing, + ProtoState::StakingRewardClaimingInvalid => TransactionFailureReason::StakingRewardClaimingInvalid, + ProtoState::StakingFeatureRemovedBeforeUnbonding => { + TransactionFailureReason::StakingFeatureRemovedBeforeUnbonding + } + ProtoState::StakingFeatureModifiedBeforeUnbonding => { + TransactionFailureReason::StakingFeatureModifiedBeforeUnbonding + } + ProtoState::StakingStartEpochInvalid => TransactionFailureReason::StakingStartEpochInvalid, + ProtoState::StakingEndEpochTooEarly => TransactionFailureReason::StakingEndEpochTooEarly, + ProtoState::BlockIssuerCommitmentInputMissing => { + TransactionFailureReason::BlockIssuerCommitmentInputMissing + } + ProtoState::BlockIssuanceCreditInputMissing => TransactionFailureReason::BlockIssuanceCreditInputMissing, + ProtoState::BlockIssuerNotExpired => TransactionFailureReason::BlockIssuerNotExpired, + ProtoState::BlockIssuerExpiryTooEarly => TransactionFailureReason::BlockIssuerExpiryTooEarly, + ProtoState::ManaMovedOffBlockIssuerAccount => TransactionFailureReason::ManaMovedOffBlockIssuerAccount, + ProtoState::AccountLocked => TransactionFailureReason::AccountLocked, + ProtoState::TimelockCommitmentInputMissing => TransactionFailureReason::TimelockCommitmentInputMissing, + ProtoState::TimelockNotExpired => TransactionFailureReason::TimelockNotExpired, + ProtoState::ExpirationCommitmentInputMissing => TransactionFailureReason::ExpirationCommitmentInputMissing, + ProtoState::ExpirationNotUnlockable => TransactionFailureReason::ExpirationNotUnlockable, + ProtoState::ReturnAmountNotFulFilled => TransactionFailureReason::ReturnAmountNotFulFilled, + ProtoState::NewChainOutputHasNonZeroedId => TransactionFailureReason::NewChainOutputHasNonZeroedId, + ProtoState::ChainOutputImmutableFeaturesChanged => { + TransactionFailureReason::ChainOutputImmutableFeaturesChanged + } + ProtoState::ImplicitAccountDestructionDisallowed => { + TransactionFailureReason::ImplicitAccountDestructionDisallowed + } + ProtoState::MultipleImplicitAccountCreationAddresses => { + TransactionFailureReason::MultipleImplicitAccountCreationAddresses + } + ProtoState::AccountInvalidFoundryCounter => TransactionFailureReason::AccountInvalidFoundryCounter, + ProtoState::AnchorInvalidStateTransition => TransactionFailureReason::AnchorInvalidStateTransition, + ProtoState::AnchorInvalidGovernanceTransition => { + TransactionFailureReason::AnchorInvalidGovernanceTransition + } + ProtoState::FoundryTransitionWithoutAccount => TransactionFailureReason::FoundryTransitionWithoutAccount, + ProtoState::FoundrySerialInvalid => TransactionFailureReason::FoundrySerialInvalid, + ProtoState::DelegationCommitmentInputMissing => TransactionFailureReason::DelegationCommitmentInputMissing, + ProtoState::DelegationRewardInputMissing => TransactionFailureReason::DelegationRewardInputMissing, + ProtoState::DelegationRewardsClaimingInvalid => TransactionFailureReason::DelegationRewardsClaimingInvalid, + ProtoState::DelegationOutputTransitionedTwice => { + TransactionFailureReason::DelegationOutputTransitionedTwice + } + ProtoState::DelegationModified => TransactionFailureReason::DelegationModified, + ProtoState::DelegationStartEpochInvalid => TransactionFailureReason::DelegationStartEpochInvalid, + ProtoState::DelegationAmountMismatch => TransactionFailureReason::DelegationAmountMismatch, + ProtoState::DelegationEndEpochNotZero => TransactionFailureReason::DelegationEndEpochNotZero, + ProtoState::DelegationEndEpochInvalid => TransactionFailureReason::DelegationEndEpochInvalid, ProtoState::CapabilitiesNativeTokenBurningNotAllowed => { - TransactionFailureReason::TransactionCapabilityNativeTokenBurningNotAllowed + TransactionFailureReason::CapabilitiesNativeTokenBurningNotAllowed } ProtoState::CapabilitiesManaBurningNotAllowed => { - TransactionFailureReason::TransactionCapabilityManaBurningNotAllowed + TransactionFailureReason::CapabilitiesManaBurningNotAllowed } ProtoState::CapabilitiesAccountDestructionNotAllowed => { - TransactionFailureReason::TransactionCapabilityAccountDestructionNotAllowed + TransactionFailureReason::CapabilitiesAccountDestructionNotAllowed } ProtoState::CapabilitiesAnchorDestructionNotAllowed => { - TransactionFailureReason::TransactionCapabilityAnchorDestructionNotAllowed + TransactionFailureReason::CapabilitiesAnchorDestructionNotAllowed } ProtoState::CapabilitiesFoundryDestructionNotAllowed => { - TransactionFailureReason::TransactionCapabilityFoundryDestructionNotAllowed + TransactionFailureReason::CapabilitiesFoundryDestructionNotAllowed } ProtoState::CapabilitiesNftDestructionNotAllowed => { - TransactionFailureReason::TransactionCapabilityNftDestructionNotAllowed + TransactionFailureReason::CapabilitiesNftDestructionNotAllowed } ProtoState::SemanticValidationFailed => TransactionFailureReason::SemanticValidationFailed, }) diff --git a/src/model/block_metadata.rs b/src/model/block_metadata.rs index 44b2caaf8..25b746190 100644 --- a/src/model/block_metadata.rs +++ b/src/model/block_metadata.rs @@ -98,32 +98,19 @@ impl From for iota_sdk::types::api::core::TransactionState { /// Describes the reason of a block failure. #[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] +#[allow(missing_docs)] pub enum BlockFailureReason { - /// The block is too old to issue. TooOldToIssue = 1, - /// One of the block's parents is too old. ParentTooOld = 2, - /// One of the block's parents does not exist. ParentDoesNotExist = 3, - /// One of the block's parents is invalid. - ParentInvalid = 4, - /// The block's issuer account could not be found. - IssuerAccountNotFound = 5, - /// The block's protocol version is invalid. - VersionInvalid = 6, - /// The mana cost could not be calculated. - ManaCostCalculationFailed = 7, - /// The block's issuer account burned insufficient Mana for a block. - BurnedInsufficientMana = 8, - /// The account is invalid. - AccountInvalid = 9, - /// The block's signature is invalid. - SignatureInvalid = 10, - /// The block is dropped due to congestion. - DroppedDueToCongestion = 11, - /// The block payload is invalid. - PayloadInvalid = 12, - /// The block is invalid. + IssuerAccountNotFound = 4, + ManaCostCalculationFailed = 5, + BurnedInsufficientMana = 6, + AccountLocked = 7, + AccountExpired = 8, + SignatureInvalid = 9, + DroppedDueToCongestion = 10, + PayloadInvalid = 11, Invalid = 255, } @@ -133,12 +120,11 @@ impl From for iota_sdk::types::api::core::BlockFailureReason BlockFailureReason::TooOldToIssue => Self::TooOldToIssue, BlockFailureReason::ParentTooOld => Self::ParentTooOld, BlockFailureReason::ParentDoesNotExist => Self::ParentDoesNotExist, - BlockFailureReason::ParentInvalid => Self::ParentInvalid, BlockFailureReason::IssuerAccountNotFound => Self::IssuerAccountNotFound, - BlockFailureReason::VersionInvalid => Self::VersionInvalid, BlockFailureReason::ManaCostCalculationFailed => Self::ManaCostCalculationFailed, BlockFailureReason::BurnedInsufficientMana => Self::BurnedInsufficientMana, - BlockFailureReason::AccountInvalid => Self::AccountInvalid, + BlockFailureReason::AccountLocked => Self::AccountLocked, + BlockFailureReason::AccountExpired => Self::AccountExpired, BlockFailureReason::SignatureInvalid => Self::SignatureInvalid, BlockFailureReason::DroppedDueToCongestion => Self::DroppedDueToCongestion, BlockFailureReason::PayloadInvalid => Self::PayloadInvalid, @@ -150,104 +136,173 @@ impl From for iota_sdk::types::api::core::BlockFailureReason /// Describes the reason of a transaction failure. #[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] +#[allow(missing_docs)] pub enum TransactionFailureReason { - /// The referenced UTXO was already spent. - InputUtxoAlreadySpent = 1, - /// The transaction is conflicting with another transaction. Conflicting specifically means a double spend - /// situation that both transaction pass all validation rules, eventually losing one(s) should have this reason. - ConflictingWithAnotherTx = 2, - /// The referenced UTXO is invalid. - InvalidReferencedUtxo = 3, - /// The transaction is invalid. - InvalidTransaction = 4, - /// The sum of the inputs and output base token amount does not match. - SumInputsOutputsAmountMismatch = 5, - /// The unlock block signature is invalid. - InvalidUnlockBlockSignature = 6, - /// The configured timelock is not yet expired. - TimelockNotExpired = 7, - /// The given native tokens are invalid. - InvalidNativeTokens = 8, - /// The return amount in a transaction is not fulfilled by the output side. - StorageDepositReturnUnfulfilled = 9, - /// An input unlock was invalid. - InvalidInputUnlock = 10, - /// The output contains a Sender with an ident (address) which is not unlocked. - SenderNotUnlocked = 11, - /// The chain state transition is invalid. - InvalidChainStateTransition = 12, - /// The referenced input is created after transaction issuing time. - InvalidTransactionIssuingTime = 13, - /// The mana amount is invalid. - InvalidManaAmount = 14, - /// The Block Issuance Credits amount is invalid. - InvalidBlockIssuanceCreditsAmount = 15, - /// Reward Context Input is invalid. - InvalidRewardContextInput = 16, - /// Commitment Context Input is invalid. - InvalidCommitmentContextInput = 17, - /// Staking Feature is not provided in account output when claiming rewards. - MissingStakingFeature = 18, - /// Failed to claim staking reward. - FailedToClaimStakingReward = 19, - /// Failed to claim delegation reward. - FailedToClaimDelegationReward = 20, - /// Burning of native tokens is not allowed in the transaction capabilities. - TransactionCapabilityNativeTokenBurningNotAllowed = 21, - /// Burning of mana is not allowed in the transaction capabilities. - TransactionCapabilityManaBurningNotAllowed = 22, - /// Destruction of accounts is not allowed in the transaction capabilities. - TransactionCapabilityAccountDestructionNotAllowed = 23, - /// Destruction of anchors is not allowed in the transaction capabilities. - TransactionCapabilityAnchorDestructionNotAllowed = 24, - /// Destruction of foundries is not allowed in the transaction capabilities. - TransactionCapabilityFoundryDestructionNotAllowed = 25, - /// Destruction of nfts is not allowed in the transaction capabilities. - TransactionCapabilityNftDestructionNotAllowed = 26, - /// The semantic validation failed for a reason not covered by the previous variants. + ConflictRejected = 1, + InputAlreadySpent = 2, + InputCreationAfterTxCreation = 3, + UnlockSignatureInvalid = 4, + CommitmentInputReferenceInvalid = 5, + BicInputReferenceInvalid = 6, + RewardInputReferenceInvalid = 7, + StakingRewardCalculationFailure = 8, + DelegationRewardCalculationFailure = 9, + InputOutputBaseTokenMismatch = 10, + ManaOverflow = 11, + InputOutputManaMismatch = 12, + ManaDecayCreationIndexExceedsTargetIndex = 13, + NativeTokenSumUnbalanced = 14, + SimpleTokenSchemeMintedMeltedTokenDecrease = 15, + SimpleTokenSchemeMintingInvalid = 16, + SimpleTokenSchemeMeltingInvalid = 17, + SimpleTokenSchemeMaximumSupplyChanged = 18, + SimpleTokenSchemeGenesisInvalid = 19, + MultiAddressLengthUnlockLengthMismatch = 20, + MultiAddressUnlockThresholdNotReached = 21, + SenderFeatureNotUnlocked = 22, + IssuerFeatureNotUnlocked = 23, + StakingRewardInputMissing = 24, + StakingBlockIssuerFeatureMissing = 25, + StakingCommitmentInputMissing = 26, + StakingRewardClaimingInvalid = 27, + StakingFeatureRemovedBeforeUnbonding = 28, + StakingFeatureModifiedBeforeUnbonding = 29, + StakingStartEpochInvalid = 30, + StakingEndEpochTooEarly = 31, + BlockIssuerCommitmentInputMissing = 32, + BlockIssuanceCreditInputMissing = 33, + BlockIssuerNotExpired = 34, + BlockIssuerExpiryTooEarly = 35, + ManaMovedOffBlockIssuerAccount = 36, + AccountLocked = 37, + TimelockCommitmentInputMissing = 38, + TimelockNotExpired = 39, + ExpirationCommitmentInputMissing = 40, + ExpirationNotUnlockable = 41, + ReturnAmountNotFulFilled = 42, + NewChainOutputHasNonZeroedId = 43, + ChainOutputImmutableFeaturesChanged = 44, + ImplicitAccountDestructionDisallowed = 45, + MultipleImplicitAccountCreationAddresses = 46, + AccountInvalidFoundryCounter = 47, + AnchorInvalidStateTransition = 48, + AnchorInvalidGovernanceTransition = 49, + FoundryTransitionWithoutAccount = 50, + FoundrySerialInvalid = 51, + DelegationCommitmentInputMissing = 52, + DelegationRewardInputMissing = 53, + DelegationRewardsClaimingInvalid = 54, + DelegationOutputTransitionedTwice = 55, + DelegationModified = 56, + DelegationStartEpochInvalid = 57, + DelegationAmountMismatch = 58, + DelegationEndEpochNotZero = 59, + DelegationEndEpochInvalid = 60, + CapabilitiesNativeTokenBurningNotAllowed = 61, + CapabilitiesManaBurningNotAllowed = 62, + CapabilitiesAccountDestructionNotAllowed = 63, + CapabilitiesAnchorDestructionNotAllowed = 64, + CapabilitiesFoundryDestructionNotAllowed = 65, + CapabilitiesNftDestructionNotAllowed = 66, SemanticValidationFailed = 255, } impl From for iota_sdk::types::block::semantic::TransactionFailureReason { fn from(value: TransactionFailureReason) -> Self { match value { - TransactionFailureReason::InputUtxoAlreadySpent => Self::InputUtxoAlreadySpent, - TransactionFailureReason::ConflictingWithAnotherTx => Self::ConflictingWithAnotherTx, - TransactionFailureReason::InvalidReferencedUtxo => Self::InvalidReferencedUtxo, - TransactionFailureReason::InvalidTransaction => Self::InvalidTransaction, - TransactionFailureReason::SumInputsOutputsAmountMismatch => Self::SumInputsOutputsAmountMismatch, - TransactionFailureReason::InvalidUnlockBlockSignature => Self::InvalidUnlockBlockSignature, + TransactionFailureReason::ConflictRejected => Self::ConflictRejected, + TransactionFailureReason::InputAlreadySpent => Self::InputAlreadySpent, + TransactionFailureReason::InputCreationAfterTxCreation => Self::InputCreationAfterTxCreation, + TransactionFailureReason::UnlockSignatureInvalid => Self::UnlockSignatureInvalid, + TransactionFailureReason::CommitmentInputReferenceInvalid => Self::CommitmentInputReferenceInvalid, + TransactionFailureReason::BicInputReferenceInvalid => Self::BicInputReferenceInvalid, + TransactionFailureReason::RewardInputReferenceInvalid => Self::RewardInputReferenceInvalid, + TransactionFailureReason::StakingRewardCalculationFailure => Self::StakingRewardCalculationFailure, + TransactionFailureReason::DelegationRewardCalculationFailure => Self::DelegationRewardCalculationFailure, + TransactionFailureReason::InputOutputBaseTokenMismatch => Self::InputOutputBaseTokenMismatch, + TransactionFailureReason::ManaOverflow => Self::ManaOverflow, + TransactionFailureReason::InputOutputManaMismatch => Self::InputOutputManaMismatch, + TransactionFailureReason::ManaDecayCreationIndexExceedsTargetIndex => { + Self::ManaDecayCreationIndexExceedsTargetIndex + } + TransactionFailureReason::NativeTokenSumUnbalanced => Self::NativeTokenSumUnbalanced, + TransactionFailureReason::SimpleTokenSchemeMintedMeltedTokenDecrease => { + Self::SimpleTokenSchemeMintedMeltedTokenDecrease + } + TransactionFailureReason::SimpleTokenSchemeMintingInvalid => Self::SimpleTokenSchemeMintingInvalid, + TransactionFailureReason::SimpleTokenSchemeMeltingInvalid => Self::SimpleTokenSchemeMeltingInvalid, + TransactionFailureReason::SimpleTokenSchemeMaximumSupplyChanged => { + Self::SimpleTokenSchemeMaximumSupplyChanged + } + TransactionFailureReason::SimpleTokenSchemeGenesisInvalid => Self::SimpleTokenSchemeGenesisInvalid, + TransactionFailureReason::MultiAddressLengthUnlockLengthMismatch => { + Self::MultiAddressLengthUnlockLengthMismatch + } + TransactionFailureReason::MultiAddressUnlockThresholdNotReached => { + Self::MultiAddressUnlockThresholdNotReached + } + TransactionFailureReason::SenderFeatureNotUnlocked => Self::SenderFeatureNotUnlocked, + TransactionFailureReason::IssuerFeatureNotUnlocked => Self::IssuerFeatureNotUnlocked, + TransactionFailureReason::StakingRewardInputMissing => Self::StakingRewardInputMissing, + TransactionFailureReason::StakingBlockIssuerFeatureMissing => Self::StakingBlockIssuerFeatureMissing, + TransactionFailureReason::StakingCommitmentInputMissing => Self::StakingCommitmentInputMissing, + TransactionFailureReason::StakingRewardClaimingInvalid => Self::StakingRewardClaimingInvalid, + TransactionFailureReason::StakingFeatureRemovedBeforeUnbonding => { + Self::StakingFeatureRemovedBeforeUnbonding + } + TransactionFailureReason::StakingFeatureModifiedBeforeUnbonding => { + Self::StakingFeatureModifiedBeforeUnbonding + } + TransactionFailureReason::StakingStartEpochInvalid => Self::StakingStartEpochInvalid, + TransactionFailureReason::StakingEndEpochTooEarly => Self::StakingEndEpochTooEarly, + TransactionFailureReason::BlockIssuerCommitmentInputMissing => Self::BlockIssuerCommitmentInputMissing, + TransactionFailureReason::BlockIssuanceCreditInputMissing => Self::BlockIssuanceCreditInputMissing, + TransactionFailureReason::BlockIssuerNotExpired => Self::BlockIssuerNotExpired, + TransactionFailureReason::BlockIssuerExpiryTooEarly => Self::BlockIssuerExpiryTooEarly, + TransactionFailureReason::ManaMovedOffBlockIssuerAccount => Self::ManaMovedOffBlockIssuerAccount, + TransactionFailureReason::AccountLocked => Self::AccountLocked, + TransactionFailureReason::TimelockCommitmentInputMissing => Self::TimelockCommitmentInputMissing, TransactionFailureReason::TimelockNotExpired => Self::TimelockNotExpired, - TransactionFailureReason::InvalidNativeTokens => Self::InvalidNativeTokens, - TransactionFailureReason::StorageDepositReturnUnfulfilled => Self::StorageDepositReturnUnfulfilled, - TransactionFailureReason::InvalidInputUnlock => Self::InvalidInputUnlock, - TransactionFailureReason::SenderNotUnlocked => Self::SenderNotUnlocked, - TransactionFailureReason::InvalidChainStateTransition => Self::InvalidChainStateTransition, - TransactionFailureReason::InvalidTransactionIssuingTime => Self::InvalidTransactionIssuingTime, - TransactionFailureReason::InvalidManaAmount => Self::InvalidManaAmount, - TransactionFailureReason::InvalidBlockIssuanceCreditsAmount => Self::InvalidBlockIssuanceCreditsAmount, - TransactionFailureReason::InvalidRewardContextInput => Self::InvalidRewardContextInput, - TransactionFailureReason::InvalidCommitmentContextInput => Self::InvalidCommitmentContextInput, - TransactionFailureReason::MissingStakingFeature => Self::MissingStakingFeature, - TransactionFailureReason::FailedToClaimStakingReward => Self::FailedToClaimStakingReward, - TransactionFailureReason::FailedToClaimDelegationReward => Self::FailedToClaimDelegationReward, - TransactionFailureReason::TransactionCapabilityNativeTokenBurningNotAllowed => { - Self::TransactionCapabilityNativeTokenBurningNotAllowed + TransactionFailureReason::ExpirationCommitmentInputMissing => Self::ExpirationCommitmentInputMissing, + TransactionFailureReason::ExpirationNotUnlockable => Self::ExpirationNotUnlockable, + TransactionFailureReason::ReturnAmountNotFulFilled => Self::ReturnAmountNotFulFilled, + TransactionFailureReason::NewChainOutputHasNonZeroedId => Self::NewChainOutputHasNonZeroedId, + TransactionFailureReason::ChainOutputImmutableFeaturesChanged => Self::ChainOutputImmutableFeaturesChanged, + TransactionFailureReason::ImplicitAccountDestructionDisallowed => { + Self::ImplicitAccountDestructionDisallowed + } + TransactionFailureReason::MultipleImplicitAccountCreationAddresses => { + Self::MultipleImplicitAccountCreationAddresses } - TransactionFailureReason::TransactionCapabilityManaBurningNotAllowed => { - Self::TransactionCapabilityManaBurningNotAllowed + TransactionFailureReason::AccountInvalidFoundryCounter => Self::AccountInvalidFoundryCounter, + TransactionFailureReason::AnchorInvalidStateTransition => Self::AnchorInvalidStateTransition, + TransactionFailureReason::AnchorInvalidGovernanceTransition => Self::AnchorInvalidGovernanceTransition, + TransactionFailureReason::FoundryTransitionWithoutAccount => Self::FoundryTransitionWithoutAccount, + TransactionFailureReason::FoundrySerialInvalid => Self::FoundrySerialInvalid, + TransactionFailureReason::DelegationCommitmentInputMissing => Self::DelegationCommitmentInputMissing, + TransactionFailureReason::DelegationRewardInputMissing => Self::DelegationRewardInputMissing, + TransactionFailureReason::DelegationRewardsClaimingInvalid => Self::DelegationRewardsClaimingInvalid, + TransactionFailureReason::DelegationOutputTransitionedTwice => Self::DelegationOutputTransitionedTwice, + TransactionFailureReason::DelegationModified => Self::DelegationModified, + TransactionFailureReason::DelegationStartEpochInvalid => Self::DelegationStartEpochInvalid, + TransactionFailureReason::DelegationAmountMismatch => Self::DelegationAmountMismatch, + TransactionFailureReason::DelegationEndEpochNotZero => Self::DelegationEndEpochNotZero, + TransactionFailureReason::DelegationEndEpochInvalid => Self::DelegationEndEpochInvalid, + TransactionFailureReason::CapabilitiesNativeTokenBurningNotAllowed => { + Self::CapabilitiesNativeTokenBurningNotAllowed } - TransactionFailureReason::TransactionCapabilityAccountDestructionNotAllowed => { - Self::TransactionCapabilityAccountDestructionNotAllowed + TransactionFailureReason::CapabilitiesManaBurningNotAllowed => Self::CapabilitiesManaBurningNotAllowed, + TransactionFailureReason::CapabilitiesAccountDestructionNotAllowed => { + Self::CapabilitiesAccountDestructionNotAllowed } - TransactionFailureReason::TransactionCapabilityAnchorDestructionNotAllowed => { - Self::TransactionCapabilityAnchorDestructionNotAllowed + TransactionFailureReason::CapabilitiesAnchorDestructionNotAllowed => { + Self::CapabilitiesAnchorDestructionNotAllowed } - TransactionFailureReason::TransactionCapabilityFoundryDestructionNotAllowed => { - Self::TransactionCapabilityFoundryDestructionNotAllowed + TransactionFailureReason::CapabilitiesFoundryDestructionNotAllowed => { + Self::CapabilitiesFoundryDestructionNotAllowed } - TransactionFailureReason::TransactionCapabilityNftDestructionNotAllowed => { - Self::TransactionCapabilityNftDestructionNotAllowed + TransactionFailureReason::CapabilitiesNftDestructionNotAllowed => { + Self::CapabilitiesNftDestructionNotAllowed } TransactionFailureReason::SemanticValidationFailed => Self::SemanticValidationFailed, }