diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c33bf2b4..3694c217d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,32 @@ Changelog ========= +[0.8.1](https://github.com/ordinals/ord/releases/tag/0.8.1) - 2023-07-23 +--------------------------------------------------------------------- + +### Added + +- Add retry to fetcher (#2297) +- Add satpoint and address to index export (#2284) +- Don't create default data directory if --index overrides it (#1991) +- Implement clean index shutdown to prevent index corruption (with clippy updates for Rust 1.71) (#2275) +- Set lower max age for not found (#2240) + +### Changed + +- Fix justfile recipe (#2299) +- Clean up deploy scripts (#2298) +- Update redb (#2294) +- Update bitcoin dependencies (#2281) +- Fix ordering for reinscriptions and show all reinscriptions for sat (#2279) +- Modify `ord list` output to include the end of each range (#1998) + +### Documentation + +- Fix docs inconsistency (#2276) +- Add contributing section (#2261) + + [0.8.0](https://github.com/ordinals/ord/releases/tag/0.8.0) - 2023-07-01 --------------------------------------------------------------------- @@ -40,7 +66,7 @@ Changelog [0.6.1](https://github.com/ordinals/ord/releases/tag/0.6.1) - 2023-06-06 --------------------------------------------------------------------- -### Changed +### Changed - Fix sat index test and unbound assignment (#2154) - Updated install.sh for new repo name (#2155) @@ -67,8 +93,8 @@ Changelog ### Misc - Switch CI back to stable clippy (#2108) -- Update dependencies (#2068) -- Use struct variants in Origin enum (#2067) +- Update dependencies (#2068) +- Use struct variants in Origin enum (#2067) - Fix test name typos(#2043) - Switch to nightly clippy (#2037) diff --git a/Cargo.lock b/Cargo.lock index 6348b4b169..d74ac94a20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -17,74 +17,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", - "opaque-debug", -] - [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] @@ -104,6 +41,12 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -115,9 +58,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" dependencies = [ "backtrace", ] @@ -141,7 +84,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.23", ] [[package]] @@ -169,9 +112,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -273,7 +216,7 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", "socket2", "waker-fn", @@ -313,7 +256,7 @@ dependencies = [ "cfg-if 1.0.0", "event-listener", "futures-lite", - "rustix", + "rustix 0.37.23", "signal-hook", "windows-sys 0.48.0", ] @@ -352,13 +295,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -399,13 +342,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "headers", @@ -449,9 +392,9 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197b070de3ae5fc503d531d4dc7680e016438c2ffc848a1fefebc5c53f35cc17" +checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063" dependencies = [ "arc-swap", "bytes", @@ -469,25 +412,19 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.13.1" @@ -496,9 +433,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bech32" @@ -512,29 +449,44 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.11.0", "serde", "unicode-normalization", ] [[package]] name = "bitcoin" -version = "0.29.2" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" +checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75" dependencies = [ "bech32", - "bitcoin_hashes", + "bitcoin-private", + "bitcoin_hashes 0.12.0", + "hex_lit", "secp256k1", "serde", ] +[[package]] +name = "bitcoin-private" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" + [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitcoin_hashes" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" dependencies = [ + "bitcoin-private", "serde", ] @@ -545,13 +497,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.9.0" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "block-buffer" @@ -614,9 +563,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -624,9 +573,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -660,28 +609,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", "winapi", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" version = "3.2.25" @@ -689,10 +629,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", - "indexmap", + "indexmap 1.9.3", "once_cell", "strsim", "termcolor", @@ -721,16 +661,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "concurrent-queue" version = "2.2.0" @@ -742,46 +672,23 @@ dependencies = [ [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64 0.13.1", - "hkdf", - "hmac", - "percent-encoding", - "rand 0.8.5", - "sha2 0.9.9", - "time 0.2.27", - "version_check", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -800,19 +707,13 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "crc32fast" version = "1.3.2" @@ -858,9 +759,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if 1.0.0", ] @@ -875,87 +776,14 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher", -] - [[package]] name = "ctrlc" -version = "3.2.5" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcf33c2a618cbe41ee43ae6e9f2e48368cd9f9db2896f10167d8d762679f639" +checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ "nix", - "windows-sys 0.45.0", -] - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", + "windows-sys 0.48.0", ] [[package]] @@ -995,9 +823,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der-parser" @@ -1053,7 +881,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1065,20 +893,11 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", ] @@ -1112,12 +931,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "displaydoc" version = "0.2.4" @@ -1126,7 +939,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -1163,6 +976,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -1212,7 +1031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -1238,9 +1057,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1316,7 +1135,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -1391,38 +1210,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "1391ab1f92ffcc08911957149833e682aa3fe252b9f45f966d2ef972274c97df" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1443,9 +1252,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.18" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1453,7 +1262,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util 0.7.8", @@ -1466,6 +1275,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "headers" version = "0.3.8" @@ -1473,13 +1288,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", "httpdate", "mime", - "sha1 0.10.5", + "sha1", ] [[package]] @@ -1508,18 +1323,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1528,24 +1334,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" -dependencies = [ - "digest 0.9.0", - "hmac", -] - -[[package]] -name = "hmac" -version = "0.10.1" +name = "hex_lit" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" [[package]] name = "html-escaper" @@ -1589,9 +1381,7 @@ checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" dependencies = [ "anyhow", "async-channel", - "async-std", "base64 0.13.1", - "cookie", "futures-lite", "infer", "pin-project-lite", @@ -1623,9 +1413,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1660,9 +1450,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1674,12 +1464,11 @@ dependencies = [ [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1690,9 +1479,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1705,16 +1494,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] name = "indicatif" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", + "instant", "number_prefix", "portable-atomic", "unicode-width", @@ -1737,44 +1537,43 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi 0.3.2", + "rustix 0.38.4", "windows-sys 0.48.0", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1873,25 +1672,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "linux-raw-sys" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1899,11 +1695,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" dependencies = [ - "cfg-if 1.0.0", "value-bag", ] @@ -1952,20 +1747,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "9.0.1" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9601439f168c13bdc5bf84349c2e61c815be4a4dcebe8c4ff4af58f4e8a6d20" +checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" dependencies = [ "bitcoin", -] - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", + "bitcoin-private", ] [[package]] @@ -1979,14 +1766,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2023,9 +1809,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.38" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" dependencies = [ "cfg-if 0.1.10", "libc", @@ -2054,7 +1840,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "static_assertions", @@ -2124,11 +1910,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2140,9 +1926,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -2158,23 +1944,17 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2191,7 +1971,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -2202,9 +1982,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", @@ -2220,12 +2000,12 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ord" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "axum", "axum-server", - "base64 0.21.0", + "base64 0.21.2", "bech32", "bip39", "bitcoin", @@ -2274,10 +2054,11 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc" -version = "0.16.5" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca77a54d5a14a2731dd85150e24be89c849bdcb5704d23097188d763381d98b8" +checksum = "ece3c1158d3391127ddd7615868792a602745cf4f9fbea259c4449c9ed89814a" dependencies = [ + "bitcoin-private", "jsonrpc", "log", "ord-bitcoincore-rpc-json", @@ -2287,29 +2068,21 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc-json" -version = "0.16.5" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b81ced8ed99f50d3f221a7de8297cbdf9bdf20ca2908a12f6128d38b2284fb" +checksum = "45f46eb509cc95759461d3cb483ba51b2adbea0e31747cb1e3f388e71e13a321" dependencies = [ "bitcoin", + "bitcoin-private", "serde", "serde_json", ] [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "parking" @@ -2353,35 +2126,35 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2402,7 +2175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "concurrent-queue", "libc", @@ -2411,22 +2184,11 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" -version = "0.3.19" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" [[package]] name = "ppv-lite86" @@ -2436,13 +2198,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -2479,28 +2239,22 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "pulldown-cmark" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" dependencies = [ - "bitflags", + "bitflags 1.3.2", "getopts", "memchr", "unicase", @@ -2508,9 +2262,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713eccf888fb05f1a96eb78c0dbc51907fee42b3377272dc902eb38985f418d5" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -2528,9 +2282,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -2594,7 +2348,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -2636,15 +2390,15 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.21", + "time 0.3.23", "yasna", ] [[package]] name = "redb" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1770bc0931171df3ced2adc9fd72d59cb47a4dc693d184c73cd382067f6ff44e" +checksum = "717a806693d0e1ed6cc55b392066bf13e703dd835acf5c5888c74740f924d355" dependencies = [ "libc", "pyo3-build-config", @@ -2656,7 +2410,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2665,7 +2419,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2674,35 +2428,47 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", "bytes", "encoding_rs", "futures-core", @@ -2750,9 +2516,9 @@ dependencies = [ [[package]] name = "rss" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1ec965a5f5ec71e16106b35df21861c4014ace848c6b75720816925552936d" +checksum = "9acf62e0f3f4b52f61d3a12d6279e3f0b90d4811b0ae888eabdf61a2e7c03a95" dependencies = [ "atom_syndication", "derive_builder", @@ -2762,9 +2528,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.6.1" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -2773,24 +2539,24 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.5.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 1.0.109", + "syn 2.0.26", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ - "sha2 0.10.6", + "sha2", "walkdir", ] @@ -2800,22 +2566,13 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver", ] [[package]] @@ -2829,35 +2586,48 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.1", "sct", ] [[package]] name = "rustls-acme" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58431104fd1f83db05a59b39482aa7af016bdca3ab108efcef42154ce06e2d5c" +checksum = "6b252541bcfab8ae3ed2240b9e6d5a4254a40b66597d9adb7f74f9f81b2d4f21" dependencies = [ "async-h1", "async-io", @@ -2886,11 +2656,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", ] [[package]] @@ -2903,17 +2673,27 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.101.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2926,24 +2706,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2957,11 +2731,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.12.0", "rand 0.8.5", "secp256k1-sys", "serde", @@ -2969,20 +2743,20 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" dependencies = [ "cc", ] [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2991,9 +2765,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -3001,50 +2775,35 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.162" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.162" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -3053,10 +2812,11 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa", "serde", ] @@ -3085,26 +2845,17 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "bd5f51e3fdb5b9cdd1577e1cb7a733474191b1aca6a72c2e50913241632c1180" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", "unsafe-libyaml", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - [[package]] name = "sha1" version = "0.10.5" @@ -3113,44 +2864,25 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "b824b6e687aff278cdbf3b36f07aa52d4bd4099699324d5da86a2ebce3aa00b3" dependencies = [ "libc", "signal-hook-registry", @@ -3185,9 +2917,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smol" @@ -3222,82 +2954,18 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - [[package]] name = "syn" version = "1.0.109" @@ -3311,9 +2979,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -3340,9 +3008,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.3" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcd0346f90b6bc83526c7b180039a8acd26a5c848cc556d457f6472eb148122" +checksum = "6b949f01f9c23823744b71e0060472ecbde578ef68cc2a9e46d114efd77c3034" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -3355,21 +3023,22 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "df8e77cb757a61f51b947ec4a7e3646efd825b73561db1c232a8ccb639e611a0" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "rustix 0.37.23", + "windows-sys 0.48.0", ] [[package]] @@ -3404,22 +3073,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -3435,29 +3104,14 @@ dependencies = [ [[package]] name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", "time-core", - "time-macros 0.2.9", + "time-macros", ] [[package]] @@ -3468,36 +3122,13 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.1.1" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3515,11 +3146,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -3538,7 +3170,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -3553,9 +3185,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", @@ -3628,12 +3260,12 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +checksum = "a8bd22a874a2d0b70452d5597b12c537331d49060824a95f49f108994f94aa4c" dependencies = [ "async-compression", - "bitflags", + "bitflags 2.3.3", "bytes", "futures-core", "futures-util", @@ -3673,9 +3305,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -3709,9 +3341,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3736,25 +3368,15 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unindent" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa30f5ea51ff7edfc797c6d3f9ec8cbd8cfedef5371766b7181d33977f4814f" - -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] +checksum = "0f86d931b9d0b666761dcfcbac3ec5e9daff8a2becfff93a8fce2591ae297b95" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -3764,9 +3386,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -3776,13 +3398,9 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" [[package]] name = "vcpkg" @@ -3814,11 +3432,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3842,9 +3459,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -3852,24 +3469,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3879,9 +3496,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3889,28 +3506,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -3918,11 +3535,11 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki", + "rustls-webpki 0.100.1", ] [[package]] @@ -3962,22 +3579,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.1", ] [[package]] @@ -3995,7 +3597,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -4015,9 +3617,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -4136,7 +3738,7 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.23", ] [[package]] @@ -4151,5 +3753,5 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.21", + "time 0.3.23", ] diff --git a/Cargo.toml b/Cargo.toml index 4ffb2e13ce..e4ea445979 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ord" description = "â—‰ Ordinal wallet and block explorer" -version = "0.8.0" +version = "0.8.1" license = "CC0-1.0" edition = "2021" autotests = false @@ -20,11 +20,11 @@ axum-server = "0.5.0" base64 = "0.21.0" bech32 = "0.9.1" bip39 = "2.0.0" -bitcoin = { version = "0.29.1", features = ["rand"] } +bitcoin = { version = "0.30.0", features = ["rand"] } boilerplate = { version = "0.2.3", features = ["axum"] } chrono = "0.4.19" clap = { version = "3.2.18", features = ["derive", "deprecated"] } -ctrlc = "3.2.1" +ctrlc = { version = "3.2.1", features = ["termination"] } derive_more = "0.99.17" dirs = "5.0.0" env_logger = "0.10.0" @@ -38,10 +38,10 @@ lazy_static = "1.4.0" log = "0.4.14" mime = "0.3.16" mime_guess = "2.0.4" -miniscript = "9.0.1" +miniscript = "10.0.0" mp4 = "0.13.0" -ord-bitcoincore-rpc = "0.16.5" -redb = "1.0.2" +ord-bitcoincore-rpc = "0.17.0" +redb = "1.0.5" regex = "1.6.0" rss = "2.0.1" rust-embed = "6.4.0" diff --git a/README.md b/README.md index f8e1418fae..93cbf89d79 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,49 @@ Once built, the `ord` binary can be found at `./target/release/ord`. `ord` requires `rustc` version 1.67.0 or later. Run `rustc --version` to ensure you have this version. Run `rustup update` to get the latest stable release. +Contributing +------------ + +If you wish to contribute there are a couple things that are helpful to know. We +put a lot of emphasis on proper testing in the code base, with three broad +categories of tests: unit, integration and fuzz. Unit tests can usually be found at +the bottom of a file in a mod block called `tests`. If you add or modify a +function please also add a corresponding test. Integration tests try to test +end-to-end functionality by executing a subcommand of the binary. Those can be +found in the [tests](tests) directory. We don't have a lot of fuzzing but the +basic structure of how we do it can be found in the [fuzz](fuzz) directory. + +We strongly recommend installing [just](https://github.com/casey/just) to make +running the tests easier. To run our CI test suite you would do: + +``` +just ci +``` + +This corresponds to the commands: + +``` +cargo fmt -- --check +cargo test --all +cargo test --all -- --ignored +``` + +Have look at the [justfile](justfile) to see some more helpful recipes +(commands). Here are a couple more good ones: + +``` +just fmt +just fuzz +just doc +just watch ltest --all +``` + +We also try to follow a TDD (Test-Driven-Development) approach, which means we +use tests as a way to get visibility into the code. Tests have to run fast for that +reason so that the feedback loop between making a change, running the test and +seeing the result is small. To facilitate that we created a mocked Bitcoin Core +instance in [test-bitcoincore-rpc](./test-bitcoincore-rpc). + Syncing ------- diff --git a/deploy/checkout b/deploy/checkout index 8d3d0bbb7a..b5707fd378 100755 --- a/deploy/checkout +++ b/deploy/checkout @@ -15,4 +15,7 @@ cd ord git fetch origin git checkout -B $BRANCH git reset --hard origin/$BRANCH -./deploy/setup $CHAIN $DOMAIN + +COMMIT=$(git rev-parse --short HEAD) + +./deploy/setup $CHAIN $DOMAIN $BRANCH $COMMIT diff --git a/deploy/deploy-ord-dev b/deploy/deploy-ord-dev deleted file mode 100755 index 0dd3a6006c..0000000000 --- a/deploy/deploy-ord-dev +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -set -euxo pipefail - -# This script deploys whatever is currently -# in working directory to our dev server -DOMAIN="ordinals-dev.com" - -# Current local working state -BRANCH=$(git rev-parse --abbrev-ref HEAD) -COMMIT=$(git rev-parse --short HEAD) -DIR="ord-${BRANCH}-${COMMIT}" - -# Edit service file if you want -$EDITOR ./deploy/ord-dev.service - -# Create own directory for every deploy -ssh root@${DOMAIN} "mkdir -p /var/lib/ord/${DIR}/repo" -rsync -avz --exclude-from='.gitignore' --exclude ".git" --exclude "*.redb" ./ root@${DOMAIN}:/var/lib/ord/${DIR}/repo - -# Store deployment info in environmental variables -ssh root@${DOMAIN} "echo 'BRANCH=${BRANCH}' >> /etc/environment \ - && echo 'COMMIT=${COMMIT}' >> /etc/environment \ - && echo 'DIR=${DIR}' >> /etc/environment" - -# Deploy -ssh root@${DOMAIN} "cd /var/lib/ord/${DIR}/repo \ - && /root/.cargo/bin/cargo build --release \ - && systemctl stop ord-dev \ - && cp ./target/release/ord /usr/local/bin/ord \ - && cp /var/lib/ord/${DIR}/repo/deploy/ord-dev.service /etc/systemd/system/ \ - && systemctl daemon-reload \ - && systemctl enable ord-dev \ - && systemctl restart ord-dev \ - && systemctl status ord-dev" diff --git a/deploy/ord-dev.service b/deploy/ord-dev.service deleted file mode 100644 index c513f3deff..0000000000 --- a/deploy/ord-dev.service +++ /dev/null @@ -1,37 +0,0 @@ -[Unit] -After=network.target -Description=Ord Dev Server -StartLimitBurst=120 -StartLimitIntervalSec=10m - -[Service] -AmbientCapabilities=CAP_NET_BIND_SERVICE -Environment=RUST_BACKTRACE=1 -Environment=RUST_LOG=info -ExecStart=/usr/local/bin/ord \ - --bitcoin-data-dir /var/lib/bitcoind \ - --data-dir /var/lib/ord \ -# --index-sats \ - server \ - --acme-contact mailto:casey@rodarmor.com \ - --http \ - --https -Group=ord -LimitNOFILE=65536 -MemoryDenyWriteExecute=true -NoNewPrivileges=true -PrivateDevices=true -PrivateTmp=true -ProtectHome=true -ProtectSystem=full -Restart=on-failure -RestartSec=5s -StateDirectory=ord -StateDirectoryMode=0700 -TimeoutStopSec=10m -Type=simple -User=ord -WorkingDirectory=/var/lib/ord - -[Install] -WantedBy=multi-user.target diff --git a/deploy/save-ord-dev-state b/deploy/save-ord-dev-state index 3662bccf65..1dba217b7d 100755 --- a/deploy/save-ord-dev-state +++ b/deploy/save-ord-dev-state @@ -2,16 +2,20 @@ set -euo pipefail # Stops, copies index and exports state of running instance -systemctl stop ord-dev +systemctl stop ord cd /var/lib/ord -# Still have to manually set --index-sats or --height-limit +mkdir -p /var/lib/ord/$REVISION + +# Still have to manually set --index-sats or --heigh-limit +# --height-limit 100000 \ /usr/local/bin/ord --bitcoin-data-dir /var/lib/bitcoind \ --data-dir /var/lib/ord \ + --index-sats \ index export -mv inscription_number_to_id.tsv ./${DIR}/inscription_number_to_id-${BRANCH}-${COMMIT}.tsv +mv inscription_number_to_id.tsv ./$REVISION/inscription_number_to_id-$BRANCH-$COMMIT.tsv -mv index.redb ./${DIR}/index-${BRANCH}-${COMMIT}.redb +mv index.redb ./$REVISION/index-$BRANCH-$COMMIT.redb diff --git a/deploy/setup b/deploy/setup index 913832e5a3..c374cc4261 100755 --- a/deploy/setup +++ b/deploy/setup @@ -1,9 +1,15 @@ #!/usr/bin/env bash +# This script is idempotent in the sense that running it more +# than once will not change the state beyond the initial application + set -euxo pipefail CHAIN=$1 DOMAIN=$2 +BRANCH=$3 +COMMIT=$4 +REVISION="ord-$BRANCH-$COMMIT" touch ~/.hushlogin @@ -17,6 +23,10 @@ printf "[Service]\nEnvironment=CHAIN=%s\n" $CHAIN \ | tee /etc/systemd/system/bitcoind.service.d/override.conf \ > /etc/systemd/system/ord.service.d/override.conf +printf 'BRANCH=%s\n' $BRANCH >> /etc/environment \ + && printf 'COMMIT=%s\n' $COMMIT >> /etc/environment \ + && printf 'REVISION=%s\n' $REVISION >> /etc/environment + hostnamectl set-hostname $DOMAIN apt-get install --yes \ @@ -70,7 +80,7 @@ rustup update stable cargo build --release if [[ -f /usr/local/bin/ord ]]; then - mv /usr/local/bin/ord /usr/local/bin/ord.bak + mv /usr/local/bin/ord /usr/local/bin/$REVISION.bak fi cp target/release/ord /usr/local/bin/ord diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 15c7b387e2..4e2f0176e4 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -152,7 +152,7 @@ content, the higher the fee that the inscription transaction must pay. Inscription content is included in transaction witnesses, which receive the witness discount. To calculate the approximate fee that an inscribe transaction -will pay, divide the content size by four and muliply by the fee rate. +will pay, divide the content size by four and multiply by the fee rate. Inscription transactions must be less than 400,000 weight units, or they will not be relayed by Bitcoin Core. One byte of inscription content costs one @@ -174,10 +174,10 @@ for the reveal transaction, and the inscription ID. Inscription IDs are of the form `TXIDiN`, where `TXID` is the transaction ID of the reveal transaction, and `N` is the index of the inscription in the reveal transaction. -The commit transaction commits to a tapscript containing the contents of the +The commit transaction commits to a tapscript containing the content of the inscription, and the reveal transaction spends from that tapscript, revealing -the contents on chain and inscribing them on the first sat of the first output -of the reveal transaction. +the content on chain and inscribing it on the first sat of the input that +contains the corresponding tapscript. Wait for the reveal transaction to be mined. You can check the status of the commit and reveal transactions using [the mempool.space block diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index f30058f2a7..d8121a4921 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -18,67 +18,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-gcm" -version = "0.8.0" +name = "aho-corasick" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", + "memchr", ] [[package]] -name = "aes-soft" -version = "0.6.4" +name = "alloc-no-stdlib" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] -name = "aesni" -version = "0.10.0" +name = "alloc-stdlib" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ - "cipher", - "opaque-debug", + "alloc-no-stdlib", ] [[package]] -name = "aho-corasick" -version = "0.7.20" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -91,18 +58,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" dependencies = [ "backtrace", ] [[package]] name = "arbitrary" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0224938f92e7aef515fac2ff2d18bd1115c1394ddf4a092e0c87e8be9499ee5" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" dependencies = [ "derive_arbitrary", ] @@ -126,7 +93,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.17", + "time 0.3.23", ] [[package]] @@ -137,7 +104,7 @@ checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -149,20 +116,34 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", "futures-core", ] +[[package]] +name = "async-compression" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + [[package]] name = "async-dup" version = "1.2.2" @@ -175,14 +156,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand", + "fastrand 1.9.0", "futures-lite", "slab", ] @@ -232,32 +213,31 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.23", "slab", "socket2", "waker-fn", - "windows-sys", ] [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] @@ -274,9 +254,9 @@ dependencies = [ [[package]] name = "async-process" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" dependencies = [ "async-io", "async-lock", @@ -285,9 +265,9 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "libc", + "rustix 0.37.23", "signal-hook", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -318,26 +298,26 @@ dependencies = [ [[package]] name = "async-task" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.61" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "atom_syndication" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91a85f2ee28cbd1ecf91288460f6dc74661fd99b4e9a559836a667ccf63aa38c" +checksum = "571832dcff775e26562e8e6930cd483de5587301d40d3a3b85d532b6383e15a7" dependencies = [ "chrono", "derive_builder", @@ -348,9 +328,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atty" @@ -371,15 +351,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.2" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1304eab461cf02bd70b083ed8273388f9724c549b316ba3d1e213ce0e9e7fb7e" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", + "headers", "http", "http-body", "hyper", @@ -397,16 +378,15 @@ dependencies = [ "sync_wrapper", "tokio", "tower", - "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f487e40dc9daee24d8a1779df88522f159a54a980f99cfbe43db0be0bd3444a8" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", @@ -421,9 +401,9 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8456dab8f11484979a86651da8e619b355ede5d61a160755155f6c344bd18c47" +checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063" dependencies = [ "arc-swap", "bytes", @@ -441,9 +421,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", @@ -454,12 +434,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.13.1" @@ -468,9 +442,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bech32" @@ -480,40 +454,48 @@ checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bip39" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e89470017230c38e52b82b3ee3f530db1856ba1d434e3a67a3456a8a8dec5f" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes 0.9.7", - "rand_core 0.4.2", + "bitcoin_hashes 0.11.0", "serde", "unicode-normalization", ] [[package]] name = "bitcoin" -version = "0.29.2" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" +checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75" dependencies = [ "bech32", - "bitcoin_hashes 0.11.0", + "bitcoin-private", + "bitcoin_hashes 0.12.0", + "hex_lit", "secp256k1", "serde", ] [[package]] -name = "bitcoin_hashes" -version = "0.9.7" +name = "bitcoin-private" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce18265ec2324ad075345d5814fbeed4f41f0a660055dc78840b74d19b874b1" +checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitcoin_hashes" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" dependencies = [ + "bitcoin-private", "serde", ] @@ -524,35 +506,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.9.0" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "blocking" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", "async-lock", "async-task", "atomic-waker", - "fastrand", + "fastrand 1.9.0", "futures-lite", + "log", ] [[package]] @@ -566,26 +546,53 @@ dependencies = [ "new_mime_guess", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "brotli" +version = "3.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byteorder" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -598,39 +605,30 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", "winapi", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", - "indexmap", + "indexmap 1.9.3", "once_cell", "strsim", "termcolor", @@ -639,15 +637,15 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.2.18" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -659,195 +657,126 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "concurrent-queue" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys", + "windows-sys 0.45.0", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64 0.13.1", - "hkdf", - "hmac", - "percent-encoding", - "rand 0.8.5", - "sha2 0.9.9", - "time 0.2.27", - "version_check", -] - [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] [[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - -[[package]] -name = "crossbeam-utils" -version = "0.8.14" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctor" -version = "0.1.26" +name = "crossbeam-channel" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "quote", - "syn", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "ctr" -version = "0.6.0" +name = "crossbeam-deque" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cipher", + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "ctrlc" -version = "3.2.4" +name = "crossbeam-epoch" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ - "nix", - "windows-sys", + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", ] [[package]] -name = "cxx" -version = "1.0.86" +name = "crossbeam-utils" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", + "cfg-if", ] [[package]] -name = "cxx-build" -version = "1.0.86" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", + "generic-array", + "typenum", ] [[package]] -name = "cxxbridge-flags" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.86" +name = "ctrlc" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ - "proc-macro2", - "quote", - "syn", + "nix", + "windows-sys 0.48.0", ] [[package]] name = "darling" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -855,34 +784,34 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der-parser" @@ -900,13 +829,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.2.2" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf460bbff5f571bfc762da5102729f59f338be7db17a21fade44c5c4f5005350" +checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -927,7 +856,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -937,7 +866,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ "derive_builder_core", - "syn", + "syn 1.0.109", ] [[package]] @@ -949,26 +878,17 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", + "rustc_version", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.3", + "block-buffer", "crypto-common", ] @@ -983,41 +903,42 @@ dependencies = [ [[package]] name = "dirs" -version = "4.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "displaydoc" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + [[package]] name = "encode_unicode" version = "0.3.6" @@ -1026,9 +947,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ "cfg-if", ] @@ -1046,15 +967,21 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1075,13 +1002,29 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "flate2" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1090,18 +1033,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1114,9 +1057,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1124,15 +1067,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1141,17 +1084,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -1162,43 +1105,42 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "futures-rustls" -version = "0.22.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" dependencies = [ "futures-io", "rustls", - "webpki 0.22.0", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1224,9 +1166,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1254,36 +1196,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "gloo-timers" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", @@ -1293,9 +1225,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1303,7 +1235,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1317,54 +1249,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] -name = "heck" -version = "0.4.0" +name = "hashbrown" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "headers" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "libc", + "base64 0.13.1", + "bitflags 1.3.2", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", ] [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "headers-core" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "libc", + "http", ] [[package]] -name = "hex" -version = "0.4.3" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hkdf" -version = "0.10.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "digest 0.9.0", - "hmac", + "libc", ] [[package]] -name = "hmac" -version = "0.10.1" +name = "hermit-abi" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex_lit" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" [[package]] name = "html-escaper" @@ -1374,9 +1320,9 @@ checksum = "459a0ca33ee92551e0a3bb1774f2d3bdd1c09fb6341845736662dd25e1fcb52a" [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -1396,9 +1342,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "http-types" @@ -1408,9 +1354,7 @@ checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" dependencies = [ "anyhow", "async-channel", - "async-std", "base64 0.13.1", - "cookie", "futures-lite", "infer", "pin-project-lite", @@ -1442,9 +1386,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1466,26 +1410,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1496,32 +1439,42 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] name = "indicatif" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", + "instant", "number_prefix", "portable-atomic", "unicode-width", @@ -1544,54 +1497,55 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.4" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ + "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes", - "rustix", - "windows-sys", + "hermit-abi 0.3.2", + "rustix 0.38.4", + "windows-sys 0.48.0", ] [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpc" -version = "0.14.0" -source = "git+https://github.com/apoelstra/rust-jsonrpc.git?rev=64b58797dd517c4de0cec769ff5652220801fe18#64b58797dd517c4de0cec769ff5652220801fe18" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" dependencies = [ "base64 0.13.1", "serde", @@ -1615,15 +1569,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libfuzzer-sys" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fff891139ee62800da71b7fd5b508d570b9ad95e614a53c6f453ca08366038" +checksum = "beb09950ae85a0a94b27676cccf37da5ff13f27076aa1adbc6545dd0d0e1bd4e" dependencies = [ "arbitrary", "cc", @@ -1631,59 +1585,52 @@ dependencies = [ ] [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "linux-raw-sys" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" dependencies = [ - "cfg-if", "value-bag", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "matchit" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -1703,32 +1650,46 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "9.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123a10aae81d0712ecc09b780f6f0ae0b0f506a5c4c912974725760d59ba073e" +checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" dependencies = [ "bitcoin", + "bitcoin-private", ] [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "mp4" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509348cba250e7b852a875100a2ddce7a36ee3abf881a681c756670c1774264d" +dependencies = [ + "byteorder", + "bytes", + "num-rational", + "serde", + "serde_json", + "thiserror", ] [[package]] @@ -1753,7 +1714,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "static_assertions", @@ -1769,6 +1730,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.3" @@ -1790,22 +1760,35 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -1817,9 +1800,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.30.2" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8c786513eb403643f2a88c244c2aaa270ef2153f55094587d0c48a3cf22a83" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -1835,23 +1818,24 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ord" -version = "0.4.0" +version = "0.8.1" dependencies = [ "anyhow", "axum", "axum-server", + "base64 0.21.2", "bech32", "bip39", "bitcoin", @@ -1866,12 +1850,14 @@ dependencies = [ "hex", "html-escaper", "http", + "hyper", "indicatif", "lazy_static", "log", "mime", "mime_guess", "miniscript", + "mp4", "ord-bitcoincore-rpc", "pulldown-cmark", "redb", @@ -1882,7 +1868,8 @@ dependencies = [ "rustls-acme", "serde", "serde_json", - "sys-info", + "serde_yaml", + "sysinfo", "tempfile", "tokio", "tokio-stream", @@ -1892,9 +1879,11 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc" -version = "0.16.4" -source = "git+https://github.com/casey/rust-bitcoincore-rpc?branch=ord#1bc2638f5a3049495a7aa953c4c6dac44fd1524b" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ece3c1158d3391127ddd7615868792a602745cf4f9fbea259c4449c9ed89814a" dependencies = [ + "bitcoin-private", "jsonrpc", "log", "ord-bitcoincore-rpc-json", @@ -1904,25 +1893,27 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc-json" -version = "0.16.4" -source = "git+https://github.com/casey/rust-bitcoincore-rpc?branch=ord#1bc2638f5a3049495a7aa953c4c6dac44fd1524b" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f46eb509cc95759461d3cb483ba51b2adbea0e31747cb1e3f388e71e13a321" dependencies = [ "bitcoin", + "bitcoin-private", "serde", "serde_json", ] [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "pem" @@ -1935,35 +1926,35 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -1973,34 +1964,25 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polling" -version = "2.5.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", + "bitflags 1.3.2", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys", -] - -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", + "pin-project-lite", + "windows-sys 0.48.0", ] [[package]] name = "portable-atomic" -version = "0.3.19" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b" +checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" [[package]] name = "ppv-lite86" @@ -2017,7 +1999,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -2032,28 +2014,22 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "pulldown-cmark" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" dependencies = [ - "bitflags", + "bitflags 1.3.2", "getopts", "memchr", "unicase", @@ -2061,9 +2037,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.17.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -2071,9 +2047,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.27.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" dependencies = [ "encoding_rs", "memchr", @@ -2081,9 +2057,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -2132,12 +2108,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -2153,7 +2123,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.10", ] [[package]] @@ -2165,22 +2135,45 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + [[package]] name = "rcgen" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.17", + "time 0.3.23", "yasna", ] [[package]] name = "redb" -version = "0.11.0" -source = "git+https://github.com/casey/redb.git?branch=ord#826fd633b2e26bb649cf7004406cb469fbb28837" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "717a806693d0e1ed6cc55b392066bf13e703dd835acf5c5888c74740f924d355" dependencies = [ "libc", "pyo3-build-config", @@ -2192,7 +2185,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -2201,36 +2203,39 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall", + "getrandom 0.2.10", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", ] [[package]] -name = "regex-syntax" -version = "0.6.28" +name = "regex-automata" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-syntax" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "ring" @@ -2249,9 +2254,9 @@ dependencies = [ [[package]] name = "rss" -version = "2.0.2" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14816ec8b4e58b34a36adba66dcadd3e1e221dcb0fb2fd83e7c5129ea1a72458" +checksum = "32100fb1eea9edc4be79553ae97914add78b55892a517995fe96d1ada50d09d7" dependencies = [ "atom_syndication", "derive_builder", @@ -2261,9 +2266,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.4.2" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "283ffe2f866869428c92e0d61c2f35dfb4355293cdfdc48f49e895c15f1333d1" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -2272,41 +2277,32 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.3.1" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ab23d42d71fb9be1b643fe6765d292c5e14d46912d13f3ae2815ca048ea04d" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn", + "syn 2.0.27", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.3.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1669d81dfabd1b5f8e2856b8bbe146c6192b0ba22162edc738ac0a5de18f054" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ - "sha2 0.10.6", + "sha2", "walkdir", ] [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" @@ -2314,7 +2310,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver", ] [[package]] @@ -2328,35 +2324,48 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.7" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", - "windows-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", + "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ "log", "ring", + "rustls-webpki 0.101.2", "sct", - "webpki 0.22.0", ] [[package]] name = "rustls-acme" -version = "0.5.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3718e4ae9807cd8ec87578b742c18c2627edca926bc17d0d8dfbf43ca99d38ce" +checksum = "6b252541bcfab8ae3ed2240b9e6d5a4254a40b66597d9adb7f74f9f81b2d4f21" dependencies = [ "async-h1", "async-io", @@ -2369,7 +2378,6 @@ dependencies = [ "http-types", "log", "pem", - "pin-project", "rcgen", "ring", "rustls", @@ -2386,24 +2394,44 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2415,10 +2443,10 @@ dependencies = [ ] [[package]] -name = "scratch" -version = "1.0.3" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2432,11 +2460,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", "rand 0.8.5", "secp256k1-sys", "serde", @@ -2444,59 +2472,44 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" dependencies = [ "cc", ] [[package]] name = "semver" -version = "0.9.0" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "63ba2516aa6bf82e0b19ca8b50019d52df58455d3cf9bdaf6315225fdd0c560a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "401797fe7833d72109fedec6bfcbe67c0eed9b99772f26eb8afd261f0abc6fd3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -2505,10 +2518,11 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.9" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b04f22b563c91331a10074bda3dd5492e3cc39d56bd557e91c0af42b6c7341" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa", "serde", ] @@ -2536,49 +2550,45 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.6.1" +name = "serde_yaml" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "sha1_smol", + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", ] [[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - -[[package]] -name = "sha2" -version = "0.9.9" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -2586,9 +2596,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -2604,22 +2614,13 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smol" version = "1.3.0" @@ -2639,9 +2640,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -2653,15 +2654,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -2669,71 +2661,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "stdweb-internal-macros" -version = "0.2.9" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "base-x", "proc-macro2", "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn", + "unicode-ident", ] -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - [[package]] name = "syn" -version = "1.0.107" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" dependencies = [ "proc-macro2", "quote", @@ -2742,9 +2690,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "synstructure" @@ -2754,38 +2702,42 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] [[package]] -name = "sys-info" -version = "0.9.1" +name = "sysinfo" +version = "0.29.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c" +checksum = "165d6d8539689e3d3bc8b98ac59541e1f21c7de7c85d60dc80e43ae0ed2113db" dependencies = [ - "cc", + "cfg-if", + "core-foundation-sys", "libc", + "ntapi", + "once_cell", + "rayon", + "winapi", ] [[package]] name = "target-lexicon" -version = "0.12.5" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" +checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" dependencies = [ "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "fastrand 2.0.0", + "redox_syscall 0.3.5", + "rustix 0.38.4", + "windows-sys 0.48.0", ] [[package]] @@ -2805,22 +2757,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -2836,114 +2788,90 @@ dependencies = [ [[package]] name = "time" -version = "0.2.27" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", "time-core", - "time-macros 0.2.6", + "time-macros", ] [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.1.1" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ - "proc-macro-hack", - "time-macros-impl", + "time-core", ] [[package]] -name = "time-macros" -version = "0.2.6" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "time-core", + "tinyvec_macros", ] [[package]] -name = "time-macros-impl" -version = "0.1.2" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki 0.22.0", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2952,9 +2880,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -2983,11 +2911,12 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ - "bitflags", + "async-compression", + "bitflags 2.3.3", "bytes", "futures-core", "futures-util", @@ -2995,7 +2924,8 @@ dependencies = [ "http-body", "http-range-header", "pin-project-lite", - "tower", + "tokio", + "tokio-util", "tower-layer", "tower-service", ] @@ -3026,9 +2956,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -3056,23 +2986,23 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046be40136ef78dc325e0edefccf84ccddacd0afcc1ca54103fa3c61bbdab1d" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" -version = "0.1.9" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "smallvec", + "tinyvec", ] [[package]] @@ -3088,14 +3018,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] -name = "universal-hash" -version = "0.4.1" +name = "unsafe-libyaml" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -3105,9 +3031,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -3117,13 +3043,9 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" [[package]] name = "version_check" @@ -3139,22 +3061,20 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3178,9 +3098,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3188,24 +3108,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.27", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -3215,9 +3135,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3225,69 +3145,40 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "cc", + "rustls-webpki 0.100.1", ] [[package]] @@ -3321,62 +3212,146 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.1", +] + [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "x509-parser" @@ -3393,14 +3368,14 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.17", + "time 0.3.23", ] [[package]] name = "yasna" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.17", + "time 0.3.23", ] diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index c5f2e47066..4725759858 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -15,7 +15,7 @@ debug = 1 [dependencies] arbitrary = { version = "1", features = ["derive"] } -bitcoin = { version = "0.29.1", features = ["rand"] } +bitcoin = { version = "0.30.0", features = ["rand"] } libfuzzer-sys = "0.4" ord = { path = ".." } @@ -24,7 +24,3 @@ name = "transaction-builder" path = "fuzz_targets/transaction_builder.rs" test = false doc = false - -[patch.crates-io] -jsonrpc = { git = "https://github.com/apoelstra/rust-jsonrpc.git", rev = "64b58797dd517c4de0cec769ff5652220801fe18" } -redb = { git = "https://github.com/casey/redb.git", branch = "ord" } diff --git a/fuzz/fuzz_targets/transaction_builder.rs b/fuzz/fuzz_targets/transaction_builder.rs index f7b9c41717..ad1be3dcfe 100644 --- a/fuzz/fuzz_targets/transaction_builder.rs +++ b/fuzz/fuzz_targets/transaction_builder.rs @@ -2,7 +2,10 @@ use { arbitrary::Arbitrary, - bitcoin::{Amount, OutPoint}, + bitcoin::{ + address::{Address, NetworkUnchecked}, + Amount, OutPoint, + }, libfuzzer_sys::fuzz_target, ord::{FeeRate, SatPoint, TransactionBuilder}, std::collections::BTreeMap, @@ -44,16 +47,19 @@ fuzz_target!(|input: Input| { } let recipient = "bc1pdqrcrxa8vx6gy75mfdfj84puhxffh4fq46h3gkp6jxdd0vjcsdyspfxcv6" - .parse() - .unwrap(); + .parse::>() + .unwrap() + .assume_checked(); let change = [ "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), ]; let Ok(fee_rate) = FeeRate::try_from(input.fee_rate) else { return; }; diff --git a/justfile b/justfile index 82d0d3f0b8..884191de5b 100644 --- a/justfile +++ b/justfile @@ -12,7 +12,7 @@ forbid: ./bin/forbid fmt: - cargo fmt + cargo fmt --all clippy: cargo clippy --all --all-targets -- -D warnings @@ -36,13 +36,13 @@ deploy-signet branch="master": (deploy branch "signet" "signet.ordinals.net") deploy-testnet branch="master": (deploy branch "test" "testnet.ordinals.net") -ord-dev-save-state domain="ordinals-dev.com": +deploy-ord-dev branch="master" chain="main" domain="ordinals-dev.com": (deploy branch chain domain) + +save-ord-dev-state domain="ordinals-dev.com": + $EDITOR ./deploy/save-ord-dev-state scp ./deploy/save-ord-dev-state root@{{domain}}:~ ssh root@{{domain}} "./save-ord-dev-state" -ord-dev-deploy: - ./deploy/deploy-ord-dev - log unit="ord" domain="ordinals.net": ssh root@{{domain}} 'journalctl -fu {{unit}}' @@ -80,7 +80,7 @@ prepare-release revision='master': #!/usr/bin/env bash set -euxo pipefail git checkout {{ revision }} - git pull upstream {{ revision }} + git pull origin {{ revision }} echo >> CHANGELOG.md git log --pretty='format:- %s' >> CHANGELOG.md $EDITOR CHANGELOG.md diff --git a/src/chain.rs b/src/chain.rs index 8145578ea6..1f72115bbb 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -54,7 +54,7 @@ impl Chain { pub(crate) fn address_from_script( self, script: &Script, - ) -> Result { + ) -> Result { Address::from_script(script, self.network()) } @@ -66,13 +66,6 @@ impl Chain { Self::Regtest => data_dir.join("regtest"), } } - - pub(crate) fn check_address_is_valid_for_network(self, address: &Address) -> Result { - if !address.is_valid_for_network(self.network()) { - bail!("Address `{address}` is not valid for {self}"); - } - Ok(()) - } } impl Display for Chain { diff --git a/src/index.rs b/src/index.rs index fc94ad24e2..b2b208c7c7 100644 --- a/src/index.rs +++ b/src/index.rs @@ -8,7 +8,7 @@ use { }, super::*, crate::wallet::Wallet, - bitcoin::BlockHeader, + bitcoin::block::Header, bitcoincore_rpc::{json::GetBlockHeaderResult, Client}, chrono::SubsecRound, indicatif::{ProgressBar, ProgressStyle}, @@ -18,7 +18,7 @@ use { TableDefinition, WriteTransaction, }, std::collections::HashMap, - std::io::{BufWriter, Write}, + std::io::{BufWriter, Read, Write}, std::sync::atomic::{self, AtomicBool}, }; @@ -147,18 +147,19 @@ impl Index { pub(crate) fn open(options: &Options) -> Result { let client = options.bitcoin_rpc_client()?; - let data_dir = options.data_dir()?; - - if let Err(err) = fs::create_dir_all(&data_dir) { - bail!("failed to create data dir `{}`: {err}", data_dir.display()); - } - let path = if let Some(path) = &options.index { path.clone() } else { - data_dir.join("index.redb") + options.data_dir()?.join("index.redb") }; + if let Err(err) = fs::create_dir_all(path.parent().unwrap()) { + bail!( + "failed to create data dir `{}`: {err}", + path.parent().unwrap().display() + ); + } + let db_cache_size = match options.db_cache_size { Some(db_cache_size) => db_cache_size, None => { @@ -168,6 +169,20 @@ impl Index { } }; + if let Ok(mut file) = fs::OpenOptions::new().read(true).open(&path) { + // use cberner's quick hack to check the redb recovery bit + // https://github.com/cberner/redb/issues/639#issuecomment-1628037591 + const MAGICNUMBER: [u8; 9] = [b'r', b'e', b'd', b'b', 0x1A, 0x0A, 0xA9, 0x0D, 0x0A]; + const RECOVERY_REQUIRED: u8 = 2; + + let mut buffer = [0; MAGICNUMBER.len() + 1]; + file.read_exact(&mut buffer).unwrap(); + + if buffer[MAGICNUMBER.len()] & RECOVERY_REQUIRED != 0 { + println!("Index file {:?} needs recovery. This can take a long time, especially for the --index-sats index.", path); + } + } + log::info!("Setting DB cache size to {} bytes", db_cache_size); let database = match Database::builder() @@ -347,8 +362,7 @@ impl Index { blocks_indexed: wtx .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height.value() + 1) .unwrap_or(0), @@ -385,24 +399,67 @@ impl Index { Updater::update(self) } - pub(crate) fn export(&self, filename: &String) -> Result { + pub(crate) fn export(&self, filename: &String, include_addresses: bool) -> Result { let mut writer = BufWriter::new(File::create(filename)?); + let rtx = self.database.begin_read()?; - for result in self - .database - .begin_read()? + let blocks_indexed = rtx + .open_table(HEIGHT_TO_BLOCK_HASH)? + .range(0..)? + .next_back() + .and_then(|result| result.ok()) + .map(|(height, _hash)| height.value() + 1) + .unwrap_or(0); + + writeln!(writer, "# export at block height {}", blocks_indexed)?; + + log::info!("exporting database tables to {filename}"); + + for result in rtx .open_table(INSCRIPTION_NUMBER_TO_INSCRIPTION_ID)? .iter()? { let (number, id) = result?; - writeln!( + let inscription_id = InscriptionId::load(*id.value()); + + let satpoint = self + .get_inscription_satpoint_by_id(inscription_id)? + .unwrap(); + + write!( writer, - "{}\t{}", + "{}\t{}\t{}", number.value(), - InscriptionId::load(*id.value()) + inscription_id, + satpoint )?; - } + if include_addresses { + let address = if satpoint.outpoint == unbound_outpoint() { + "unbound".to_string() + } else { + let output = self + .get_transaction(satpoint.outpoint.txid)? + .unwrap() + .output + .into_iter() + .nth(satpoint.outpoint.vout.try_into().unwrap()) + .unwrap(); + self + .options + .chain() + .address_from_script(&output.script_pubkey) + .map(|address| address.to_string()) + .unwrap_or_else(|e| e.to_string()) + }; + write!(writer, "\t{}", address)?; + } + writeln!(writer)?; + + if SHUTTING_DOWN.load(atomic::Ordering::Relaxed) { + break; + } + } writer.flush()?; Ok(()) } @@ -513,7 +570,7 @@ impl Index { } } - pub(crate) fn block_header(&self, hash: BlockHash) -> Result> { + pub(crate) fn block_header(&self, hash: BlockHash) -> Result> { self.client.get_block_header(&hash).into_option() } @@ -536,17 +593,30 @@ impl Index { self.client.get_block(&hash).into_option() } - pub(crate) fn get_inscription_id_by_sat(&self, sat: Sat) -> Result> { - Ok( - self - .database - .begin_read()? - .open_multimap_table(SAT_TO_INSCRIPTION_ID)? - .get(&sat.n())? - .next() - .and_then(|result| result.ok()) - .map(|inscription_id| Entry::load(*inscription_id.value())), - ) + pub(crate) fn get_inscription_ids_by_sat(&self, sat: Sat) -> Result> { + let rtx = &self.database.begin_read()?; + + let mut ids = rtx + .open_multimap_table(SAT_TO_INSCRIPTION_ID)? + .get(&sat.n())? + .filter_map(|result| { + result + .ok() + .map(|inscription_id| InscriptionId::load(*inscription_id.value())) + }) + .collect::>(); + + if ids.len() > 1 { + let re_id_to_seq_num = rtx.open_table(REINSCRIPTION_ID_TO_SEQUENCE_NUMBER)?; + ids.sort_by_key( + |inscription_id| match re_id_to_seq_num.get(&inscription_id.store()) { + Ok(Some(num)) => num.value() + 1, // remove at next index refactor + _ => 0, + }, + ); + } + + Ok(ids) } pub(crate) fn get_inscription_id_by_inscription_number( @@ -598,37 +668,30 @@ impl Index { })) } - pub(crate) fn get_inscriptions_on_output( - &self, - outpoint: OutPoint, - ) -> Result> { - Ok( - Self::inscriptions_on_output( - &self - .database - .begin_read()? - .open_multimap_table(SATPOINT_TO_INSCRIPTION_ID)?, - outpoint, - )? - .map(|(_satpoint, inscription_id)| inscription_id) - .collect(), - ) - } - - #[cfg(test)] - pub(crate) fn get_inscriptions_on_output_ordered( + pub(crate) fn get_inscriptions_on_output_with_satpoints( &self, outpoint: OutPoint, ) -> Result> { let rtx = &self.database.begin_read()?; - let sat_to_id = rtx.open_multimap_table(SATPOINT_TO_INSCRIPTION_ID)?; - let re_id_to_seq_num = rtx.open_table(REINSCRIPTION_ID_TO_SEQUENCE_NUMBER)?; Self::inscriptions_on_output_ordered(&re_id_to_seq_num, &sat_to_id, outpoint) } + pub(crate) fn get_inscriptions_on_output( + &self, + outpoint: OutPoint, + ) -> Result> { + Ok( + self + .get_inscriptions_on_output_with_satpoints(outpoint)? + .iter() + .map(|(_satpoint, inscription_id)| *inscription_id) + .collect(), + ) + } + pub(crate) fn get_transaction(&self, txid: Txid) -> Result> { if txid == self.genesis_block_coinbase_txid { Ok(Some(self.genesis_block_coinbase_transaction.clone())) @@ -739,8 +802,7 @@ impl Index { let current = tx .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height) .map(|x| x.value()) @@ -779,7 +841,7 @@ impl Index { let id = id_result?; result.insert(Entry::load(*satpoint.value()), Entry::load(*id.value())); } - if result.len() == n.unwrap_or(usize::MAX) { + if result.len() >= n.unwrap_or(usize::MAX) { break; } } @@ -811,7 +873,7 @@ impl Index { let inscription_number_to_inscription_id = rtx.open_table(INSCRIPTION_NUMBER_TO_INSCRIPTION_ID)?; - let latest = match inscription_number_to_inscription_id.iter()?.rev().next() { + let latest = match inscription_number_to_inscription_id.iter()?.next_back() { Some(Ok((number, _id))) => number.value(), Some(Err(_)) => return Ok(Default::default()), None => return Ok(Default::default()), @@ -947,7 +1009,7 @@ impl Index { } } - fn inscriptions_on_output<'a: 'tx, 'tx>( + fn inscriptions_on_output_unordered<'a: 'tx, 'tx>( satpoint_to_id: &'a impl ReadableMultimapTable<&'static SatPointValue, &'static InscriptionIdValue>, outpoint: OutPoint, ) -> Result + 'tx> { @@ -981,7 +1043,7 @@ impl Index { satpoint_to_id: &'a impl ReadableMultimapTable<&'static SatPointValue, &'static InscriptionIdValue>, outpoint: OutPoint, ) -> Result> { - let mut result = Self::inscriptions_on_output(satpoint_to_id, outpoint)? + let mut result = Self::inscriptions_on_output_unordered(satpoint_to_id, outpoint)? .collect::>(); if result.len() <= 1 { @@ -990,7 +1052,7 @@ impl Index { result.sort_by_key(|(_satpoint, inscription_id)| { match re_id_to_seq_num.get(&inscription_id.store()) { - Ok(Some(num)) => num.value(), + Ok(Some(num)) => num.value() + 1, // remove at next index refactor Ok(None) => 0, _ => 0, } @@ -2524,30 +2586,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0)], @@ -2631,30 +2693,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0), (2, 0, 0), (3, 0, 0)], @@ -2736,30 +2798,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0)], @@ -3004,7 +3066,7 @@ mod tests { ], context .index - .get_inscriptions_on_output_ordered(OutPoint { txid, vout: 0 }) + .get_inscriptions_on_output_with_satpoints(OutPoint { txid, vout: 0 }) .unwrap() .iter() .map(|(_satpoint, inscription_id)| *inscription_id) @@ -3056,7 +3118,94 @@ mod tests { vec![(location, first), (location, second), (location, third)], context .index - .get_inscriptions_on_output_ordered(OutPoint { txid, vout: 0 }) + .get_inscriptions_on_output_with_satpoints(OutPoint { txid, vout: 0 }) + .unwrap() + ) + } + } + + #[test] + fn reinscriptions_sequence_numbers_are_tracked_correctly() { + for context in Context::configurations() { + context.mine_blocks(1); + + let mut inscription_ids = vec![]; + for i in 1..=5 { + let txid = context.rpc_server.broadcast_tx(TransactionTemplate { + inputs: &[(i, if i == 1 { 0 } else { 1 }, 0)], // for the first inscription use coinbase, otherwise use the previous tx + witness: inscription("text/plain;charset=utf-8", &format!("hello {}", i)).to_witness(), + ..Default::default() + }); + + inscription_ids.push(InscriptionId { txid, index: 0 }); + + context.mine_blocks(1); + } + + let rtx = context.index.database.begin_read().unwrap(); + let re_id_to_seq_num = rtx.open_table(REINSCRIPTION_ID_TO_SEQUENCE_NUMBER).unwrap(); + + for (index, id) in inscription_ids.iter().enumerate() { + match re_id_to_seq_num.get(&id.store()) { + Ok(Some(num)) => { + let sequence_number = num.value() + 1; // remove at next index refactor + assert_eq!( + index as u64, sequence_number, + "sequence number mismatch for {:?}", + id + ); + } + Ok(None) => assert_eq!( + index, 0, + "only first inscription should not have sequence number for {:?}", + id + ), + Err(error) => panic!("Error retrieving sequence number: {}", error), + } + } + } + } + + #[test] + fn reinscriptions_are_ordered_correctly_for_many_outpoints() { + for context in Context::configurations() { + context.mine_blocks(1); + + let mut inscription_ids = vec![]; + for i in 1..=21 { + let txid = context.rpc_server.broadcast_tx(TransactionTemplate { + inputs: &[(i, if i == 1 { 0 } else { 1 }, 0)], // for the first inscription use coinbase, otherwise use the previous tx + witness: inscription("text/plain;charset=utf-8", &format!("hello {}", i)).to_witness(), + ..Default::default() + }); + + inscription_ids.push(InscriptionId { txid, index: 0 }); + + context.mine_blocks(1); + } + + let final_txid = inscription_ids.last().unwrap().txid; + let location = SatPoint { + outpoint: OutPoint { + txid: final_txid, + vout: 0, + }, + offset: 0, + }; + + let expected_result = inscription_ids + .iter() + .map(|id| (location, *id)) + .collect::>(); + + assert_eq!( + expected_result, + context + .index + .get_inscriptions_on_output_with_satpoints(OutPoint { + txid: final_txid, + vout: 0 + }) .unwrap() ) } diff --git a/src/index/entry.rs b/src/index/entry.rs index 9b9c80de05..f7c09ea91f 100644 --- a/src/index/entry.rs +++ b/src/index/entry.rs @@ -14,11 +14,11 @@ impl Entry for BlockHash { type Value = BlockHashValue; fn load(value: Self::Value) -> Self { - BlockHash::from_inner(value) + BlockHash::from_raw_hash(Hash::from_byte_array(value)) } fn store(self) -> Self::Value { - self.into_inner() + *self.as_ref() } } @@ -72,7 +72,7 @@ impl Entry for InscriptionId { fn load(value: Self::Value) -> Self { let (txid, index) = value.split_at(32); Self { - txid: Txid::from_inner(txid.try_into().unwrap()), + txid: Txid::from_raw_hash(Hash::from_slice(txid).unwrap()), index: u32::from_be_bytes(index.try_into().unwrap()), } } @@ -80,7 +80,7 @@ impl Entry for InscriptionId { fn store(self) -> Self::Value { let mut value = [0; 36]; let (txid, index) = value.split_at_mut(32); - txid.copy_from_slice(self.txid.as_inner()); + txid.copy_from_slice(self.txid.as_ref()); index.copy_from_slice(&self.index.to_be_bytes()); value } diff --git a/src/index/fetcher.rs b/src/index/fetcher.rs index baf31064aa..774405b9f5 100644 --- a/src/index/fetcher.rs +++ b/src/index/fetcher.rs @@ -65,23 +65,38 @@ impl Fetcher { } let body = Value::Array(reqs).to_string(); - let req = Request::builder() - .method(Method::POST) - .uri(&self.url) - .header(hyper::header::AUTHORIZATION, &self.auth) - .header(hyper::header::CONTENT_TYPE, "application/json") - .body(Body::from(body))?; - let response = self.client.request(req).await?; - - let buf = hyper::body::to_bytes(response).await?; - - let mut results: Vec> = serde_json::from_slice(&buf)?; + let mut results: Vec>; + let mut retries = 0; + + loop { + results = match self.try_get_transactions(body.clone()).await { + Ok(results) => results, + Err(error) => { + if retries >= 5 { + return Err(anyhow!( + "failed to fetch raw transactions after 5 retries: {}", + error + )); + } + + log::info!("failed to fetch raw transactions, retrying: {}", error); + + tokio::time::sleep(tokio::time::Duration::from_millis( + 100 * u64::pow(2, retries), + )) + .await; + retries += 1; + continue; + } + }; + break; + } // Return early on any error, because we need all results to proceed if let Some(err) = results.iter().find_map(|res| res.error.as_ref()) { return Err(anyhow!( - "Failed to fetch raw transaction: code {} message {}", + "failed to fetch raw transaction: code {} message {}", err.code, err.message )); @@ -109,4 +124,30 @@ impl Fetcher { .collect::>>()?; Ok(txs) } + + async fn try_get_transactions(&self, body: String) -> Result>> { + let req = Request::builder() + .method(Method::POST) + .uri(&self.url) + .header(hyper::header::AUTHORIZATION, &self.auth) + .header(hyper::header::CONTENT_TYPE, "application/json") + .body(Body::from(body))?; + + let response = self.client.request(req).await?; + + let buf = hyper::body::to_bytes(response).await?; + + let results: Vec> = match serde_json::from_slice(&buf) { + Ok(results) => results, + Err(e) => { + return Err(anyhow!( + "failed to parse JSON-RPC response: {e}. response: {response}", + e = e, + response = String::from_utf8_lossy(&buf) + )) + } + }; + + Ok(results) + } } diff --git a/src/index/rtx.rs b/src/index/rtx.rs index 3018ca3161..4f6b03c694 100644 --- a/src/index/rtx.rs +++ b/src/index/rtx.rs @@ -9,8 +9,7 @@ impl Rtx<'_> { .0 .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| Height(height.value())), ) @@ -22,8 +21,7 @@ impl Rtx<'_> { .0 .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height.value() + 1) .unwrap_or(0), @@ -44,8 +42,7 @@ impl Rtx<'_> { .0 .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(_height, hash)| BlockHash::load(*hash.value())), ), diff --git a/src/index/updater.rs b/src/index/updater.rs index d2084cadb6..7b78fb435e 100644 --- a/src/index/updater.rs +++ b/src/index/updater.rs @@ -9,7 +9,7 @@ use { mod inscription_updater; struct BlockData { - header: BlockHeader, + header: Header, txdata: Vec<(Transaction, Txid)>, } @@ -46,8 +46,7 @@ impl Updater { let height = wtx .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height.value() + 1) .unwrap_or(0); @@ -103,12 +102,7 @@ impl Updater { let mut uncommitted = 0; let mut value_cache = HashMap::new(); - loop { - let block = match rx.recv() { - Ok(block) => block, - Err(mpsc::RecvError) => break, - }; - + while let Ok(block) = rx.recv() { self.index_block( index, &mut outpoint_sender, @@ -140,8 +134,7 @@ impl Updater { let height = wtx .open_table(HEIGHT_TO_BLOCK_HASH)? .range(0..)? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(height, _hash)| height.value() + 1) .unwrap_or(0); @@ -399,7 +392,7 @@ impl Updater { if let Some(prev_height) = self.height.checked_sub(1) { let prev_hash = height_to_block_hash.get(&prev_height)?.unwrap(); - if prev_hash.value() != block.header.prev_blockhash.as_ref() { + if prev_hash.value() != &block.header.prev_blockhash.as_raw_hash().to_byte_array() { index.reorged.store(true, atomic::Ordering::Relaxed); return Err(anyhow!("reorg detected at or before {prev_height}")); } diff --git a/src/index/updater/inscription_updater.rs b/src/index/updater/inscription_updater.rs index e084f99964..fce36e608e 100644 --- a/src/index/updater/inscription_updater.rs +++ b/src/index/updater/inscription_updater.rs @@ -70,8 +70,7 @@ impl<'a, 'db, 'tx> InscriptionUpdater<'a, 'db, 'tx> { let next_number = number_to_id .iter()? - .rev() - .next() + .next_back() .and_then(|result| result.ok()) .map(|(number, _id)| number.value() + 1) .unwrap_or(0); @@ -170,14 +169,7 @@ impl<'a, 'db, 'tx> InscriptionUpdater<'a, 'db, 'tx> { } else if inscription.tx_in_offset != 0 { Some(Curse::NotAtOffsetZero) } else if inscribed_offsets.contains_key(&offset) { - let seq_num = self - .reinscription_id_to_seq_num - .iter()? - .rev() - .next() - .and_then(|result| result.ok()) - .map(|(_id, number)| number.value() + 1) - .unwrap_or(0); + let seq_num = self.reinscription_id_to_seq_num.len()?; let sat = Self::calculate_sat(input_sat_ranges, offset); log::info!("processing reinscription {inscription_id} on sat {:?}: sequence number {seq_num}, inscribed offsets {:?}", sat, inscribed_offsets); diff --git a/src/inscription.rs b/src/inscription.rs index 60365a5245..e647999fc6 100644 --- a/src/inscription.rs +++ b/src/inscription.rs @@ -3,22 +3,17 @@ use { bitcoin::{ blockdata::{ opcodes, - script::{self, Instruction, Instructions}, + script::{self, Instruction, Instructions, PushBytesBuf}, }, - util::taproot::TAPROOT_ANNEX_PREFIX, - Script, Witness, + taproot::TAPROOT_ANNEX_PREFIX, + ScriptBuf, Witness, }, std::{iter::Peekable, str}, }; -const INSCRIPTION_ENVELOPE_HEADER: [bitcoin::blockdata::script::Instruction<'static>; 3] = [ - Instruction::PushBytes(&[]), // This is an OP_FALSE - Instruction::Op(opcodes::all::OP_IF), - Instruction::PushBytes(PROTOCOL_ID), -]; -const PROTOCOL_ID: &[u8] = b"ord"; -const BODY_TAG: &[u8] = &[]; -const CONTENT_TYPE_TAG: &[u8] = &[1]; +const PROTOCOL_ID: [u8; 3] = *b"ord"; +const BODY_TAG: [u8; 0] = []; +const CONTENT_TYPE_TAG: [u8; 1] = [1]; #[derive(Debug, PartialEq, Clone)] pub(crate) enum Curse { @@ -93,23 +88,23 @@ impl Inscription { .push_opcode(opcodes::all::OP_IF) .push_slice(PROTOCOL_ID); - if let Some(content_type) = &self.content_type { + if let Some(content_type) = self.content_type.clone() { builder = builder .push_slice(CONTENT_TYPE_TAG) - .push_slice(content_type); + .push_slice(PushBytesBuf::try_from(content_type).unwrap()); } if let Some(body) = &self.body { builder = builder.push_slice(BODY_TAG); for chunk in body.chunks(520) { - builder = builder.push_slice(chunk); + builder = builder.push_slice(PushBytesBuf::try_from(chunk.to_vec()).unwrap()); } } builder.push_opcode(opcodes::all::OP_ENDIF) } - pub(crate) fn append_reveal_script(&self, builder: script::Builder) -> Script { + pub(crate) fn append_reveal_script(&self, builder: script::Builder) -> ScriptBuf { self.append_reveal_script_to_builder(builder).into_script() } @@ -168,6 +163,7 @@ pub(crate) enum InscriptionError { type Result = std::result::Result; +#[derive(Debug)] struct InscriptionParser<'a> { instructions: Peekable>, } @@ -201,7 +197,7 @@ impl<'a> InscriptionParser<'a> { .unwrap(); InscriptionParser { - instructions: Script::from(Vec::from(script)).instructions().peekable(), + instructions: ScriptBuf::from(Vec::from(script)).instructions().peekable(), } .parse_inscriptions() .into_iter() @@ -223,32 +219,31 @@ impl<'a> InscriptionParser<'a> { fn parse_one_inscription(&mut self) -> Result { self.advance_into_inscription_envelope()?; - let mut fields = BTreeMap::new(); loop { match self.advance()? { - Instruction::PushBytes(BODY_TAG) => { + Instruction::PushBytes(tag) if tag.as_bytes() == BODY_TAG.as_slice() => { let mut body = Vec::new(); while !self.accept(&Instruction::Op(opcodes::all::OP_ENDIF))? { body.extend_from_slice(self.expect_push()?); } - fields.insert(BODY_TAG, body); + fields.insert(BODY_TAG.as_slice(), body); break; } Instruction::PushBytes(tag) => { - if fields.contains_key(tag) { + if fields.contains_key(tag.as_bytes()) { return Err(InscriptionError::InvalidInscription); } - fields.insert(tag, self.expect_push()?.to_vec()); + fields.insert(tag.as_bytes(), self.expect_push()?.to_vec()); } Instruction::Op(opcodes::all::OP_ENDIF) => break, _ => return Err(InscriptionError::InvalidInscription), } } - let body = fields.remove(BODY_TAG); - let content_type = fields.remove(CONTENT_TYPE_TAG); + let body = fields.remove(BODY_TAG.as_slice()); + let content_type = fields.remove(CONTENT_TYPE_TAG.as_slice()); for tag in fields.keys() { if let Some(lsb) = tag.first() { @@ -271,7 +266,11 @@ impl<'a> InscriptionParser<'a> { fn advance_into_inscription_envelope(&mut self) -> Result<()> { loop { - if self.match_instructions(&INSCRIPTION_ENVELOPE_HEADER)? { + if self.match_instructions(&[ + Instruction::PushBytes((&[]).into()), // represents an OF_FALSE + Instruction::Op(opcodes::all::OP_IF), + Instruction::PushBytes((&PROTOCOL_ID).into()), + ])? { break; } } @@ -291,7 +290,7 @@ impl<'a> InscriptionParser<'a> { fn expect_push(&mut self) -> Result<&'a [u8]> { match self.advance()? { - Instruction::PushBytes(bytes) => Ok(bytes), + Instruction::PushBytes(bytes) => Ok(bytes.as_bytes()), _ => Err(InscriptionError::InvalidInscription), } } @@ -327,7 +326,7 @@ mod tests { #[test] fn ignore_key_path_spends() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[Vec::new()])), Err(InscriptionError::KeyPathSpend), ); } @@ -335,7 +334,7 @@ mod tests { #[test] fn ignore_key_path_spends_with_annex() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![Vec::new(), vec![0x50]])), + InscriptionParser::parse(&Witness::from_slice(&[Vec::new(), vec![0x50]])), Err(InscriptionError::KeyPathSpend), ); } @@ -343,7 +342,7 @@ mod tests { #[test] fn ignore_unparsable_scripts() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![vec![0x01], Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[vec![0x01], Vec::new()])), Err(InscriptionError::Script(script::Error::EarlyEndOfScript)), ); } @@ -351,8 +350,8 @@ mod tests { #[test] fn no_inscription() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![ - Script::new().into_bytes(), + InscriptionParser::parse(&Witness::from_slice(&[ + ScriptBuf::new().into_bytes(), Vec::new() ])), Ok(vec![]) @@ -474,16 +473,16 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::all::OP_CHECKSIG) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![inscription("text/plain;charset=utf-8", "ord")]), ); } @@ -495,15 +494,15 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![inscription("text/plain;charset=utf-8", "ord")]), ); } @@ -514,23 +513,23 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![ inscription("text/plain;charset=utf-8", "foo"), inscription("text/plain;charset=utf-8", "bar") @@ -557,11 +556,11 @@ mod tests { let script = script::Builder::new() .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) - .push_slice("ord".as_bytes()) + .push_slice(b"ord") .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![]) ); } @@ -570,12 +569,12 @@ mod tests { fn no_op_false() { let script = script::Builder::new() .push_opcode(opcodes::all::OP_IF) - .push_slice("ord".as_bytes()) + .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![]) ); } @@ -594,10 +593,10 @@ mod tests { fn extract_from_transaction() { let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: envelope(&[b"ord", &[1], b"text/plain;charset=utf-8", &[], b"ord"]), }], @@ -619,17 +618,17 @@ mod tests { fn extract_from_second_input() { let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![ TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: Witness::new(), }, TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: inscription("foo", [1; 1040]).to_witness(), }, @@ -649,14 +648,14 @@ mod tests { builder = inscription("foo", [1; 100]).append_reveal_script_to_builder(builder); builder = inscription("bar", [1; 100]).append_reveal_script_to_builder(builder); - let witness = Witness::from_vec(vec![builder.into_script().into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[builder.into_script().into_bytes(), Vec::new()]); let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness, }], diff --git a/src/lib.rs b/src/lib.rs index 1f51664923..64a828a0f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,11 +33,12 @@ use { anyhow::{anyhow, bail, Context, Error}, bip39::Mnemonic, bitcoin::{ + address::{Address, NetworkUnchecked}, blockdata::constants::COIN_VALUE, consensus::{self, Decodable, Encodable}, hash_types::BlockHash, hashes::Hash, - Address, Amount, Block, Network, OutPoint, Script, Sequence, Transaction, TxIn, TxOut, Txid, + Amount, Block, Network, OutPoint, Script, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, }, bitcoincore_rpc::{Client, RpcApi}, chain::Chain, @@ -131,6 +132,7 @@ const CYCLE_EPOCHS: u64 = 6; static SHUTTING_DOWN: AtomicBool = AtomicBool::new(false); static LISTENERS: Mutex> = Mutex::new(Vec::new()); +static INDEXER: Mutex>> = Mutex::new(Option::None); fn integration_test() -> bool { env::var_os("ORD_INTEGRATION_TEST") @@ -149,21 +151,32 @@ fn unbound_outpoint() -> OutPoint { } } +fn gracefully_shutdown_indexer() { + if let Some(indexer) = INDEXER.lock().unwrap().take() { + // We explicitly set this to true to notify the thread to not take on new work + SHUTTING_DOWN.store(true, atomic::Ordering::Relaxed); + log::info!("Waiting for index thread to finish..."); + if indexer.join().is_err() { + log::warn!("Index thread panicked; join failed"); + } + } +} + pub fn main() { env_logger::init(); ctrlc::set_handler(move || { + if SHUTTING_DOWN.fetch_or(true, atomic::Ordering::Relaxed) { + process::exit(1); + } + + println!("Shutting down gracefully. Press again to shutdown immediately."); + LISTENERS .lock() .unwrap() .iter() .for_each(|handle| handle.graceful_shutdown(Some(Duration::from_millis(100)))); - - println!("Shutting down gracefully. Press again to shutdown immediately."); - - if SHUTTING_DOWN.fetch_or(true, atomic::Ordering::Relaxed) { - process::exit(1); - } }) .expect("Error setting handler"); @@ -179,6 +192,11 @@ pub fn main() { { eprintln!("{}", err.backtrace()); } + + gracefully_shutdown_indexer(); + process::exit(1); } + + gracefully_shutdown_indexer(); } diff --git a/src/object.rs b/src/object.rs index ffde4d7084..15b7a21205 100644 --- a/src/object.rs +++ b/src/object.rs @@ -2,7 +2,7 @@ use super::*; #[derive(Debug, PartialEq)] pub enum Object { - Address(Address), + Address(Address), Hash([u8; 32]), InscriptionId(InscriptionId), Integer(u128), @@ -21,7 +21,7 @@ impl FromStr for Object { Address => Ok(Self::Address(s.parse()?)), Decimal | Degree | Percentile | Name => Ok(Self::Sat(s.parse()?)), Hash => Ok(Self::Hash( - bitcoin::hashes::sha256::Hash::from_str(s)?.into_inner(), + bitcoin::hashes::sha256::Hash::from_str(s)?.to_byte_array(), )), InscriptionId => Ok(Self::InscriptionId(s.parse()?)), Integer => Ok(Self::Integer(s.parse()?)), @@ -34,7 +34,7 @@ impl FromStr for Object { impl Display for Object { fn fmt(&self, f: &mut Formatter) -> fmt::Result { match self { - Self::Address(address) => write!(f, "{address}"), + Self::Address(address) => write!(f, "{}", address.clone().assume_checked()), Self::Hash(hash) => { for byte in hash { write!(f, "{byte:02x}")?; diff --git a/src/options.rs b/src/options.rs index a8853ae7a9..20841e911b 100644 --- a/src/options.rs +++ b/src/options.rs @@ -82,13 +82,15 @@ impl Options { } pub(crate) fn rpc_url(&self) -> String { - self.rpc_url.clone().unwrap_or_else(|| { + if let Some(rpc_url) = &self.rpc_url { + format!("{rpc_url}/wallet/{}", self.wallet) + } else { format!( "127.0.0.1:{}/wallet/{}", self.chain().default_rpc_port(), self.wallet ) - }) + } } pub(crate) fn cookie_file(&self) -> Result { @@ -285,7 +287,7 @@ mod tests { .unwrap() .options .rpc_url(), - "127.0.0.1:1234" + "127.0.0.1:1234/wallet/ord" ); } diff --git a/src/subcommand/index.rs b/src/subcommand/index.rs index 448e8cc3ef..0193011636 100644 --- a/src/subcommand/index.rs +++ b/src/subcommand/index.rs @@ -25,6 +25,8 @@ pub(crate) struct Export { help = " file to write to" )] tsv: String, + #[clap(long, help = "Whether to include addresses in export")] + include_addresses: bool, } impl Export { @@ -32,7 +34,7 @@ impl Export { let index = Index::open(&options)?; index.update()?; - index.export(&self.tsv)?; + index.export(&self.tsv, self.include_addresses)?; Ok(()) } diff --git a/src/subcommand/list.rs b/src/subcommand/list.rs index b1193638fe..4ec93b14b0 100644 --- a/src/subcommand/list.rs +++ b/src/subcommand/list.rs @@ -10,7 +10,9 @@ pub(crate) struct List { pub struct Output { pub output: OutPoint, pub start: u64, + pub end: u64, pub size: u64, + pub offset: u64, pub rarity: Rarity, pub name: String, } @@ -24,11 +26,22 @@ impl List { match index.list(self.outpoint)? { Some(crate::index::List::Unspent(ranges)) => { let mut outputs = Vec::new(); - for (output, start, size, rarity, name) in list(self.outpoint, ranges) { + for Output { + output, + start, + end, + size, + offset, + rarity, + name, + } in list(self.outpoint, ranges) + { outputs.push(Output { output, start, + end, size, + offset, rarity, name, }); @@ -44,15 +57,25 @@ impl List { } } -fn list(outpoint: OutPoint, ranges: Vec<(u64, u64)>) -> Vec<(OutPoint, u64, u64, Rarity, String)> { +fn list(outpoint: OutPoint, ranges: Vec<(u64, u64)>) -> Vec { + let mut offset = 0; ranges .into_iter() .map(|(start, end)| { let size = end - start; - let rarity = Sat(start).rarity(); - let name = Sat(start).name(); + let output = Output { + output: outpoint, + start, + end, + size, + offset, + name: Sat(start).name(), + rarity: Sat(start).rarity(), + }; - (outpoint, start, size, rarity, name) + offset += size; + + output }) .collect() } @@ -61,6 +84,26 @@ fn list(outpoint: OutPoint, ranges: Vec<(u64, u64)>) -> Vec<(OutPoint, u64, u64, mod tests { use super::*; + fn output( + output: OutPoint, + start: u64, + end: u64, + size: u64, + offset: u64, + rarity: Rarity, + name: String, + ) -> Output { + Output { + output, + start, + end, + size, + offset, + name, + rarity, + } + } + #[test] fn list_ranges() { let outpoint = @@ -74,27 +117,33 @@ mod tests { assert_eq!( list(outpoint, ranges), vec![ - ( + output( OutPoint::from_str("4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:5") .unwrap(), 50 * COIN_VALUE, + 55 * COIN_VALUE, 5 * COIN_VALUE, + 0, Rarity::Uncommon, "nvtcsezkbth".to_string() ), - ( + output( OutPoint::from_str("4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:5") .unwrap(), 10, + 100, 90, + 5 * COIN_VALUE, Rarity::Common, "nvtdijuwxlf".to_string() ), - ( + output( OutPoint::from_str("4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:5") .unwrap(), 1050000000000000, + 1150000000000000, 100000000000000, + 5 * COIN_VALUE + 90, Rarity::Epic, "gkjbdrhkfqf".to_string() ) diff --git a/src/subcommand/preview.rs b/src/subcommand/preview.rs index d9f402e47e..462f762952 100644 --- a/src/subcommand/preview.rs +++ b/src/subcommand/preview.rs @@ -68,8 +68,9 @@ impl Preview { let rpc_client = options.bitcoin_rpc_client_for_wallet_command(false)?; - let address = - rpc_client.get_new_address(None, Some(bitcoincore_rpc::json::AddressType::Bech32m))?; + let address = rpc_client + .get_new_address(None, Some(bitcoincore_rpc::json::AddressType::Bech32m))? + .require_network(Network::Regtest)?; rpc_client.generate_to_address(101, &address)?; diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 07c87197bd..e5a1a35d7a 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -141,13 +141,17 @@ impl Server { println!("run server ......"); Runtime::new()?.block_on(async { - let clone = index.clone(); - thread::spawn(move || loop { - if let Err(error) = clone.update() { + let index_clone = index.clone(); + let index_thread = thread::spawn(move || loop { + if SHUTTING_DOWN.load(atomic::Ordering::Relaxed) { + break; + } + if let Err(error) = index_clone.update() { log::warn!("{error}"); } thread::sleep(Duration::from_millis(5000)); }); + INDEXER.lock().unwrap().replace(index_thread); let config = options.load_config()?; let acme_domains = self.acme_domains()?; @@ -402,7 +406,7 @@ impl Server { sat, satpoint, blocktime: index.block_time(sat.height())?, - inscription: index.get_inscription_id_by_sat(sat)?, + inscriptions: index.get_inscription_ids_by_sat(sat)?, } .page(page_config, index.has_sat_index()?), ) @@ -473,7 +477,7 @@ impl Server { TxOut { value, - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), } } else { index @@ -1048,7 +1052,7 @@ mod tests { fn new_with_regtest() -> Self { Self::new_server( test_bitcoincore_rpc::builder() - .network(bitcoin::Network::Regtest) + .network(bitcoin::network::constants::Network::Regtest) .build(), None, &["--chain", "regtest"], diff --git a/src/subcommand/wallet.rs b/src/subcommand/wallet.rs index 914805d5af..00c1d8da97 100644 --- a/src/subcommand/wallet.rs +++ b/src/subcommand/wallet.rs @@ -5,7 +5,7 @@ use { All, Secp256k1, }, bitcoin::{ - util::bip32::{ChildNumber, DerivationPath, ExtendedPrivKey, Fingerprint}, + bip32::{ChildNumber, DerivationPath, ExtendedPrivKey, Fingerprint}, Network, }, bitcoincore_rpc::bitcoincore_rpc_json::{ImportDescriptors, Timestamp}, @@ -71,10 +71,13 @@ impl Wallet { } } -fn get_change_address(client: &Client) -> Result
{ - client - .call("getrawchangeaddress", &["bech32m".into()]) - .context("could not get change addresses from wallet") +fn get_change_address(client: &Client, options: &Options) -> Result
{ + Ok( + client + .call::>("getrawchangeaddress", &["bech32m".into()]) + .context("could not get change addresses from wallet")? + .require_network(options.chain().network())?, + ) } pub(crate) fn initialize_wallet(options: &Options, seed: [u8; 64]) -> Result { diff --git a/src/subcommand/wallet/inscribe.rs b/src/subcommand/wallet/inscribe.rs index 9f9c9bf1fb..639be28dc0 100644 --- a/src/subcommand/wallet/inscribe.rs +++ b/src/subcommand/wallet/inscribe.rs @@ -3,15 +3,16 @@ use { crate::wallet::Wallet, bitcoin::{ blockdata::{opcodes, script}, + key::PrivateKey, + key::{TapTweak, TweakedKeyPair, TweakedPublicKey, UntweakedKeyPair}, + locktime::absolute::LockTime, policy::MAX_STANDARD_TX_WEIGHT, - schnorr::{TapTweak, TweakedKeyPair, TweakedPublicKey, UntweakedKeyPair}, secp256k1::{ self, constants::SCHNORR_SIGNATURE_SIZE, rand, schnorr::Signature, Secp256k1, XOnlyPublicKey, }, - util::key::PrivateKey, - util::sighash::{Prevouts, SighashCache}, - util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TaprootBuilder}, - PackedLockTime, SchnorrSighashType, Witness, + sighash::{Prevouts, SighashCache, TapSighashType}, + taproot::{ControlBlock, LeafVersion, TapLeafHash, TaprootBuilder}, + ScriptBuf, Witness, }, bitcoincore_rpc::bitcoincore_rpc_json::{ImportDescriptors, Timestamp}, bitcoincore_rpc::Client, @@ -49,7 +50,7 @@ pub(crate) struct Inscribe { #[clap(long, help = "Don't sign or broadcast transactions.")] pub(crate) dry_run: bool, #[clap(long, help = "Send inscription to .")] - pub(crate) destination: Option
, + pub(crate) destination: Option>, } impl Inscribe { @@ -65,16 +66,14 @@ impl Inscribe { let inscriptions = index.get_inscriptions(None)?; - let commit_tx_change = [get_change_address(&client)?, get_change_address(&client)?]; + let commit_tx_change = [ + get_change_address(&client, &options)?, + get_change_address(&client, &options)?, + ]; let reveal_tx_destination = match self.destination { - Some(address) => { - options - .chain() - .check_address_is_valid_for_network(&address)?; - address - } - None => get_change_address(&client)?, + Some(address) => address.require_network(options.chain().network())?, + None => get_change_address(&client, &options)?, }; let (unsigned_commit_tx, reveal_tx, recovery_key_pair) = @@ -193,8 +192,8 @@ impl Inscribe { let (public_key, _parity) = XOnlyPublicKey::from_keypair(&key_pair); let reveal_script = inscription.append_reveal_script( - script::Builder::new() - .push_slice(&public_key.serialize()) + ScriptBuf::builder() + .push_slice(public_key.serialize()) .push_opcode(opcodes::all::OP_CHECKSIG), ); @@ -268,12 +267,12 @@ impl Inscribe { 0, &Prevouts::All(&[output]), TapLeafHash::from_script(&reveal_script, LeafVersion::TapScript), - SchnorrSighashType::Default, + TapSighashType::Default, ) .expect("signature hash should compute"); let signature = secp256k1.sign_schnorr( - &secp256k1::Message::from_slice(signature_hash.as_inner()) + &secp256k1::Message::from_slice(signature_hash.as_ref()) .expect("should be cryptographically secure hash"), &key_pair, ); @@ -298,7 +297,7 @@ impl Inscribe { let reveal_weight = reveal_tx.weight(); - if !no_limit && reveal_weight > MAX_STANDARD_TX_WEIGHT.try_into().unwrap() { + if !no_limit && reveal_weight > bitcoin::Weight::from_wu(MAX_STANDARD_TX_WEIGHT.into()) { bail!( "reveal transaction weight greater than {MAX_STANDARD_TX_WEIGHT} (MAX_STANDARD_TX_WEIGHT): {reveal_weight}" ); @@ -350,7 +349,7 @@ impl Inscribe { sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, }], output: vec![output], - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, version: 1, }; diff --git a/src/subcommand/wallet/inscriptions.rs b/src/subcommand/wallet/inscriptions.rs index 73f8a1fc0a..020ac5ce61 100644 --- a/src/subcommand/wallet/inscriptions.rs +++ b/src/subcommand/wallet/inscriptions.rs @@ -5,6 +5,7 @@ pub struct Output { pub inscription: InscriptionId, pub location: SatPoint, pub explorer: String, + pub postage: u64, } pub(crate) fn run(options: Options) -> Result { @@ -24,12 +25,13 @@ pub(crate) fn run(options: Options) -> Result { let mut output = Vec::new(); for (location, inscription) in inscriptions { - if unspent_outputs.contains_key(&location.outpoint) { + if let Some(postage) = unspent_outputs.get(&location.outpoint) { output.push(Output { location, inscription, explorer: format!("{explorer}{inscription}"), - }); + postage: postage.to_sat(), + }) } } diff --git a/src/subcommand/wallet/receive.rs b/src/subcommand/wallet/receive.rs index 78726b8156..94228ff364 100644 --- a/src/subcommand/wallet/receive.rs +++ b/src/subcommand/wallet/receive.rs @@ -2,7 +2,7 @@ use super::*; #[derive(Deserialize, Serialize)] pub struct Output { - pub address: Address, + pub address: Address, } pub(crate) fn run(options: Options) -> Result { diff --git a/src/subcommand/wallet/send.rs b/src/subcommand/wallet/send.rs index b0622150b4..b4f1551d4b 100644 --- a/src/subcommand/wallet/send.rs +++ b/src/subcommand/wallet/send.rs @@ -2,7 +2,7 @@ use {super::*, crate::wallet::Wallet}; #[derive(Debug, Parser)] pub(crate) struct Send { - address: Address, + address: Address, outgoing: Outgoing, #[clap(long, help = "Use fee rate of sats/vB")] fee_rate: FeeRate, @@ -15,9 +15,7 @@ pub struct Output { impl Send { pub(crate) fn run(self, options: Options) -> Result { - options - .chain() - .check_address_is_valid_for_network(&self.address)?; + let address = self.address.require_network(options.chain().network())?; let index = Index::open(&options)?; index.update()?; @@ -56,8 +54,7 @@ impl Send { bail!("failed to lock ordinal UTXOs"); } - let txid = - client.send_to_address(&self.address, amount, None, None, None, None, None, None)?; + let txid = client.send_to_address(&address, amount, None, None, None, None, None, None)?; print_json(Output { transaction: txid })?; @@ -65,13 +62,16 @@ impl Send { } }; - let change = [get_change_address(&client)?, get_change_address(&client)?]; + let change = [ + get_change_address(&client, &options)?, + get_change_address(&client, &options)?, + ]; let unsigned_transaction = TransactionBuilder::build_transaction_with_postage( satpoint, inscriptions, unspent_outputs, - self.address, + address, change, self.fee_rate, )?; diff --git a/src/subcommand/wallet/transaction_builder.rs b/src/subcommand/wallet/transaction_builder.rs index 11f73d4f65..5738e0c8ee 100644 --- a/src/subcommand/wallet/transaction_builder.rs +++ b/src/subcommand/wallet/transaction_builder.rs @@ -35,10 +35,13 @@ use { super::*, bitcoin::{ - blockdata::{locktime::PackedLockTime, witness::Witness}, - util::amount::Amount, + blockdata::{locktime::absolute::LockTime, witness::Witness}, + Amount, ScriptBuf, + }, + std::{ + cmp::{max, min}, + collections::{BTreeMap, BTreeSet}, }, - std::collections::{BTreeMap, BTreeSet}, }; #[derive(Debug, PartialEq)] @@ -255,6 +258,7 @@ impl TransactionBuilder { ); let sat_offset = self.calculate_sat_offset(); + if sat_offset == 0 { tprintln!("outgoing is aligned"); } else { @@ -279,17 +283,27 @@ impl TransactionBuilder { if self.outputs[0].0 == self.recipient { tprintln!("no alignment output"); } else { - let dust_limit = self.recipient.script_pubkey().dust_value(); + let dust_limit = self + .unused_change_addresses + .last() + .unwrap() + .script_pubkey() + .dust_value(); + if self.outputs[0].1 >= dust_limit { tprintln!("no padding needed"); } else { - let (utxo, size) = self.select_cardinal_utxo(dust_limit - self.outputs[0].1)?; - self.inputs.insert(0, utxo); - self.outputs[0].1 += size; - tprintln!( - "padded alignment output to {} with additional {size} sat input", - self.outputs[0].1 - ); + while self.outputs[0].1 < dust_limit { + let (utxo, size) = self.select_cardinal_utxo(dust_limit - self.outputs[0].1, true)?; + + self.inputs.insert(0, utxo); + self.outputs[0].1 += size; + + tprintln!( + "padded alignment output to {} with additional {size} sat input", + self.outputs[0].1 + ); + } } } @@ -308,15 +322,31 @@ impl TransactionBuilder { .checked_add(estimated_fee) .ok_or(Error::ValueOverflow)?; - if let Some(deficit) = total.checked_sub(self.outputs.last().unwrap().1) { - if deficit > Amount::ZERO { + if let Some(mut deficit) = total.checked_sub(self.outputs.last().unwrap().1) { + while deficit > Amount::ZERO { + let additional_fee = self.fee_rate.fee(Self::ADDITIONAL_INPUT_VBYTES); + let needed = deficit - .checked_add(self.fee_rate.fee(Self::ADDITIONAL_INPUT_VBYTES)) + .checked_add(additional_fee) .ok_or(Error::ValueOverflow)?; - let (utxo, value) = self.select_cardinal_utxo(needed)?; + + let (utxo, value) = self.select_cardinal_utxo(needed, false)?; + + let benefit = value + .checked_sub(additional_fee) + .ok_or(Error::NotEnoughCardinalUtxos)?; + self.inputs.push(utxo); + self.outputs.last_mut().unwrap().1 += value; - tprintln!("added {value} sat input to cover {deficit} sat deficit"); + + if benefit > deficit { + tprintln!("added {value} sat input to cover {deficit} sat deficit"); + deficit = Amount::ZERO; + } else { + tprintln!("added {value} sat input to reduce {deficit} sat deficit by {benefit} sat"); + deficit -= benefit; + } } } @@ -425,13 +455,13 @@ impl TransactionBuilder { fn estimate_vbytes_with(inputs: usize, outputs: Vec
) -> usize { Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: (0..inputs) .map(|_| TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, - witness: Witness::from_vec(vec![vec![0; TransactionBuilder::SCHNORR_SIGNATURE_SIZE]]), + witness: Witness::from_slice(&[&[0; TransactionBuilder::SCHNORR_SIGNATURE_SIZE]]), }) .collect(), output: outputs @@ -453,13 +483,13 @@ impl TransactionBuilder { let recipient = self.recipient.script_pubkey(); let transaction = Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: self .inputs .iter() .map(|outpoint| TxIn { previous_output: *outpoint, - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, witness: Witness::new(), }) @@ -599,7 +629,7 @@ impl TransactionBuilder { let mut modified_tx = transaction.clone(); for input in &mut modified_tx.input { - input.witness = Witness::from_vec(vec![vec![0; 64]]); + input.witness = Witness::from_slice(&[&[0; 64]]); } let expected_fee = self.fee_rate.fee(modified_tx.vsize()); @@ -631,8 +661,19 @@ impl TransactionBuilder { panic!("Could not find outgoing sat in inputs"); } - fn select_cardinal_utxo(&mut self, minimum_value: Amount) -> Result<(OutPoint, Amount)> { - let mut found = None; + /// Cardinal UTXOs are those that contain no inscriptions and can therefore + /// be used to pad transactions. Sometimes multiple of these UTXOs are needed + /// and depending on the context we want to select either ones above or + /// under (when trying to consolidate dust outputs) the target value. + fn select_cardinal_utxo( + &mut self, + target_value: Amount, + prefer_under: bool, + ) -> Result<(OutPoint, Amount)> { + tprintln!( + "looking for {} cardinal worth {target_value}", + if prefer_under { "smaller" } else { "bigger" } + ); let inscribed_utxos = self .inscriptions @@ -640,22 +681,46 @@ impl TransactionBuilder { .map(|satpoint| satpoint.outpoint) .collect::>(); + let mut best_match = None; for utxo in &self.utxos { if inscribed_utxos.contains(utxo) { continue; } - let value = self.amounts[utxo]; + let current_value = self.amounts[utxo]; - if value >= minimum_value { - found = Some((*utxo, value)); - break; + let (_, best_value) = match best_match { + Some(prev) => prev, + None => { + best_match = Some((*utxo, current_value)); + (*utxo, current_value) + } + }; + + let abs_diff = |a: Amount, b: Amount| -> Amount { max(a, b) - min(a, b) }; + let is_closer = abs_diff(current_value, target_value) < abs_diff(best_value, target_value); + + let not_preference_but_closer = if prefer_under { + best_value > target_value && is_closer + } else { + best_value < target_value && is_closer + }; + + let is_preference_and_closer = if prefer_under { + current_value <= target_value && is_closer + } else { + current_value >= target_value && is_closer + }; + + if is_preference_and_closer || not_preference_but_closer { + best_match = Some((*utxo, current_value)) } } - let (utxo, value) = found.ok_or(Error::NotEnoughCardinalUtxos)?; + let (utxo, value) = best_match.ok_or(Error::NotEnoughCardinalUtxos)?; self.utxos.remove(&utxo); + tprintln!("found cardinal worth {}", value); Ok((utxo, value)) } @@ -730,7 +795,7 @@ mod tests { tx_builder.build(), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2)), tx_in(outpoint(3))], output: vec![ tx_out(5_000, recipient()), @@ -772,7 +837,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(4901, recipient())], }) @@ -819,7 +884,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![tx_out(4_950, change(1)), tx_out(4_862, recipient())], }) @@ -881,7 +946,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![ tx_out(4_950, change(1)), @@ -968,8 +1033,9 @@ mod tests { .unwrap(); builder.outputs[0].0 = "tb1qx4gf3ya0cxfcwydpq8vr2lhrysneuj5d7lqatw" - .parse() - .unwrap(); + .parse::>() + .unwrap() + .assume_checked(); builder.build().unwrap(); } @@ -1012,7 +1078,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![ tx_out(TransactionBuilder::TARGET_POSTAGE.to_sat(), recipient()), @@ -1058,7 +1124,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(3_333, change(1)), tx_out(6_537, recipient())], }) @@ -1083,7 +1149,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(2)), tx_in(outpoint(1))], output: vec![tx_out(10_001, change(1)), tx_out(9_811, recipient())], }) @@ -1311,7 +1377,7 @@ mod tests { transaction, Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(10_000 - fee.to_sat(), recipient())], } @@ -1334,7 +1400,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1000, recipient()), tx_out(3870, change(1))], }) @@ -1360,7 +1426,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![tx_out(1500, recipient()), tx_out(312, change(1))], }) @@ -1444,8 +1510,9 @@ mod tests { 0, vec![ "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), ], ); assert_eq!(after - before, TransactionBuilder::ADDITIONAL_OUTPUT_VBYTES); @@ -1467,7 +1534,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(901, recipient())], }), @@ -1489,7 +1556,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(20_000, recipient())], }), @@ -1512,7 +1579,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1005, recipient())], }), @@ -1589,7 +1656,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1802, recipient())], }), @@ -1611,10 +1678,167 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(20250, recipient())], }), ); } + + #[test] + fn select_outgoing_can_select_multiple_utxos() { + let mut utxos = vec![ + (outpoint(2), Amount::from_sat(3_006)), // 2. biggest utxo is selected 2nd leaving us needing 4206 more + (outpoint(1), Amount::from_sat(3_003)), // 1. satpoint is selected 1st leaving us needing 7154 more + (outpoint(5), Amount::from_sat(3_004)), + (outpoint(4), Amount::from_sat(3_001)), // 4. smallest utxo >= 1259 is selected 4th, filling deficit + (outpoint(3), Amount::from_sat(3_005)), // 3. next biggest utxo is selected 3rd leaving us needing 1259 more + (outpoint(6), Amount::from_sat(3_002)), + ]; + + let tx_builder = TransactionBuilder::new( + satpoint(1, 0), + BTreeMap::new(), + utxos.clone().into_iter().collect(), + recipient(), + [change(0), change(1)], + FeeRate::try_from(1.0).unwrap(), + Target::Value(Amount::from_sat(10_000)), + ) + .unwrap() + .select_outgoing() + .unwrap() + .add_value() + .unwrap(); + + utxos.remove(4); + utxos.remove(3); + utxos.remove(1); + utxos.remove(0); + assert_eq!( + tx_builder.utxos, + utxos.iter().map(|(outpoint, _ranges)| *outpoint).collect() + ); + assert_eq!( + tx_builder.inputs, + [outpoint(1), outpoint(2), outpoint(3), outpoint(4)] + ); // value inputs are pushed at the end + assert_eq!( + tx_builder.outputs, + [(recipient(), Amount::from_sat(3_003 + 3_006 + 3_005 + 3_001))] + ) + } + + #[test] + fn pad_alignment_output_can_select_multiple_utxos() { + let mut utxos = vec![ + (outpoint(4), Amount::from_sat(101)), // 4. smallest utxo >= 84 is selected 4th, filling deficit + (outpoint(1), Amount::from_sat(20_000)), // 1. satpoint is selected 1st leaving deficit 293 + (outpoint(2), Amount::from_sat(105)), // 2. biggest utxo <= 293 is selected 2nd leaving deficit 188 + (outpoint(5), Amount::from_sat(103)), + (outpoint(6), Amount::from_sat(10_000)), + (outpoint(3), Amount::from_sat(104)), // 3. biggest utxo <= 188 is selected 3rd leaving deficit 84 + (outpoint(7), Amount::from_sat(102)), + ]; + + let tx_builder = TransactionBuilder::new( + satpoint(1, 1), + BTreeMap::new(), + utxos.clone().into_iter().collect(), + recipient(), + [change(0), change(1)], + FeeRate::try_from(1.0).unwrap(), + Target::Value(Amount::from_sat(10_000)), + ) + .unwrap() + .select_outgoing() + .unwrap() + .align_outgoing() + .pad_alignment_output() + .unwrap(); + + utxos.remove(5); + utxos.remove(2); + utxos.remove(1); + utxos.remove(0); + assert_eq!( + tx_builder.utxos, + utxos.iter().map(|(outpoint, _ranges)| *outpoint).collect() + ); + assert_eq!( + tx_builder.inputs, + [outpoint(4), outpoint(3), outpoint(2), outpoint(1)] + ); // padding inputs are inserted at the start + assert_eq!( + tx_builder.outputs, + [ + (change(1), Amount::from_sat(101 + 104 + 105 + 1)), + (recipient(), Amount::from_sat(19_999)) + ] + ) + } + + fn select_cardinal_utxo_prefer_under_helper( + target_value: Amount, + prefer_under: bool, + expected_value: Amount, + ) { + let utxos = vec![ + (outpoint(4), Amount::from_sat(101)), + (outpoint(1), Amount::from_sat(20_000)), + (outpoint(2), Amount::from_sat(105)), + (outpoint(5), Amount::from_sat(103)), + (outpoint(6), Amount::from_sat(10_000)), + (outpoint(3), Amount::from_sat(104)), + (outpoint(7), Amount::from_sat(102)), + ]; + + let mut tx_builder = TransactionBuilder::new( + satpoint(0, 0), + BTreeMap::new(), + utxos.into_iter().collect(), + recipient(), + [change(0), change(1)], + FeeRate::try_from(1.0).unwrap(), + Target::Value(Amount::from_sat(10_000)), + ) + .unwrap(); + + assert_eq!( + tx_builder + .select_cardinal_utxo(target_value, prefer_under) + .unwrap() + .1, + expected_value + ); + } + + #[test] + fn select_cardinal_utxo_prefer_under() { + // select biggest utxo <= 104 + select_cardinal_utxo_prefer_under_helper(Amount::from_sat(104), true, Amount::from_sat(104)); + + // select biggest utxo <= 1_000 + select_cardinal_utxo_prefer_under_helper(Amount::from_sat(1_000), true, Amount::from_sat(105)); + + // select biggest utxo <= 10, else smallest > 10 + select_cardinal_utxo_prefer_under_helper(Amount::from_sat(10), true, Amount::from_sat(101)); + + // select smallest utxo >= 104 + select_cardinal_utxo_prefer_under_helper(Amount::from_sat(104), false, Amount::from_sat(104)); + + // select smallest utxo >= 1_000 + select_cardinal_utxo_prefer_under_helper( + Amount::from_sat(1000), + false, + Amount::from_sat(10_000), + ); + + // select smallest utxo >= 100_000, else biggest < 100_000 + select_cardinal_utxo_prefer_under_helper( + Amount::from_sat(100_000), + false, + Amount::from_sat(20_000), + ); + } } diff --git a/src/templates/block.rs b/src/templates/block.rs index 3eab023012..d05988ff91 100644 --- a/src/templates/block.rs +++ b/src/templates/block.rs @@ -11,11 +11,9 @@ pub(crate) struct BlockHtml { impl BlockHtml { pub(crate) fn new(block: Block, height: Height, best_height: Height) -> Self { - let mut target = block.header.target().to_be_bytes(); - target.reverse(); Self { hash: block.header.block_hash(), - target: BlockHash::from_inner(target), + target: BlockHash::from_raw_hash(Hash::from_byte_array(block.header.target().to_be_bytes())), block, height, best_height, diff --git a/src/templates/input.rs b/src/templates/input.rs index 9fb77e1fd8..aa070f605e 100644 --- a/src/templates/input.rs +++ b/src/templates/input.rs @@ -30,7 +30,7 @@ mod tests { previous_output: "0000000000000000000000000000000000000000000000000000000000000000:0" .parse() .unwrap(), - script_sig: script::Builder::new().push_slice("foo".as_bytes()).into_script(), + script_sig: ScriptBuf::builder().push_slice(b"foo").into_script(), sequence: Sequence::MAX, witness, } diff --git a/src/templates/output.rs b/src/templates/output.rs index d8d447bcb5..2172795b18 100644 --- a/src/templates/output.rs +++ b/src/templates/output.rs @@ -19,7 +19,7 @@ impl PageContent for OutputHtml { mod tests { use { super::*, - bitcoin::{blockdata::script, PubkeyHash, Script}, + bitcoin::{blockdata::script, PubkeyHash}, }; #[test] @@ -32,7 +32,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, }, " @@ -89,7 +89,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, } .to_string(), @@ -116,7 +116,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, }, " diff --git a/src/templates/sat.rs b/src/templates/sat.rs index 8894ca1388..fd1c5bab7d 100644 --- a/src/templates/sat.rs +++ b/src/templates/sat.rs @@ -5,7 +5,7 @@ pub(crate) struct SatHtml { pub(crate) sat: Sat, pub(crate) satpoint: Option, pub(crate) blocktime: Blocktime, - pub(crate) inscription: Option, + pub(crate) inscriptions: Vec, } impl PageContent for SatHtml { @@ -25,7 +25,7 @@ mod tests { sat: Sat(0), satpoint: None, blocktime: Blocktime::confirmed(0), - inscription: None, + inscriptions: Vec::new(), }, "

Sat 0

@@ -58,7 +58,7 @@ mod tests { sat: Sat(2099999997689999), satpoint: None, blocktime: Blocktime::confirmed(0), - inscription: None, + inscriptions: Vec::new(), }, "

Sat 2099999997689999

@@ -91,7 +91,7 @@ mod tests { sat: Sat(1), satpoint: None, blocktime: Blocktime::confirmed(0), - inscription: None, + inscriptions: Vec::new(), }, r"

Sat 1

.*\n.*", ); @@ -104,9 +104,39 @@ mod tests { sat: Sat(0), satpoint: None, blocktime: Blocktime::confirmed(0), - inscription: Some(inscription_id(1)), + inscriptions: vec![inscription_id(1)], }, - r"

Sat 0

.*
inscription
.*
.*", + " +

Sat 0

+ .* +
inscriptions
+
+ .* +
+ .*" + .unindent(), + ); + } + + #[test] + fn sat_with_reinscription() { + assert_regex_match!( + SatHtml { + sat: Sat(0), + satpoint: None, + blocktime: Blocktime::confirmed(0), + inscriptions: vec![inscription_id(1), inscription_id(2)], + }, + " +

Sat 0

+ .* +
inscriptions
+
+ .* + .* +
+ .*" + .unindent(), ); } @@ -117,7 +147,7 @@ mod tests { sat: Sat::LAST, satpoint: None, blocktime: Blocktime::confirmed(0), - inscription: None, + inscriptions: Vec::new(), }, r"

Sat 2099999997689999

.*\nnext.*", ); @@ -130,7 +160,7 @@ mod tests { sat: Sat(0), satpoint: Some(satpoint(1, 0)), blocktime: Blocktime::confirmed(0), - inscription: None, + inscriptions: Vec::new(), }, "

Sat 0

.*
location
1{64}:1:0
.*", ); diff --git a/src/templates/transaction.rs b/src/templates/transaction.rs index c5b7c878c0..14ec84801a 100644 --- a/src/templates/transaction.rs +++ b/src/templates/transaction.rs @@ -36,14 +36,14 @@ impl PageContent for TransactionHtml { mod tests { use { super::*, - bitcoin::{blockdata::script, PackedLockTime, TxOut}, + bitcoin::{blockdata::script, locktime::absolute::LockTime, TxOut}, }; #[test] fn html() { let transaction = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: vec![TxIn { sequence: Default::default(), previous_output: Default::default(), @@ -104,7 +104,7 @@ mod tests { fn with_blockhash() { let transaction = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: Vec::new(), output: vec![ TxOut { diff --git a/src/test.rs b/src/test.rs index 3ca70c33e0..43fd74e927 100644 --- a/src/test.rs +++ b/src/test.rs @@ -1,8 +1,9 @@ pub(crate) use { super::*, crate::inscription::TransactionInscription, + bitcoin::blockdata::script::PushBytesBuf, bitcoin::blockdata::{opcodes, script}, - bitcoin::Witness, + bitcoin::{ScriptBuf, Witness}, pretty_assertions::assert_eq as pretty_assert_eq, std::iter, test_bitcoincore_rpc::TransactionTemplate, @@ -69,14 +70,16 @@ pub(crate) fn satpoint(n: u64, offset: u64) -> SatPoint { pub(crate) fn address() -> Address { "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn recipient() -> Address { "tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn change(n: u64) -> Address { @@ -86,14 +89,15 @@ pub(crate) fn change(n: u64) -> Address { 2 => "tb1qxz9yk0td0yye009gt6ayn7jthz5p07a75luryg", _ => panic!(), } - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn tx_in(previous_output: OutPoint) -> TxIn { TxIn { previous_output, - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, witness: Witness::new(), } @@ -139,10 +143,12 @@ pub(crate) fn envelope(payload: &[&[u8]]) -> Witness { .push_opcode(opcodes::all::OP_IF); for data in payload { - builder = builder.push_slice(data); + let mut buf = PushBytesBuf::new(); + buf.extend_from_slice(data).unwrap(); + builder = builder.push_slice(buf); } let script = builder.push_opcode(opcodes::all::OP_ENDIF).into_script(); - Witness::from_vec(vec![script.into_bytes(), Vec::new()]) + Witness::from_slice(&[script.into_bytes(), Vec::new()]) } diff --git a/templates/input.html b/templates/input.html index 08d19e069f..8575091f16 100644 --- a/templates/input.html +++ b/templates/input.html @@ -10,7 +10,7 @@

Input /{{self.path.0}}/{{self.path.1}}/{{self.path.2}}

witness
{{hex::encode(consensus::serialize(&self.input.witness))}}
%% } %% if !self.input.script_sig.is_empty() { -
script sig
{{self.input.script_sig.asm()}}
+
script sig
{{self.input.script_sig.to_asm_string()}}
text
{{String::from_utf8_lossy(self.input.script_sig.as_bytes())}}
%% } diff --git a/templates/output.html b/templates/output.html index 3736b21110..e2b01448db 100644 --- a/templates/output.html +++ b/templates/output.html @@ -9,7 +9,7 @@

Output {{self.outpoint}}

%% }
value
{{ self.output.value }}
-
script pubkey
{{ self.output.script_pubkey.asm() }}
+
script pubkey
{{ self.output.script_pubkey.to_asm_string() }}
%% if let Ok(address) = self.chain.address_from_script(&self.output.script_pubkey ) {
address
{{ address }}
%% } diff --git a/templates/sat.html b/templates/sat.html index 05177a4ff5..51ac8b3e85 100644 --- a/templates/sat.html +++ b/templates/sat.html @@ -11,8 +11,13 @@

Sat {{ self.sat.n() }}

offset
{{ self.sat.third() }}
rarity
{{ self.sat.rarity() }}
timestamp
{{self.blocktime.suffix()}}
-%% if let Some((inscription)) = &self.inscription { -
inscription
{{ Iframe::thumbnail(*inscription) }}
+%% if !self.inscriptions.is_empty() { +
inscriptions
+
+%% for inscription in &self.inscriptions { + {{Iframe::thumbnail(*inscription)}} +%% } +
%% } %% if let Some(satpoint) = self.satpoint {
location
{{ satpoint }}
diff --git a/templates/transaction.html b/templates/transaction.html index 23bb8614e9..15636f26b2 100644 --- a/templates/transaction.html +++ b/templates/transaction.html @@ -27,7 +27,7 @@

{{"Output".tally(self.transaction.output.len())}}

value
{{ output.value }}
-
script pubkey
{{ output.script_pubkey.asm() }}
+
script pubkey
{{ output.script_pubkey.to_asm_string() }}
%% if let Ok(address) = self.chain.address_from_script(&output.script_pubkey) {
address
{{ address }}
%% } diff --git a/test-bitcoincore-rpc/Cargo.toml b/test-bitcoincore-rpc/Cargo.toml index 76016d6a64..bbb0ec79b4 100644 --- a/test-bitcoincore-rpc/Cargo.toml +++ b/test-bitcoincore-rpc/Cargo.toml @@ -8,12 +8,12 @@ homepage = "https://github.com/ordinals/ord" repository = "https://github.com/ordinals/ord" [dependencies] -bitcoin = { version = "0.29.1", features = ["serde", "rand"] } +bitcoin = { version = "0.30.0", features = ["serde", "rand"] } hex = "0.4.3" jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" jsonrpc-http-server = "18.0.0" -ord-bitcoincore-rpc = "0.16.5" +ord-bitcoincore-rpc = "0.17.0" reqwest = { version = "0.11.10", features = ["blocking"] } -serde = { version = "1", features = ["derive"] } -serde_json = "1.0.0" +serde = { version = "1.0.137", features = ["derive"] } +serde_json = { version = "1.0.81" } diff --git a/test-bitcoincore-rpc/src/api.rs b/test-bitcoincore-rpc/src/api.rs index 17728d3c6d..fc88b0e121 100644 --- a/test-bitcoincore-rpc/src/api.rs +++ b/test-bitcoincore-rpc/src/api.rs @@ -64,7 +64,7 @@ pub trait Api { #[rpc(name = "sendtoaddress")] fn send_to_address( &self, - address: Address, + address: Address, amount: f64, comment: Option, comment_to: Option, @@ -94,7 +94,7 @@ pub trait Api { &self, minconf: Option, maxconf: Option, - address: Option, + address: Option>, include_unsafe: Option, query_options: Option, ) -> Result, jsonrpc_core::Error>; @@ -106,7 +106,7 @@ pub trait Api { fn get_raw_change_address( &self, address_type: Option, - ) -> Result; + ) -> Result; #[rpc(name = "getdescriptorinfo")] fn get_descriptor_info( @@ -125,7 +125,7 @@ pub trait Api { &self, label: Option, address_type: Option, - ) -> Result; + ) -> Result; #[rpc(name = "listtransactions")] fn list_transactions( diff --git a/test-bitcoincore-rpc/src/lib.rs b/test-bitcoincore-rpc/src/lib.rs index 7051d283d6..7a7e314a17 100644 --- a/test-bitcoincore-rpc/src/lib.rs +++ b/test-bitcoincore-rpc/src/lib.rs @@ -3,14 +3,18 @@ use { api::Api, bitcoin::{ + address::{Address, NetworkUnchecked}, + amount::SignedAmount, + block::Header, blockdata::constants::COIN_VALUE, - blockdata::script, + blockdata::{block::Version, script}, consensus::encode::{deserialize, serialize}, - hash_types::BlockHash, + hash_types::{BlockHash, TxMerkleNode}, hashes::Hash, - util::amount::SignedAmount, - Address, Amount, Block, BlockHeader, Network, OutPoint, PackedLockTime, Script, Sequence, - Transaction, TxIn, TxMerkleNode, TxOut, Txid, Witness, Wtxid, + locktime::absolute::LockTime, + pow::CompactTarget, + Amount, Block, Network, OutPoint, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, Witness, + Wtxid, }, bitcoincore_rpc::json::{ Bip125Replaceable, CreateRawTransactionInput, Descriptor, EstimateMode, GetBalancesResult, @@ -228,6 +232,7 @@ impl Handle { Network::Testnet => Network::Testnet.to_string(), Network::Signet => Network::Signet.to_string(), Network::Regtest => Network::Regtest.to_string(), + _ => panic!(), } } diff --git a/test-bitcoincore-rpc/src/server.rs b/test-bitcoincore-rpc/src/server.rs index 0ea66122dd..58c185e07d 100644 --- a/test-bitcoincore-rpc/src/server.rs +++ b/test-bitcoincore-rpc/src/server.rs @@ -1,9 +1,8 @@ use { super::*, bitcoin::{ - psbt::serialize::Deserialize, secp256k1::{rand, KeyPair, Secp256k1, XOnlyPublicKey}, - Address, Witness, + Witness, }, bitcoincore_rpc::RawTx, }; @@ -51,6 +50,7 @@ impl Api for Server { Network::Testnet => "test", Network::Signet => "signet", Network::Regtest => "regtest", + _ => panic!(), }), blocks: 0, headers: 0, @@ -128,7 +128,7 @@ impl Api for Server { nonce: 0, previous_block_hash: None, time: 0, - version: 0, + version: Version::ONE, version_hex: Some(vec![0, 0, 0, 0]), }) .unwrap(), @@ -201,12 +201,12 @@ impl Api for Server { let tx = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: utxos .iter() .map(|input| TxIn { previous_output: OutPoint::new(input.txid, input.vout), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::MAX, witness: Witness::new(), }) @@ -215,7 +215,7 @@ impl Api for Server { .values() .map(|amount| TxOut { value: (*amount * COIN_VALUE as f64) as u64, - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), }) .collect(), }; @@ -247,9 +247,9 @@ impl Api for Server { assert_eq!(utxos, None, "utxos param not supported"); assert_eq!(sighash_type, None, "sighash_type param not supported"); - let mut transaction = Transaction::deserialize(&hex::decode(tx).unwrap()).unwrap(); + let mut transaction: Transaction = deserialize(&hex::decode(tx).unwrap()).unwrap(); for input in &mut transaction.input { - input.witness = Witness::from_vec(vec![vec![0; 64]]); + input.witness = Witness::from_slice(&[&[0; 64]]); } Ok( @@ -271,7 +271,7 @@ impl Api for Server { fn send_to_address( &self, - address: Address, + address: Address, amount: f64, comment: Option, comment_to: Option, @@ -291,7 +291,7 @@ impl Api for Server { let locked = state.locked.iter().cloned().collect(); state.sent.push(Sent { - address, + address: address.assume_checked(), amount, locked, }); @@ -378,7 +378,7 @@ impl Api for Server { &self, minconf: Option, maxconf: Option, - address: Option, + address: Option>, include_unsafe: Option, query_options: Option, ) -> Result, jsonrpc_core::Error> { @@ -402,7 +402,7 @@ impl Api for Server { label: None, redeem_script: None, witness_script: None, - script_pub_key: Script::new(), + script_pub_key: ScriptBuf::new(), amount, confirmations: 0, spendable: true, @@ -428,7 +428,7 @@ impl Api for Server { fn get_raw_change_address( &self, _address_type: Option, - ) -> Result { + ) -> Result { let secp256k1 = Secp256k1::new(); let key_pair = KeyPair::new(&secp256k1, &mut rand::thread_rng()); let (public_key, _parity) = XOnlyPublicKey::from_keypair(&key_pair); diff --git a/test-bitcoincore-rpc/src/state.rs b/test-bitcoincore-rpc/src/state.rs index 29b2d91889..0a05039aa5 100644 --- a/test-bitcoincore-rpc/src/state.rs +++ b/test-bitcoincore-rpc/src/state.rs @@ -48,7 +48,7 @@ impl State { pub(crate) fn push_block(&mut self, subsidy: u64) -> Block { let coinbase = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), script_sig: script::Builder::new() @@ -78,19 +78,19 @@ impl State { fee }) .sum::(), - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), }], }; self.transactions.insert(coinbase.txid(), coinbase.clone()); let block = Block { - header: BlockHeader { - version: 0, + header: Header { + version: Version::ONE, prev_blockhash: *self.hashes.last().unwrap(), merkle_root: TxMerkleNode::all_zeros(), time: self.blocks.len().try_into().unwrap(), - bits: 0, + bits: CompactTarget::from_consensus(0), nonce: self.nonce, }, txdata: std::iter::once(coinbase) @@ -136,7 +136,7 @@ impl State { total_value += tx.output[*vout].value; input.push(TxIn { previous_output: OutPoint::new(tx.txid(), *vout as u32), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::MAX, witness: template.witness.clone(), }); @@ -150,7 +150,7 @@ impl State { let tx = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input, output: (0..template.outputs) .map(|i| TxOut { diff --git a/tests/lib.rs b/tests/lib.rs index 50a0fbee8c..cd9f4dfab1 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -3,7 +3,11 @@ use { self::{command_builder::CommandBuilder, expected::Expected, test_server::TestServer}, bip39::Mnemonic, - bitcoin::{blockdata::constants::COIN_VALUE, Network, OutPoint, Txid}, + bitcoin::{ + address::{Address, NetworkUnchecked}, + blockdata::constants::COIN_VALUE, + Network, OutPoint, Txid, + }, executable_path::executable_path, pretty_assertions::assert_eq as pretty_assert_eq, regex::Regex, diff --git a/tests/list.rs b/tests/list.rs index bb54633bb3..8b82267d3b 100644 --- a/tests/list.rs +++ b/tests/list.rs @@ -16,7 +16,9 @@ fn output_found() { .parse() .unwrap(), start: 0, + end: 50 * COIN_VALUE, size: 50 * COIN_VALUE, + offset: 0, rarity: "mythic".parse().unwrap(), name: "nvtdijuwxlp".into(), }] diff --git a/tests/wallet/inscribe.rs b/tests/wallet/inscribe.rs index eb28a91166..03a20ee03a 100644 --- a/tests/wallet/inscribe.rs +++ b/tests/wallet/inscribe.rs @@ -374,7 +374,8 @@ fn inscribe_to_specific_destination() { .address; let txid = CommandBuilder::new(format!( - "wallet inscribe --destination {destination} degenerate.png --fee-rate 1" + "wallet inscribe --destination {} degenerate.png --fee-rate 1", + destination.clone().assume_checked() )) .write("degenerate.png", [1; 520]) .rpc_server(&rpc_server) @@ -385,7 +386,7 @@ fn inscribe_to_specific_destination() { assert_eq!(reveal_tx.txid(), txid); assert_eq!( reveal_tx.output.first().unwrap().script_pubkey, - destination.script_pubkey() + destination.payload.script_pubkey() ); } @@ -401,7 +402,7 @@ fn inscribe_to_address_on_different_network() { .write("degenerate.png", [1; 520]) .rpc_server(&rpc_server) .expected_exit_code(1) - .stderr_regex("error: Address `tb1qsgx55dp6gn53tsmyjjv4c2ye403hgxynxs0dnm` is not valid for mainnet\n") + .stderr_regex("error: address tb1qsgx55dp6gn53tsmyjjv4c2ye403hgxynxs0dnm belongs to network testnet which is different from required bitcoin\n") .run_and_extract_stdout(); } diff --git a/tests/wallet/inscriptions.rs b/tests/wallet/inscriptions.rs index 7e2b90894c..3951e8f072 100644 --- a/tests/wallet/inscriptions.rs +++ b/tests/wallet/inscriptions.rs @@ -32,11 +32,14 @@ fn inscriptions() { .run_and_check_output::() .address; - let stdout = CommandBuilder::new(format!("wallet send --fee-rate 1 {address} {inscription}")) - .rpc_server(&rpc_server) - .expected_exit_code(0) - .stdout_regex(".*") - .run_and_extract_stdout(); + let stdout = CommandBuilder::new(format!( + "wallet send --fee-rate 1 {} {inscription}", + address.assume_checked() + )) + .rpc_server(&rpc_server) + .expected_exit_code(0) + .stdout_regex(".*") + .run_and_extract_stdout(); rpc_server.mine_blocks(1); @@ -79,3 +82,40 @@ fn inscriptions_includes_locked_utxos() { assert_eq!(output[0].inscription, inscription.parse().unwrap()); assert_eq!(output[0].location, format!("{reveal}:0:0").parse().unwrap()); } + +#[test] +fn inscriptions_with_postage() { + let rpc_server = test_bitcoincore_rpc::spawn(); + create_wallet(&rpc_server); + rpc_server.mine_blocks(1); + + let Inscribe { inscription, .. } = inscribe(&rpc_server); + + let output = CommandBuilder::new("wallet inscriptions") + .rpc_server(&rpc_server) + .run_and_check_output::>(); + + assert_eq!(output[0].postage, 10000); + + let address = CommandBuilder::new("wallet receive") + .rpc_server(&rpc_server) + .run_and_check_output::() + .address; + + CommandBuilder::new(format!( + "wallet send --fee-rate 1 {} {inscription}", + address.assume_checked() + )) + .rpc_server(&rpc_server) + .expected_exit_code(0) + .stdout_regex(".*") + .run_and_extract_stdout(); + + rpc_server.mine_blocks(1); + + let output = CommandBuilder::new("wallet inscriptions") + .rpc_server(&rpc_server) + .run_and_check_output::>(); + + assert_eq!(output[0].postage, 9889); +} diff --git a/tests/wallet/send.rs b/tests/wallet/send.rs index 617dbb9dd7..5ecf6122c8 100644 --- a/tests/wallet/send.rs +++ b/tests/wallet/send.rs @@ -117,7 +117,7 @@ fn send_addresses_must_be_valid_for_network() { )) .rpc_server(&rpc_server) .expected_stderr( - "error: Address `tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz` is not valid for mainnet\n", + "error: address tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz belongs to network testnet which is different from required bitcoin\n", ) .expected_exit_code(1) .run_and_extract_stdout(); @@ -234,8 +234,9 @@ fn send_btc() { &[Sent { amount: 1.0, address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), locked: Vec::new(), }] ) @@ -267,8 +268,9 @@ fn send_btc_locks_inscriptions() { &[Sent { amount: 1.0, address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), locked: vec![OutPoint { txid: reveal, vout: 0,