diff --git a/.github/workflows/check_lint_build.yaml b/.github/workflows/check_lint_build.yaml index 0e71e1f..0052013 100644 --- a/.github/workflows/check_lint_build.yaml +++ b/.github/workflows/check_lint_build.yaml @@ -218,7 +218,7 @@ jobs: version: ${{ steps.git-tag-name.outputs.git_tag_name }} - name: Release - uses: softprops/action-gh-release@v2.0.2 + uses: softprops/action-gh-release@v3.0.1 if: startsWith(github.ref, 'refs/tags/') with: files: | @@ -254,6 +254,7 @@ jobs: - name: Download release assets uses: robinraju/release-downloader@v1.13 with: + fileName: '*' tag: ${{ github.ref_name }} - name: Create zip files for releases.drivechain.info diff --git a/Cargo.lock b/Cargo.lock index f15f845..9b0a19c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,44 +20,66 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" [[package]] name = "accesskit" -version = "0.17.1" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d3b8f9bae46a948369bc4a03e815d4ed6d616bd00de4051133a5019dc31c5a" +checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" +dependencies = [ + "uuid", +] [[package]] name = "accesskit_atspi_common" -version = "0.10.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5dd55e6e94949498698daf4d48fb5659e824d7abec0d394089656ceaf99d4f" +checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954" dependencies = [ "accesskit", - "accesskit_consumer", + "accesskit_consumer 0.36.0", "atspi-common", + "phf 0.13.1", "serde", - "thiserror 1.0.69", "zvariant", ] [[package]] name = "accesskit_consumer" -version = "0.26.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f47983a1084940ba9a39c077a8c63e55c619388be5476ac04c804cfbd1e63459" +checksum = "53cf47daed85312e763fbf85ceca136e0d7abc68e0a7e12abe11f48172bc3b10" dependencies = [ "accesskit", - "hashbrown 0.15.5", - "immutable-chunkmap", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_consumer" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_consumer" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", ] [[package]] name = "accesskit_macos" -version = "0.18.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7329821f3bd1101e03a7d2e03bd339e3ac0dc64c70b4c9f9ae1949e3ba8dece1" +checksum = "17cb8b66cef272d48161b02a6317cc2bdd5f98bb0a5e79c68f704a5862aa396b" dependencies = [ "accesskit", - "accesskit_consumer", - "hashbrown 0.15.5", + "accesskit_consumer 0.37.0", + "hashbrown 0.16.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", @@ -65,9 +87,9 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.13.1" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcee751cc20d88678c33edaf9c07e8b693cd02819fe89053776f5313492273f5" +checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c" dependencies = [ "accesskit", "accesskit_atspi_common", @@ -83,24 +105,23 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.24.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fcd5d23d70670992b823e735e859374d694a3d12bfd8dd32bd3bd8bedb5d81" +checksum = "eff7009f1a532e917d66970a1e80c965140c6cfbbabbdde3d64e5431e6c78e21" dependencies = [ "accesskit", - "accesskit_consumer", - "hashbrown 0.15.5", - "paste", + "accesskit_consumer 0.35.0", + "hashbrown 0.16.1", "static_assertions", "windows", - "windows-core 0.58.0", + "windows-core", ] [[package]] name = "accesskit_winit" -version = "0.23.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6a48dad5530b6deb9fc7a52cc6c3bf72cdd9eb8157ac9d32d69f2427a5e879" +checksum = "1fe9a94394896352cc4660ca2288bd4ef883d83238853c038b44070c8f134313" dependencies = [ "accesskit", "accesskit_macos", @@ -189,6 +210,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "android-activity" version = "0.6.0" @@ -205,7 +232,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "thiserror 1.0.69", ] @@ -290,7 +317,7 @@ dependencies = [ "clipboard-win", "image", "log", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-app-kit 0.3.2", "objc2-core-foundation", "objc2-core-graphics", @@ -370,6 +397,18 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-compression" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "async-executor" version = "1.13.3" @@ -384,17 +423,6 @@ dependencies = [ "slab", ] -[[package]] -name = "async-fs" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" -dependencies = [ - "async-lock", - "blocking", - "futures-lite", -] - [[package]] name = "async-io" version = "2.6.0" @@ -509,20 +537,19 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atspi" -version = "0.22.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" +checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d" dependencies = [ "atspi-common", - "atspi-connection", "atspi-proxies", ] [[package]] name = "atspi-common" -version = "0.6.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" +checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d" dependencies = [ "enumflags2", "serde", @@ -534,28 +561,15 @@ dependencies = [ "zvariant", ] -[[package]] -name = "atspi-connection" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" -dependencies = [ - "atspi-common", - "atspi-proxies", - "futures-lite", - "zbus", -] - [[package]] name = "atspi-proxies" -version = "0.6.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" +checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" dependencies = [ "atspi-common", "serde", "zbus", - "zvariant", ] [[package]] @@ -598,6 +612,8 @@ dependencies = [ "http", "http-body", "http-body-util", + "hyper", + "hyper-util", "itoa", "matchit", "memchr", @@ -631,11 +647,10 @@ dependencies = [ [[package]] name = "base58ck" -version = "0.1.0" +version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f" +checksum = "365c0acd5b2e8dd0111a46c4faea83fb3cfb6e39a49a7c73a06e090db7b2eff0" dependencies = [ - "bitcoin-internals", "bitcoin_hashes", ] @@ -742,19 +757,23 @@ dependencies = [ [[package]] name = "bip300301_enforcer_integration_tests" version = "0.3.4" -source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=a4197ad2ae9d35252d12008ff616bce710b647d2#a4197ad2ae9d35252d12008ff616bce710b647d2" +source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=1100b6085d9ed64eeaf1b57b3c44609626bd4b23#1100b6085d9ed64eeaf1b57b3c44609626bd4b23" dependencies = [ "anyhow", "bdk_wallet", "bip300301_enforcer_lib", "bitcoin", "bitcoin-jsonrpsee", + "buffa", + "buffa-types", "cfg-if", + "connectrpc", "cusf-enforcer-mempool", "dotenvy", "either", "futures", "hex 0.4.3", + "http", "indicatif", "jsonrpsee 0.26.0", "libtest-mimic", @@ -767,7 +786,6 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tokio-stream", - "tonic", "tracing", "tracing-indicatif", ] @@ -775,7 +793,7 @@ dependencies = [ [[package]] name = "bip300301_enforcer_lib" version = "0.3.4" -source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=a4197ad2ae9d35252d12008ff616bce710b647d2#a4197ad2ae9d35252d12008ff616bce710b647d2" +source = "git+https://github.com/LayerTwo-Labs/bip300301_enforcer?rev=1100b6085d9ed64eeaf1b57b3c44609626bd4b23#1100b6085d9ed64eeaf1b57b3c44609626bd4b23" dependencies = [ "aes-gcm", "argon2", @@ -788,18 +806,23 @@ dependencies = [ "bitcoin", "bitcoin-jsonrpsee", "bitcoin-send-tx-p2p", + "buffa", + "buffa-descriptor", + "buffa-types", "byteorder", "clap", + "connectrpc", "cusf-enforcer-mempool", "derive_more", "either", "error-fatality", "fallible-iterator", "futures", - "hashlink 0.11.0", + "hashlink 0.12.0", "heed 0.22.0", "heed-types", "hex 0.4.3", + "http-body", "jiff", "jsonrpsee 0.26.0", "miette", @@ -808,8 +831,6 @@ dependencies = [ "ordermap", "ouroboros", "parking_lot", - "prost", - "prost-types", "rand 0.10.1", "reqwest 0.13.4", "rusqlite", @@ -823,8 +844,6 @@ dependencies = [ "tokio-rusqlite", "tokio-stream", "tokio-util", - "tonic", - "tonic-prost", "tracing", "tracing-appender", "tracing-subscriber", @@ -846,24 +865,24 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" [[package]] name = "bitcoin" -version = "0.32.100" +version = "0.32.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39581299241111285f3268ba75ddf372746fd041620918b145c1af9d75e91b6c" +checksum = "8ed8ccb78a9ff7a6fbb90e2fb9b8588b4a9928d49d8af3cb789108a84ea6b0ce" dependencies = [ "base58ck", "base64 0.21.7", @@ -871,23 +890,38 @@ dependencies = [ "bitcoin-io", "bitcoin-units", "bitcoin_hashes", - "hex-conservative", + "hex-conservative 0.2.2", "hex_lit", "secp256k1", "serde", ] +[[package]] +name = "bitcoin-consensus-encoding" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2d6094e2a1ba3c93b5a596fe5a10d1a10c3c6e06785cde89f693a044c01aa40" +dependencies = [ + "bitcoin-internals", +] + [[package]] name = "bitcoin-internals" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bdbe14aa07b06e6cfeffc529a1f099e5fbe249524f8125358604df99a4bed2" +checksum = "a30a22d1f112dde8e16be7b45c63645dc165cef254f835b3e1e9553e485cfa64" +dependencies = [ + "hex-conservative 0.3.2", +] [[package]] name = "bitcoin-io" -version = "0.1.4" +version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" +checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78" +dependencies = [ + "bitcoin-consensus-encoding", +] [[package]] name = "bitcoin-jsonrpsee" @@ -924,21 +958,22 @@ dependencies = [ [[package]] name = "bitcoin-units" -version = "0.1.100" +version = "0.1.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bad157b78d0d1b22c4cbb6a35a566211fc4d14866a37f2c780652b50f3b845" +checksum = "9cb95693f371d089a4b5b6fc41c6f3ea6e01ee8c15388335dfac8ea685173b51" dependencies = [ + "bitcoin-consensus-encoding", "serde", ] [[package]] name = "bitcoin_hashes" -version = "0.14.1" +version = "0.14.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ec84b80c482df901772e931a9a681e26a1b9ee2302edeff23cb30328745c8b" +checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2" dependencies = [ "bitcoin-io", - "hex-conservative", + "hex-conservative 0.2.2", "serde", ] @@ -986,12 +1021,6 @@ dependencies = [ "cpufeatures 0.2.17", ] -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - [[package]] name = "block-buffer" version = "0.10.4" @@ -1010,6 +1039,15 @@ dependencies = [ "objc2 0.5.2", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.4", +] + [[package]] name = "blocking" version = "1.6.2" @@ -1046,6 +1084,48 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "buffa" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec95898e2ef31d6266042f21c398fa5ff8334d14d6b2ac5fb38b55448d94f595" +dependencies = [ + "base64 0.22.1", + "bytes", + "compact_str", + "ecow", + "hashbrown 0.15.5", + "once_cell", + "serde", + "serde_json", + "smol_str 0.3.2", + "thiserror 2.0.18", +] + +[[package]] +name = "buffa-descriptor" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74c0bf128c53f22b0fc3c1e8e66969cd21375879061293fd4e5298e839099a9" +dependencies = [ + "buffa", + "serde", + "serde_json", +] + +[[package]] +name = "buffa-types" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5103995623b8e213abfa84b89feb98a0df84514607aafd52e6add9ca53c57d2e" +dependencies = [ + "buffa", + "bytes", + "serde", + "serde_json", + "thiserror 2.0.18", +] + [[package]] name = "bumpalo" version = "3.19.1" @@ -1089,6 +1169,9 @@ name = "bytes" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] [[package]] name = "calloop" @@ -1141,6 +1224,15 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "castaway" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.2.55" @@ -1275,14 +1367,24 @@ dependencies = [ [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" dependencies = [ + "serde", "termcolor", "unicode-width 0.1.14", ] +[[package]] +name = "color" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18ef4657441fb193b65f34dc39b3781f0dfec23d3bd94d0eeb4e88cde421edb" +dependencies = [ + "bytemuck", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -1299,6 +1401,40 @@ dependencies = [ "memchr", ] +[[package]] +name = "compact_str" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "serde", + "static_assertions", +] + +[[package]] +name = "compression-codecs" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +dependencies = [ + "compression-core", + "flate2", + "memchr", + "zstd", + "zstd-safe", +] + +[[package]] +name = "compression-core" +version = "0.4.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -1308,6 +1444,40 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "connectrpc" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003fac88ace432fd8e6adbe13da8b20e90613b89e70c72186c505ad1bea307b2" +dependencies = [ + "async-compression", + "async-trait", + "axum", + "base64 0.22.1", + "buffa", + "bytes", + "flate2", + "futures", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "libc", + "percent-encoding", + "pin-project", + "serde", + "serde_json", + "thiserror 2.0.18", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tracing", + "wasm-bindgen-futures", + "zstd", +] + [[package]] name = "console" version = "0.16.2" @@ -1540,7 +1710,7 @@ dependencies = [ [[package]] name = "cusf-enforcer-mempool" version = "0.3.0" -source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=5f4de6440b159c4d9cb65d6acc47d3b0d38239e3#5f4de6440b159c4d9cb65d6acc47d3b0d38239e3" +source = "git+https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git?rev=e6c0ca5620c926c8b3a1df67ac83c45ce9cb4acd#e6c0ca5620c926c8b3a1df67ac83c45ce9cb4acd" dependencies = [ "anyhow", "async-trait", @@ -1557,8 +1727,10 @@ dependencies = [ "lending-iterator", "nonempty 0.12.0", "parking_lot", + "polonius-the-crab 0.5.0", "thiserror 2.0.18", "tokio", + "tokio-util", "tracing", "typewit", "ulid", @@ -1687,7 +1859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "objc2 0.6.4", ] [[package]] @@ -1737,7 +1909,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9" dependencies = [ - "phf", + "phf 0.11.3", ] [[package]] @@ -1754,14 +1926,23 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecolor" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc4feb366740ded31a004a0e4452fbf84e80ef432ecf8314c485210229672fd1" +checksum = "a05fbfa222ffb51989d5ccf33e5f7aebfcf96c5023413856b0c3618a7f79896e" dependencies = [ "bytemuck", "emath", ] +[[package]] +name = "ecow" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78e4f79b296fbaab6ce2e22d52cb4c7f010fe0ebe7a32e34fa25885fd797bd02" +dependencies = [ + "serde", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -1813,9 +1994,9 @@ dependencies = [ [[package]] name = "eframe" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0dfe0859f3fb1bc6424c57d41e10e9093fe938f426b691e42272c2f336d915c" +checksum = "f98fe83b2589105b69dd25ca1e0fa2135a6e864d502fd8e08978f937e128cfef" dependencies = [ "ahash", "bytemuck", @@ -1824,17 +2005,17 @@ dependencies = [ "egui-wgpu", "egui-winit", "egui_glow", - "glow", "glutin", "glutin-winit", "image", "js-sys", "log", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", + "objc2 0.6.4", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", + "pollster", "profiling", "raw-window-handle", "static_assertions", @@ -1842,16 +2023,16 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "web-time", - "winapi", - "windows-sys 0.59.0", + "wgpu", + "windows-sys 0.61.2", "winit", ] [[package]] name = "egui" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd34cec49ab55d85ebf70139cb1ccd29c977ef6b6ba4fe85489d6877ee9ef3" +checksum = "42112be0ae157289312b92b3dfaf20e911b5a3c4c65d4aab0e7c47fbc0ce16e3" dependencies = [ "accesskit", "ahash", @@ -1861,13 +2042,15 @@ dependencies = [ "log", "nohash-hasher", "profiling", + "smallvec", + "unicode-segmentation", ] [[package]] name = "egui-wgpu" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d319dfef570f699b6e9114e235e862a2ddcf75f0d1a061de9e1328d92146d820" +checksum = "9f0c0559ac5598a1b887a6206dccbab7e3e6246c57cb00ae287262bd44776c9c" dependencies = [ "ahash", "bytemuck", @@ -1876,7 +2059,7 @@ dependencies = [ "epaint", "log", "profiling", - "thiserror 1.0.69", + "thiserror 2.0.18", "type-map", "web-time", "wgpu", @@ -1885,16 +2068,18 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d9dfbb78fe4eb9c3a39ad528b90ee5915c252e77bbab9d4ebc576541ab67e13" +checksum = "967c5b323625d46d46a59b5daba3fef742248d27693cc18972458619858c4239" dependencies = [ "accesskit_winit", - "ahash", "arboard", "bytemuck", "egui", "log", + "objc2 0.6.4", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", "profiling", "raw-window-handle", "smithay-clipboard", @@ -1905,11 +2090,10 @@ dependencies = [ [[package]] name = "egui_glow" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910906e3f042ea6d2378ec12a6fd07698e14ddae68aed2d819ffe944a73aab9e" +checksum = "62b652957fa7e1ab01e8fecbfbf4e35f6e43a53fa98af8a562b50d5403cd44b9" dependencies = [ - "ahash", "bytemuck", "egui", "glow", @@ -1947,9 +2131,9 @@ dependencies = [ [[package]] name = "emath" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e4cadcff7a5353ba72b7fea76bf2122b5ebdbc68e8155aa56dfdea90083fe1b" +checksum = "b53f0d33a479321da6b0caa71366c9f67e8a2c149762d90bdc0d16e601ee8ecb" dependencies = [ "bytemuck", ] @@ -2009,27 +2193,31 @@ dependencies = [ [[package]] name = "epaint" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fcc0f5a7c613afd2dee5e4b30c3e6acafb8ad6f0edb06068811f708a67c562" +checksum = "6675898a291ec212fc3df04f537d177fce8496120244590e6359dcaa4c25da79" dependencies = [ - "ab_glyph", "ahash", "bytemuck", "ecolor", "emath", "epaint_default_fonts", + "font-types", "log", "nohash-hasher", "parking_lot", "profiling", + "self_cell", + "skrifa", + "smallvec", + "vello_cpu", ] [[package]] name = "epaint_default_fonts" -version = "0.31.1" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7e7a64c02cf7a5b51e745a9e45f60660a286f151c238b9d397b3e923f5082f" +checksum = "f8970033a4282a7bcf899b38b5ed3a58b732fe093d03785d58648515d8d309da" [[package]] name = "equivalent" @@ -2110,7 +2298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f19e3ea99dbfbef0c1ec26d83e69de0c579f6aa6aaac4f44597805fcc27e97af" dependencies = [ "bitcoin", - "hex-conservative", + "hex-conservative 0.2.2", "log", "reqwest 0.12.28", "serde", @@ -2118,6 +2306,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + [[package]] name = "event-listener" version = "5.4.1" @@ -2242,6 +2439,15 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fearless_simd" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb2907d1f08b2b316b9223ced5b0e89d87028ba8deae9764741dba8ff7f3903" +dependencies = [ + "bytemuck", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2278,6 +2484,7 @@ checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -2298,6 +2505,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" +[[package]] +name = "font-types" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" +dependencies = [ + "bytemuck", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -2625,9 +2841,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" dependencies = [ "js-sys", "slotmap", @@ -2649,7 +2865,7 @@ dependencies = [ "glutin_glx_sys", "glutin_wgl_sys", "libloading", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-app-kit 0.3.2", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -2723,22 +2939,17 @@ dependencies = [ ] [[package]] -name = "gpu-alloc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" -dependencies = [ - "bitflags 2.10.0", - "gpu-alloc-types", -] - -[[package]] -name = "gpu-alloc-types" -version = "0.3.0" +name = "gpu-allocator" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" dependencies = [ - "bitflags 2.10.0", + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.18", + "windows", ] [[package]] @@ -2788,6 +2999,7 @@ checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "num-traits", "zerocopy", ] @@ -2808,6 +3020,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "foldhash 0.1.5", + "serde", ] [[package]] @@ -2816,6 +3029,8 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ + "allocator-api2", + "equivalent", "foldhash 0.2.0", ] @@ -2824,6 +3039,9 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] [[package]] name = "hashlink" @@ -2854,6 +3072,16 @@ dependencies = [ "serde", ] +[[package]] +name = "hashlink" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5081f264ed7adee96ea4b4778b6bb9da0a7228b084587aa3bd3ff05da7c5a3b" +dependencies = [ + "hashbrown 0.17.1", + "serde", +] + [[package]] name = "heck" version = "0.3.3" @@ -2962,6 +3190,15 @@ dependencies = [ "arrayvec", ] +[[package]] +name = "hex-conservative" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830e599c2904b08f0834ee6337d8fe8f0ed4a63b5d9e7a7f49c0ffa06d08d360" +dependencies = [ + "arrayvec", +] + [[package]] name = "hex-literal" version = "0.4.1" @@ -2980,6 +3217,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +[[package]] +name = "higher-kinded-types" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e690f8474c6c5d8ff99656fcbc195a215acc3949481a8b0b3351c838972dc776" +dependencies = [ + "macro_rules_attribute 0.2.2", + "never-say-never", + "paste", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -3000,9 +3248,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", "itoa", @@ -3139,7 +3387,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core", ] [[package]] @@ -3303,15 +3551,6 @@ dependencies = [ "bitmaps", ] -[[package]] -name = "immutable-chunkmap" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3e98b1520e49e252237edc238a39869da9f3241f2ec19dc788c1d24694d1e4" -dependencies = [ - "arrayvec", -] - [[package]] name = "include_path" version = "0.1.1" @@ -3843,6 +4082,18 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + [[package]] name = "l2l-openapi" version = "0.1.0" @@ -3884,10 +4135,10 @@ checksum = "bc07588c853b50689205fb5c00498aa681d89828e0ce8cbd965ebc7a5d8ae260" dependencies = [ "extension-traits", "lending-iterator-proc_macros", - "macro_rules_attribute", + "macro_rules_attribute 0.1.3", "never-say-never", "nougat", - "polonius-the-crab", + "polonius-the-crab 0.2.1", ] [[package]] @@ -3981,6 +4232,12 @@ dependencies = [ "escape8259", ] +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -4086,7 +4343,17 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf0c9b980bf4f3a37fd7b1c066941dd1b1d0152ce6ee6e8fe8c49b9f6810d862" dependencies = [ - "macro_rules_attribute-proc_macro", + "macro_rules_attribute-proc_macro 0.1.3", + "paste", +] + +[[package]] +name = "macro_rules_attribute" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520" +dependencies = [ + "macro_rules_attribute-proc_macro 0.2.2", "paste", ] @@ -4097,13 +4364,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58093314a45e00c77d5c508f76e77c3396afbbc0d01506e7fae47b018bac2b1d" [[package]] -name = "malloc_buf" -version = "0.0.6" +name = "macro_rules_attribute-proc_macro" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] +checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" [[package]] name = "matchers" @@ -4128,9 +4392,9 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" dependencies = [ "libc", ] @@ -4165,21 +4429,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "metal" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" -dependencies = [ - "bitflags 2.10.0", - "block", - "core-graphics-types", - "foreign-types 0.5.0", - "log", - "objc", - "paste", -] - [[package]] name = "miette" version = "7.6.0" @@ -4289,24 +4538,28 @@ checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" [[package]] name = "naga" -version = "24.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" +checksum = "0dd91265cc2454558f659b3b4b9640f0ddb8cc6521277f166b8a8c181c898079" dependencies = [ "arrayvec", "bit-set", "bitflags 2.10.0", + "cfg-if", "cfg_aliases", "codespan-reporting", + "half", + "hashbrown 0.16.1", "hexf-parse", "indexmap", + "libm", "log", + "num-traits", + "once_cell", "rustc-hash 1.1.0", "spirv", - "strum 0.26.3", - "termcolor", "thiserror 2.0.18", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -4318,7 +4571,7 @@ dependencies = [ "bitflags 2.10.0", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", @@ -4330,15 +4583,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -4354,19 +4598,6 @@ version = "6.6.666" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf5a574dadd7941adeaa71823ecba5e28331b8313fb2e1c6a5c7e5981ea53ad6" -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases", - "libc", - "memoffset", -] - [[package]] name = "no-std-compat" version = "0.4.1" @@ -4415,7 +4646,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b57b9ced431322f054fc673f1d3c7fa52d80efd9df74ad2fc759f044742510" dependencies = [ - "macro_rules_attribute", + "macro_rules_attribute 0.1.3", "nougat-proc_macros", ] @@ -4452,6 +4683,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -4476,15 +4708,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - [[package]] name = "objc-sys" version = "0.3.5" @@ -4503,9 +4726,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ "objc2-encode", ] @@ -4517,13 +4740,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "libc", "objc2 0.5.2", "objc2-core-data", "objc2-core-image", "objc2-foundation 0.2.2", - "objc2-quartz-core", + "objc2-quartz-core 0.2.2", ] [[package]] @@ -4533,7 +4756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-foundation", "objc2-core-graphics", "objc2-foundation 0.3.2", @@ -4546,7 +4769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -4558,7 +4781,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -4570,7 +4793,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -4583,7 +4806,7 @@ checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.10.0", "dispatch2", - "objc2 0.6.3", + "objc2 0.6.4", ] [[package]] @@ -4594,7 +4817,7 @@ checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ "bitflags 2.10.0", "dispatch2", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-foundation", "objc2-io-surface", ] @@ -4605,10 +4828,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", - "objc2-metal", + "objc2-metal 0.2.2", ] [[package]] @@ -4617,7 +4840,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-contacts", "objc2-foundation 0.2.2", @@ -4636,7 +4859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "dispatch", "libc", "objc2 0.5.2", @@ -4649,7 +4872,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "block2 0.6.2", + "objc2 0.6.4", "objc2-core-foundation", ] @@ -4660,7 +4884,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-core-foundation", ] @@ -4670,7 +4894,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", @@ -4683,11 +4907,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.10.0", + "block2 0.6.2", + "objc2 0.6.4", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-quartz-core" version = "0.2.2" @@ -4695,10 +4931,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", - "objc2-metal", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", ] [[package]] @@ -4718,7 +4967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", @@ -4726,19 +4975,31 @@ dependencies = [ "objc2-core-location", "objc2-foundation 0.2.2", "objc2-link-presentation", - "objc2-quartz-core", + "objc2-quartz-core 0.2.2", "objc2-symbols", "objc2-uniform-type-identifiers", "objc2-user-notifications", ] +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-uniform-type-identifiers" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -4750,7 +5011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ "bitflags 2.10.0", - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -4971,6 +5232,19 @@ dependencies = [ "serde_core", ] +[[package]] +name = "peniko" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2b6aadb221872732e87d465213e9be5af2849b0e8cc5300a8ba98fffa2e00a" +dependencies = [ + "bytemuck", + "color", + "kurbo", + "linebender_resource_handle", + "smallvec", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -4994,8 +5268,19 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", ] [[package]] @@ -5004,18 +5289,41 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared", + "phf_shared 0.11.3", "rand 0.8.6", ] +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + [[package]] name = "phf_macros" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", "proc-macro2", "quote", "syn 2.0.117", @@ -5030,6 +5338,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.10" @@ -5329,12 +5646,37 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "polonius-the-crab" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a69ee997a6282f8462abf1e0d8c38c965e968799e912b3bed8c9e8a28c2f9f" +[[package]] +name = "polonius-the-crab" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec242d7eccbb2fd8b3b5b6e3cf89f94a91a800f469005b44d154359609f8af72" +dependencies = [ + "higher-kinded-types", + "never-say-never", +] + +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + [[package]] name = "polyval" version = "0.6.2" @@ -5386,6 +5728,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "prettyplease" version = "0.2.37" @@ -5398,9 +5746,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] @@ -5614,28 +5962,28 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", - "serde", ] [[package]] name = "quick-xml" -version = "0.38.4" +version = "0.39.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" dependencies = [ "memchr", + "serde", ] [[package]] name = "quinn" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" dependencies = [ "bytes", "cfg_aliases", @@ -5653,9 +6001,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e" dependencies = [ "bytes", "fastbloom", @@ -5794,6 +6142,12 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + [[package]] name = "raw-cpuid" version = "11.6.0" @@ -5809,6 +6163,18 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + [[package]] name = "rayon" version = "1.11.0" @@ -5842,6 +6208,16 @@ dependencies = [ "yasna", ] +[[package]] +name = "read-fonts" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" +dependencies = [ + "bytemuck", + "font-types", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -6336,6 +6712,12 @@ dependencies = [ "libc", ] +[[package]] +name = "self_cell" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" + [[package]] name = "semver" version = "1.0.27" @@ -6525,6 +6907,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +[[package]] +name = "skrifa" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" +dependencies = [ + "bytemuck", + "read-fonts", +] + [[package]] name = "slab" version = "0.4.12" @@ -6618,6 +7010,16 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "snap" version = "1.1.1" @@ -6695,9 +7097,9 @@ dependencies = [ [[package]] name = "spirv" -version = "0.3.0+sdk-1.3.268.0" +version = "0.4.0+sdk-1.4.341.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" dependencies = [ "bitflags 2.10.0", ] @@ -6745,15 +7147,6 @@ dependencies = [ "strum_macros 0.20.1", ] -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros 0.26.4", -] - [[package]] name = "strum" version = "0.27.2" @@ -6784,19 +7177,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.117", -] - [[package]] name = "strum_macros" version = "0.27.2" @@ -7144,18 +7524,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap", "toml_datetime", @@ -7165,9 +7545,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] @@ -7283,6 +7663,7 @@ dependencies = [ "futures-util", "http", "http-body", + "http-body-util", "iri-string", "pin-project-lite", "tower", @@ -7592,12 +7973,13 @@ dependencies = [ [[package]] name = "uuid" -version = "1.23.1" +version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" dependencies = [ "getrandom 0.4.2", "js-sys", + "serde_core", "wasm-bindgen", ] @@ -7613,6 +7995,32 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vello_common" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd1a4c633ce09e7d713df1a6e036644a125e15e0c169cfb5180ddf5836ca04b" +dependencies = [ + "bytemuck", + "fearless_simd", + "hashbrown 0.16.1", + "log", + "peniko", + "skrifa", + "smallvec", +] + +[[package]] +name = "vello_cpu" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162bfe48aabf6a9fdcd401b628c7d9f260c2cbabb343c70a65feba6f7849edc" +dependencies = [ + "bytemuck", + "hashbrown 0.16.1", + "vello_common", +] + [[package]] name = "version_check" version = "0.9.5" @@ -7941,7 +8349,7 @@ dependencies = [ "jni", "log", "ndk-context", - "objc2 0.6.3", + "objc2 0.6.4", "objc2-foundation 0.3.2", "url", "web-sys", @@ -7988,17 +8396,22 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "24.0.5" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0b3436f0729f6cdf2e6e9201f3d39dc95813fad61d826c1ed07918b4539353" +checksum = "bb3feacc458f7bee8bc1737149b42b6c731aa461039a4264a67bb6681646b250" dependencies = [ "arrayvec", "bitflags 2.10.0", + "bytemuck", + "cfg-if", "cfg_aliases", "document-features", + "hashbrown 0.16.1", "js-sys", "log", + "naga", "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", @@ -8013,79 +8426,149 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "24.0.5" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f0aa306497a238d169b9dc70659105b4a096859a34894544ca81719242e1499" +checksum = "02da3ad1b568337f25513b317870960ef87073ea0945502e44b864b67a8c77b7" dependencies = [ "arrayvec", + "bit-set", "bit-vec", "bitflags 2.10.0", + "bytemuck", "cfg_aliases", "document-features", + "hashbrown 0.16.1", "indexmap", "log", "naga", "once_cell", "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash 1.1.0", "smallvec", "thiserror 2.0.18", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-wasm", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", + "wgpu-naga-bridge", "wgpu-types", ] +[[package]] +name = "wgpu-core-deps-apple" +version = "29.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e51b5447e144b3dbba4feb01f80f4fa21696fa0cd99afb2c3df1affd6fdb28" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "29.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3487cd6293a963bc5c0c0396f6a2192043c50003c07f4efdccbad3d90ec9d819" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-wasm" +version = "29.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2f2fb042f36920771deb0b966543c5751b18f3d327760ffc90f74e20b2dcd4" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "29.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb01076d0aa08b0ba9bd741e178b5cc440f5abe99d9581323a4c8b5d1a1916" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-hal" -version = "24.0.4" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f112f464674ca69f3533248508ee30cb84c67cf06c25ff6800685f5e0294e259" +checksum = "31f8e1a9e7a8512f276f7c62e018c7fa8d60954303fed2e5750114332049193f" dependencies = [ "android_system_properties", "arrayvec", "ash", + "bit-set", "bitflags 2.10.0", + "block2 0.6.2", "bytemuck", + "cfg-if", "cfg_aliases", - "core-graphics-types", "glow", "glutin_wgl_sys", - "gpu-alloc", + "gpu-allocator", "gpu-descriptor", + "hashbrown 0.16.1", "js-sys", "khronos-egl", "libc", "libloading", "log", - "metal", "naga", - "ndk-sys 0.5.0+25.2.9519653", - "objc", + "ndk-sys", + "objc2 0.6.4", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", "once_cell", "ordered-float", "parking_lot", + "portable-atomic", + "portable-atomic-util", "profiling", + "range-alloc", "raw-window-handle", + "raw-window-metal", "renderdoc-sys", - "rustc-hash 1.1.0", "smallvec", "thiserror 2.0.18", "wasm-bindgen", + "wayland-sys", "web-sys", + "wgpu-naga-bridge", "wgpu-types", "windows", + "windows-core", + "windows-result", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "29.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c654c483f058800972c3645e95388a7eca31bf9fe1933bc20e036588a0be02" +dependencies = [ + "naga", + "wgpu-types", ] [[package]] name = "wgpu-types" -version = "24.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" +checksum = "a9bcc31518a0e9735aefebedb5f7a9ef3ed1c42549c9f4c882fa9060ceaac639" dependencies = [ "bitflags 2.10.0", + "bytemuck", "js-sys", "log", + "raw-window-handle", "web-sys", ] @@ -8143,25 +8626,23 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.58.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", ] [[package]] -name = "windows-core" -version = "0.58.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-core", ] [[package]] @@ -8170,22 +8651,22 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link", - "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-result", + "windows-strings", ] [[package]] -name = "windows-implement" -version = "0.58.0" +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "windows-core", + "windows-link", + "windows-threading", ] [[package]] @@ -8199,17 +8680,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -8228,12 +8698,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "windows-result" -version = "0.2.0" +name = "windows-numerics" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" dependencies = [ - "windows-targets 0.52.6", + "windows-core", + "windows-link", ] [[package]] @@ -8245,16 +8716,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.5.1" @@ -8331,6 +8792,15 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8423,15 +8893,15 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.12" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" dependencies = [ "ahash", "android-activity", "atomic-waker", "bitflags 2.10.0", - "block2", + "block2 0.5.1", "bytemuck", "calloop 0.13.0", "cfg_aliases", @@ -8447,7 +8917,7 @@ dependencies = [ "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", - "objc2-ui-kit", + "objc2-ui-kit 0.2.2", "orbclient", "percent-encoding", "pin-project", @@ -8456,7 +8926,7 @@ dependencies = [ "rustix 0.38.44", "sctk-adwaita", "smithay-client-toolkit 0.19.2", - "smol_str", + "smol_str 0.2.2", "tracing", "unicode-segmentation", "wasm-bindgen", @@ -8475,9 +8945,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.14" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -8626,16 +9096,6 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" -[[package]] -name = "xdg-home" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "xkbcommon-dl" version = "0.4.2" @@ -8695,13 +9155,12 @@ dependencies = [ [[package]] name = "zbus" -version = "4.4.0" +version = "5.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +checksum = "eee682d202a77e4a9f3b2c2bdf48a7b28af5c08c34ddf66f98c93e5e39464285" dependencies = [ "async-broadcast", "async-executor", - "async-fs", "async-io", "async-lock", "async-process", @@ -8712,20 +9171,18 @@ dependencies = [ "enumflags2", "event-listener", "futures-core", - "futures-sink", - "futures-util", + "futures-lite", "hex 0.4.3", - "nix", + "libc", "ordered-stream", - "rand 0.8.6", + "rustix 1.1.3", "serde", "serde_repr", - "sha1", - "static_assertions", "tracing", "uds_windows", - "windows-sys 0.52.0", - "xdg-home", + "uuid", + "windows-sys 0.61.2", + "winnow", "zbus_macros", "zbus_names", "zvariant", @@ -8733,9 +9190,9 @@ dependencies = [ [[package]] name = "zbus-lockstep" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" +checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" dependencies = [ "zbus_xml", "zvariant", @@ -8743,9 +9200,9 @@ dependencies = [ [[package]] name = "zbus-lockstep-macros" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" +checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" dependencies = [ "proc-macro2", "quote", @@ -8757,37 +9214,38 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.4.0" +version = "5.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +checksum = "adf1bd45a81a103745b1757754762a26e8cd01e4532e4d6c8ec431624b80d1d6" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", + "zbus_names", + "zvariant", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "3.0.0" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d" dependencies = [ "serde", - "static_assertions", + "winnow", "zvariant", ] [[package]] name = "zbus_xml" -version = "4.0.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" +checksum = "a8067892e940ed1727dea64690378601603b31d62dfde019a5335fbb7c0e0ed9" dependencies = [ - "quick-xml 0.30.0", + "quick-xml 0.39.4", "serde", - "static_assertions", "zbus_names", "zvariant", ] @@ -8935,12 +9393,46 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "zlib-rs" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" + [[package]] name = "zmij" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zune-core" version = "0.4.12" @@ -8958,22 +9450,23 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.2.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +checksum = "a192a0bde63360d77a7523c833d4b4ce6070a927e2c53246e4c540b1a3e27be0" dependencies = [ "endi", "enumflags2", "serde", - "static_assertions", + "winnow", "zvariant_derive", + "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "4.2.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +checksum = "90bc6cde9c01c511074be97f7ccb6c19d0da89e3f8662e812e999dcfd4638737" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8984,11 +9477,13 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "2.1.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +checksum = "1e8535915cfa75547e559d8c68e8139909a4aeee076831e4ef7fc59d8172c4d6" dependencies = [ "proc-macro2", "quote", + "serde", "syn 2.0.117", + "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index 5750f23..f5e65c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ dotenvy = "0.15.7" ed25519-bip32 = "0.4.1" ed25519-dalek = "2.1.1" educe = { version = "0.6.0", default-features = false } -eframe = "0.31.0" +eframe = "0.34.0" either = "1.13.0" error-fatality = "0.1.2" fallible-iterator = "0.3.0" @@ -95,12 +95,12 @@ zeromq = "0.5.0" [workspace.dependencies.bip300301_enforcer_lib] default-features = false git = "https://github.com/LayerTwo-Labs/bip300301_enforcer" -rev = "a4197ad2ae9d35252d12008ff616bce710b647d2" +rev = "1100b6085d9ed64eeaf1b57b3c44609626bd4b23" [workspace.dependencies.bip300301_enforcer_integration_tests] default-features = false git = "https://github.com/LayerTwo-Labs/bip300301_enforcer" -rev = "a4197ad2ae9d35252d12008ff616bce710b647d2" +rev = "1100b6085d9ed64eeaf1b57b3c44609626bd4b23" [workspace.dependencies.l2l-openapi] git = "https://github.com/Ash-L2L/l2l-openapi" diff --git a/app/gui/activity/mod.rs b/app/gui/activity/mod.rs index 59c641f..acc877e 100644 --- a/app/gui/activity/mod.rs +++ b/app/gui/activity/mod.rs @@ -39,7 +39,7 @@ impl Activity { } pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::TopBottomPanel::top("activity_tabs").show(ui.ctx(), |ui| { + egui::Panel::top("activity_tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { Tab::iter().for_each(|tab_variant| { let tab_name = tab_variant.to_string(); @@ -47,7 +47,7 @@ impl Activity { }) }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::BlockExplorer => { self.block_explorer.show(app, ui); } diff --git a/app/gui/bitnames/mod.rs b/app/gui/bitnames/mod.rs index c019ce0..e389834 100644 --- a/app/gui/bitnames/mod.rs +++ b/app/gui/bitnames/mod.rs @@ -27,7 +27,7 @@ pub struct BitNames { impl BitNames { pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::TopBottomPanel::top("bitnames_tabs").show(ui.ctx(), |ui| { + egui::Panel::top("bitnames_tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { Tab::iter().for_each(|tab_variant| { let tab_name = tab_variant.to_string(); @@ -35,7 +35,7 @@ impl BitNames { }) }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::AllBitNames => { let () = self.all_bitnames.show(app, ui); } diff --git a/app/gui/bitnames/reserve_register.rs b/app/gui/bitnames/reserve_register.rs index 3a9dafc..ec6aa32 100644 --- a/app/gui/bitnames/reserve_register.rs +++ b/app/gui/bitnames/reserve_register.rs @@ -154,8 +154,8 @@ pub(super) struct ReserveRegister { impl ReserveRegister { pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::SidePanel::left("reserve") - .exact_width(ui.available_width() / 2.) + egui::Panel::left("reserve") + .exact_size(ui.available_width() / 2.) .resizable(false) .show_inside(ui, |ui| { ui.vertical_centered(|ui| { diff --git a/app/gui/coins/mod.rs b/app/gui/coins/mod.rs index 285d2bc..5fd16a7 100644 --- a/app/gui/coins/mod.rs +++ b/app/gui/coins/mod.rs @@ -47,7 +47,7 @@ impl Coins { app: Option<&App>, ui: &mut egui::Ui, ) -> anyhow::Result<()> { - egui::TopBottomPanel::top("coins_tabs").show(ui.ctx(), |ui| { + egui::Panel::top("coins_tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { Tab::iter().for_each(|tab_variant| { let tab_name = tab_variant.to_string(); @@ -55,7 +55,7 @@ impl Coins { }) }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::TransferReceive => { let () = self.transfer_receive.show(app, ui); } diff --git a/app/gui/coins/my_bitnames.rs b/app/gui/coins/my_bitnames.rs index 76bcda3..911450e 100644 --- a/app/gui/coins/my_bitnames.rs +++ b/app/gui/coins/my_bitnames.rs @@ -58,8 +58,8 @@ impl MyBitnames { known_name_bitname_reservations, unknown_name_bitname_reservations, ) = app.map(Self::get_bitname_reservations).unwrap_or_default(); - let _response = egui::SidePanel::left("My BitName Reservations") - .exact_width(350.) + let _response = egui::Panel::left("My BitName Reservations") + .exact_size(350.) .resizable(false) .show_inside(ui, move |ui| { ui.heading("BitName Reservations"); @@ -140,8 +140,8 @@ impl MyBitnames { pub fn show_bitnames(&mut self, app: Option<&App>, ui: &mut egui::Ui) { let (known_name_bitnames, unknown_name_bitnames) = app.map(Self::get_bitnames).unwrap_or_default(); - egui::SidePanel::left("My BitNames") - .exact_width(350.) + egui::Panel::left("My BitNames") + .exact_size(350.) .resizable(false) .show_inside(ui, |ui| { ui.heading("BitNames"); diff --git a/app/gui/coins/transfer_receive.rs b/app/gui/coins/transfer_receive.rs index 51a69c4..04dec45 100644 --- a/app/gui/coins/transfer_receive.rs +++ b/app/gui/coins/transfer_receive.rs @@ -145,8 +145,8 @@ impl TransferReceive { } pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::SidePanel::left("transfer") - .exact_width(ui.available_width() / 2.) + egui::Panel::left("transfer") + .exact_size(ui.available_width() / 2.) .resizable(false) .show_inside(ui, |ui| { ui.vertical_centered(|ui| { diff --git a/app/gui/console_logs.rs b/app/gui/console_logs.rs index 9e4e482..4beacd2 100644 --- a/app/gui/console_logs.rs +++ b/app/gui/console_logs.rs @@ -6,7 +6,7 @@ use std::sync::{ use clap::Parser; use eframe::egui::{ self, Key, KeyboardShortcut, Modifiers, ScrollArea, TextEdit, TextStyle, - TopBottomPanel, Widget as _, + Widget as _, }; use crate::{ @@ -89,7 +89,7 @@ impl ConsoleLogs { } pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - TopBottomPanel::bottom("command_input").show_inside(ui, |ui| { + egui::Panel::bottom("command_input").show_inside(ui, |ui| { let command_input = TextEdit::multiline(&mut self.command_input) .font(TextStyle::Monospace) .desired_width(f32::INFINITY) diff --git a/app/gui/messaging/decrypt.rs b/app/gui/messaging/decrypt.rs index 956d189..d591576 100644 --- a/app/gui/messaging/decrypt.rs +++ b/app/gui/messaging/decrypt.rs @@ -67,8 +67,8 @@ impl DecryptMessage { }; self.receiver_pubkey = Some(receiver_pubkey); } - let ciphertext_response = egui::SidePanel::left("ciphertext message") - .exact_width(ui.available_width() / 2.) + let ciphertext_response = egui::Panel::left("ciphertext message") + .exact_size(ui.available_width() / 2.) .resizable(false) .show_inside(ui, |ui| { ui.vertical_centered(|ui| { diff --git a/app/gui/messaging/encrypt.rs b/app/gui/messaging/encrypt.rs index 8dafbdb..e45ed70 100644 --- a/app/gui/messaging/encrypt.rs +++ b/app/gui/messaging/encrypt.rs @@ -68,8 +68,8 @@ impl EncryptMessage { }; self.receiver_pubkey = Some(receiver_pubkey); } - let plaintext_response = egui::SidePanel::left("plaintext message") - .exact_width(ui.available_width() / 2.) + let plaintext_response = egui::Panel::left("plaintext message") + .exact_size(ui.available_width() / 2.) .resizable(false) .show_inside(ui, |ui| { ui.vertical_centered(|ui| { diff --git a/app/gui/messaging/mod.rs b/app/gui/messaging/mod.rs index 3a2a678..78933ce 100644 --- a/app/gui/messaging/mod.rs +++ b/app/gui/messaging/mod.rs @@ -46,7 +46,7 @@ impl Messaging { } pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::CentralPanel::default().show(ui.ctx(), |ui| { + egui::CentralPanel::default().show_inside(ui, |ui| { ui.vertical_centered(|ui| { ui.add_sized((250., 10.), |ui: &mut egui::Ui| { //ui.group(|ui| { diff --git a/app/gui/mod.rs b/app/gui/mod.rs index 04db4f8..47d0105 100644 --- a/app/gui/mod.rs +++ b/app/gui/mod.rs @@ -199,21 +199,20 @@ impl EguiApp { // Use the cc.gl (a glow::Context) to create graphics shaders and buffers that you can use // for e.g. egui::PaintCallback. cc.egui_ctx.set_fonts(FONT_DEFINITIONS.clone()); - let mut style = (*cc.egui_ctx.style()).clone(); - // Palette found using https://coolors.co/005c80-a0a0a0-0d0630-c1ff9b-ce1483 - // Default blue, eg. selected buttons - const _LAPIS_LAZULI: Color32 = Color32::from_rgb(0x0D, 0x5c, 0x80); - // Default grey, eg. grid lines - const _CADET_GREY: Color32 = Color32::from_rgb(0xa0, 0xa0, 0xa0); - const _VIOLET: Color32 = Color32::from_rgb(0x0D, 0x06, 0x30); - const LIGHT_GREEN: Color32 = Color32::from_rgb(0xc1, 0xff, 0x9b); - const _RED_VIOLET: Color32 = Color32::from_rgb(0xce, 0x14, 0x83); - // Accent color - const ACCENT: Color32 = LIGHT_GREEN; - // Grid color / accent color - style.visuals.widgets.noninteractive.bg_stroke.color = ACCENT; - - cc.egui_ctx.set_style(style); + cc.egui_ctx.global_style_mut(|style| { + // Palette found using https://coolors.co/005c80-a0a0a0-0d0630-c1ff9b-ce1483 + // Default blue, eg. selected buttons + const _LAPIS_LAZULI: Color32 = Color32::from_rgb(0x0D, 0x5c, 0x80); + // Default grey, eg. grid lines + const _CADET_GREY: Color32 = Color32::from_rgb(0xa0, 0xa0, 0xa0); + const _VIOLET: Color32 = Color32::from_rgb(0x0D, 0x06, 0x30); + const LIGHT_GREEN: Color32 = Color32::from_rgb(0xc1, 0xff, 0x9b); + const _RED_VIOLET: Color32 = Color32::from_rgb(0xce, 0x14, 0x83); + // Accent color + const ACCENT: Color32 = LIGHT_GREEN; + // Grid color / accent color + style.visuals.widgets.noninteractive.bg_stroke.color = ACCENT; + }); let activity = Activity::new(app.as_ref()); let bottom_panel = BottomPanel::new(app.clone()); @@ -238,18 +237,18 @@ impl EguiApp { } impl eframe::App for EguiApp { - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - ctx.request_repaint(); + fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + ui.request_repaint(); if let Some(app) = self.app.as_ref() && !app.wallet.has_seed().unwrap_or(false) { - egui::CentralPanel::default().show(ctx, |_ui| { - egui::Window::new("Set Seed").show(ctx, |ui| { + egui::CentralPanel::default().show_inside(ui, |ui| { + egui::Window::new("Set Seed").show(ui, |ui| { self.set_seed.show(app, ui); }); }); } else { - egui::TopBottomPanel::top("tabs").show(ctx, |ui| { + egui::Panel::top("tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { Tab::iter().for_each(|tab_variant| { let tab_name = tab_variant.to_string(); @@ -261,29 +260,33 @@ impl eframe::App for EguiApp { }) }); }); - egui::TopBottomPanel::bottom("bottom_panel") - .show(ctx, |ui| self.bottom_panel.show(&mut self.miner, ui)); - egui::CentralPanel::default().show(ctx, |ui| match self.tab { - Tab::ParentChain => { - self.parent_chain.show(self.app.as_ref(), ui) - } - Tab::Coins => { - let () = self.coins.show(self.app.as_ref(), ui).unwrap(); - } - Tab::BitNames => { - self.bitnames.show(self.app.as_ref(), ui); - } - Tab::Paymail => { - self.paymail.show(self.app.as_ref(), ui).unwrap() - } - Tab::Messaging => { - self.messaging.show(self.app.as_ref(), ui); - } - Tab::Activity => { - self.activity.show(self.app.as_ref(), ui); - } - Tab::ConsoleLogs => { - self.console_logs.show(self.app.as_ref(), ui); + egui::Panel::bottom("bottom_panel").show_inside(ui, |ui| { + self.bottom_panel.show(&mut self.miner, ui) + }); + egui::CentralPanel::default().show_inside(ui, |ui| { + match self.tab { + Tab::ParentChain => { + self.parent_chain.show(self.app.as_ref(), ui) + } + Tab::Coins => { + let () = + self.coins.show(self.app.as_ref(), ui).unwrap(); + } + Tab::BitNames => { + self.bitnames.show(self.app.as_ref(), ui); + } + Tab::Paymail => { + self.paymail.show(self.app.as_ref(), ui).unwrap() + } + Tab::Messaging => { + self.messaging.show(self.app.as_ref(), ui); + } + Tab::Activity => { + self.activity.show(self.app.as_ref(), ui); + } + Tab::ConsoleLogs => { + self.console_logs.show(self.app.as_ref(), ui); + } } }); } diff --git a/app/gui/parent_chain/mod.rs b/app/gui/parent_chain/mod.rs index 29f65bc..275c495 100644 --- a/app/gui/parent_chain/mod.rs +++ b/app/gui/parent_chain/mod.rs @@ -35,7 +35,7 @@ impl ParentChain { } pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::TopBottomPanel::top("parent_chain_tabs").show(ui.ctx(), |ui| { + egui::Panel::top("parent_chain_tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { Tab::iter().for_each(|tab_variant| { let tab_name = tab_variant.to_string(); @@ -43,7 +43,7 @@ impl ParentChain { }) }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::Transfer => { self.transfer.show(app, ui); } diff --git a/app/gui/parent_chain/transfer.rs b/app/gui/parent_chain/transfer.rs index 4286bed..8e062ae 100644 --- a/app/gui/parent_chain/transfer.rs +++ b/app/gui/parent_chain/transfer.rs @@ -287,8 +287,8 @@ pub(super) struct Transfer { impl Transfer { pub fn show(&mut self, app: Option<&App>, ui: &mut egui::Ui) { - egui::SidePanel::left("deposit") - .exact_width(ui.available_width() / 2.) + egui::Panel::left("deposit") + .exact_size(ui.available_width() / 2.) .resizable(false) .show_inside(ui, |ui| { ui.vertical_centered(|ui| { diff --git a/app/gui/paymail/inbox.rs b/app/gui/paymail/inbox.rs index 82cd8cd..63f2863 100644 --- a/app/gui/paymail/inbox.rs +++ b/app/gui/paymail/inbox.rs @@ -89,7 +89,7 @@ impl Inbox { settings: &Settings, ui: &mut egui::Ui, ) { - egui::SidePanel::left("Inbox") + egui::Panel::left("Inbox") //.exact_width(250.) .show_inside(ui, |ui| { let () = self diff --git a/app/gui/paymail/mod.rs b/app/gui/paymail/mod.rs index 8c87598..c79f27e 100644 --- a/app/gui/paymail/mod.rs +++ b/app/gui/paymail/mod.rs @@ -29,13 +29,13 @@ impl Paymail { ui: &mut egui::Ui, ) -> anyhow::Result<()> { ui.heading("My Paymail"); - egui::TopBottomPanel::top("paymail_tabs").show(ui.ctx(), |ui| { + egui::Panel::top("paymail_tabs").show_inside(ui, |ui| { ui.horizontal(|ui| { ui.selectable_value(&mut self.tab, Tab::Inbox, "inbox"); ui.selectable_value(&mut self.tab, Tab::Settings, "settings"); }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::Inbox => { self.inbox.show(app, &self.settings, ui); } diff --git a/app/gui/paymail/settings.rs b/app/gui/paymail/settings.rs index aeef21b..51f97ce 100644 --- a/app/gui/paymail/settings.rs +++ b/app/gui/paymail/settings.rs @@ -56,7 +56,7 @@ impl Settings { } pub fn show(&mut self, ui: &mut egui::Ui) { - egui::SidePanel::left("Inbox") + egui::Panel::left("Inbox") //.exact_width(250.) .show_inside(ui, |ui| { ui.vertical(|ui| { @@ -67,7 +67,7 @@ impl Settings { ); }); }); - egui::CentralPanel::default().show(ui.ctx(), |ui| match self.tab { + egui::CentralPanel::default().show_inside(ui, |ui| match self.tab { Tab::BitnameInboxes => { self.show_bitname_inboxes(ui); } diff --git a/deny.toml b/deny.toml index b8fb4f7..ccfd0e9 100644 --- a/deny.toml +++ b/deny.toml @@ -119,7 +119,7 @@ exceptions = [ { allow = ["CDLA-Permissive-2.0"], name = "webpki-root-certs", version = "0.26.11" }, { allow = ["CDLA-Permissive-2.0"], name = "webpki-root-certs", version = "1.0.5" }, { allow = ["CDLA-Permissive-2.0"], name = "webpki-roots", version = "1.0.5" }, - { allow = ["LicenseRef-UFL-1.0", "OFL-1.1", "Ubuntu-font-1.0"], name = "epaint_default_fonts", version = "0.31.0" }, + { allow = ["LicenseRef-UFL-1.0", "OFL-1.1", "Ubuntu-font-1.0"], name = "epaint_default_fonts", version = "0.34.3" }, { allow = ["MPL-2.0"], name = "bitmaps", version = "3.2.1" }, { allow = ["MPL-2.0"], name = "imbl", version = "7.0.0" }, { allow = ["MPL-2.0"], name = "imbl-sized-chunks", version = "0.1.3" }, @@ -129,6 +129,7 @@ exceptions = [ { allow = ["Zlib"], name = "slotmap", version = "1.0.7" }, { allow = ["Zlib"], name = "typewit", version = "1.11.0" }, { allow = ["Zlib"], name = "typewit_proc_macros", version = "1.8.1" }, + { allow = ["Zlib"], name = "zlib-rs", version = "0.5.5" }, ] # Some crates don't have (easily) machine readable licensing information, diff --git a/lib/net/peer/task.rs b/lib/net/peer/task.rs index acd9d5c..0d603ae 100644 --- a/lib/net/peer/task.rs +++ b/lib/net/peer/task.rs @@ -317,7 +317,7 @@ impl ConnectionTask { peer_state_id: Some(peer_state_id), }; let _: bool = request_queue.send_request(request.into())?; - return Ok(Some(true)); + return Ok(Some(false)); } let main_ancestor = ctxt.archive.last_common_main_ancestor( &rotxn, diff --git a/lib/state/mod.rs b/lib/state/mod.rs index b22b8c1..6fa3d03 100644 --- a/lib/state/mod.rs +++ b/lib/state/mod.rs @@ -582,7 +582,7 @@ impl State { .ok_or(AmountOverflowError)?; } if let InPoint::Withdrawal { .. } = spent_output.inpoint { - total_withdrawal_stxo_value = total_deposit_stxo_value + total_withdrawal_stxo_value = total_withdrawal_stxo_value .checked_add(spent_output.output.get_value()) .ok_or(AmountOverflowError)?; } @@ -683,37 +683,56 @@ impl Watchable<()> for State { } #[cfg(test)] -mod tests { +mod test { use ed25519_dalek::SigningKey; use crate::{ authorization, state::{Error, State, error}, types::{ - Address, AuthorizedTransaction, BitName, BitcoinOutputContent, - FilledOutput, FilledOutputContent, FilledTransaction, Hash, + Address, AuthorizedTransaction, BitName, FilledOutput, + FilledOutputContent, FilledTransaction, Hash, InPoint, MutableBitNameData, OutPoint, OutPointKey, Output, OutputContent, - Transaction, TxData, Txid, VerifyingKey, + SpentOutput, Transaction, TxData, Txid, VerifyingKey, }, }; - /// Open a fresh state in a unique temporary directory. - fn new_state(dir_name_suffix: &str) -> (sneed::Env, State) { - let dir_name = if dir_name_suffix.is_empty() { - format!("plain_bitnames_{}", std::process::id()) - } else { - format!("plain_bitnames_{dir_name_suffix}_{}", std::process::id()) - }; - let path = std::env::temp_dir().join(dir_name); - let _remove_result = std::fs::remove_dir_all(&path); - std::fs::create_dir_all(&path).unwrap(); - let env = { - let mut opts = heed::EnvOpenOptions::new(); - opts.map_size(10 * 1024 * 1024).max_dbs(State::NUM_DBS); - unsafe { sneed::Env::open(&opts, &path) }.unwrap() - }; - let state = State::new(&env).unwrap(); - (env, state) + pub fn temp_env_path( + test_name: &str, + ) -> anyhow::Result { + let mut path = std::env::temp_dir(); + let nanos = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH)? + .as_nanos(); + path.push(format!( + "bitnames-{test_name}-{}-{nanos}", + std::process::id() + )); + Ok(path) + } + + // open a fresh state-backed env in a unique temp dir + pub fn temp_env(test_name: &str) -> anyhow::Result { + let path = temp_env_path(test_name)?; + std::fs::create_dir_all(&path)?; + let mut opts = heed::EnvOpenOptions::new(); + opts.map_size(64 * 1024 * 1024).max_dbs(State::NUM_DBS); + let res = unsafe { sneed::Env::open(&opts, &path) }?; + Ok(res) + } + + pub fn fresh_state(test_name: &str) -> anyhow::Result<(sneed::Env, State)> { + let env = temp_env(test_name)?; + let state = State::new(&env)?; + Ok((env, state)) + } + + /// Create a bitcoin filled output + pub fn bitcoin_filled_output(address: Address, sats: u64) -> FilledOutput { + FilledOutput::new_bitcoin_value( + address, + bitcoin::Amount::from_sat(sats), + ) } /// Fund `address` with a single bitcoin UTXO of `value` sats, returning its @@ -722,18 +741,13 @@ mod tests { env: &sneed::Env, state: &State, address: Address, - value: u64, + value_sats: u64, ) -> OutPoint { let outpoint = OutPoint::Regular { txid: Default::default(), vout: 0, }; - let output = FilledOutput::new( - address, - FilledOutputContent::Bitcoin(BitcoinOutputContent( - bitcoin::Amount::from_sat(value), - )), - ); + let output = bitcoin_filled_output(address, value_sats); let mut rwtxn = env.write_txn().unwrap(); state .utxos @@ -782,8 +796,9 @@ mod tests { /// spent UTXOs silently skips the unauthorized input, allowing any UTXO to /// be spent without a signature. #[test] - fn validate_transaction_rejects_missing_authorization() { - let (env, state) = new_state("auth_count"); + fn validate_transaction_rejects_missing_authorization() -> anyhow::Result<()> + { + let (env, state) = fresh_state("auth_count")?; let signing_key = SigningKey::from_bytes(&[1u8; 32]); let verifying_key: VerifyingKey = signing_key.verifying_key().into(); let address = authorization::get_address(&verifying_key); @@ -791,12 +806,7 @@ mod tests { let transaction = Transaction::new( vec![outpoint], - vec![Output::new( - address, - OutputContent::Bitcoin(BitcoinOutputContent( - bitcoin::Amount::from_sat(900), - )), - )], + vec![bitcoin_filled_output(address, 900).into()], ); // The attack: spend the input while providing no authorization for it. @@ -804,11 +814,11 @@ mod tests { transaction: transaction.clone(), authorizations: Vec::new(), }; - let rotxn = env.read_txn().unwrap(); + let rotxn = env.read_txn()?; let err = state .validate_transaction(&rotxn, &unauthorized) .expect_err("tx with no authorizations must be rejected"); - assert!( + anyhow::ensure!( matches!( err, Error::WrongNumberOfAuthorizations { @@ -821,11 +831,11 @@ mod tests { // The same transaction with a valid authorization is accepted. let authorized = - authorization::authorize(&[(address, &signing_key)], transaction) - .unwrap(); + authorization::authorize(&[(address, &signing_key)], transaction)?; state .validate_transaction(&rotxn, &authorized) .expect("correctly authorized tx should validate"); + Ok(()) } /// A registration whose spent reservation does not commit to the @@ -833,9 +843,10 @@ mod tests { /// later panics in `apply_registration`, which fails to find the /// reservation to burn. #[test] - fn validate_bitnames_rejects_registration_without_matching_reservation() { - let (env, state) = new_state("registration"); - let rotxn = env.read_txn().unwrap(); + fn validate_bitnames_rejects_registration_without_matching_reservation() + -> anyhow::Result<()> { + let (env, state) = fresh_state("registration")?; + let rotxn = env.read_txn()?; let name_hash = BitName([7; 32]); let revealed_nonce: Hash = [3; 32]; let implied_commitment: Hash = @@ -849,7 +860,7 @@ mod tests { let err = state.validate_bitnames(&rotxn, &tx).expect_err( "registration without a matching reservation must be rejected", ); - assert!( + anyhow::ensure!( matches!( err, Error::BitName( @@ -864,5 +875,84 @@ mod tests { state.validate_bitnames(&rotxn, &tx).expect( "registration burning the matching reservation should validate", ); + Ok(()) + } + + #[test] + fn sidechain_wealth() -> anyhow::Result<()> { + use std::str::FromStr; + + use bitcoin::hashes::Hash as _; + + let (env, state) = fresh_state("sidechain-wealth")?; + { + let mut rwtxn = env.write_txn()?; + + // One unspent DEPOSIT UTXO: 50 sats. + let deposit_utxo_op = OutPoint::Deposit(bitcoin::OutPoint { + txid: bitcoin::Txid::from_str( + "0000000000000000000000000000000000000000000000000000000000000001", + )?, + vout: 0, + }); + state.utxos.put( + &mut rwtxn, + &OutPointKey::from(&deposit_utxo_op), + &bitcoin_filled_output(Address::ALL_ZEROS, 50), + )?; + + // Two spent DEPOSIT STXOs: 100 + 100 sats. + for (i, sats) in [(2u8, 100u64), (3u8, 100u64)] { + let op = OutPoint::Deposit(bitcoin::OutPoint { + txid: bitcoin::Txid::from_byte_array([i; 32]), + vout: 0, + }); + let stxo = SpentOutput { + output: bitcoin_filled_output(Address::ALL_ZEROS, sats), + inpoint: InPoint::Regular { + txid: [i; 32].into(), + vin: 0, + }, + }; + state + .stxos + .put(&mut rwtxn, &OutPointKey::from(&op), &stxo)?; + } + + // Two WITHDRAWAL STXOs: 10 + 10 sats + for (i, sats) in [(4u8, 10u64), (5u8, 10u64)] { + let op = OutPoint::Regular { + txid: [i; 32].into(), + vout: 0, + }; + let stxo = SpentOutput { + output: bitcoin_filled_output(Address::ALL_ZEROS, sats), + inpoint: InPoint::Withdrawal { + m6id: crate::types::M6id( + bitcoin::Txid::from_byte_array([i; 32]), + ), + }, + }; + state + .stxos + .put(&mut rwtxn, &OutPointKey::from(&op), &stxo)?; + } + + rwtxn.commit()?; + } + + let rotxn = env.read_txn()?; + let sidechain_wealth = state.sidechain_wealth(&rotxn)?; + + // Correct value: deposit UTXO 50 + deposit STXOs 200 - withdrawal + // STXOs 20 = 230 sats. + let expected_sidechain_wealth = bitcoin::Amount::from_sat(230); + anyhow::ensure!( + sidechain_wealth == expected_sidechain_wealth, + "Expected sidechain wealth ({}), but computed ({})", + expected_sidechain_wealth, + sidechain_wealth, + ); + Ok(()) } } diff --git a/lib/state/two_way_peg_data.rs b/lib/state/two_way_peg_data.rs index 43fb06a..7afd45d 100644 --- a/lib/state/two_way_peg_data.rs +++ b/lib/state/two_way_peg_data.rs @@ -25,15 +25,6 @@ fn collect_withdrawal_bundle( txn: &RoTxn, block_height: u32, ) -> Result, Error> { - // Weight of a bundle with 0 outputs. - const BUNDLE_0_WEIGHT: u64 = 504; - // Weight of a single output. - const OUTPUT_WEIGHT: u64 = 128; - // Turns out to be 3121. - const MAX_BUNDLE_OUTPUTS: usize = - ((bitcoin::policy::MAX_STANDARD_TX_WEIGHT as u64 - BUNDLE_0_WEIGHT) - / OUTPUT_WEIGHT) as usize; - // Aggregate all outputs by destination. // destination -> (value, mainchain fee, spent_utxos) let mut address_to_aggregated_withdrawal = HashMap::< @@ -80,17 +71,37 @@ fn collect_withdrawal_bundle( aggregated_withdrawals.sort_by_key(|a| std::cmp::Reverse(a.clone())); let mut fee = bitcoin::Amount::ZERO; let mut spend_utxos = BTreeMap::::new(); - let mut bundle_outputs = vec![]; + let mut bundle_outputs = Vec::new(); + let mut bundle_txouts_size: u32 = 0; for aggregated in &aggregated_withdrawals { - if bundle_outputs.len() > MAX_BUNDLE_OUTPUTS { + let script_pubkey = + aggregated.main_address.assume_checked_ref().script_pubkey(); + let Ok(n_outputs) = u32::try_from(bundle_outputs.len() + 1) else { + break; + }; + let Ok(spk_size) = u32::try_from(script_pubkey.len()) else { + // This SPK is invalid, but others might be ok + continue; + }; + let Some(txout_size) = WithdrawalBundle::txout_size(spk_size) else { + // This SPK is invalid, but others might be ok + continue; + }; + if let Some(sum_txout_sizes) = + bundle_txouts_size.checked_add(txout_size) + { + bundle_txouts_size = sum_txout_sizes; + } else { + break; + }; + if WithdrawalBundle::predict_weight(n_outputs, bundle_txouts_size) + .is_none() + { break; } let bundle_output = bitcoin::TxOut { value: aggregated.value, - script_pubkey: aggregated - .main_address - .assume_checked_ref() - .script_pubkey(), + script_pubkey, }; spend_utxos.extend(aggregated.spend_utxos.clone()); bundle_outputs.push(bundle_output); @@ -926,7 +937,7 @@ pub fn disconnect( latest_withdrawal_bundle_event_block_hash, last_withdrawal_bundle_event_block_hash ); - assert_eq!(block_height - 1, last_withdrawal_bundle_event_block_height); + assert_eq!(block_height, last_withdrawal_bundle_event_block_height); if !state .withdrawal_bundle_event_blocks .delete(rwtxn, &last_withdrawal_bundle_event_block_seq_idx)? @@ -939,14 +950,14 @@ pub fn disconnect( .map(|(height, _bundle)| height) .unwrap_or_default(); if block_height - last_withdrawal_bundle_failure_height - > WITHDRAWAL_BUNDLE_FAILURE_GAP + >= WITHDRAWAL_BUNDLE_FAILURE_GAP && let Some(bundle_m6id) = state.pending_withdrawal_bundle.try_get(rwtxn, &())? && let (bundle, bundle_status) = state .withdrawal_bundles .try_get(rwtxn, &bundle_m6id)? .ok_or(error::PendingWithdrawalBundleUnknown(bundle_m6id))? - && bundle_status.latest().height == block_height - 1 + && bundle_status.latest().height == block_height { state.pending_withdrawal_bundle.delete(rwtxn, &())?; if let (Some(bundle_status), _latest_bundle_status) = @@ -971,7 +982,7 @@ pub fn disconnect( .last(rwtxn)? .ok_or(Error::NoDepositBlock)?; assert_eq!(latest_deposit_block_hash, last_deposit_block_hash); - assert_eq!(block_height - 1, last_deposit_block_height); + assert_eq!(block_height, last_deposit_block_height); if !state .deposit_blocks .delete(rwtxn, &last_deposit_block_seq_idx)? @@ -983,59 +994,45 @@ pub fn disconnect( } #[cfg(test)] -mod tests { - use std::collections::BTreeMap; +mod test { + use std::{collections::BTreeMap, sync::Arc}; - use bitcoin::hashes::Hash as _; + use bitcoin::{ + Network, + hashes::Hash as _, + secp256k1::{Secp256k1, SecretKey}, + }; use hashlink::LinkedHashMap; use crate::{ state::{ HeightStamped, RollBack, State, WithdrawalBundleInfo, + test::{bitcoin_filled_output, fresh_state}, two_way_peg_data::{ - disconnect, disconnect_withdrawal_bundle_failed, + collect_withdrawal_bundle, disconnect, + disconnect_withdrawal_bundle_failed, }, }, types::{ - Address, BitcoinOutputContent, FilledOutput, FilledOutputContent, - InPoint, M6id, OutPoint, OutPointKey, Txid, WithdrawalBundle, + Address, FilledOutput, FilledOutputContent, InPoint, M6id, + OutPoint, OutPointKey, Txid, WithdrawalBundle, WithdrawalBundleEvent, WithdrawalBundleEventStatus, - WithdrawalBundleStatus, + WithdrawalBundleStatus, WithdrawalOutputContent, proto::mainchain::{BlockEvent, BlockInfo, TwoWayPegData}, }, }; - // open a fresh state-backed env in a unique temp dir - fn temp_env() -> sneed::Env { - let mut path = std::env::temp_dir(); - let unique = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .unwrap() - .as_nanos(); - path.push(format!("bitnames-test-{}-{unique}", std::process::id())); - std::fs::create_dir_all(&path).unwrap(); - let mut opts = heed::EnvOpenOptions::new(); - opts.map_size(16 * 1024 * 1024).max_dbs(State::NUM_DBS); - unsafe { sneed::Env::open(&opts, &path) }.unwrap() - } - // a failed known bundle reinstates its utxos as spendable, so disconnecting // the failure must spend them again #[test] - fn disconnect_failed_bundle_spends_reinstated_utxo() { - let env = temp_env(); - let state = State::new(&env).unwrap(); + fn disconnect_failed_bundle_spends_reinstated_utxo() -> anyhow::Result<()> { + let (env, state) = + fresh_state("disconnect_failed_bundle_spends_reinstated_utxo")?; let outpoint = OutPoint::Regular { txid: Txid::from([1; 32]), vout: 0, }; - let output = FilledOutput { - address: Address::ALL_ZEROS, - content: FilledOutputContent::Bitcoin(BitcoinOutputContent( - bitcoin::Amount::from_sat(1000), - )), - memo: Vec::new(), - }; + let output = bitcoin_filled_output(Address::ALL_ZEROS, 1000); let key = OutPointKey::from(&outpoint); let m6id = { @@ -1046,8 +1043,7 @@ mod tests { bitcoin::Amount::ZERO, spend_utxos, Vec::new(), - ) - .unwrap(); + )?; let m6id = bundle.compute_m6id(); let mut bundle_status = RollBack::>::new( WithdrawalBundleStatus::Submitted, @@ -1056,76 +1052,70 @@ mod tests { bundle_status .push(WithdrawalBundleStatus::Failed, 1) .unwrap(); - let mut rwtxn = env.write_txn().unwrap(); - state - .withdrawal_bundles - .put( - &mut rwtxn, - &m6id, - &(WithdrawalBundleInfo::Known(bundle), bundle_status), - ) - .unwrap(); - state - .latest_failed_withdrawal_bundle - .put( - &mut rwtxn, - &(), - &RollBack::>::new(m6id, 1), - ) - .unwrap(); + let mut rwtxn = env.write_txn()?; + state.withdrawal_bundles.put( + &mut rwtxn, + &m6id, + &(WithdrawalBundleInfo::Known(bundle), bundle_status), + )?; + state.latest_failed_withdrawal_bundle.put( + &mut rwtxn, + &(), + &RollBack::>::new(m6id, 1), + )?; // the failure reinstated the utxo - state.utxos.put(&mut rwtxn, &key, &output).unwrap(); - rwtxn.commit().unwrap(); + state.utxos.put(&mut rwtxn, &key, &output)?; + rwtxn.commit()?; m6id }; - let mut rwtxn = env.write_txn().unwrap(); - disconnect_withdrawal_bundle_failed(&state, &mut rwtxn, 1, m6id) - .unwrap(); - assert!(state.utxos.try_get(&rwtxn, &key).unwrap().is_none()); - let stxo = state.stxos.try_get(&rwtxn, &key).unwrap().unwrap(); - assert_eq!(stxo.inpoint, InPoint::Withdrawal { m6id }); + let mut rwtxn = env.write_txn()?; + disconnect_withdrawal_bundle_failed(&state, &mut rwtxn, 1, m6id)?; + anyhow::ensure!(state.utxos.try_get(&rwtxn, &key)?.is_none()); + let stxo = state.stxos.get(&rwtxn, &key)?; + anyhow::ensure!(stxo.inpoint == InPoint::Withdrawal { m6id }); + Ok(()) } // disconnecting a withdrawal bundle event must remove its // withdrawal_bundle_event_blocks record, not a deposit_blocks record that // happens to share the same sequence index #[test] - fn disconnect_withdrawal_event_block_uses_correct_db() { - let env = temp_env(); - let state = State::new(&env).unwrap(); + fn disconnect_withdrawal_event_block_uses_correct_db() -> anyhow::Result<()> + { + let (env, state) = + fresh_state("disconnect_withdrawal_event_block_uses_correct_db")?; let block_height = 5u32; let m6id = M6id(bitcoin::Txid::from_byte_array([7; 32])); let event_block_hash = bitcoin::BlockHash::from_byte_array([9; 32]); let deposit_block_hash = bitcoin::BlockHash::from_byte_array([3; 32]); - let mut rwtxn = env.write_txn().unwrap(); - state.height.put(&mut rwtxn, &(), &block_height).unwrap(); - state - .withdrawal_bundles - .put( - &mut rwtxn, - &m6id, - &( - WithdrawalBundleInfo::Unknown, - RollBack::>::new( - WithdrawalBundleStatus::Submitted, - block_height, - ), + let mut rwtxn = env.write_txn()?; + state.height.put(&mut rwtxn, &(), &block_height)?; + state.withdrawal_bundles.put( + &mut rwtxn, + &m6id, + &( + WithdrawalBundleInfo::Unknown, + RollBack::>::new( + WithdrawalBundleStatus::Submitted, + block_height, ), - ) - .unwrap(); - state - .withdrawal_bundle_event_blocks - .put(&mut rwtxn, &0, &(event_block_hash, block_height - 1)) - .unwrap(); + ), + )?; + state.withdrawal_bundle_event_blocks.put( + &mut rwtxn, + &0, + &(event_block_hash, block_height), + )?; // a deposit record at the same sequence index that must survive - state - .deposit_blocks - .put(&mut rwtxn, &0, &(deposit_block_hash, block_height - 1)) - .unwrap(); - rwtxn.commit().unwrap(); + state.deposit_blocks.put( + &mut rwtxn, + &0, + &(deposit_block_hash, block_height), + )?; + rwtxn.commit()?; let two_way_peg_data = { let mut block_info = LinkedHashMap::new(); @@ -1144,16 +1134,205 @@ mod tests { TwoWayPegData { block_info } }; - let mut rwtxn = env.write_txn().unwrap(); - disconnect(&state, &mut rwtxn, &two_way_peg_data).unwrap(); - assert!( + let mut rwtxn = env.write_txn()?; + disconnect(&state, &mut rwtxn, &two_way_peg_data)?; + anyhow::ensure!( state .withdrawal_bundle_event_blocks - .try_get(&rwtxn, &0) - .unwrap() + .try_get(&rwtxn, &0)? .is_none() ); - assert!(state.deposit_blocks.try_get(&rwtxn, &0).unwrap().is_some()); - rwtxn.commit().unwrap(); + anyhow::ensure!(state.deposit_blocks.try_get(&rwtxn, &0)?.is_some()); + rwtxn.commit()?; + Ok(()) + } + + fn seeded_public_key(idx: u32) -> bitcoin::CompressedPublicKey { + let secp = Secp256k1::new(); + let mut key_bytes = [0_u8; 32]; + key_bytes[28..].copy_from_slice(&idx.to_be_bytes()); + let secret_key = SecretKey::from_slice(&key_bytes) + .expect("small non-zero integers are valid secret keys"); + let public_key = + bitcoin::secp256k1::PublicKey::from_secret_key(&secp, &secret_key); + bitcoin::CompressedPublicKey(public_key) + } + + fn regtest_p2wpkh_address( + idx: u32, + ) -> bitcoin::Address { + let public_key = seeded_public_key(idx); + bitcoin::Address::p2wpkh(&public_key, Network::Regtest).into_unchecked() + } + + fn with_state_with_withdrawals( + test_name: &str, + count: u32, + main_address: fn( + u32, + ) -> bitcoin::Address< + bitcoin::address::NetworkUnchecked, + >, + f: impl FnOnce(&State, &mut sneed::RwTxn<'_>) -> R, + ) -> anyhow::Result { + let (env, state) = fresh_state(test_name)?; + let res = { + let mut rwtxn = env.write_txn()?; + state.height.put( + &mut rwtxn, + &(), + &crate::state::WITHDRAWAL_BUNDLE_FAILURE_GAP, + )?; + + for idx in 1..=count { + let mut txid_bytes = [0_u8; 32]; + txid_bytes[28..].copy_from_slice(&idx.to_be_bytes()); + let outpoint = OutPoint::Regular { + txid: txid_bytes.into(), + vout: 0, + }; + let output = FilledOutput { + address: { + let mut addr = [0u8; 20]; + let idx = idx.to_be_bytes(); + addr[..idx.len()].copy_from_slice(&idx); + Address::from(addr) + }, + content: FilledOutputContent::BitcoinWithdrawal( + WithdrawalOutputContent { + value: bitcoin::Amount::from_sat(1_000), + main_fee: bitcoin::Amount::ZERO, + main_address: main_address(idx), + }, + ), + memo: Vec::new(), + }; + state.utxos.put( + &mut rwtxn, + &OutPointKey::from(&outpoint), + &output, + )?; + } + f(&state, &mut rwtxn) + }; + drop(state); + let env_path = Arc::clone(env.path()); + drop(env); + drop(std::fs::remove_dir_all(env_path)); + Ok(res) + } + + #[test] + fn collect_withdrawal_bundle_p2wpkh_off_by_one_does_not_exceed_weight() + -> anyhow::Result<()> { + const CLAIMED_MAX_BUNDLE_OUTPUTS: u32 = 3_222; + + let bundle = with_state_with_withdrawals( + "collect_withdrawal_bundle_p2wpkh_off_by_one", + CLAIMED_MAX_BUNDLE_OUTPUTS + 1, + regtest_p2wpkh_address, + |state, rwtxn| collect_withdrawal_bundle(state, rwtxn, 42), + )?; + let bundle = match bundle { + Ok(Some(bundle)) => bundle, + Ok(None) => anyhow::bail!("expected a withdrawal bundle"), + Err(err) => anyhow::bail!("unexpected collection error: {err:?}"), + }; + let output_count = bundle.tx().output.len(); + let weight = bundle.tx().weight().to_wu(); + + anyhow::ensure!( + output_count == (CLAIMED_MAX_BUNDLE_OUTPUTS as usize + 2), + "expected {} tx outputs including metadata, got {output_count}", + CLAIMED_MAX_BUNDLE_OUTPUTS as usize + 2, + ); + anyhow::ensure!( + weight <= bitcoin::policy::MAX_STANDARD_TX_WEIGHT as u64, + "unexpected overweight P2WPKH bundle: {weight} wu" + ); + Ok(()) + } + + // connecting a deposit then disconnecting it on a reorg must round-trip + #[test] + fn deposit_reorg_round_trips() -> anyhow::Result<()> { + use crate::types::{ + Body, FilledTransaction, Header, proto::mainchain::Deposit, + }; + + let (env, state) = fresh_state("deposit_reorg_round_trips")?; + let empty_body = Body { + coinbase: Vec::new(), + transactions: Vec::new(), + authorizations: Vec::new(), + }; + let no_txs: &[FilledTransaction] = &[]; + let merkle_root = Body::compute_merkle_root(&[], no_txs)?; + let main0 = bitcoin::BlockHash::from_byte_array([10; 32]); + let main1 = bitcoin::BlockHash::from_byte_array([11; 32]); + + let genesis = Header { + merkle_root, + prev_side_hash: None, + prev_main_hash: main0, + }; + { + let mut rwtxn = env.write_txn()?; + state.apply_block(&mut rwtxn, &genesis, &empty_body)?; + state.connect_two_way_peg_data( + &mut rwtxn, + &TwoWayPegData::default(), + )?; + rwtxn.commit()?; + } + + let block1 = Header { + merkle_root, + prev_side_hash: Some(genesis.hash()), + prev_main_hash: main1, + }; + let deposit_outpoint = bitcoin::OutPoint { + txid: bitcoin::Txid::from_byte_array([2; 32]), + vout: 0, + }; + let deposit_key = + OutPointKey::from(&OutPoint::Deposit(deposit_outpoint)); + let deposit_twpd = { + let mut block_info = LinkedHashMap::new(); + block_info.insert( + main1, + BlockInfo { + bmm_commitment: None, + events: vec![BlockEvent::Deposit(Deposit { + tx_index: 0, + outpoint: deposit_outpoint, + output: bitcoin_filled_output(Address::ALL_ZEROS, 1000), + })], + }, + ); + TwoWayPegData { block_info } + }; + { + let mut rwtxn = env.write_txn()?; + state.apply_block(&mut rwtxn, &block1, &empty_body)?; + state.connect_two_way_peg_data(&mut rwtxn, &deposit_twpd)?; + anyhow::ensure!( + state.utxos.try_get(&rwtxn, &deposit_key)?.is_some() + ); + anyhow::ensure!(state.deposit_blocks.last(&rwtxn)?.is_some()); + rwtxn.commit()?; + } + + { + let mut rwtxn = env.write_txn()?; + state.disconnect_two_way_peg_data(&mut rwtxn, &deposit_twpd)?; + anyhow::ensure!( + state.utxos.try_get(&rwtxn, &deposit_key)?.is_none() + ); + anyhow::ensure!(state.deposit_blocks.last(&rwtxn)?.is_none()); + rwtxn.commit()?; + } + + Ok(()) } } diff --git a/types/authorization.rs b/types/authorization.rs index 3b74bb5..464a7dd 100644 --- a/types/authorization.rs +++ b/types/authorization.rs @@ -96,9 +96,11 @@ pub enum Error { #[error("borsh serialization error")] BorshSerialize(#[from] borsh::io::Error), #[error("ed25519_dalek error")] - DalekError(#[from] SignatureError), - #[error("bincode error")] - BincodeError(#[from] bincode::Error), + Dalek(#[from] SignatureError), + #[error("not enough authorizations")] + NotEnoughAuthorizations, + #[error("too many authorizations")] + TooManyAuthorizations, #[error( "wrong key for address: address = {address}, hash(verifying_key) = {hash_verifying_key}" @@ -170,6 +172,14 @@ fn tx_msg_canonical(tx: &Transaction) -> borsh::io::Result> { pub fn verify_authorized_transaction( transaction: &AuthorizedTransaction, ) -> Result<(), Error> { + let verifications_required = &transaction.transaction.inputs.len(); + match transaction.authorizations.len().cmp(verifications_required) { + std::cmp::Ordering::Less => return Err(Error::NotEnoughAuthorizations), + std::cmp::Ordering::Equal => (), + std::cmp::Ordering::Greater => { + return Err(Error::TooManyAuthorizations); + } + } let tx_msg_canonical = tx_msg_canonical(&transaction.transaction)?; let messages: Vec<_> = std::iter::repeat_n( tx_msg_canonical.as_slice(), diff --git a/types/lib.rs b/types/lib.rs index 185bdd0..1a986bb 100644 --- a/types/lib.rs +++ b/types/lib.rs @@ -260,6 +260,127 @@ pub struct WithdrawalBundle { } impl WithdrawalBundle { + /// Compute the size of a single txout + pub const fn txout_size(spk_size: u32) -> Option { + let Some(size) = (bitcoin::Amount::SIZE as u32) + .checked_add(bitcoin::VarInt(spk_size as u64).size() as u32) + else { + return None; + }; + size.checked_add(spk_size) + } + + /// Predict the weight of a withdrawal bundle, based on the number of + /// outputs (not including the commitment/treasury outputs) and the + /// sum of sizes of txouts (not including the commitment/treasury outputs). + /// Returns None if the predicted weight exceeds the maximum tx weight. + pub const fn predict_weight( + n_outputs: u32, + sum_txout_sizes: u32, + ) -> Option { + use bitcoin::{VarInt, Weight}; + const fn txin_base_size(script_sig_size: u32) -> Option { + const OUTPOINT_SIZE: u8 = 36; + const SEQUENCE_SIZE: u8 = 4; + let script_sig_len_size: u8 = + VarInt(script_sig_size as u64).size() as u8; + let Some(res) = ((OUTPOINT_SIZE + script_sig_len_size) as u32) + .checked_add(script_sig_size) + else { + return None; + }; + res.checked_add(SEQUENCE_SIZE as u32) + } + const fn tx_base_size( + n_inputs: u32, + sum_txin_base_sizes: u32, + n_outputs: u32, + sum_txout_sizes: u32, + ) -> Option { + const VERSION_SIZE: u8 = 4; + const fn vin_base_size( + n_inputs: u32, + sum_txin_base_sizes: u32, + ) -> Option { + let len_size = VarInt(n_inputs as u64).size() as u8; + (len_size as u32).checked_add(sum_txin_base_sizes) + } + const fn vout_size( + n_outputs: u32, + sum_txout_sizes: u32, + ) -> Option { + let len_size = VarInt(n_outputs as u64).size() as u8; + (len_size as u32).checked_add(sum_txout_sizes) + } + const LOCKTIME_SIZE: u8 = bitcoin::absolute::LockTime::SIZE as u8; + let res = VERSION_SIZE as u32; + let Some(vin_base_size) = + vin_base_size(n_inputs, sum_txin_base_sizes) + else { + return None; + }; + let Some(res) = res.checked_add(vin_base_size) else { + return None; + }; + let Some(vout_size) = vout_size(n_outputs, sum_txout_sizes) else { + return None; + }; + let Some(res) = res.checked_add(vout_size) else { + return None; + }; + res.checked_add(LOCKTIME_SIZE as u32) + } + const N_INPUTS: u32 = 1; + const SUM_TXIN_BASE_SIZES: u32 = { + const TREASURY_TXIN_BASE_SIZE: u32 = { + const TREASURY_SCRIPT_SIG_SIZE: u32 = 0; + txin_base_size(TREASURY_SCRIPT_SIG_SIZE).unwrap() + }; + TREASURY_TXIN_BASE_SIZE + }; + let Some(n_outputs) = n_outputs.checked_add(2) else { + return None; + }; + let Some(sum_txout_sizes) = ({ + const INPUTS_COMMITMENT_TXOUT_SIZE: u32 = { + const INPUTS_COMMITMENT_OUTPUT_SPK_SIZE: u8 = 34; + WithdrawalBundle::txout_size( + INPUTS_COMMITMENT_OUTPUT_SPK_SIZE as u32, + ) + .unwrap() + }; + const MAINCHAIN_FEE_COMMITMENT_TXOUT_SIZE: u32 = { + const MAINCHAIN_FEE_COMMITMENT_OUTPUT_SPK_SIZE: u8 = 10; + WithdrawalBundle::txout_size( + MAINCHAIN_FEE_COMMITMENT_OUTPUT_SPK_SIZE as u32, + ) + .unwrap() + }; + (INPUTS_COMMITMENT_TXOUT_SIZE + MAINCHAIN_FEE_COMMITMENT_TXOUT_SIZE) + .checked_add(sum_txout_sizes) + }) else { + return None; + }; + let Some(tx_base_size) = tx_base_size( + N_INPUTS, + SUM_TXIN_BASE_SIZES, + n_outputs, + sum_txout_sizes, + ) else { + return None; + }; + let Some(tx_weight_wu) = + (tx_base_size as u64).checked_mul(Weight::WITNESS_SCALE_FACTOR) + else { + return None; + }; + if tx_weight_wu <= bitcoin::Transaction::MAX_STANDARD_WEIGHT.to_wu() { + Some(Weight::from_wu(tx_weight_wu)) + } else { + None + } + } + pub fn new( block_height: u32, fee: bitcoin::Amount, diff --git a/types/transaction/mod.rs b/types/transaction/mod.rs index 18815d3..249d15f 100644 --- a/types/transaction/mod.rs +++ b/types/transaction/mod.rs @@ -587,6 +587,7 @@ pub struct FilledOutput { impl FilledOutput { /// construct a new filled output + #[inline(always)] pub fn new(address: Address, content: FilledContent) -> Self { Self { address, @@ -595,6 +596,15 @@ impl FilledOutput { } } + /// Construct a new Bitcoin value output + #[inline(always)] + pub fn new_bitcoin_value( + address: Address, + amount: bitcoin::Amount, + ) -> Self { + Self::new(address, FilledContent::new_bitcoin_value(amount)) + } + /// returns the BitName ID (name hash) if the filled output content /// corresponds to a BitName output. pub fn bitname(&self) -> Option<&BitName> { @@ -698,11 +708,17 @@ impl FilledTransaction { self.transaction.implied_reservation_commitment() } - /// accessor for tx outputs + /// accessor for tx inputs pub fn inputs(&self) -> &TxInputs { &self.transaction.inputs } + pub fn filled_inputs( + &self, + ) -> impl DoubleEndedIterator { + self.transaction.inputs.iter().zip(&self.spent_utxos) + } + /// true if the tx data corresponds to a BitName registration pub fn is_registration(&self) -> bool { self.transaction.is_registration() diff --git a/types/transaction/output_content.rs b/types/transaction/output_content.rs index a5d0939..d758b4f 100644 --- a/types/transaction/output_content.rs +++ b/types/transaction/output_content.rs @@ -434,8 +434,10 @@ mod filled { use serde::{Deserialize, Serialize}; use utoipa::{PartialSchema, ToSchema}; - use super::Content; - use crate::{BitName, Hash, Txid}; + use crate::{ + BitName, Hash, Txid, + transaction::{Content, output_content}, + }; /// Defines a Filled enum with the specified visibility, name, /// derives, and attributes for each variant @@ -459,8 +461,8 @@ mod filled { $( $(#[$bitcoin_attr])* )? - Bitcoin(super::BitcoinContent), - BitcoinWithdrawal(super::WithdrawalContent), + Bitcoin(output_content::BitcoinContent), + BitcoinWithdrawal(output_content::WithdrawalContent), BitName(BitName), /// Reservation txid and commitment BitNameReservation( @@ -506,6 +508,12 @@ mod filled { ); impl Filled { + /// Constructs a new filled Bitcoin value output + #[inline(always)] + pub fn new_bitcoin_value(amount: bitcoin::Amount) -> Self { + Self::Bitcoin(output_content::BitcoinContent(amount)) + } + /// returns the BitName ID (name hash) if the filled output content /// corresponds to a BitName output. pub fn bitname(&self) -> Option<&BitName> {