diff --git a/Cargo.lock b/Cargo.lock index 4a95328b4..8a318331a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,18 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli 0.29.0", + "gimli 0.31.1", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -141,33 +141,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -175,9 +175,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "anymap2" @@ -202,17 +202,23 @@ dependencies = [ "password-hash", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -247,11 +253,11 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ - "asn1-rs-derive 0.5.0", + "asn1-rs-derive 0.5.1", "asn1-rs-impl 0.2.0", "displaydoc", "nom", @@ -275,13 +281,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "synstructure 0.13.1", ] @@ -304,7 +310,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -342,13 +348,13 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-lite 2.3.0", "slab", ] @@ -361,8 +367,8 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.3.1", "async-executor", - "async-io 2.3.3", - "async-lock 3.4.0", + "async-io", + "async-lock", "blocking", "futures-lite 2.3.0", "once_cell", @@ -380,12 +386,12 @@ dependencies = [ "async-stream", "async-trait", "base64 0.13.1", - "bytes 1.6.1", + "bytes 1.8.0", "fast_chemail", "fnv", "futures-util", "handlebars", - "http", + "http 0.2.12", "indexmap 1.9.3", "mime", "multer", @@ -409,12 +415,12 @@ checksum = "777d02b4b35c1eb15bb63391f45b4622206fe1199940fa8b4b6136904fae035c" dependencies = [ "async-graphql", "async-trait", - "axum", - "bytes 1.6.1", + "axum 0.6.20", + "bytes 1.8.0", "futures-util", - "http-body", + "http-body 0.4.6", "serde_json", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-service", ] @@ -452,7 +458,7 @@ version = "5.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d461325bfb04058070712296601dfe5e5bd6cdff84780a0a8c569ffb15c87eb3" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "indexmap 1.9.3", "serde", "serde_json", @@ -460,50 +466,21 @@ dependencies = [ [[package]] name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.4.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.2", - "rustix 0.38.34", + "polling 3.7.3", + "rustix", "slab", "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", + "windows-sys 0.59.0", ] [[package]] @@ -519,28 +496,41 @@ dependencies = [ [[package]] name = "async-object-pool" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" +checksum = "333c456b97c3f2d50604e8b2624253b7f787208cb72eb75e64b0ad11b221652c" dependencies = [ "async-std", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel 2.3.1", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.34", - "windows-sys 0.48.0", + "event-listener 5.3.1", + "futures-lite 2.3.0", + "rustix", + "tracing", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", ] [[package]] @@ -554,38 +544,38 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.3", - "async-lock 3.4.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.34", + "rustix", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", + "futures-lite 2.3.0", "gloo-timers", "kv-log-macro", "log", @@ -599,9 +589,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -610,13 +600,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -627,13 +617,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -642,7 +632,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "futures-sink", "futures-util", "memchr", @@ -661,7 +651,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ - "http", + "http 0.2.12", "log", "url", ] @@ -679,9 +669,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "autotools" @@ -699,15 +689,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.3.4", "base64 0.21.7", "bitflags 1.3.2", - "bytes 1.6.1", + "bytes 1.8.0", "futures-util", "headers", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -721,10 +711,37 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1 0.10.6", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tokio-tungstenite", - "tower", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +dependencies = [ + "async-trait", + "axum-core 0.4.5", + "bytes 1.8.0", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 1.0.1", + "tower 0.5.1", "tower-layer", "tower-service", ] @@ -736,16 +753,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", - "bytes 1.6.1", + "bytes 1.8.0", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", "tower-service", ] +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes 1.8.0", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.1", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-jrpc" version = "0.3.2" @@ -754,7 +791,7 @@ checksum = "163372a0c1cb179c5b3a9ac5edbb01501b4d4ad247b971712d0559e832819e3a" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.6.20", "serde", "serde_json", "thiserror", @@ -762,17 +799,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.36.2", + "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -787,15 +824,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base58-monero" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935c90240f9b7749c80746bf88ad9cb346f34b01ee30ad4d566dfdecd6e3cc6a" -dependencies = [ - "thiserror", -] - [[package]] name = "base58-monero" version = "2.0.0" @@ -1014,10 +1042,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "syn_derive", ] @@ -1038,9 +1066,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -1048,9 +1076,9 @@ dependencies = [ [[package]] name = "buffer-redux" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9f8ddd22e0a12391d1e7ada69ec3b0da1914f1cec39c5cf977143c5b2854f5" +checksum = "4e8acf87c5b9f5897cd3ebb9a327f420e0cae9dd4e5c1d2e36f2c84c571a58f1" dependencies = [ "memchr", ] @@ -1097,9 +1125,9 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -1115,9 +1143,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -1131,10 +1159,10 @@ dependencies = [ "async-std", "digest", "either", - "futures 0.3.30", + "futures 0.3.31", "hex", "libc", - "memmap2", + "memmap2 0.5.10", "miette", "reflink-copy", "serde", @@ -1160,9 +1188,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1196,7 +1224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88da5a13c620b4ca0078845707ea9c3faf11edbc3ffd8497d11d686211cd1ac0" dependencies = [ "serde", - "toml 0.8.15", + "toml 0.8.19", ] [[package]] @@ -1231,12 +1259,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1422,23 +1451,23 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.10" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", - "clap_derive 4.5.8", + "clap_derive 4.5.18", ] [[package]] name = "clap_builder" -version = "4.5.10" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", - "clap_lex 0.7.1", + "clap_lex 0.7.2", "strsim 0.11.1", "terminal_size", ] @@ -1458,14 +1487,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -1479,9 +1508,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clipboard-win" @@ -1502,9 +1531,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -1528,22 +1557,21 @@ dependencies = [ [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "async-trait", "convert_case 0.6.0", "json5", - "lazy_static", "nom", "pathdiff", "ron", "rust-ini", "serde", "serde_json", - "toml 0.8.15", - "yaml-rust", + "toml 0.8.19", + "yaml-rust2", ] [[package]] @@ -1553,9 +1581,9 @@ dependencies = [ "anyhow", "async-trait", "fern", - "futures 0.3.30", + "futures 0.3.31", "humantime 2.1.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "itertools 0.11.0", "log", "rand", @@ -1613,7 +1641,7 @@ dependencies = [ "console-api", "crossbeam-channel", "crossbeam-utils", - "futures 0.3.30", + "futures 0.3.31", "hdrhistogram", "humantime 2.1.0", "prost-types 0.11.9", @@ -1681,9 +1709,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1709,65 +1737,83 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" +checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" +checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" dependencies = [ + "arrayvec", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-egraph", "cranelift-entity", + "cranelift-isle", "gimli 0.26.2", "log", - "regalloc", + "regalloc2", "smallvec 1.13.2", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" +checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" +checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" + +[[package]] +name = "cranelift-egraph" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" +dependencies = [ + "cranelift-entity", + "fxhash", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "log", + "smallvec 1.13.2", +] [[package]] name = "cranelift-entity" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" +checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" [[package]] name = "cranelift-frontend" -version = "0.82.3" +version = "0.91.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" +checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" dependencies = [ "cranelift-codegen", "log", @@ -1775,6 +1821,12 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cranelift-isle" +version = "0.91.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" + [[package]] name = "crc" version = "3.2.1" @@ -1807,9 +1859,9 @@ dependencies = [ [[package]] name = "critical-section" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-channel" @@ -1839,6 +1891,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -1941,14 +2002,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cd12917efc3a8b069a4975ef3cb2f2d835d42d04b3814d90838488f9dd9bf69" dependencies = [ "anyhow", - "clap 4.5.10", + "clap 4.5.20", "console", "cucumber-codegen", "cucumber-expressions", "derive_more", "drain_filter_polyfill", "either", - "futures 0.3.30", + "futures 0.3.31", "gherkin", "globwalk", "humantime 2.1.0", @@ -1958,7 +2019,7 @@ dependencies = [ "lazy-regex", "linked-hash-map", "once_cell", - "pin-project 1.1.5", + "pin-project 1.1.6", "regex", "sealed", "serde", @@ -1978,7 +2039,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.85", "synthez", ] @@ -1998,24 +2059,24 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.46" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6" +checksum = "d9fb4d13a1be2b58f14d60adba57c9834b78c62fd86c3e76a148f732686e9265" dependencies = [ "curl-sys", "libc", "openssl-probe", "openssl-sys", "schannel", - "socket2 0.5.7", + "socket2", "windows-sys 0.52.0", ] [[package]] name = "curl-sys" -version = "0.4.73+curl-8.8.0" +version = "0.4.77+curl-8.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "450ab250ecf17227c39afb9a2dd9261dc0035cb80f2612472fc0c4aac2dcb84d" +checksum = "f469e8a5991f277a208224f6c7ad72ecb5f986e36d09ae1f2c1bb9259478a480" dependencies = [ "cc", "libc", @@ -2054,7 +2115,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2113,7 +2174,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2135,7 +2196,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2151,6 +2212,20 @@ dependencies = [ "parking_lot_core 0.9.10", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -2217,7 +2292,7 @@ version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ - "asn1-rs 0.6.1", + "asn1-rs 0.6.2", "displaydoc", "nom", "num-bigint", @@ -2298,7 +2373,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2334,11 +2409,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "dialoguer" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" +dependencies = [ + "console", + "shell-words", + "tempfile", + "thiserror", + "zeroize", +] + [[package]] name = "diesel" -version = "2.1.6" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff236accb9a5069572099f0b350a92e9560e8e63a9b8d546162f4a5e03026bb2" +checksum = "158fe8e2e68695bd615d7e4f3227c0727b151330d3e253b525086c348d055d5e" dependencies = [ "bigdecimal", "chrono", @@ -2354,21 +2442,22 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.4" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14701062d6bed917b5c7103bdffaee1e4609279e240488ad24e7bd979ca6866c" +checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" dependencies = [ "diesel_table_macro_syntax", + "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "diesel_migrations" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac" +checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" dependencies = [ "diesel", "migrations_internals", @@ -2377,11 +2466,11 @@ dependencies = [ [[package]] name = "diesel_table_macro_syntax" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2402,16 +2491,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys 0.3.7", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -2445,18 +2525,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -2476,7 +2544,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2500,6 +2568,20 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408" +[[package]] +name = "dsl_auto_type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +dependencies = [ + "darling 0.20.10", + "either", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.85", +] + [[package]] name = "dtoa" version = "1.0.9" @@ -2589,9 +2671,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -2604,26 +2686,14 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "enum-as-inner" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "enum-as-inner" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2664,7 +2734,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -2740,17 +2810,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.3.1" @@ -2808,9 +2867,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fd-lock" @@ -2819,7 +2878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if", - "rustix 0.38.34", + "rustix", "windows-sys 0.48.0", ] @@ -2869,9 +2928,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -2883,6 +2942,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2937,9 +3002,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2962,9 +3027,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2972,15 +3037,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2990,9 +3055,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -3015,7 +3080,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-core", "futures-io", "parking", @@ -3024,36 +3089,37 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "futures-rustls" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.21.12", + "rustls 0.23.15", + "rustls-pki-types", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-ticker" @@ -3061,7 +3127,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9763058047f713632a52e916cc7f6a4b3fc6e9fc1ff8c5b1dc49e5a89041682e" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "instant", ] @@ -3074,9 +3140,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures 0.1.31", "futures-channel", @@ -3092,12 +3158,21 @@ dependencies = [ ] [[package]] -name = "gcc" -version = "0.3.55" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - -[[package]] +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] name = "generate_ristretto_value_lookup" version = "0.7.0" dependencies = [ @@ -3124,8 +3199,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -3149,7 +3226,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.72", + "syn 2.0.85", "textwrap 0.16.1", "thiserror", "typed-builder", @@ -3168,9 +3245,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" @@ -3193,9 +3270,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -3217,9 +3294,9 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -3244,16 +3321,35 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.5.0", + "http 0.2.12", + "indexmap 2.6.0", "slab", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes 1.8.0", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util 0.7.12", "tracing", ] @@ -3277,15 +3373,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -3314,6 +3401,26 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "hdrhistogram" version = "7.5.4" @@ -3334,9 +3441,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ "base64 0.21.7", - "bytes 1.6.1", + "bytes 1.8.0", "headers-core", - "http", + "http 0.2.12", "httpdate", "mime", "sha1 0.10.6", @@ -3348,7 +3455,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.12", ] [[package]] @@ -3420,6 +3527,25 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +[[package]] +name = "hickory-client" +version = "0.25.0-alpha.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90078f18923f3a7663f62fbd43c4030de758d16efae0071cdf3ef9c6358cbf49" +dependencies = [ + "cfg-if", + "data-encoding", + "futures-channel", + "futures-util", + "hickory-proto 0.25.0-alpha.2", + "once_cell", + "radix_trie", + "rand", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hickory-proto" version = "0.24.1" @@ -3429,7 +3555,7 @@ dependencies = [ "async-trait", "cfg-if", "data-encoding", - "enum-as-inner 0.6.0", + "enum-as-inner", "futures-channel", "futures-io", "futures-util", @@ -3437,10 +3563,41 @@ dependencies = [ "ipnet", "once_cell", "rand", - "socket2 0.5.7", + "socket2", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-proto" +version = "0.25.0-alpha.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8270a1857fb962b9914aafd46a89a187a4e63d0eb4190c327e7c7b8256a2d055" +dependencies = [ + "async-recursion", + "async-trait", + "bitflags 2.6.0", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.5.0", + "ipnet", + "once_cell", + "rand", + "ring 0.17.8", + "rustls 0.23.15", + "rustls-pemfile 2.2.0", "thiserror", + "time", "tinyvec", "tokio", + "tokio-rustls 0.26.0", "tracing", "url", ] @@ -3453,7 +3610,28 @@ checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.1", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.3", + "rand", + "resolv-conf", + "smallvec 1.13.2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hickory-resolver" +version = "0.25.0-alpha.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c110355b5703070d9e29c344d79818a7cde3de9c27fc35750defea6074b0ad" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.25.0-alpha.2", "ipconfig", "lru-cache", "once_cell", @@ -3522,7 +3700,18 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes 1.8.0", "fnv", "itoa", ] @@ -3533,8 +3722,31 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.6.1", - "http", + "bytes 1.8.0", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes 1.8.0", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes 1.8.0", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -3546,9 +3758,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -3570,7 +3782,7 @@ dependencies = [ "crossbeam-utils", "form_urlencoded", "futures-util", - "hyper", + "hyper 0.14.31", "isahc", "lazy_static", "levenshtein", @@ -3617,28 +3829,49 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +dependencies = [ + "bytes 1.8.0", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec 1.13.2", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3646,8 +3879,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -3659,30 +3892,62 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.31", "pin-project-lite", "tokio", "tokio-io-timeout", ] +[[package]] +name = "hyper-timeout" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +dependencies = [ + "hyper 1.5.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.6.1", - "hyper", + "bytes 1.8.0", + "hyper 0.14.31", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes 1.8.0", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.5.0", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3716,17 +3981,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -3763,10 +4017,10 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.3", + "async-io", "core-foundation", "fnv", - "futures 0.3.30", + "futures 0.3.31", "if-addrs", "ipnet", "log", @@ -3784,10 +4038,10 @@ checksum = "064d90fec10d541084e7b39ead8875a5a80d9114a2b18791565253bae25f49e4" dependencies = [ "async-trait", "attohttpc", - "bytes 1.6.1", - "futures 0.3.30", - "http", - "hyper", + "bytes 1.8.0", + "futures 0.3.31", + "http 0.2.12", + "hyper 0.14.31", "log", "rand", "tokio", @@ -3797,9 +4051,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -3886,12 +4140,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -3941,7 +4195,7 @@ dependencies = [ "config", "cucumber", "httpmock", - "indexmap 2.5.0", + "indexmap 2.6.0", "libp2p", "log", "log4rs", @@ -3985,7 +4239,7 @@ dependencies = [ "tari_wallet_daemon_client", "time", "tokio", - "tonic 0.8.3", + "tonic 0.12.3", ] [[package]] @@ -3995,7 +4249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5927883184e6a819b22d5e4f5f7bc7ca134fde9b2026fbddd8d95249746ba21e" dependencies = [ "async-trait", - "bytes 1.6.1", + "bytes 1.8.0", "log", "rand", "rtcp", @@ -4013,24 +4267,13 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipconfig" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.7", + "socket2", "widestring", "windows-sys 0.48.0", "winreg", @@ -4038,26 +4281,26 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "isahc" @@ -4073,7 +4316,7 @@ dependencies = [ "encoding_rs", "event-listener 2.5.3", "futures-lite 1.13.0", - "http", + "http 0.2.12", "log", "mime", "once_cell", @@ -4152,9 +4395,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -4207,9 +4450,9 @@ dependencies = [ [[package]] name = "kstring" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e703acfd696000db3f6d1238e23b3d1f889192e1e439969c44e8423bb7a5655e" +checksum = "558bf9508a558512042d3095138b1f7b8fe90c5467d94f9f1da28b3731c5dbd1" dependencies = [ "serde", "static_assertions", @@ -4257,9 +4500,9 @@ dependencies = [ [[package]] name = "lazy-regex" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d12be4595afdf58bd19e4a9f4e24187da2a66700786ff660a418e9059937a4c" +checksum = "8d8e41c97e6bc7ecb552016274b99fbb5d035e8de288c582d9b933af6677bfda" dependencies = [ "lazy-regex-proc_macros", "once_cell", @@ -4268,14 +4511,14 @@ dependencies = [ [[package]] name = "lazy-regex-proc_macros" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bcd58e6c97a7fcbaffcdc95728b393b8d98933bfadad49ed4097845b57ef0b" +checksum = "76e1d8b05d672c53cb9c7b920bbba8783845ae4f0b076e02a3db1d02c81b4163" dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -4346,9 +4589,9 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libgit2-sys" @@ -4372,16 +4615,6 @@ dependencies = [ "libc", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libm" version = "0.2.8" @@ -4400,15 +4633,14 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.54.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.54.1" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "getrandom", - "instant", "libp2p-allow-block-list", "libp2p-autonat", "libp2p-connection-limits", @@ -4429,15 +4661,15 @@ dependencies = [ "libp2p-upnp", "libp2p-yamux", "multiaddr 0.18.1", - "pin-project 1.1.5", + "pin-project 1.1.6", "rw-stream-sink", "thiserror", ] [[package]] name = "libp2p-allow-block-list" -version = "0.3.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.4.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "libp2p-core", "libp2p-identity", @@ -4447,28 +4679,34 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.12.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.13.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "async-trait", "asynchronous-codec", - "futures 0.3.30", + "bytes 1.8.0", + "either", + "futures 0.3.31", + "futures-bounded", "futures-timer", - "instant", "libp2p-core", "libp2p-identity", "libp2p-request-response", "libp2p-swarm", "quick-protobuf", - "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4)", + "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558)", "rand", + "rand_core", + "thiserror", "tracing", + "void", + "web-time", ] [[package]] name = "libp2p-connection-limits" -version = "0.3.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.4.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "libp2p-core", "libp2p-identity", @@ -4478,21 +4716,20 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.41.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.42.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "instant", "libp2p-identity", "multiaddr 0.18.1", "multihash 0.19.1", "multistream-select", "once_cell", "parking_lot 0.12.3", - "pin-project 1.1.5", + "pin-project 1.1.6", "quick-protobuf", "rand", "rw-stream-sink", @@ -4501,38 +4738,39 @@ dependencies = [ "tracing", "unsigned-varint 0.8.0", "void", + "web-time", ] [[package]] name = "libp2p-dcutr" -version = "0.11.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.12.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-bounded", "futures-timer", - "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm", "lru", "quick-protobuf", - "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4)", + "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558)", "thiserror", "tracing", "void", + "web-time", ] [[package]] name = "libp2p-dns" -version = "0.41.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.42.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "async-trait", - "futures 0.3.30", - "hickory-resolver", + "futures 0.3.31", + "hickory-resolver 0.24.1", "libp2p-core", "libp2p-identity", "parking_lot 0.12.3", @@ -4542,42 +4780,42 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.46.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.47.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", "base64 0.22.1", "byteorder", - "bytes 1.6.1", + "bytes 1.8.0", "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-ticker", "getrandom", "hex_fmt", - "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm", "prometheus-client", "quick-protobuf", - "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4)", + "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558)", "rand", "regex", "sha2", "smallvec 1.13.2", "tracing", "void", + "web-time", ] [[package]] name = "libp2p-identify" -version = "0.44.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.45.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-bounded", "futures-timer", "libp2p-core", @@ -4585,7 +4823,7 @@ dependencies = [ "libp2p-swarm", "lru", "quick-protobuf", - "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4)", + "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558)", "smallvec 1.13.2", "thiserror", "tracing", @@ -4594,8 +4832,8 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.8" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.2.9" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "bs58 0.5.1", "ed25519-dalek", @@ -4613,19 +4851,19 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.45.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.46.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "data-encoding", - "futures 0.3.30", - "hickory-proto", + "futures 0.3.31", + "hickory-proto 0.24.1", "if-watch", "libp2p-core", "libp2p-identity", "libp2p-swarm", "rand", "smallvec 1.13.2", - "socket2 0.5.7", + "socket2", "tokio", "tracing", "void", @@ -4639,17 +4877,16 @@ dependencies = [ "futures-bounded", "libp2p", "prost 0.12.6", - "smallvec 2.0.0-alpha.6", + "smallvec 2.0.0-alpha.7", "tracing", ] [[package]] name = "libp2p-metrics" -version = "0.14.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.15.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "futures 0.3.30", - "instant", + "futures 0.3.31", "libp2p-core", "libp2p-dcutr", "libp2p-gossipsub", @@ -4658,19 +4895,20 @@ dependencies = [ "libp2p-ping", "libp2p-relay", "libp2p-swarm", - "pin-project 1.1.5", + "pin-project 1.1.6", "prometheus-client", + "web-time", ] [[package]] name = "libp2p-noise" -version = "0.44.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.45.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", - "bytes 1.6.1", + "bytes 1.8.0", "curve25519-dalek", - "futures 0.3.30", + "futures 0.3.31", "libp2p-core", "libp2p-identity", "multiaddr 0.18.1", @@ -4706,28 +4944,28 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.44.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.45.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "either", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm", "rand", "tracing", "void", + "web-time", ] [[package]] name = "libp2p-quic" -version = "0.10.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.11.1" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "bytes 1.6.1", - "futures 0.3.30", + "bytes 1.8.0", + "futures 0.3.31", "futures-timer", "if-watch", "libp2p-core", @@ -4736,9 +4974,9 @@ dependencies = [ "parking_lot 0.12.3", "quinn", "rand", - "ring 0.16.20", - "rustls 0.21.12", - "socket2 0.5.7", + "ring 0.17.8", + "rustls 0.23.15", + "socket2", "thiserror", "tokio", "tracing", @@ -4746,20 +4984,20 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.17.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.18.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", - "bytes 1.6.1", + "bytes 1.8.0", "either", - "futures 0.3.30", + "futures 0.3.31", "futures-bounded", "futures-timer", "libp2p-core", "libp2p-identity", "libp2p-swarm", "quick-protobuf", - "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4)", + "quick-protobuf-codec 0.3.1 (git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558)", "rand", "static_assertions", "thiserror", @@ -4770,14 +5008,13 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.26.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.27.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "futures-bounded", "futures-timer", - "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm", @@ -4785,6 +5022,7 @@ dependencies = [ "smallvec 1.13.2", "tracing", "void", + "web-time", ] [[package]] @@ -4798,14 +5036,13 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.44.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.45.1" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "either", "fnv", - "futures 0.3.30", + "futures 0.3.31", "futures-timer", - "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", @@ -4817,48 +5054,49 @@ dependencies = [ "tokio", "tracing", "void", + "web-time", ] [[package]] name = "libp2p-swarm-derive" -version = "0.34.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.35.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "libp2p-tcp" -version = "0.41.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.42.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "if-watch", "libc", "libp2p-core", "libp2p-identity", - "socket2 0.5.7", + "socket2", "tokio", "tracing", ] [[package]] name = "libp2p-tls" -version = "0.3.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.5.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-rustls", "libp2p-core", "libp2p-identity", - "rcgen", - "ring 0.16.20", - "rustls 0.21.12", - "rustls-webpki", + "rcgen 0.11.3", + "ring 0.17.8", + "rustls 0.23.15", + "rustls-webpki 0.101.7", "thiserror", "x509-parser 0.16.0", "yasna", @@ -4866,10 +5104,10 @@ dependencies = [ [[package]] name = "libp2p-upnp" -version = "0.2.2" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.3.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "futures-timer", "igd-next", "libp2p-core", @@ -4881,11 +5119,11 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.45.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +version = "0.46.0" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "either", - "futures 0.3.30", + "futures 0.3.31", "libp2p-core", "thiserror", "tracing", @@ -4916,9 +5154,9 @@ dependencies = [ [[package]] name = "libtor" -version = "46.9.0+0.4.6.x" +version = "47.13.0+0.4.7.x" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ca40c5090fd84877853f509dce8f906922e6c6fb0be12f4b61f6116710d457" +checksum = "1be588c6a2f02b860a1c0e3b2a59edcb171058f8da71b8ca0ddd7bb40f102c5c" dependencies = [ "libtor-derive", "libtor-sys", @@ -4938,24 +5176,33 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "libtor-src" +version = "47.13.0+0.4.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73bef51ecfbe7e63ce5cb8757ebc59d09dca6985da7f7470931ac22eab00719" +dependencies = [ + "fs_extra", +] + [[package]] name = "libtor-sys" -version = "46.9.1+0.4.6.9" +version = "47.13.0+0.4.7.x" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bf218e9764d77c16b77b9a26f219c5302bf7be010fd82aba63b019dea41fea" +checksum = "eb0bc2cfc5d03851617d33508acc511e46f0c2b3cbc3cda85defcb50efa628bb" dependencies = [ "autotools", "cc", - "fs_extra", + "libtor-src", "libz-sys", "openssl-sys", ] [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -4969,12 +5216,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -4983,9 +5224,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "liquid" -version = "0.26.6" +version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10929f201279ba14da3297b957dcda1e0bf7a6f3bb5115688be684aa8864e9cc" +checksum = "7cdcc72b82748f47c2933c172313f5a9aea5b2c4eb3fa4c66b4ea55bb60bb4b1" dependencies = [ "doc-comment", "liquid-core", @@ -4996,12 +5237,12 @@ dependencies = [ [[package]] name = "liquid-core" -version = "0.26.6" +version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aef4b2160791f456eb880c990a97746f693746f92302ef5f1d06111cf14b768" +checksum = "2752e978ffc53670f3f2e8b3ef09f348d6f7b5474a3be3f8a5befe5382e4effb" dependencies = [ "anymap2", - "itertools 0.12.1", + "itertools 0.13.0", "kstring", "liquid-derive", "num-traits", @@ -5014,22 +5255,22 @@ dependencies = [ [[package]] name = "liquid-derive" -version = "0.26.5" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915f6d0a2963a27cd5205c1902f32ddfe3bc035816afd268cf88c0fc0f8d287e" +checksum = "3b51f1d220e3fa869e24cfd75915efe3164bd09bb11b3165db3f37f57bf673e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "liquid-lib" -version = "0.26.6" +version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f48fc446873f74d869582f5c4b8cbf3248c93395e410a67af5809b3731e44a" +checksum = "59b1a298d3d2287ee5b1e43840d885b8fdfc37d3f4e90d82aacfd04d021618da" dependencies = [ - "itertools 0.12.1", + "itertools 0.13.0", "liquid-core", "once_cell", "percent-encoding", @@ -5110,34 +5351,13 @@ dependencies = [ "winapi", ] -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap 1.9.3", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -5149,15 +5369,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "mach2" version = "0.4.2" @@ -5182,12 +5393,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -5219,6 +5424,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -5237,6 +5451,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "merlin" version = "3.0.0" @@ -5269,24 +5492,24 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "migrations_internals" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada" +checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.19", ] [[package]] name = "migrations_macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08" +checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" dependencies = [ "migrations_internals", "proc-macro2", @@ -5317,7 +5540,7 @@ checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" dependencies = [ "crossbeam-channel", "crossbeam-utils", - "dashmap", + "dashmap 5.5.3", "skeptic", "smallvec 1.13.2", "tagptr", @@ -5332,50 +5555,51 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "minotari_app_grpc" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "argon2", "base64 0.13.1", "borsh", "chrono", "log", - "prost 0.11.9", - "prost-types 0.11.9", + "prost 0.13.3", + "prost-types 0.13.3", "rand", - "rcgen", + "rcgen 0.12.1", "subtle", "tari_common_types", "tari_comms", "tari_core", "tari_crypto", "tari_features", + "tari_max_size", "tari_script", "tari_utilities", "thiserror", "tokio", - "tonic 0.8.3", + "tonic 0.12.3", "tonic-build", "zeroize", ] [[package]] name = "minotari_app_utilities" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "clap 3.2.25", - "dialoguer", - "futures 0.3.30", + "dialoguer 0.10.4", + "futures 0.3.31", "json5", "log", "rand", @@ -5387,13 +5611,13 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.8.3", + "tonic 0.12.3", ] [[package]] name = "minotari_console_wallet" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "blake2", "chrono", @@ -5402,9 +5626,8 @@ dependencies = [ "console-subscriber", "crossterm 0.25.0", "digest", - "dirs 5.0.1", - "futures 0.3.30", - "ledger-transport-hid", + "dirs-next 2.0.0", + "futures 0.3.31", "log", "log4rs", "minotari_app_grpc", @@ -5432,13 +5655,14 @@ dependencies = [ "tari_hashing", "tari_key_manager", "tari_libtor", + "tari_max_size", "tari_p2p", "tari_script", "tari_shutdown", "tari_utilities", "thiserror", "tokio", - "tonic 0.8.3", + "tonic 0.12.3", "tui", "unicode-segmentation", "unicode-width", @@ -5447,25 +5671,41 @@ dependencies = [ "zxcvbn", ] +[[package]] +name = "minotari_ledger_wallet_common" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" +dependencies = [ + "bs58 0.5.1", +] + [[package]] name = "minotari_ledger_wallet_comms" -version = "1.0.0-pre.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ + "borsh", + "dialoguer 0.11.0", "ledger-transport 0.10.0 (git+https://github.com/Zondax/ledger-rs?rev=20e2a20)", "ledger-transport-hid", - "num-derive", - "num-traits", + "log", + "minotari_ledger_wallet_common", + "once_cell", + "rand", + "semver", "serde", + "tari_common", "tari_common_types", "tari_crypto", + "tari_script", + "tari_utilities", "thiserror", ] [[package]] name = "minotari_node" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", "async-trait", @@ -5478,7 +5718,7 @@ dependencies = [ "crossterm 0.25.0", "derive_more", "either", - "futures 0.3.30", + "futures 0.3.31", "log", "log-mdc", "log4rs", @@ -5489,6 +5729,7 @@ dependencies = [ "rustyline", "rustyline-derive", "serde", + "serde_json", "strum 0.22.0", "tari_common", "tari_common_types", @@ -5506,21 +5747,21 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tonic 0.8.3", + "tonic 0.12.3", ] [[package]] name = "minotari_node_grpc_client" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "minotari_app_grpc", ] [[package]] name = "minotari_wallet" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "argon2", "async-trait", @@ -5534,11 +5775,11 @@ dependencies = [ "diesel_migrations", "digest", "fs2", - "futures 0.3.30", + "futures 0.3.31", "itertools 0.10.5", "libsqlite3-sys", "log", - "prost 0.11.9", + "prost 0.13.3", "rand", "serde", "serde_json", @@ -5554,6 +5795,7 @@ dependencies = [ "tari_core", "tari_crypto", "tari_key_manager", + "tari_max_size", "tari_p2p", "tari_script", "tari_service_framework", @@ -5562,19 +5804,19 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "tower", + "tower 0.4.13", "zeroize", ] [[package]] name = "minotari_wallet_grpc_client" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "minotari_app_grpc", "tari_common_types", "thiserror", - "tonic 0.8.3", + "tonic 0.12.3", ] [[package]] @@ -5604,9 +5846,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -5629,7 +5871,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f25218523ad4a171ddda05251669afb788cdc2f0df94082aab856a2b09541c3f" dependencies = [ - "base58-monero 2.0.0", + "base58-monero", "curve25519-dalek", "fixed-hash", "hex", @@ -5652,10 +5894,10 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "encoding_rs", "futures-util", - "http", + "http 0.2.12", "httparse", "log", "memchr", @@ -5685,7 +5927,7 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.18.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "arrayref", "byteorder", @@ -5761,11 +6003,11 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "multistream-select" version = "0.13.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "bytes 1.6.1", - "futures 0.3.30", - "pin-project 1.1.5", + "bytes 1.8.0", + "futures 0.3.31", + "pin-project 1.1.6", "smallvec 1.13.2", "tracing", "unsigned-varint 0.8.0", @@ -5832,8 +6074,8 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ - "bytes 1.6.1", - "futures 0.3.30", + "bytes 1.8.0", + "futures 0.3.31", "log", "netlink-packet-core", "netlink-sys", @@ -5847,8 +6089,8 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ - "bytes 1.6.1", - "futures 0.3.30", + "bytes 1.8.0", + "futures 0.3.31", "libc", "log", "tokio", @@ -6008,7 +6250,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6074,21 +6316,9 @@ dependencies = [ [[package]] name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap 1.9.3", - "memchr", -] - -[[package]] -name = "object" -version = "0.36.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -6104,18 +6334,18 @@ dependencies = [ [[package]] name = "oid-registry" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ - "asn1-rs 0.6.1", + "asn1-rs 0.6.2", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" dependencies = [ "critical-section", "portable-atomic", @@ -6129,9 +6359,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -6150,7 +6380,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6161,18 +6391,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.4.0+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -6181,12 +6411,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "2.10.1" @@ -6198,12 +6422,12 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.13.2", + "hashbrown 0.14.5", ] [[package]] @@ -6256,7 +6480,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6264,9 +6488,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -6311,7 +6535,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall 0.5.7", "smallvec 1.13.2", "windows-targets 0.52.6", ] @@ -6341,9 +6565,9 @@ checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" [[package]] name = "pb-rs" @@ -6420,9 +6644,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -6431,9 +6655,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -6441,22 +6665,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -6470,7 +6694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.5.0", + "indexmap 2.6.0", ] [[package]] @@ -6551,11 +6775,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ - "pin-project-internal 1.1.5", + "pin-project-internal 1.1.6", ] [[package]] @@ -6571,13 +6795,13 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6594,12 +6818,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-io", ] @@ -6626,9 +6850,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" @@ -6648,17 +6872,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.34", + "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6686,9 +6910,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -6698,9 +6922,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -6720,12 +6947,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6761,11 +6988,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -6794,9 +7021,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -6836,7 +7063,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -6845,7 +7072,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "prost-derive 0.9.0", ] @@ -6855,7 +7082,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "prost-derive 0.11.9", ] @@ -6865,17 +7092,27 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "prost-derive 0.12.6", ] +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes 1.8.0", + "prost-derive 0.13.3", +] + [[package]] name = "prost-build" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "heck 0.4.1", "itertools 0.10.5", "lazy_static", @@ -6897,18 +7134,39 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "heck 0.5.0", "itertools 0.12.1", "log", "multimap 0.10.0", "once_cell", "petgraph", - "prettyplease 0.2.20", + "prettyplease 0.2.25", "prost 0.12.6", "prost-types 0.12.6", "regex", - "syn 2.0.72", + "syn 2.0.85", + "tempfile", +] + +[[package]] +name = "prost-build" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +dependencies = [ + "bytes 1.8.0", + "heck 0.5.0", + "itertools 0.13.0", + "log", + "multimap 0.10.0", + "once_cell", + "petgraph", + "prettyplease 0.2.25", + "prost 0.13.3", + "prost-types 0.13.3", + "regex", + "syn 2.0.85", "tempfile", ] @@ -6948,7 +7206,20 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.85", ] [[package]] @@ -6957,7 +7228,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "prost 0.9.0", ] @@ -6979,6 +7250,15 @@ dependencies = [ "prost 0.12.6", ] +[[package]] +name = "prost-types" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +dependencies = [ + "prost 0.13.3", +] + [[package]] name = "proto_builder" version = "0.7.0" @@ -7062,7 +7342,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474" dependencies = [ "asynchronous-codec", - "bytes 1.6.1", + "bytes 1.8.0", "quick-protobuf", "thiserror", "unsigned-varint 0.8.0", @@ -7071,10 +7351,10 @@ dependencies = [ [[package]] name = "quick-protobuf-codec" version = "0.3.1" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ "asynchronous-codec", - "bytes 1.6.1", + "bytes 1.8.0", "quick-protobuf", "thiserror", "unsigned-varint 0.8.0", @@ -7091,17 +7371,18 @@ dependencies = [ [[package]] name = "quinn" -version = "0.10.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "futures-io", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.21.12", + "rustls 0.23.15", + "socket2", "thiserror", "tokio", "tracing", @@ -7109,15 +7390,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.10.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "rand", - "ring 0.16.20", + "ring 0.17.8", "rustc-hash", - "rustls 0.21.12", + "rustls 0.23.15", "slab", "thiserror", "tinyvec", @@ -7126,22 +7407,22 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.4.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ - "bytes 1.6.1", "libc", - "socket2 0.5.7", + "once_cell", + "socket2", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -7205,9 +7486,9 @@ dependencies = [ [[package]] name = "randomx-rs" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14fb999f322669968fd0e80aeca5cb91e7a817a94ebf2b0fcd345a4a7c695203" +checksum = "9abb8f2aa3432700c2b64a67406ac0da4956d78991f50559509cecc2b6abf249" dependencies = [ "bitflags 1.3.2", "libc", @@ -7247,6 +7528,18 @@ dependencies = [ "yasna", ] +[[package]] +name = "rcgen" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48406db8ac1f3cbc7dcdb56ec355343817958a356ff430259bb07baf7607e1e1" +dependencies = [ + "pem 3.0.4", + "ring 0.17.8", + "time", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -7258,18 +7551,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -7283,18 +7576,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc31414597d1cd7fdd2422798b7652a6329dda0fe0219e6335a13d5bcaa9aeb6" dependencies = [ "cfg-if", - "rustix 0.38.34", + "rustix", "windows 0.58.0", ] [[package]] -name = "regalloc" -version = "0.0.34" +name = "regalloc2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" +checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" dependencies = [ + "fxhash", "log", - "rustc-hash", + "slice-group-by", "smallvec 1.13.2", ] @@ -7376,14 +7670,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", - "bytes 1.6.1", + "bytes 1.8.0", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", "hyper-rustls", "hyper-tls", "ipnet", @@ -7400,7 +7694,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", @@ -7410,7 +7704,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.4", "winreg", ] @@ -7475,27 +7769,28 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", - "bytes 1.6.1", + "bytes 1.8.0", "hashbrown 0.12.3", + "indexmap 1.9.3", "ptr_meta", "rend", "rkyv_derive", "seahash", "tinyvec", - "uuid 1.10.0", + "uuid 1.11.0", ] [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -7550,7 +7845,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33648a781874466a62d89e265fee9f17e32bc7d05a256e6cca41bf97eadcd8aa" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "thiserror", "webrtc-util", ] @@ -7561,7 +7856,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "netlink-packet-route", "netlink-proto", @@ -7576,7 +7871,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e60482acbe8afb31edf6b1413103b7bca7a65004c423b3c3993749a083994fbe" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "rand", "serde", "thiserror", @@ -7589,7 +7884,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47fca9bd66ae0b1f3f649b8f5003d6176433d7293b78b0fce7e1031816bdd99d" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "rand", "serde", "thiserror", @@ -7598,9 +7893,9 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", "ordered-multimap", @@ -7614,9 +7909,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc-hex" @@ -7626,9 +7921,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -7644,85 +7939,81 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.14", + "linux-raw-sys", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.20.9" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.16.20", + "ring 0.17.8", + "rustls-webpki 0.101.7", "sct", - "webpki", ] [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", + "once_cell", "ring 0.17.8", - "rustls-webpki", - "sct", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.13.1", + "base64 0.21.7", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -7733,11 +8024,22 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rustyline" @@ -7776,10 +8078,10 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.4.0" -source = "git+https://github.com/tari-project/rust-libp2p.git?rev=0dccc6ca09651f6cc76ca08c58c31e34626d26c4#0dccc6ca09651f6cc76ca08c58c31e34626d26c4" +source = "git+https://github.com/tari-project/rust-libp2p.git?rev=3d918ccbf5ae1cbec0815a2156079b0fba4ba558#3d918ccbf5ae1cbec0815a2156079b0fba4ba558" dependencies = [ - "futures 0.3.30", - "pin-project 1.1.5", + "futures 0.3.31", + "pin-project 1.1.6", "static_assertions", ] @@ -7800,11 +8102,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7859,7 +8161,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -7891,14 +8193,20 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" + [[package]] name = "semver" version = "1.0.23" @@ -7910,9 +8218,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] @@ -7928,32 +8236,35 @@ dependencies = [ ] [[package]] -name = "serde_bytes" -version = "0.11.15" +name = "serde-wasm-bindgen" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" dependencies = [ + "js-sys", "serde", + "wasm-bindgen", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -7986,14 +8297,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8035,7 +8346,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8044,7 +8355,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -8109,12 +8420,28 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared-buffer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" +dependencies = [ + "bytes 1.8.0", + "memmap2 0.6.2", +] + [[package]] name = "shell-words" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -8127,9 +8454,9 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", "mio 0.7.14", @@ -8158,9 +8485,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" @@ -8210,6 +8537,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + [[package]] name = "slug" version = "0.1.6" @@ -8239,9 +8572,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smallvec" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66778689f64ae4f4e9365890e55048783afc0bb07a8e214b0bcfe7b88e6bb2bf" +checksum = "e6a96cb564e12be8458b004bd829787ebe887de197d94516d2ba5a2a32235a0c" [[package]] name = "smart-default" @@ -8251,7 +8584,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8308,16 +8641,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -8510,7 +8833,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8566,9 +8889,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -8584,7 +8907,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8593,6 +8916,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "synstructure" version = "0.12.6" @@ -8613,7 +8942,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8622,7 +8951,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3d2c2202510a1e186e63e596d9318c91a8cbe85cd1a56a7be0c333e5f59ec8d" dependencies = [ - "syn 2.0.72", + "syn 2.0.85", "synthez-codegen", "synthez-core", ] @@ -8633,7 +8962,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f724aa6d44b7162f3158a57bccd871a77b39a4aef737e01bcdff41f4772c7746" dependencies = [ - "syn 2.0.72", + "syn 2.0.85", "synthez-core", ] @@ -8646,7 +8975,7 @@ dependencies = [ "proc-macro2", "quote", "sealed", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -8684,9 +9013,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.15" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tari-tiny-keccak" @@ -8712,7 +9041,7 @@ dependencies = [ "tari_dan_common_types", "tari_utilities", "thiserror", - "tonic 0.8.3", + "tonic 0.12.3", "ts-rs", "url", ] @@ -8750,11 +9079,10 @@ dependencies = [ [[package]] name = "tari_common" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", - "blake2", "cargo_toml", "config", "dirs-next 1.0.2", @@ -8769,7 +9097,6 @@ dependencies = [ "serde_yaml", "sha2", "structopt", - "tari_crypto", "tari_features", "tempfile", "thiserror", @@ -8778,8 +9105,8 @@ dependencies = [ [[package]] name = "tari_common_sqlite" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "diesel", "diesel_migrations", @@ -8792,8 +9119,8 @@ dependencies = [ [[package]] name = "tari_common_types" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "base64 0.21.7", "bitflags 2.6.0", @@ -8802,6 +9129,7 @@ dependencies = [ "bs58 0.5.1", "chacha20poly1305", "digest", + "minotari_ledger_wallet_common", "newtype-ops", "once_cell", "primitive-types", @@ -8817,28 +9145,28 @@ dependencies = [ [[package]] name = "tari_comms" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", "async-trait", "bitflags 2.6.0", "blake2", - "bytes 1.6.1", + "bytes 1.8.0", "chrono", "cidr", "data-encoding", "derivative", "digest", - "futures 0.3.30", + "futures 0.3.31", "lmdb-zero", "log", "log-mdc", "multiaddr 0.14.0", "nom", "once_cell", - "pin-project 1.1.5", - "prost 0.11.9", + "pin-project 1.1.6", + "prost 0.13.3", "rand", "serde", "serde_derive", @@ -8853,7 +9181,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util 0.6.10", - "tower", + "tower 0.4.13", "tracing", "yamux 0.13.3", "zeroize", @@ -8861,8 +9189,8 @@ dependencies = [ [[package]] name = "tari_comms_dht" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", "bitflags 2.6.0", @@ -8873,11 +9201,11 @@ dependencies = [ "diesel", "diesel_migrations", "digest", - "futures 0.3.30", + "futures 0.3.31", "log", "log-mdc", "pin-project 0.4.30", - "prost 0.11.9", + "prost 0.13.3", "rand", "serde", "tari_common", @@ -8890,14 +9218,14 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", - "tower", + "tower 0.4.13", "zeroize", ] [[package]] name = "tari_comms_rpc_macros" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "proc-macro2", "quote", @@ -8910,7 +9238,7 @@ version = "0.7.0" dependencies = [ "anyhow", "async-trait", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", "serde", "tari_common", @@ -8929,17 +9257,17 @@ dependencies = [ [[package]] name = "tari_contacts" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "chrono", "diesel", "diesel_migrations", - "futures 0.3.30", + "futures 0.3.31", "log", "num-derive", "num-traits", - "prost 0.11.9", + "prost 0.13.3", "rand", "serde", "serde_json", @@ -8949,20 +9277,21 @@ dependencies = [ "tari_comms", "tari_comms_dht", "tari_crypto", + "tari_max_size", "tari_p2p", "tari_service_framework", "tari_shutdown", "tari_utilities", "thiserror", "tokio", - "tower", - "uuid 1.10.0", + "tower 0.4.13", + "uuid 1.11.0", ] [[package]] name = "tari_core" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "async-trait", "bincode 1.3.3", @@ -8975,13 +9304,15 @@ dependencies = [ "decimal-rs", "derivative", "digest", + "dirs-next 1.0.2", "fs2", - "futures 0.3.30", + "futures 0.3.31", "hex", "integer-encoding", "lmdb-zero", "log", "log-mdc", + "minotari_ledger_wallet_comms", "monero", "newtype-ops", "num-derive", @@ -8989,7 +9320,7 @@ dependencies = [ "num-traits", "once_cell", "primitive-types", - "prost 0.11.9", + "prost 0.13.3", "rand", "randomx-rs", "serde", @@ -9010,6 +9341,7 @@ dependencies = [ "tari_features", "tari_hashing", "tari_key_manager", + "tari_max_size", "tari_mmr", "tari_p2p", "tari_script", @@ -9026,9 +9358,9 @@ dependencies = [ [[package]] name = "tari_crypto" -version = "0.20.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b761f7cf1754eb2223286c9d437c81737526f393f09f69b2456bf49ba25a5b" +checksum = "f2c126518e7d09ec8a95de51921c17430b85b3a729375310326bb95cfaa1d12b" dependencies = [ "blake2", "borsh", @@ -9054,12 +9386,12 @@ version = "0.7.0" dependencies = [ "anyhow", "async-trait", - "bytes 1.6.1", + "bytes 1.8.0", "cacache", "chrono", "config", - "dashmap", - "futures 0.3.30", + "dashmap 5.5.3", + "futures 0.3.31", "json5", "libp2p-identity", "log", @@ -9104,7 +9436,7 @@ version = "0.7.0" dependencies = [ "blake2", "ethnum", - "indexmap 2.5.0", + "indexmap 2.6.0", "libp2p-identity", "newtype-ops", "prost 0.12.6", @@ -9132,7 +9464,7 @@ dependencies = [ "cargo_toml", "d3ne", "env_logger 0.10.2", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", "rand", "semver", @@ -9183,7 +9515,7 @@ version = "0.7.0" dependencies = [ "anyhow", "chrono", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", "rand", "serde", @@ -9257,6 +9589,7 @@ dependencies = [ "chacha20poly1305", "digest", "rand", + "serde_json", "tari_crypto", "tari_engine_types", "tari_hashing", @@ -9272,12 +9605,12 @@ name = "tari_dan_wallet_daemon" version = "0.7.0" dependencies = [ "anyhow", - "axum", + "axum 0.6.20", "axum-jrpc", "base64 0.20.0", "clap 3.2.25", "config", - "futures 0.3.30", + "futures 0.3.31", "humantime-serde", "include_dir", "libsqlite3-sys", @@ -9377,7 +9710,7 @@ dependencies = [ "blake2", "digest", "hex", - "indexmap 2.5.0", + "indexmap 2.6.0", "lazy_static", "rand", "serde", @@ -9415,8 +9748,8 @@ dependencies = [ [[package]] name = "tari_features" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" [[package]] name = "tari_generate" @@ -9437,8 +9770,8 @@ dependencies = [ [[package]] name = "tari_hashing" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "borsh", "digest", @@ -9452,13 +9785,13 @@ dependencies = [ "anyhow", "async-graphql", "async-graphql-axum", - "axum", + "axum 0.6.20", "axum-jrpc", "clap 3.2.25", "config", "diesel", "diesel_migrations", - "futures 0.3.30", + "futures 0.3.31", "include_dir", "libp2p", "log", @@ -9523,7 +9856,7 @@ name = "tari_indexer_lib" version = "0.7.0" dependencies = [ "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "rand", "serde", @@ -9540,8 +9873,8 @@ dependencies = [ [[package]] name = "tari_key_manager" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "argon2", "async-trait", @@ -9554,7 +9887,7 @@ dependencies = [ "diesel", "diesel_migrations", "digest", - "futures 0.3.30", + "futures 0.3.31", "log", "rand", "serde", @@ -9573,13 +9906,12 @@ dependencies = [ [[package]] name = "tari_libtor" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "derivative", "libtor", "log", - "openssl", "rand", "tari_common", "tari_p2p", @@ -9587,10 +9919,21 @@ dependencies = [ "tor-hash-passwd", ] +[[package]] +name = "tari_max_size" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" +dependencies = [ + "borsh", + "serde", + "tari_utilities", + "thiserror", +] + [[package]] name = "tari_metrics" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "once_cell", "prometheus", @@ -9599,14 +9942,13 @@ dependencies = [ [[package]] name = "tari_mmr" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "borsh", "digest", "log", "serde", - "tari_common", "tari_crypto", "tari_utilities", "thiserror", @@ -9630,19 +9972,21 @@ dependencies = [ [[package]] name = "tari_p2p" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", "fs2", - "futures 0.3.30", + "futures 0.3.31", + "hickory-client", + "hickory-resolver 0.25.0-alpha.2", "lmdb-zero", "log", "pgp", - "prost 0.11.9", + "prost 0.13.3", "rand", "reqwest", - "rustls 0.20.9", + "rustls 0.23.15", "semver", "serde", "tari_common", @@ -9656,9 +10000,8 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tower", - "trust-dns-client", - "webpki", + "tower 0.4.13", + "webpki-roots 0.26.6", ] [[package]] @@ -9667,13 +10010,13 @@ version = "0.7.0" dependencies = [ "async-trait", "bitflags 2.6.0", - "bytes 1.6.1", - "futures 0.3.30", + "bytes 1.8.0", + "futures 0.3.31", "libp2p", "libp2p-substream", "log", "once_cell", - "pin-project 1.1.5", + "pin-project 1.1.6", "prost 0.12.6", "prost-build 0.12.6", "proto_builder", @@ -9681,8 +10024,8 @@ dependencies = [ "tari_shutdown", "thiserror", "tokio", - "tokio-util 0.7.11", - "tower", + "tokio-util 0.7.12", + "tower 0.4.13", "tracing", ] @@ -9701,7 +10044,7 @@ version = "0.7.0" dependencies = [ "anyhow", "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "tari_common", "tari_consensus", @@ -9733,8 +10076,8 @@ dependencies = [ [[package]] name = "tari_script" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "blake2", "borsh", @@ -9744,18 +10087,19 @@ dependencies = [ "sha2", "sha3", "tari_crypto", + "tari_max_size", "tari_utilities", "thiserror", ] [[package]] name = "tari_service_framework" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "anyhow", "async-trait", - "futures 0.3.30", + "futures 0.3.31", "log", "tari_shutdown", "thiserror", @@ -9765,10 +10109,10 @@ dependencies = [ [[package]] name = "tari_shutdown" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", ] [[package]] @@ -9776,11 +10120,11 @@ name = "tari_signaling_server" version = "0.7.0" dependencies = [ "anyhow", - "axum", + "axum 0.6.20", "axum-jrpc", "chrono", - "clap 4.5.10", - "dirs 4.0.0", + "clap 4.5.20", + "dirs", "jsonwebtoken", "log", "serde", @@ -9803,7 +10147,7 @@ dependencies = [ "diesel", "diesel_migrations", "hex", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", "rand", "serde", @@ -9824,7 +10168,7 @@ name = "tari_state_tree" version = "0.7.0" dependencies = [ "hex", - "indexmap 2.5.0", + "indexmap 2.6.0", "itertools 0.11.0", "log", "serde", @@ -9838,8 +10182,8 @@ dependencies = [ [[package]] name = "tari_storage" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ "bincode 1.3.3", "lmdb-zero", @@ -9865,12 +10209,12 @@ version = "0.7.0" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.6.20", "axum-jrpc", "base64 0.22.1", "clap 3.2.25", "fern", - "futures 0.3.30", + "futures 0.3.31", "humantime 2.1.0", "include_dir", "json5", @@ -9895,8 +10239,8 @@ dependencies = [ "tari_wallet_daemon_client", "thiserror", "tokio", - "toml 0.8.15", - "tonic 0.8.3", + "toml 0.8.19", + "tonic 0.12.3", "tower-http", "url", ] @@ -9967,10 +10311,10 @@ dependencies = [ [[package]] name = "tari_test_utils" -version = "1.0.0-dan.16" -source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#35573840c3b40f7e87b4021f8bed754be8e859cf" +version = "1.7.0-pre.3" +source = "git+https://github.com/tari-project/tari.git?branch=feature-dan2#9012114a0a049369014d2ee00505cbabf0fad5c6" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "rand", "tari_comms", "tari_shutdown", @@ -9982,7 +10326,7 @@ dependencies = [ name = "tari_transaction" version = "0.7.0" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "rand", "serde", "tari_common_types", @@ -10008,11 +10352,11 @@ dependencies = [ [[package]] name = "tari_utilities" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1bb0e5d1d812f2be2d6ad861caad68f75adb5b2e8376264850300deb16ddc7" +checksum = "539470532a8ca1a8a1aa26f6240586f7d0f7d90ab94ae67f092bcd75a1bb4060" dependencies = [ - "base58-monero 0.3.2", + "base58-monero", "base64 0.13.1", "bincode 1.3.3", "borsh", @@ -10031,13 +10375,13 @@ version = "0.7.0" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.6.20", "axum-jrpc", "clap 3.2.25", "config", - "futures 0.3.30", + "futures 0.3.31", "include_dir", - "indexmap 2.5.0", + "indexmap 2.6.0", "json5", "libp2p", "libsqlite3-sys", @@ -10091,7 +10435,7 @@ version = "0.7.0" dependencies = [ "anyhow", "clap 3.2.25", - "dirs 4.0.0", + "dirs", "jfs", "log", "multiaddr 0.18.1", @@ -10194,8 +10538,8 @@ dependencies = [ "tari_crypto", "tari_shutdown", "tokio", - "toml 0.8.15", - "tonic 0.8.3", + "toml 0.8.19", + "tonic 0.12.3", "url", ] @@ -10204,7 +10548,7 @@ name = "tariswap_bench" version = "0.7.0" dependencies = [ "anyhow", - "clap 4.5.10", + "clap 4.5.20", "fern", "log", "tari_crypto", @@ -10223,14 +10567,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", - "fastrand 2.1.0", - "rustix 0.38.34", - "windows-sys 0.52.0", + "fastrand 2.1.1", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] @@ -10255,12 +10600,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ - "rustix 0.38.34", - "windows-sys 0.48.0", + "rustix", + "windows-sys 0.59.0", ] [[package]] @@ -10285,22 +10630,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -10400,18 +10745,18 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", - "bytes 1.6.1", + "bytes 1.8.0", "libc", - "mio 1.0.1", + "mio 1.0.2", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "tracing", "windows-sys 0.52.0", @@ -10435,7 +10780,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -10450,35 +10795,35 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.20.9", + "rustls 0.21.12", "tokio", - "webpki", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.21.12", + "rustls 0.23.15", + "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", ] [[package]] @@ -10499,7 +10844,7 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "futures-core", "futures-io", "futures-sink", @@ -10510,11 +10855,11 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "futures-core", "futures-io", "futures-sink", @@ -10533,132 +10878,94 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.16", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.5.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" -dependencies = [ - "indexmap 2.5.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.15", + "winnow", ] [[package]] name = "tonic" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ - "async-stream", "async-trait", - "axum", - "base64 0.13.1", - "bytes 1.6.1", + "axum 0.6.20", + "base64 0.21.7", + "bytes 1.8.0", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-timeout", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", + "hyper-timeout 0.4.1", "percent-encoding", - "pin-project 1.1.5", + "pin-project 1.1.6", "prost 0.11.9", - "prost-derive 0.11.9", - "rustls-native-certs", - "rustls-pemfile 1.0.4", "tokio", - "tokio-rustls 0.23.4", "tokio-stream", - "tokio-util 0.7.11", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tonic" -version = "0.9.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ + "async-stream", "async-trait", - "axum", - "base64 0.21.7", - "bytes 1.6.1", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-timeout", + "axum 0.7.7", + "base64 0.22.1", + "bytes 1.8.0", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.0", + "hyper-timeout 0.5.1", + "hyper-util", "percent-encoding", - "pin-project 1.1.5", - "prost 0.11.9", + "pin-project 1.1.6", + "prost 0.13.3", + "rustls-native-certs", + "rustls-pemfile 2.2.0", + "socket2", "tokio", + "tokio-rustls 0.26.0", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -10666,15 +10973,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.8.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ - "prettyplease 0.1.25", + "prettyplease 0.2.25", "proc-macro2", - "prost-build 0.11.9", + "prost-build 0.13.3", + "prost-types 0.13.3", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] @@ -10700,17 +11008,31 @@ dependencies = [ "futures-util", "hdrhistogram", "indexmap 1.9.3", - "pin-project 1.1.5", + "pin-project 1.1.6", "pin-project-lite", "rand", "slab", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-layer", "tower-service", "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.4.4" @@ -10718,11 +11040,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "bitflags 2.6.0", - "bytes 1.6.1", + "bytes 1.8.0", "futures-core", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "http-range-header", "httpdate", "mime", @@ -10730,7 +11052,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-layer", "tower-service", "tracing", @@ -10738,15 +11060,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -10768,7 +11090,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -10787,7 +11109,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 1.1.5", + "pin-project 1.1.6", "tracing", ] @@ -10812,9 +11134,9 @@ version = "0.7.0" dependencies = [ "anyhow", "bincode 2.0.0-rc.3", - "bytes 1.6.1", - "clap 4.5.10", - "indexmap 2.5.0", + "bytes 1.8.0", + "clap 4.5.20", + "indexmap 2.6.0", "once_cell", "rand", "rayon", @@ -10833,7 +11155,7 @@ name = "transaction_submitter" version = "0.7.0" dependencies = [ "anyhow", - "clap 4.5.10", + "clap 4.5.20", "tari_dan_common_types", "tari_transaction", "tari_validator_node_client", @@ -10843,62 +11165,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" - -[[package]] -name = "trust-dns-client" -version = "0.21.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dfcea87b25f0810e2a527458dd621e252fd8a5827153329308d6e1f252d68" -dependencies = [ - "cfg-if", - "data-encoding", - "futures-channel", - "futures-util", - "lazy_static", - "log", - "radix_trie", - "rand", - "ring 0.16.20", - "rustls 0.20.9", - "thiserror", - "time", - "tokio", - "trust-dns-proto", - "webpki", -] - -[[package]] -name = "trust-dns-proto" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner 0.4.0", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand", - "ring 0.16.20", - "rustls 0.20.9", - "rustls-pemfile 0.3.0", - "smallvec 1.13.2", - "thiserror", - "tinyvec", - "tokio", - "tokio-rustls 0.23.4", - "url", - "webpki", -] +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" [[package]] name = "try-lock" @@ -10913,7 +11182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2cae1fc5d05d47aa24b64f9a4f7cba24cdc9187a2084dd97ac57bef5eccae6" dependencies = [ "chrono", - "indexmap 2.5.0", + "indexmap 2.6.0", "thiserror", "ts-rs-macros", ] @@ -10927,7 +11196,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "termcolor", ] @@ -10951,9 +11220,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", - "bytes 1.6.1", + "bytes 1.8.0", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand", @@ -10971,7 +11240,7 @@ checksum = "ffb2ac4f331064513ad510b7a36edc0df555bd61672986607f7c9ff46f98f415" dependencies = [ "async-trait", "base64 0.21.7", - "futures 0.3.30", + "futures 0.3.31", "log", "md-5", "rand", @@ -10979,7 +11248,7 @@ dependencies = [ "stun", "thiserror", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "webrtc-util", ] @@ -11009,7 +11278,7 @@ checksum = "29a3151c41d0b13e3d011f98adc24434560ef06673a155a6c7f66b9879eecce2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -11029,9 +11298,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -11047,24 +11316,21 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-linebreak" @@ -11074,30 +11340,30 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" @@ -11189,9 +11455,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -11204,9 +11470,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "vcpkg" @@ -11222,9 +11488,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "virtue" @@ -11300,34 +11566,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -11337,9 +11604,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -11347,101 +11614,100 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-encoder" -version = "0.214.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] [[package]] name = "wasmer" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea8d8361c9d006ea3d7797de7bd6b1492ffd0f91a22430cfda6c1658ad57bedf" +checksum = "2d920d06243e9f456c336c428a34560357dedf59d9febaae14f1995ac120cff6" dependencies = [ + "bytes 1.8.0", "cfg-if", + "derivative", "indexmap 1.9.3", "js-sys", - "loupe", "more-asserts", + "rustc-demangle", + "serde", + "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", - "wasmer-artifact", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", - "wasmer-engine", - "wasmer-engine-dylib", - "wasmer-engine-universal", "wasmer-types", "wasmer-vm", "wat", - "winapi", -] - -[[package]] -name = "wasmer-artifact" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aaf9428c29c1d8ad2ac0e45889ba8a568a835e33fd058964e5e500f2f7ce325" -dependencies = [ - "enumset", - "loupe", - "thiserror", - "wasmer-compiler", - "wasmer-types", + "windows-sys 0.59.0", ] [[package]] name = "wasmer-compiler" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67a6cd866aed456656db2cfea96c18baabbd33f676578482b85c51e1ee19d2c" +checksum = "0e01832173aa52345e480965f18c638a8a5a9e5e4d85a48675bdf1964147dc7f" dependencies = [ + "backtrace", + "bytes 1.8.0", + "cfg-if", + "enum-iterator", "enumset", - "loupe", + "lazy_static", + "leb128", + "libc", + "memmap2 0.6.2", + "more-asserts", + "region", "rkyv", - "serde", - "serde_bytes", + "self_cell", + "shared-buffer", "smallvec 1.13.2", - "target-lexicon", "thiserror", "wasmer-types", + "wasmer-vm", "wasmparser", + "windows-sys 0.59.0", + "xxhash-rust", ] [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48be2f9f6495f08649e4f8b946a2cbbe119faf5a654aa1457f9504a99d23dae0" +checksum = "1c1618f53b492cf6649beeb372930e376e0f52d9842c0c5eb5aa2b548251dab6" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "gimli 0.26.2", - "loupe", "more-asserts", "rayon", "smallvec 1.13.2", @@ -11453,9 +11719,9 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e50405cc2a2f74ff574584710a5f2c1d5c93744acce2ca0866084739284b51" +checksum = "9c5875633aea92153b6a561cb07363785ca9e07792ca6cd7c1cc371761001d8f" dependencies = [ "proc-macro-error", "proc-macro2", @@ -11463,172 +11729,82 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "wasmer-engine" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f98f010978c244db431b392aeab0661df7ea0822343334f8f2a920763548e45" -dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", -] - -[[package]] -name = "wasmer-engine-dylib" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0358af9c154724587731175553805648d9acb8f6657880d165e378672b7e53" -dependencies = [ - "cfg-if", - "enum-iterator", - "enumset", - "leb128", - "libloading", - "loupe", - "object 0.28.4", - "rkyv", - "serde", - "tempfile", - "tracing", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] - -[[package]] -name = "wasmer-engine-universal" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "440dc3d93c9ca47865a4f4edd037ea81bf983b5796b59b3d712d844b32dbef15" -dependencies = [ - "cfg-if", - "enumset", - "leb128", - "loupe", - "region", - "rkyv", - "wasmer-compiler", - "wasmer-engine", - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-vm", - "winapi", -] - -[[package]] -name = "wasmer-engine-universal-artifact" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f1db3f54152657eb6e86c44b66525ff7801dad8328fe677da48dd06af9ad41" -dependencies = [ - "enum-iterator", - "enumset", - "loupe", - "rkyv", - "thiserror", - "wasmer-artifact", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-middlewares" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7812438ed2f37203a37007cdb5332b8475cb2b16e15d51299b2647894e9ed3a" +checksum = "b88a9e1deb02d6547ac672ffcea9fd0c63d725047883282a8b2a297a4819bd81" dependencies = [ - "loupe", "wasmer", "wasmer-types", "wasmer-vm", ] -[[package]] -name = "wasmer-object" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d831335ff3a44ecf451303f6f891175c642488036b92ceceb24ac8623a8fa8b" -dependencies = [ - "object 0.28.4", - "thiserror", - "wasmer-compiler", - "wasmer-types", -] - [[package]] name = "wasmer-types" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39df01ea05dc0a9bab67e054c7cb01521e53b35a7bb90bd02eca564ed0b2667f" +checksum = "8fb32f0d231b591e4c8a65e81d4647fa3180496d71a123d4948dba8551bba9c2" dependencies = [ - "backtrace", + "bytecheck", "enum-iterator", + "enumset", + "getrandom", + "hex", "indexmap 1.9.3", - "loupe", "more-asserts", "rkyv", - "serde", + "sha2", + "target-lexicon", "thiserror", + "xxhash-rust", ] [[package]] name = "wasmer-vm" -version = "2.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d965fa61f4dc4cdb35a54daaf7ecec3563fbb94154a6c35433f879466247dd" +checksum = "e38e9301f5bb9f18da9cda4002d74d2cb6ac1f36dcf919fd77f91fca321fb1e5" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", + "crossbeam-queue", + "dashmap 6.1.0", + "derivative", "enum-iterator", + "fnv", "indexmap 1.9.3", "lazy_static", "libc", - "loupe", - "mach", - "memoffset 0.6.5", + "mach2", + "memoffset 0.9.1", "more-asserts", "region", - "rkyv", "scopeguard", - "serde", "thiserror", - "wasmer-artifact", "wasmer-types", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "wasmparser" -version = "0.83.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +dependencies = [ + "bitflags 2.6.0", + "indexmap 2.6.0", + "semver", +] [[package]] name = "wast" -version = "214.0.0" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694bcdb24c49c8709bd8713768b71301a11e823923eee355d530f1d8d0a7f8e9" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ - "bumpalo", "leb128", "memchr", "unicode-width", @@ -11637,18 +11813,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.214.0" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347249eb56773fa728df2656cfe3a8c19437ded61a922a0b5e0839d9790e278e" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -11665,20 +11841,19 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.22.4" +name = "webpki-roots" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "webrtc" @@ -11688,14 +11863,14 @@ checksum = "d91e7cf018f7185552bf6a5dd839f4ed9827aea33b746763c9a215f84a0d0b34" dependencies = [ "arc-swap", "async-trait", - "bytes 1.6.1", + "bytes 1.8.0", "cfg-if", "hex", "interceptor", "lazy_static", "log", "rand", - "rcgen", + "rcgen 0.11.3", "regex", "ring 0.16.20", "rtcp", @@ -11729,7 +11904,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c08e648e10572b9edbe741074e0f4d3cb221aa7cdf9a814ee71606de312f33" dependencies = [ - "bytes 1.6.1", + "bytes 1.8.0", "log", "thiserror", "tokio", @@ -11758,7 +11933,7 @@ dependencies = [ "p384", "rand", "rand_core", - "rcgen", + "rcgen 0.11.3", "ring 0.16.20", "rustls 0.21.12", "sec1", @@ -11791,7 +11966,7 @@ dependencies = [ "tokio", "turn", "url", - "uuid 1.10.0", + "uuid 1.11.0", "waitgroup", "webrtc-mdns", "webrtc-util", @@ -11804,7 +11979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce981f93104a8debb3563bb0cedfe4aa2f351fdf6b53f346ab50009424125c08" dependencies = [ "log", - "socket2 0.5.7", + "socket2", "thiserror", "tokio", "webrtc-util", @@ -11817,7 +11992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "280017b6b9625ef7329146332518b339c3cceff231cc6f6a9e0e6acab25ca4af" dependencies = [ "byteorder", - "bytes 1.6.1", + "bytes 1.8.0", "rand", "rtp 0.10.0", "thiserror", @@ -11831,7 +12006,7 @@ checksum = "df75ec042002fe995194712cbeb2029107a60a7eab646f1b789eb1be94d0e367" dependencies = [ "arc-swap", "async-trait", - "bytes 1.6.1", + "bytes 1.8.0", "crc", "log", "rand", @@ -11850,7 +12025,7 @@ dependencies = [ "aes", "aes-gcm", "byteorder", - "bytes 1.6.1", + "bytes 1.8.0", "ctr", "hmac", "log", @@ -11871,7 +12046,7 @@ checksum = "5e85154ef743d9a2a116d104faaaa82740a281b8b4bed5ee691a2df6c133d873" dependencies = [ "async-trait", "bitflags 1.3.2", - "bytes 1.6.1", + "bytes 1.8.0", "ipnet", "lazy_static", "libc", @@ -11892,7 +12067,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.34", + "rustix", ] [[package]] @@ -11919,11 +12094,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11991,7 +12166,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -12002,7 +12177,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -12055,6 +12230,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -12208,18 +12392,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.15" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -12279,12 +12454,12 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ - "asn1-rs 0.6.1", + "asn1-rs 0.6.2", "data-encoding", "der-parser 9.0.0", "lazy_static", "nom", - "oid-registry 0.7.0", + "oid-registry 0.7.1", "rusticata-macros", "thiserror", "time", @@ -12292,9 +12467,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "xmltree" @@ -12307,17 +12482,19 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63658493314859b4dfdf3fb8c1defd61587839def09582db50b8a4e93afca6bb" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yaml-rust2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "8902160c4e6f2fb145dbe9d6760a75e3c9522d8bf796ed7047c85919ac7115f8" dependencies = [ - "linked-hash-map", + "arraydeque", + "encoding_rs", + "hashlink", ] [[package]] @@ -12326,11 +12503,11 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "nohash-hasher", "parking_lot 0.12.3", - "pin-project 1.1.5", + "pin-project 1.1.6", "rand", "static_assertions", ] @@ -12341,11 +12518,11 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a31b5e376a8b012bee9c423acdbb835fc34d45001cfa3106236a624e4b738028" dependencies = [ - "futures 0.3.30", + "futures 0.3.31", "log", "nohash-hasher", "parking_lot 0.12.3", - "pin-project 1.1.5", + "pin-project 1.1.6", "rand", "static_assertions", "web-time", @@ -12366,6 +12543,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -12377,7 +12555,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -12397,7 +12575,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 6625f66fa..543b0f281 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,14 +124,35 @@ tari_hashing = { git = "https://github.com/tari-project/tari.git", branch = "fea # avoid including default features so each crate can choose which ones to import tari_core = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2", default-features = false } -tari_crypto = "0.20.0" tari_key_manager = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } tari_metrics = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } tari_mmr = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } tari_p2p = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } tari_shutdown = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } tari_storage = { git = "https://github.com/tari-project/tari.git", branch = "feature-dan2" } -tari_utilities = "0.7.0" + +#minotari_app_grpc = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_app_utilities = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_console_wallet = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_node = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_node_grpc_client = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_wallet = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#minotari_wallet_grpc_client = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_common = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_common_types = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_hashing = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +# +## avoid including default features so each crate can choose which ones to import +#tari_core = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2", default-features = false } +#tari_key_manager = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_metrics = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_mmr = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_p2p = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_shutdown = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } +#tari_storage = { git = "https://github.com/sdbondi/tari.git", branch = "update-feature-dan2" } + +tari_crypto = "0.21.0" +tari_utilities = "0.8.0" # third-party dependencies anyhow = "1.0.75" @@ -162,8 +183,8 @@ convert_case = "0.6.0" cucumber = "0.21.0" d3ne = { git = "https://github.com/stringhandler/d3ne-rs.git", tag = "v0.8.0-pre.3" } dashmap = "5.5.0" -diesel = { version = "<=2.1.6", default-features = false } -diesel_migrations = "<=2.1.0" +diesel = { version = "2.2.4", default-features = false } +diesel_migrations = "2.2.0" digest = "0.10" dirs = "4.0.0" env_logger = "0.10.0" @@ -185,8 +206,8 @@ indoc = "1.0.6" itertools = "0.11.0" lazy_static = "1.4.0" # Use Tari's libp2p fork that adds support for Schnorr-Ristretto -libp2p-identity = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "0dccc6ca09651f6cc76ca08c58c31e34626d26c4" } -libp2p = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "0dccc6ca09651f6cc76ca08c58c31e34626d26c4" } +libp2p-identity = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "3d918ccbf5ae1cbec0815a2156079b0fba4ba558" } +libp2p = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "3d918ccbf5ae1cbec0815a2156079b0fba4ba558" } #libp2p = "0.53.1" #libp2p-identity = "0.2.8" libsqlite3-sys = "0.25" @@ -196,7 +217,7 @@ log = "0.4.20" log4rs = "1.3" mime_guess = "2.0.4" mini-moka = "0.10.0" -multiaddr = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "0dccc6ca09651f6cc76ca08c58c31e34626d26c4" } +multiaddr = { git = "https://github.com/tari-project/rust-libp2p.git", rev = "3d918ccbf5ae1cbec0815a2156079b0fba4ba558" } #multiaddr = "0.18" newtype-ops = "0.1.4" once_cell = "1.18.0" @@ -226,7 +247,7 @@ time = "0.3.15" tokio = { version = "1.34", default-features = false } tokio-stream = "0.1.7" tokio-util = "0.7.10" -tonic = "0.8.3" +tonic = "0.12.3" tower = "0.4" tower-http = { version = "0.4", default-features = false } tower-layer = "0.3" @@ -238,8 +259,8 @@ ts-rs = { version = "7.1", features = [ ] } url = "2.4.1" urlencoding = "2.1.3" -wasmer = "2.3.0" -wasmer-middlewares = "2.3.0" +wasmer = "4.4.0" +wasmer-middlewares = "4.4.0" webrtc = "0.9.0" zeroize = "1" @@ -273,3 +294,6 @@ overflow-checks = true #minotari_app_utilities = { git = "https://github.com/account/tari.git", branch = "my-branch" } #minotari_node = { git = "https://github.com/account/tari.git", branch = "my-branch" } #tari_metrics = { git = "https://github.com/account/tari.git", branch = "my-branch" } +#tari_libtor = { git = "https://github.com/account/tari.git", branch = "my-branch" } +#tari_hashing = { git = "https://github.com/account/tari.git", branch = "my-branch" } + diff --git a/applications/tari_dan_app_utilities/src/base_layer_scanner.rs b/applications/tari_dan_app_utilities/src/base_layer_scanner.rs index 1a7bacabb..6a26f12ac 100644 --- a/applications/tari_dan_app_utilities/src/base_layer_scanner.rs +++ b/applications/tari_dan_app_utilities/src/base_layer_scanner.rs @@ -393,7 +393,7 @@ impl BaseLayerScanner { output_hash, output.commitment.as_public_key() ); - self.register_burnt_utxo(&output, &block_info).await?; + self.register_burnt_utxo(output, &block_info).await?; }, } } @@ -432,7 +432,7 @@ impl BaseLayerScanner { async fn register_burnt_utxo( &mut self, - output: &TransactionOutput, + output: TransactionOutput, block_info: &BlockInfo, ) -> Result<(), BaseLayerScannerError> { let substate_id = SubstateId::UnclaimedConfidentialOutput( @@ -458,18 +458,16 @@ impl BaseLayerScanner { return Ok(()); } - let encrypted_data_bytes = output.encrypted_data.as_bytes(); - if encrypted_data_bytes.len() < EncryptedData::size() { - return Err(BaseLayerScannerError::InvalidSideChainUtxoResponse( - "Encrypted data is the incorrect size".to_string(), - )); - } + let encrypted_data_bytes = output.encrypted_data.into_byte_vec(); + let encrypted_data = EncryptedData::try_from(encrypted_data_bytes).map_err(|len| { + BaseLayerScannerError::InvalidSideChainUtxoResponse(format!( + "Encrypted data incorrect length of bytes: {len}" + )) + })?; let substate = SubstateValue::UnclaimedConfidentialOutput(UnclaimedConfidentialOutput { commitment: output.commitment.clone(), - encrypted_data: EncryptedData::try_from(&encrypted_data_bytes[..EncryptedData::size()]).map_err(|_| { - BaseLayerScannerError::InvalidSideChainUtxoResponse("Encrypted data has too few bytes".to_string()) - })?, + encrypted_data, }); info!( diff --git a/applications/tari_dan_app_utilities/src/configuration.rs b/applications/tari_dan_app_utilities/src/configuration.rs index fcae3f3e5..7394bcd47 100644 --- a/applications/tari_dan_app_utilities/src/configuration.rs +++ b/applications/tari_dan_app_utilities/src/configuration.rs @@ -1,7 +1,5 @@ // Copyright 2024 The Tari Project // SPDX-License-Identifier: BSD-3-Clause -// Copyright 2022 The Tari Project -// SPDX-License-Identifier: BSD-3-Clause use std::{ fs, @@ -24,6 +22,7 @@ pub fn load_configuration, TOverride: ConfigOverrideProvider>( config_path: P, create_if_not_exists: bool, overrides: &TOverride, + network_override: Option, ) -> Result { debug!( target: LOG_TARGET, @@ -35,13 +34,14 @@ pub fn load_configuration, TOverride: ConfigOverrideProvider>( write_config_to(&config_path, &sources)?; } - load_configuration_with_overrides(config_path, overrides) + load_configuration_with_overrides(config_path, overrides, network_override) } /// Loads the config at the given path applying all overrides. pub fn load_configuration_with_overrides, TOverride: ConfigOverrideProvider>( config_path: P, overrides: &TOverride, + network_override: Option, ) -> Result { let filename = config_path .as_ref() @@ -57,27 +57,26 @@ pub fn load_configuration_with_overrides, TOverride: ConfigOverri .separator("__"), ) .build()?; - - let mut network = match cfg.get_string("network") { - Ok(network) => { - Network::from_str(&network).map_err(|e| ConfigError::new("Invalid network", Some(e.to_string())))? - }, - Err(config::ConfigError::NotFound(_)) => { - debug!(target: LOG_TARGET, "No network configuration found. Using default network '{}'.", Network::default()); - Network::default() - }, - Err(e) => { - return Err(ConfigError::new( - "Could not get network configuration", - Some(e.to_string()), - )); + let network = match network_override { + Some(network) => network, + None => match cfg.get_string("network") { + Ok(network) => { + Network::from_str(&network).map_err(|e| ConfigError::new("Invalid network", Some(e.to_string())))? + }, + Err(config::ConfigError::NotFound(_)) => { + debug!(target: LOG_TARGET, "No network configuration found. Using default network '{}'.", Network::default()); + Network::default() + }, + Err(e) => { + return Err(ConfigError::new( + "Could not get network configuration", + Some(e.to_string()), + )); + }, }, }; - let overrides = overrides.get_config_property_overrides(&mut network); - if overrides.is_empty() { - return Ok(cfg); - } + let overrides = overrides.get_config_property_overrides(&network); let mut cfg = Config::builder().add_source(cfg); for (key, value) in overrides { @@ -85,6 +84,9 @@ pub fn load_configuration_with_overrides, TOverride: ConfigOverri .set_override(key.as_str(), value.as_str()) .map_err(|ce| ConfigError::new("Could not override config property", Some(ce.to_string())))?; } + cfg = cfg + .set_override("network", network.to_string()) + .map_err(|ce| ConfigError::new("Could not override config property", Some(ce.to_string())))?; let cfg = cfg .build() .map_err(|ce| ConfigError::new("Could not build config", Some(ce.to_string())))?; diff --git a/applications/tari_dan_app_utilities/src/json_encoding.rs b/applications/tari_dan_app_utilities/src/json_encoding.rs index 6f150287e..f04488fa2 100644 --- a/applications/tari_dan_app_utilities/src/json_encoding.rs +++ b/applications/tari_dan_app_utilities/src/json_encoding.rs @@ -161,7 +161,7 @@ fn fix_invalid_object_keys(value: &CborValue) -> CborValue { mod tests { use tari_common_types::types::Commitment; use tari_engine_types::{confidential::ConfidentialOutput, resource_container::ResourceContainer, vault::Vault}; - use tari_template_lib::models::{Amount, ResourceAddress}; + use tari_template_lib::models::{Amount, EncryptedData, ResourceAddress}; use super::*; @@ -173,7 +173,7 @@ mod tests { let confidential_output = ConfidentialOutput { commitment: commitment.clone(), stealth_public_nonce: commitment.as_public_key().clone(), - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), minimum_value_promise: 0, viewable_balance: None, }; diff --git a/applications/tari_dan_app_utilities/src/keypair.rs b/applications/tari_dan_app_utilities/src/keypair.rs index f7ede760b..11ad597ed 100644 --- a/applications/tari_dan_app_utilities/src/keypair.rs +++ b/applications/tari_dan_app_utilities/src/keypair.rs @@ -57,7 +57,7 @@ struct KeyPairInner { /// - `identity_file` - Reference to file path /// - `public_address` - Network address of the base node /// - `create_id` - Only applies if the identity_file does not exist or is malformed. If true, a new identity will be -/// created, otherwise the user will be prompted to create a new ID +/// created, otherwise the user will be prompted to create a new ID /// - `peer_features` - Enables features of the base node /// /// # Return diff --git a/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs b/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs index 82c6feee5..1583a0320 100644 --- a/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs +++ b/applications/tari_dan_app_utilities/src/template_manager/implementation/manager.rs @@ -20,12 +20,7 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use std::{ - collections::HashMap, - convert::{TryFrom, TryInto}, - fs, - sync::Arc, -}; +use std::{collections::HashMap, convert::TryFrom, fs, sync::Arc}; use chrono::Utc; use log::*; @@ -195,7 +190,7 @@ impl TemplateManager { let template = DbTemplate { template_name: template.template_name, template_address: template.template_address.into_array().into(), - expected_hash: template.registration.binary_sha.into_vec().try_into()?, + expected_hash: template.registration.binary_sha.as_ref().try_into()?, url: template.registration.binary_url.into_string(), height: template.mined_height, status: TemplateStatus::New, diff --git a/applications/tari_dan_app_utilities/src/template_manager/implementation/service.rs b/applications/tari_dan_app_utilities/src/template_manager/implementation/service.rs index 36dfce19d..60d46690b 100644 --- a/applications/tari_dan_app_utilities/src/template_manager/implementation/service.rs +++ b/applications/tari_dan_app_utilities/src/template_manager/implementation/service.rs @@ -235,7 +235,7 @@ impl TemplateManagerService { TemplateType::Flow => DbTemplateType::Flow, TemplateType::Manifest => DbTemplateType::Manifest, }; - let expected_binary_hash = FixedHash::try_from(template.registration.binary_sha.clone().into_vec()) + let expected_binary_hash = FixedHash::try_from(template.registration.binary_sha.as_ref()) .map_err(|_| TemplateManagerError::InvalidBaseLayerTemplate)?; self.manager.add_template(template)?; // We could queue this up much later, at which point we'd update to pending diff --git a/applications/tari_dan_app_utilities/src/template_manager/interface/types.rs b/applications/tari_dan_app_utilities/src/template_manager/interface/types.rs index 14120b900..e92ebec37 100644 --- a/applications/tari_dan_app_utilities/src/template_manager/interface/types.rs +++ b/applications/tari_dan_app_utilities/src/template_manager/interface/types.rs @@ -46,7 +46,7 @@ impl From for TemplateMetadata { name: reg.template_name, address: reg.template_address, url: reg.registration.binary_url.into_string(), - binary_sha: FixedHash::try_from(reg.registration.binary_sha.into_vec()) + binary_sha: FixedHash::try_from(reg.registration.binary_sha.as_ref()) // TODO: impl Fallible conversion .expect("binary_sha must be 32 bytes long"), height: reg.mined_height, diff --git a/applications/tari_dan_wallet_daemon/src/cli.rs b/applications/tari_dan_wallet_daemon/src/cli.rs index c7ccdc8f8..77ea16059 100644 --- a/applications/tari_dan_wallet_daemon/src/cli.rs +++ b/applications/tari_dan_wallet_daemon/src/cli.rs @@ -51,7 +51,7 @@ impl Cli { } impl ConfigOverrideProvider for Cli { - fn get_config_property_overrides(&self, network: &mut Network) -> Vec<(String, String)> { + fn get_config_property_overrides(&self, network: &Network) -> Vec<(String, String)> { let mut overrides = self.common.get_config_property_overrides(network); if let Some(json_rpc_address) = self.json_rpc_address { overrides.push(( diff --git a/applications/tari_dan_wallet_daemon/src/handlers/accounts.rs b/applications/tari_dan_wallet_daemon/src/handlers/accounts.rs index 0cd6a156a..fc83fbc1d 100644 --- a/applications/tari_dan_wallet_daemon/src/handlers/accounts.rs +++ b/applications/tari_dan_wallet_daemon/src/handlers/accounts.rs @@ -561,7 +561,13 @@ pub async fn handle_claim_burn( commitment_substate_address.version, ) .await?; - let output = output.into_unclaimed_confidential_output().unwrap(); + let output = output.into_unclaimed_confidential_output().ok_or_else(|| { + anyhow!( + "Expected the indexer to return an unclaimed confidential output substate for {}, but another substate \ + type was returned", + commitment_substate_address.substate_id + ) + })?; let unmasked_output = sdk.confidential_crypto_api().unblind_output( &output.commitment, &output.encrypted_data, @@ -581,6 +587,8 @@ pub async fn handle_claim_burn( )); } + // TODO: validate the proof_of_knowledge from the claim before submitting the transaction + let encrypted_data = sdk.confidential_crypto_api().encrypt_value_and_mask( final_amount.as_u64_checked().unwrap(), &mask.key, diff --git a/applications/tari_dan_wallet_daemon/src/handlers/rpc.rs b/applications/tari_dan_wallet_daemon/src/handlers/rpc.rs index 259bf83f4..ac3940bbe 100644 --- a/applications/tari_dan_wallet_daemon/src/handlers/rpc.rs +++ b/applications/tari_dan_wallet_daemon/src/handlers/rpc.rs @@ -32,13 +32,13 @@ pub async fn handle_login_request( ) -> Result { let jwt = context.wallet_sdk().jwt_api(); - let (auth_token, valid_till) = + let (auth_token, valid_for) = jwt.generate_auth_token(auth_request.permissions.as_slice().try_into()?, auth_request.duration)?; - context.notifier().notify(AuthLoginRequestEvent { - auth_token: auth_token.clone(), - valid_till, - }); - Ok(AuthLoginResponse { auth_token }) + context.notifier().notify(AuthLoginRequestEvent); + Ok(AuthLoginResponse { + auth_token, + valid_for_secs: valid_for.as_secs(), + }) } pub async fn handle_login_accept( diff --git a/applications/tari_dan_wallet_daemon/src/jrpc_server.rs b/applications/tari_dan_wallet_daemon/src/jrpc_server.rs index fc554e7e0..d81291a1d 100644 --- a/applications/tari_dan_wallet_daemon/src/jrpc_server.rs +++ b/applications/tari_dan_wallet_daemon/src/jrpc_server.rs @@ -198,16 +198,13 @@ where .handle( &context, token, - value.parse_params().map_err(|e| { - match &e.result { - JsonRpcAnswer::Result(_) => { - unreachable!("parse_params() error should not return a result") - }, - JsonRpcAnswer::Error(e) => { - warn!(target: LOG_TARGET, "🌐 JSON-RPC params error: {}", e); - }, - } - e + value.parse_params().inspect_err(|e| match &e.result { + JsonRpcAnswer::Result(_) => { + unreachable!("parse_params() error should not return a result") + }, + JsonRpcAnswer::Error(e) => { + warn!(target: LOG_TARGET, "🌐 JSON-RPC params error: {}", e); + }, })?, ) .await diff --git a/applications/tari_dan_wallet_daemon/src/main.rs b/applications/tari_dan_wallet_daemon/src/main.rs index 4e4f877a5..25c7f3eaf 100644 --- a/applications/tari_dan_wallet_daemon/src/main.rs +++ b/applications/tari_dan_wallet_daemon/src/main.rs @@ -42,7 +42,7 @@ async fn main() -> Result<(), anyhow::Error> { let cli = Cli::init(); let config_path = cli.common.config_path(); - let cfg = load_configuration(config_path, true, &cli)?; + let cfg = load_configuration(config_path, true, &cli, cli.common.network)?; let config = ApplicationConfig::load_from(&cfg)?; if let Some(index) = cli.derive_secret { diff --git a/applications/tari_dan_wallet_daemon/src/services/events.rs b/applications/tari_dan_wallet_daemon/src/services/events.rs index 09ba91714..d3becb3b0 100644 --- a/applications/tari_dan_wallet_daemon/src/services/events.rs +++ b/applications/tari_dan_wallet_daemon/src/services/events.rs @@ -1,8 +1,6 @@ // Copyright 2023 The Tari Project // SPDX-License-Identifier: BSD-3-Clause -use std::time::SystemTime; - use tari_dan_wallet_sdk::models::{Account, NewAccountInfo, TransactionStatus}; use tari_engine_types::{commit_result::FinalizeResult, substate::SubstateId}; use tari_template_lib::models::Amount; @@ -15,7 +13,7 @@ pub enum WalletEvent { TransactionInvalid(TransactionInvalidEvent), AccountCreated(AccountCreatedEvent), AccountChanged(AccountChangedEvent), - AuthLoginRequest(AuthLoginRequestEvent), + AuthLoginRequest(#[allow(dead_code)] AuthLoginRequestEvent), } impl From for WalletEvent { @@ -72,6 +70,7 @@ pub struct TransactionFinalizedEvent { #[derive(Debug, Clone)] pub struct AccountCreatedEvent { pub account: Account, + #[allow(dead_code)] pub created_by_tx: TransactionId, } @@ -86,11 +85,7 @@ pub struct TransactionInvalidEvent { pub status: TransactionStatus, pub finalize: Option, pub final_fee: Option, - pub is_dry_run: bool, } #[derive(Debug, Clone)] -pub struct AuthLoginRequestEvent { - pub auth_token: String, - pub valid_till: SystemTime, -} +pub struct AuthLoginRequestEvent; diff --git a/applications/tari_dan_wallet_daemon/src/services/transaction_service/service.rs b/applications/tari_dan_wallet_daemon/src/services/transaction_service/service.rs index c1870c31e..59df0057a 100644 --- a/applications/tari_dan_wallet_daemon/src/services/transaction_service/service.rs +++ b/applications/tari_dan_wallet_daemon/src/services/transaction_service/service.rs @@ -282,7 +282,6 @@ where status: transaction.status, finalize: transaction.finalize, final_fee: transaction.final_fee, - is_dry_run: transaction.is_dry_run, }), } }, diff --git a/applications/tari_indexer/src/cli.rs b/applications/tari_indexer/src/cli.rs index 510663032..c5d838696 100644 --- a/applications/tari_indexer/src/cli.rs +++ b/applications/tari_indexer/src/cli.rs @@ -67,9 +67,8 @@ impl Cli { } impl ConfigOverrideProvider for Cli { - fn get_config_property_overrides(&self, network: &mut Network) -> Vec<(String, String)> { + fn get_config_property_overrides(&self, network: &Network) -> Vec<(String, String)> { let mut overrides = self.common.get_config_property_overrides(network); - *network = self.common.network.unwrap_or(*network); overrides.push(("network".to_string(), network.to_string())); overrides.push(("indexer.override_from".to_string(), network.to_string())); overrides.push(("p2p.seeds.override_from".to_string(), network.to_string())); diff --git a/applications/tari_indexer/src/json_rpc/handlers.rs b/applications/tari_indexer/src/json_rpc/handlers.rs index 2a875e588..171400499 100644 --- a/applications/tari_indexer/src/json_rpc/handlers.rs +++ b/applications/tari_indexer/src/json_rpc/handlers.rs @@ -486,7 +486,7 @@ impl JsonRpcHandlers { return Ok(JsonRpcResponse::success(answer_id, SubmitTransactionResponse { result: IndexerTransactionFinalizedResult::Finalized { - execution_result: Some(exec_result), + execution_result: Some(Box::new(exec_result)), final_decision: Decision::Commit, abort_details: None, finalized_time: Default::default(), @@ -648,7 +648,7 @@ impl JsonRpcHandlers { GetTransactionResultResponse { result: IndexerTransactionFinalizedResult::Finalized { final_decision: finalized.final_decision, - execution_result: finalized.execute_result, + execution_result: finalized.execute_result.map(Box::new), execution_time: finalized.execution_time, finalized_time: finalized.finalized_time, abort_details: finalized.abort_details, @@ -705,7 +705,7 @@ impl JsonRpcHandlers { .map_err(|e| Self::internal_error(answer_id, e))?; IndexerTransactionFinalizedResult::Finalized { final_decision: finalized.final_decision, - execution_result: finalized.execute_result, + execution_result: finalized.execute_result.map(Box::new), execution_time: finalized.execution_time, finalized_time: finalized.finalized_time, abort_details: finalized.abort_details, diff --git a/applications/tari_indexer/src/lib.rs b/applications/tari_indexer/src/lib.rs index 0cff64fb5..e54e8b2ec 100644 --- a/applications/tari_indexer/src/lib.rs +++ b/applications/tari_indexer/src/lib.rs @@ -75,6 +75,7 @@ const LOG_TARGET: &str = "tari::indexer::app"; #[allow(clippy::too_many_lines)] pub async fn run_indexer(config: ApplicationConfig, mut shutdown_signal: ShutdownSignal) -> Result<(), ExitError> { + info!(target: LOG_TARGET, "Starting indexer node on network {}", config.network); let keypair = setup_keypair_prompt(&config.indexer.identity_file, true)?; let db_factory = SqliteDbFactory::new(config.indexer.data_dir.clone()); diff --git a/applications/tari_indexer/src/main.rs b/applications/tari_indexer/src/main.rs index 3340537f1..b908b4b1b 100644 --- a/applications/tari_indexer/src/main.rs +++ b/applications/tari_indexer/src/main.rs @@ -60,9 +60,9 @@ async fn main() { async fn main_inner() -> Result<(), ExitError> { let cli = Cli::init(); let config_path = cli.common.config_path(); - let cfg = load_configuration(config_path, true, &cli).map_err(|e| ExitError::new(ExitCode::ConfigError, e))?; + let cfg = load_configuration(config_path, true, &cli, cli.common.network) + .map_err(|e| ExitError::new(ExitCode::ConfigError, e))?; let config = ApplicationConfig::load_from(&cfg)?; - println!("Starting indexer node on network {}", config.network); // Remove the file if it was left behind by a previous run let _file = fs::remove_file(config.common.base_path.join("pid")); let mut shutdown = Shutdown::new(); diff --git a/applications/tari_signaling_server/src/data.rs b/applications/tari_signaling_server/src/data.rs index c4bf44a66..c4cd4e912 100644 --- a/applications/tari_signaling_server/src/data.rs +++ b/applications/tari_signaling_server/src/data.rs @@ -19,7 +19,7 @@ pub struct Data { pub expiration: chrono::Duration, pub secret_key: String, // The lowest still probably alive id. They will be cleaned up after expiration, which goes in order. - pub low_id: u64, + pub _low_id: u64, pub id: u64, } @@ -40,7 +40,7 @@ impl Data { answer_ice_candidates: HashMap::new(), expiration: chrono::Duration::minutes(5), secret_key: create_secret(), - low_id: 0, + _low_id: 0, id: 0, } } diff --git a/applications/tari_swarm_daemon/src/process_definitions/context.rs b/applications/tari_swarm_daemon/src/process_definitions/context.rs index 9a0fc182e..ed5f48254 100644 --- a/applications/tari_swarm_daemon/src/process_definitions/context.rs +++ b/applications/tari_swarm_daemon/src/process_definitions/context.rs @@ -18,6 +18,7 @@ use crate::process_manager::{ pub struct ProcessContext<'a> { instance_id: InstanceId, bin: &'a PathBuf, + envs: &'a [(String, String)], base_path: PathBuf, network: Network, listen_ip: IpAddr, @@ -30,6 +31,7 @@ impl<'a> ProcessContext<'a> { pub(crate) fn new( instance_id: InstanceId, bin: &'a PathBuf, + envs: &'a [(String, String)], base_path: PathBuf, network: Network, listen_ip: IpAddr, @@ -40,6 +42,7 @@ impl<'a> ProcessContext<'a> { Self { instance_id, bin, + envs, base_path, network, listen_ip, @@ -77,8 +80,8 @@ impl<'a> ProcessContext<'a> { &self.listen_ip } - pub fn environment(&self) -> Vec<(&str, &str)> { - vec![] + pub fn environment(&self) -> impl Iterator { + self.envs.iter().map(|(k, v)| (k.as_str(), v.as_str())) } pub fn minotari_nodes(&self) -> impl Iterator { diff --git a/applications/tari_swarm_daemon/src/process_definitions/minotari_miner.rs b/applications/tari_swarm_daemon/src/process_definitions/minotari_miner.rs index ba70d58c6..dd7d3af2d 100644 --- a/applications/tari_swarm_daemon/src/process_definitions/minotari_miner.rs +++ b/applications/tari_swarm_daemon/src/process_definitions/minotari_miner.rs @@ -38,10 +38,11 @@ impl ProcessDefinition for MinotariMiner { let base_node_grpc_port = base_node.instance().allocated_ports().expect("grpc"); let mut wallet_client = wallet.connect_client().await?; - let grpc::GetAddressResponse { address } = wallet_client.get_address(grpc::Empty {}).await?.into_inner(); + let grpc::GetAddressResponse { one_sided_address, .. } = + wallet_client.get_address(grpc::Empty {}).await?.into_inner(); let wallet_payment_address = - TariAddress::from_bytes(&address).expect("Invalid public key returned from console wallet"); + TariAddress::from_bytes(&one_sided_address).expect("Invalid public key returned from console wallet"); let max_blocks = context .get_setting("max_blocks") diff --git a/applications/tari_swarm_daemon/src/process_manager/instances/manager.rs b/applications/tari_swarm_daemon/src/process_manager/instances/manager.rs index 0c570d15f..5f709b249 100644 --- a/applications/tari_swarm_daemon/src/process_manager/instances/manager.rs +++ b/applications/tari_swarm_daemon/src/process_manager/instances/manager.rs @@ -138,6 +138,7 @@ impl InstanceManager { let context = ProcessContext::new( instance_id, &executable.path, + &executable.env, base_path.clone(), self.network, listen_ip, diff --git a/applications/tari_swarm_daemon/src/process_manager/processes/wallet_daemon.rs b/applications/tari_swarm_daemon/src/process_manager/processes/wallet_daemon.rs index 4cada7143..719fc3884 100644 --- a/applications/tari_swarm_daemon/src/process_manager/processes/wallet_daemon.rs +++ b/applications/tari_swarm_daemon/src/process_manager/processes/wallet_daemon.rs @@ -26,7 +26,7 @@ impl WalletDaemonProcess { .get("jrpc") .ok_or_else(|| anyhow!("No wallet JSON-RPC port allocated"))?; let mut client = WalletDaemonClient::connect(format!("http://localhost:{port}"), None)?; - let AuthLoginResponse { auth_token } = client + let AuthLoginResponse { auth_token, .. } = client .auth_request(AuthLoginRequest { permissions: vec!["Admin".to_string()], duration: None, diff --git a/applications/tari_swarm_daemon/src/webserver/server.rs b/applications/tari_swarm_daemon/src/webserver/server.rs index df9f410d5..8bc14afc9 100644 --- a/applications/tari_swarm_daemon/src/webserver/server.rs +++ b/applications/tari_swarm_daemon/src/webserver/server.rs @@ -135,16 +135,13 @@ where H: for<'a> JrpcHandler<'a, TReq, Response = TResp>, { let answer_id = value.get_answer_id(); - let params = value.parse_params().map_err(|e| { - match &e.result { - JsonRpcAnswer::Result(_) => { - unreachable!("parse_params() error should not return a result") - }, - JsonRpcAnswer::Error(e) => { - warn!(target: LOG_TARGET, "🌐 JSON-RPC params error: {}", e); - }, - } - e + let params = value.parse_params().inspect_err(|e| match &e.result { + JsonRpcAnswer::Result(_) => { + unreachable!("parse_params() error should not return a result") + }, + JsonRpcAnswer::Error(e) => { + warn!(target: LOG_TARGET, "🌐 JSON-RPC params error: {}", e); + }, })?; let resp = handler .handle(&context, params) diff --git a/applications/tari_validator_node/src/bootstrap.rs b/applications/tari_validator_node/src/bootstrap.rs index b160a0ee8..7624c7802 100644 --- a/applications/tari_validator_node/src/bootstrap.rs +++ b/applications/tari_validator_node/src/bootstrap.rs @@ -106,7 +106,7 @@ use crate::{ p2p::{ create_tari_validator_node_rpc_service, services::{ - consensus_gossip::{self, ConsensusGossipHandle}, + consensus_gossip::{self}, mempool::{self, MempoolHandle}, messaging::{ConsensusInboundMessaging, ConsensusOutboundMessaging}, }, @@ -377,12 +377,12 @@ pub async fn spawn_services( epoch_manager, template_manager: template_manager_service, consensus_handle, - global_db, + // global_db, state_store, dry_run_transaction_processor, handles, - validator_node_client_factory, - consensus_gossip_service, + // validator_node_client_factory, + // consensus_gossip_service, }) } @@ -431,10 +431,10 @@ pub struct Services { pub epoch_manager: EpochManagerHandle, pub template_manager: TemplateManagerHandle, pub consensus_handle: ConsensusHandle, - pub global_db: GlobalDb>, + // pub global_db: GlobalDb>, pub dry_run_transaction_processor: DryRunTransactionProcessor, - pub validator_node_client_factory: TariValidatorNodeRpcClientFactory, - pub consensus_gossip_service: ConsensusGossipHandle, + // pub validator_node_client_factory: TariValidatorNodeRpcClientFactory, + // pub consensus_gossip_service: ConsensusGossipHandle, pub state_store: SqliteStateStore, pub handles: Vec>>, diff --git a/applications/tari_validator_node/src/cli.rs b/applications/tari_validator_node/src/cli.rs index f049da09f..4db4e0eec 100644 --- a/applications/tari_validator_node/src/cli.rs +++ b/applications/tari_validator_node/src/cli.rs @@ -62,9 +62,8 @@ pub struct Cli { } impl ConfigOverrideProvider for Cli { - fn get_config_property_overrides(&self, network: &mut Network) -> Vec<(String, String)> { + fn get_config_property_overrides(&self, network: &Network) -> Vec<(String, String)> { let mut overrides = self.common.get_config_property_overrides(network); - *network = self.common.network.unwrap_or(*network); overrides.push(("network".to_string(), network.to_string())); overrides.push(("validator_node.override_from".to_string(), network.to_string())); overrides.push(("p2p.seeds.override_from".to_string(), network.to_string())); diff --git a/applications/tari_validator_node/src/lib.rs b/applications/tari_validator_node/src/lib.rs index cb079d5ea..8330abe0b 100644 --- a/applications/tari_validator_node/src/lib.rs +++ b/applications/tari_validator_node/src/lib.rs @@ -95,6 +95,7 @@ pub async fn run_validator_node( config: &ApplicationConfig, shutdown_signal: ShutdownSignal, ) -> Result<(), anyhow::Error> { + info!(target: LOG_TARGET, "Starting validator node on network {}", config.network); let keypair = setup_keypair_prompt( &config.validator_node.identity_file, !config.validator_node.dont_create_id, diff --git a/applications/tari_validator_node/src/main.rs b/applications/tari_validator_node/src/main.rs index 5627589cd..5630ffc0c 100644 --- a/applications/tari_validator_node/src/main.rs +++ b/applications/tari_validator_node/src/main.rs @@ -66,7 +66,8 @@ async fn main() { async fn main_inner() -> Result<(), ExitError> { let cli = Cli::parse(); let config_path = cli.common.config_path(); - let cfg = load_configuration(config_path, true, &cli).map_err(|e| ExitError::new(ExitCode::ConfigError, e))?; + let cfg = load_configuration(config_path, true, &cli, cli.common.network) + .map_err(|e| ExitError::new(ExitCode::ConfigError, e))?; let config = ApplicationConfig::load_from(&cfg)?; // Remove the pid file if it exists @@ -80,7 +81,6 @@ async fn main_inner() -> Result<(), ExitError> { eprintln!("{}", e); } - info!(target: LOG_TARGET, "Starting validator node on network {}", config.network); match run_validator_node(&config, shutdown.to_signal()).await { Ok(_) => info!(target: LOG_TARGET, "Validator node shutdown successfully"), Err(e) => match e.downcast() { diff --git a/applications/tari_validator_node/src/p2p/services/mempool/gossip.rs b/applications/tari_validator_node/src/p2p/services/mempool/gossip.rs index b71b44e70..1d3c2a1ba 100644 --- a/applications/tari_validator_node/src/p2p/services/mempool/gossip.rs +++ b/applications/tari_validator_node/src/p2p/services/mempool/gossip.rs @@ -72,10 +72,17 @@ impl MempoolGossip { } } - pub async fn next_message(&mut self) -> Option> { + pub async fn next_message(&mut self) -> Option> { let (from, msg) = self.rx_gossip.recv().await?; + // Number of transactions still to receive + let num_pending = self.rx_gossip.len(); match self.codec.decode(msg).await { - Ok((len, msg)) => Some(Ok((from.into(), msg, len))), + Ok((msg_len, msg)) => Some(Ok(IncomingMessage { + address: from.into(), + message: msg, + num_pending, + message_size: msg_len, + })), Err(e) => Some(Err(MempoolError::InvalidMessage(e.into()))), } } @@ -187,3 +194,10 @@ fn shard_group_to_topic(shard_group: ShardGroup) -> String { shard_group.end().as_u32() ) } + +pub struct IncomingMessage { + pub address: PeerAddress, + pub message: DanMessage, + pub num_pending: usize, + pub message_size: usize, +} diff --git a/applications/tari_validator_node/src/p2p/services/mempool/service.rs b/applications/tari_validator_node/src/p2p/services/mempool/service.rs index 15d4fbb3c..345b97fef 100644 --- a/applications/tari_validator_node/src/p2p/services/mempool/service.rs +++ b/applications/tari_validator_node/src/p2p/services/mempool/service.rs @@ -39,7 +39,10 @@ use super::metrics::PrometheusMempoolMetrics; use super::MempoolError; use crate::{ consensus::ConsensusHandle, - p2p::services::mempool::{gossip::MempoolGossip, handle::MempoolRequest}, + p2p::services::mempool::{ + gossip::{IncomingMessage, MempoolGossip}, + handle::MempoolRequest, + }, transaction_validators::TransactionValidationError, validator::Validator, }; @@ -160,9 +163,14 @@ where TValidator: Validator, + result: Result, ) -> Result<(), MempoolError> { - let (from, msg, num_pending) = result?; + let IncomingMessage { + address: from, + message: msg, + num_pending, + message_size, + } = result?; let DanMessage::NewTransaction(msg) = msg; let NewTransactionMessage { transaction } = *msg; @@ -180,8 +188,9 @@ where TValidator: Validator Result; + // fn stats(&self) -> Result; } pub struct MatterMostNotifier { @@ -89,9 +89,9 @@ impl Alerting for MatterMostNotifier { Ok(()) } - fn stats(&self) -> Result { - Ok(self.alerts_sent) - } + // fn stats(&self) -> Result { + // Ok(self.alerts_sent) + // } } pub struct TelegramNotifier { @@ -147,7 +147,7 @@ impl Alerting for TelegramNotifier { Ok(()) } - fn stats(&self) -> Result { - Ok(self.alerts_sent) - } + // fn stats(&self) -> Result { + // Ok(self.alerts_sent) + // } } diff --git a/bindings/dist/types/Claims.d.ts b/bindings/dist/types/Claims.d.ts index 7c6a7222a..8ef7e1cb7 100644 --- a/bindings/dist/types/Claims.d.ts +++ b/bindings/dist/types/Claims.d.ts @@ -3,5 +3,5 @@ export interface Claims { id: number; name: string; permissions: JrpcPermissions; - exp: number; + exp: bigint; } diff --git a/bindings/dist/types/wallet-daemon-client/AuthLoginResponse.d.ts b/bindings/dist/types/wallet-daemon-client/AuthLoginResponse.d.ts index 9ef2fd5d4..b7a692321 100644 --- a/bindings/dist/types/wallet-daemon-client/AuthLoginResponse.d.ts +++ b/bindings/dist/types/wallet-daemon-client/AuthLoginResponse.d.ts @@ -1,3 +1,4 @@ export interface AuthLoginResponse { auth_token: string; + valid_for_secs: bigint; } diff --git a/bindings/src/types/Claims.ts b/bindings/src/types/Claims.ts index 03c6b98d7..cac3a7b59 100644 --- a/bindings/src/types/Claims.ts +++ b/bindings/src/types/Claims.ts @@ -5,5 +5,5 @@ export interface Claims { id: number; name: string; permissions: JrpcPermissions; - exp: number; + exp: bigint; } diff --git a/bindings/src/types/wallet-daemon-client/AuthLoginResponse.ts b/bindings/src/types/wallet-daemon-client/AuthLoginResponse.ts index c48a12773..389a303db 100644 --- a/bindings/src/types/wallet-daemon-client/AuthLoginResponse.ts +++ b/bindings/src/types/wallet-daemon-client/AuthLoginResponse.ts @@ -2,4 +2,5 @@ export interface AuthLoginResponse { auth_token: string; + valid_for_secs: bigint; } diff --git a/clients/tari_indexer_client/src/types.rs b/clients/tari_indexer_client/src/types.rs index fe7beda83..78d41592f 100644 --- a/clients/tari_indexer_client/src/types.rs +++ b/clients/tari_indexer_client/src/types.rs @@ -239,7 +239,7 @@ pub enum IndexerTransactionFinalizedResult { Pending, Finalized { final_decision: Decision, - execution_result: Option, + execution_result: Option>, #[cfg_attr(feature = "ts", ts(type = "{secs: number, nanos: number}"))] execution_time: Duration, #[cfg_attr(feature = "ts", ts(type = "{secs: number, nanos: number}"))] diff --git a/clients/wallet_daemon_client/src/types.rs b/clients/wallet_daemon_client/src/types.rs index dc7acf506..2986a051b 100644 --- a/clients/wallet_daemon_client/src/types.rs +++ b/clients/wallet_daemon_client/src/types.rs @@ -879,6 +879,7 @@ pub struct AuthLoginRequest { )] pub struct AuthLoginResponse { pub auth_token: String, + pub valid_for_secs: u64, } #[derive(Debug, Clone, Deserialize, Serialize)] diff --git a/dan_layer/common_types/src/extra_data.rs b/dan_layer/common_types/src/extra_data.rs index 9afe71bec..21b924bf0 100644 --- a/dan_layer/common_types/src/extra_data.rs +++ b/dan_layer/common_types/src/extra_data.rs @@ -38,7 +38,7 @@ pub enum ExtraFieldKey { SidechainId = 0x00, } -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, Serialize, Default)] #[cfg_attr(feature = "ts", derive(TS), ts(export, export_to = "../../bindings/src/types/"))] pub struct ExtraData(#[cfg_attr(feature = "ts", ts(type = "string"))] BTreeMap); diff --git a/dan_layer/common_types/src/hasher.rs b/dan_layer/common_types/src/hasher.rs index 38155d039..43dbc23b9 100644 --- a/dan_layer/common_types/src/hasher.rs +++ b/dan_layer/common_types/src/hasher.rs @@ -7,7 +7,7 @@ use blake2::{ Blake2b, }; use serde::Serialize; -use tari_bor::encode_into; +use tari_bor::encode_into_std_writer; use tari_common_types::types::FixedHash; use tari_crypto::hashing::DomainSeparation; @@ -42,7 +42,7 @@ impl TariHasher { // encoding in infallible. However this should be the case. Since it is very unergonomic to return an // error in hash chain functions, and therefore all usages of the hasher, we assume all types implement // infallible encoding. - encode_into(data, &mut self.hash_writer()).expect("encoding failed") + encode_into_std_writer(data, &mut self.hash_writer()).expect("encoding failed") } pub fn chain(mut self, data: &T) -> Self { diff --git a/dan_layer/common_types/src/hashing.rs b/dan_layer/common_types/src/hashing.rs index 5254f498d..98b22e9ce 100644 --- a/dan_layer/common_types/src/hashing.rs +++ b/dan_layer/common_types/src/hashing.rs @@ -25,7 +25,7 @@ use blake2::{digest::consts::U32, Blake2b}; use tari_crypto::{hash_domain, hashing::DomainSeparatedHasher}; -use tari_hashing::ValidatorNodeBmtHashDomain; +use tari_hashing::ValidatorNodeMerkleHashDomain; use tari_mmr::{BalancedBinaryMerkleProof, BalancedBinaryMerkleTree, MergedBalancedBinaryMerkleProof}; use crate::hasher::{tari_hasher, TariHasher}; @@ -56,7 +56,7 @@ fn dan_hasher(label: &'static str) -> TariHasher { tari_hasher::(label) } -pub type ValidatorNodeBmtHasherBlake2b = DomainSeparatedHasher, ValidatorNodeBmtHashDomain>; +pub type ValidatorNodeBmtHasherBlake2b = DomainSeparatedHasher, ValidatorNodeMerkleHashDomain>; pub type ValidatorNodeBalancedMerkleTree = BalancedBinaryMerkleTree; pub type ValidatorNodeMerkleProof = BalancedBinaryMerkleProof; pub type MergedValidatorNodeMerkleProof = MergedBalancedBinaryMerkleProof; diff --git a/dan_layer/consensus/src/block_validations.rs b/dan_layer/consensus/src/block_validations.rs index 80ac6007b..4f430e9f1 100644 --- a/dan_layer/consensus/src/block_validations.rs +++ b/dan_layer/consensus/src/block_validations.rs @@ -178,7 +178,7 @@ pub fn check_quorum_certificate( } if qc.signatures().is_empty() { - return Err(ProposalValidationError::QuorumWasNotReached { qc: qc.clone() }.into()); + return Err(ProposalValidationError::QuorumWasNotReached { qc: *qc.id() }.into()); } for signature in qc.signatures() { @@ -198,14 +198,14 @@ pub fn check_quorum_certificate( for sign in qc.signatures() { let message = vote_signing_service.create_message(qc.block_id(), &qc.decision()); if !sign.verify(message) { - return Err(ProposalValidationError::QCInvalidSignature { qc: qc.clone() }.into()); + return Err(ProposalValidationError::QCInvalidSignature { qc: *qc.id() }.into()); } } if committee_info.quorum_threshold() > u32::try_from(qc.signatures().len()).map_err(|_| ProposalValidationError::QCConversionError)? { - return Err(ProposalValidationError::QuorumWasNotReached { qc: qc.clone() }.into()); + return Err(ProposalValidationError::QuorumWasNotReached { qc: *qc.id() }.into()); } Ok(()) } diff --git a/dan_layer/consensus/src/hotstuff/error.rs b/dan_layer/consensus/src/hotstuff/error.rs index ed39b8630..dcb4ef417 100644 --- a/dan_layer/consensus/src/hotstuff/error.rs +++ b/dan_layer/consensus/src/hotstuff/error.rs @@ -5,7 +5,7 @@ use tari_common_types::types::FixedHash; use tari_crypto::ristretto::RistrettoPublicKey; use tari_dan_common_types::{Epoch, NodeHeight, VersionedSubstateIdError}; use tari_dan_storage::{ - consensus_models::{BlockError, BlockId, LeafBlock, LockedBlock, QuorumCertificate, TransactionPoolError}, + consensus_models::{BlockError, BlockId, LeafBlock, LockedBlock, QcId, TransactionPoolError}, StorageError, }; use tari_epoch_manager::EpochManagerError; @@ -188,12 +188,10 @@ pub enum ProposalValidationError { MissingSignature { block_id: BlockId, height: NodeHeight }, #[error("Proposed block {block_id} {height} has invalid signature")] InvalidSignature { block_id: BlockId, height: NodeHeight }, - #[error("QC is not valid: {qc}")] - QCisNotValid { qc: QuorumCertificate }, #[error("QC has invalid signature: {qc}")] - QCInvalidSignature { qc: QuorumCertificate }, + QCInvalidSignature { qc: QcId }, #[error("Quorum was not reached: {qc}")] - QuorumWasNotReached { qc: QuorumCertificate }, + QuorumWasNotReached { qc: QcId }, #[error("Invalid network in block {block_id}: expected {expected_network}, given {block_network}")] InvalidNetwork { expected_network: String, diff --git a/dan_layer/consensus/src/hotstuff/on_message_validate.rs b/dan_layer/consensus/src/hotstuff/on_message_validate.rs index 1e93f5808..bce67d70e 100644 --- a/dan_layer/consensus/src/hotstuff/on_message_validate.rs +++ b/dan_layer/consensus/src/hotstuff/on_message_validate.rs @@ -4,7 +4,6 @@ use std::collections::HashSet; use log::*; -use tari_common_types::types::PublicKey; use tari_dan_common_types::{ committee::{Committee, CommitteeInfo}, Epoch, @@ -246,7 +245,6 @@ impl OnMessageValidate { Ok(MessageValidationResult::ParkedProposal { block_id: *proposal.block.id(), epoch: proposal.block.epoch(), - proposed_by: proposal.block.proposed_by().clone(), missing_txs: missing_tx_ids, }) } @@ -384,7 +382,6 @@ impl OnMessageValidate { Ok(MessageValidationResult::ParkedProposal { block_id: *parked_block.block().id(), epoch: parked_block.block().epoch(), - proposed_by: parked_block.block().proposed_by().clone(), missing_txs: missing_tx_ids, }) }) @@ -420,7 +417,6 @@ pub enum MessageValidationResult { ParkedProposal { block_id: BlockId, epoch: Epoch, - proposed_by: PublicKey, missing_txs: HashSet, }, Discard, diff --git a/dan_layer/consensus/src/hotstuff/substate_store/error.rs b/dan_layer/consensus/src/hotstuff/substate_store/error.rs index 05606e8b5..7f0b2927e 100644 --- a/dan_layer/consensus/src/hotstuff/substate_store/error.rs +++ b/dan_layer/consensus/src/hotstuff/substate_store/error.rs @@ -50,7 +50,7 @@ pub enum LockFailedError { #[error("Substate {id} is DOWN")] SubstateIsDown { id: VersionedSubstateId }, #[error( - "Failed to {} lock substate {substate_id} due to conflict with existing {} lock on {}", conflict.requested_lock, conflict.existing_lock, conflict.transaction_id + "Failed to {} lock substate {substate_id} due to conflict with existing {} lock in transaction {}", conflict.requested_lock, conflict.existing_lock, conflict.transaction_id )] LockConflict { substate_id: VersionedSubstateId, diff --git a/dan_layer/consensus/src/hotstuff/worker.rs b/dan_layer/consensus/src/hotstuff/worker.rs index c2a14ba9f..4f6abd0ed 100644 --- a/dan_layer/consensus/src/hotstuff/worker.rs +++ b/dan_layer/consensus/src/hotstuff/worker.rs @@ -432,9 +432,9 @@ impl HotstuffWorker { Ok(()) }, MessageValidationResult::Discard => Ok(()), - MessageValidationResult::Invalid { err, .. } => { + MessageValidationResult::Invalid { err, from, message } => { self.hooks.on_error(&err); - error!(target: LOG_TARGET, "🚨 Invalid new message: {}", err); + error!(target: LOG_TARGET, "🚨 Invalid new message from {from}: {err} - {message}"); Ok(()) }, } @@ -460,7 +460,7 @@ impl HotstuffWorker { return Ok(()); }; - debug!( + info!( target: LOG_TARGET, "🔥 new transaction ready for consensus: {} ({} pending)", transaction.id(), @@ -658,7 +658,7 @@ impl HotstuffWorker { let current_epoch = self.epoch_manager.current_epoch().await?; // Propose quickly if we should end the epoch (i.e base layer epoch > pacemaker epoch) if current_epoch == epoch { - debug!(target: LOG_TARGET, "[on_beat] No transactions to propose. Waiting for a timeout."); + info!(target: LOG_TARGET, "[on_beat] No transactions to propose. Waiting for a timeout."); return Ok(()); } } diff --git a/dan_layer/consensus_tests/src/support/validator/builder.rs b/dan_layer/consensus_tests/src/support/validator/builder.rs index 6b534fd1b..e1f04c7d3 100644 --- a/dan_layer/consensus_tests/src/support/validator/builder.rs +++ b/dan_layer/consensus_tests/src/support/validator/builder.rs @@ -173,7 +173,7 @@ impl ValidatorBuilder { let validator = Validator { address: self.address.clone(), - shard_address: self.shard_address, + _shard_address: self.shard_address, shard_group: self.shard_group, num_committees: self.num_committees, transaction_executions: self.transaction_executions.clone(), diff --git a/dan_layer/consensus_tests/src/support/validator/instance.rs b/dan_layer/consensus_tests/src/support/validator/instance.rs index 60c04fbb2..9408d1246 100644 --- a/dan_layer/consensus_tests/src/support/validator/instance.rs +++ b/dan_layer/consensus_tests/src/support/validator/instance.rs @@ -39,7 +39,7 @@ pub struct ValidatorChannels { pub struct Validator { pub address: TestAddress, - pub shard_address: SubstateAddress, + pub _shard_address: SubstateAddress, pub shard_group: ShardGroup, pub num_committees: u32, diff --git a/dan_layer/engine/Cargo.toml b/dan_layer/engine/Cargo.toml index 07b634018..6493a7b1c 100644 --- a/dan_layer/engine/Cargo.toml +++ b/dan_layer/engine/Cargo.toml @@ -27,12 +27,12 @@ d3ne = { workspace = true } log = { workspace = true, features = ["std"] } rand = { workspace = true } indexmap = { workspace = true } -semver ={ workspace = true } +semver = { workspace = true } serde = { workspace = true, default-features = true } serde_json = { workspace = true } thiserror = { workspace = true } tempfile = { workspace = true } -wasmer = { workspace = true } +wasmer = { workspace = true, features = ["cranelift"] } wasmer-middlewares = { workspace = true } [dev-dependencies] diff --git a/dan_layer/engine/src/fees/fee_module.rs b/dan_layer/engine/src/fees/fee_module.rs index 9297898b1..9c8146eb9 100644 --- a/dan_layer/engine/src/fees/fee_module.rs +++ b/dan_layer/engine/src/fees/fee_module.rs @@ -3,7 +3,7 @@ use std::io; -use tari_bor::encode_into; +use tari_bor::encode_into_std_writer; use tari_engine_types::fees::FeeSource; use super::FeeTable; @@ -38,7 +38,7 @@ impl RuntimeModule for FeeModule { let total_storage = track.with_substates_to_persist(|changes| { let mut counter = ByteCounter::new(); for substate in changes.values() { - encode_into(substate, &mut counter)?; + encode_into_std_writer(substate, &mut counter)?; } Ok::<_, RuntimeModuleError>(counter.get()) })?; diff --git a/dan_layer/engine/src/runtime/mod.rs b/dan_layer/engine/src/runtime/mod.rs index 469ff9e30..8130d4ef4 100644 --- a/dan_layer/engine/src/runtime/mod.rs +++ b/dan_layer/engine/src/runtime/mod.rs @@ -217,6 +217,8 @@ impl Runtime { impl Debug for Runtime { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Runtime").field("engine", &"dyn RuntimeEngine").finish() + f.debug_struct("Runtime") + .field("interface", &"dyn RuntimeEngine") + .finish() } } diff --git a/dan_layer/engine/src/runtime/scope.rs b/dan_layer/engine/src/runtime/scope.rs index 9c34dacaf..1a7173aad 100644 --- a/dan_layer/engine/src/runtime/scope.rs +++ b/dan_layer/engine/src/runtime/scope.rs @@ -345,7 +345,7 @@ pub enum PushCallFrame { module_name: String, component_scope: IndexedWellKnownTypes, component_lock: LockedSubstate, - arg_scope: IndexedWellKnownTypes, + arg_scope: Box, entity_id: EntityId, }, Static { diff --git a/dan_layer/engine/src/template/error.rs b/dan_layer/engine/src/template/error.rs index 48cdfe5b2..e89350718 100644 --- a/dan_layer/engine/src/template/error.rs +++ b/dan_layer/engine/src/template/error.rs @@ -32,8 +32,8 @@ pub enum TemplateLoaderError { CompileError(#[from] wasmer::CompileError), #[error(transparent)] InstantiationError(Box), - #[error(transparent)] - HostEnvInitError(#[from] wasmer::HostEnvInitError), + #[error("Export error: {0}")] + ExportError(#[from] wasmer::ExportError), #[error("Runtime error: {0}")] RuntimeError(#[from] wasmer::RuntimeError), } diff --git a/dan_layer/engine/src/traits.rs b/dan_layer/engine/src/traits.rs index 3ec297e34..0dee46ce1 100644 --- a/dan_layer/engine/src/traits.rs +++ b/dan_layer/engine/src/traits.rs @@ -23,8 +23,13 @@ use tari_engine_types::instruction_result::InstructionResult; use tari_template_abi::FunctionDef; -pub trait Invokable { +pub trait Invokable { type Error; - fn invoke(&self, def: &FunctionDef, args: Vec) -> Result; + fn invoke( + &mut self, + store: &mut S, + def: &FunctionDef, + args: Vec, + ) -> Result; } diff --git a/dan_layer/engine/src/transaction/processor.rs b/dan_layer/engine/src/transaction/processor.rs index 83284a7c2..3ee9931d4 100644 --- a/dan_layer/engine/src/transaction/processor.rs +++ b/dan_layer/engine/src/transaction/processor.rs @@ -490,7 +490,7 @@ impl + 'static> T module_name: template.template_name().to_string(), component_scope, component_lock: component_lock.clone(), - arg_scope, + arg_scope: Box::new(arg_scope), entity_id: component.entity_id, })?; @@ -519,9 +519,10 @@ impl + 'static> T args: Vec, ) -> Result { let result = match module { - LoadedTemplate::Wasm(wasm_module) => { - let process = WasmProcess::start(wasm_module, runtime)?; - process.invoke(&function_def, args)? + LoadedTemplate::Wasm(loaded) => { + let mut store = loaded.create_store(); + let mut process = WasmProcess::init(&mut store, loaded, runtime)?; + process.invoke(&mut store, &function_def, args)? }, LoadedTemplate::Flow(flow_factory) => { flow_factory.run_new_instance( diff --git a/dan_layer/engine/src/wasm/environment.rs b/dan_layer/engine/src/wasm/environment.rs index b3725cd4a..7cc3c0b06 100644 --- a/dan_layer/engine/src/wasm/environment.rs +++ b/dan_layer/engine/src/wasm/environment.rs @@ -21,61 +21,60 @@ // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. use std::{ - cell::Cell, fmt::{Debug, Formatter}, + ops::Range, sync::{Arc, Mutex}, }; +use tari_template_abi::{TemplateDef, ABI_TEMPLATE_DEF_GLOBAL_NAME}; use wasmer::{ - imports, - Function, - HostEnvInitError, + AsStoreMut, + AsStoreRef, + ExportError, Instance, - LazyInit, Memory, - NativeFunc, - Pages, - Resolver, - Store, - WasmerEnv, + MemoryAccessError, + MemoryView, + TypedFunction, + WasmPtr, }; -use crate::{runtime::RuntimeError, wasm::WasmExecutionError}; +use crate::{ + runtime::RuntimeError, + wasm::{mem_writer::MemWriter, WasmExecutionError}, +}; #[derive(Clone)] pub struct WasmEnv { - memory: LazyInit, - mem_alloc: LazyInit>, - mem_free: LazyInit>, + memory: Option, state: T, + mem_alloc: Option>>, last_panic: Arc>>, last_engine_error: Arc>>, } -impl WasmEnv { +impl WasmEnv { pub fn new(state: T) -> Self { Self { + memory: None, state, - memory: LazyInit::new(), - mem_alloc: LazyInit::new(), - mem_free: LazyInit::new(), + mem_alloc: None, last_panic: Arc::new(Mutex::new(None)), last_engine_error: Arc::new(Mutex::new(None)), } } - pub(super) fn alloc(&self, len: u32) -> Result { - let ptr = self.get_mem_alloc_func()?.call(len as i32)?; - if ptr == 0 { + pub(super) fn set_last_panic(&self, message: String) { + *self.last_panic.lock().unwrap() = Some(message); + } + + pub(super) fn alloc(&self, store: &mut S, len: u32) -> Result, WasmExecutionError> { + let ptr = self.get_mem_alloc_func()?.call(store, len)?; + if ptr.offset() == 0 { return Err(WasmExecutionError::MemoryAllocationFailed); } - Ok(AllocPtr(ptr as u32, len)) - } - - pub(super) fn free(&self, ptr: AllocPtr) -> Result<(), WasmExecutionError> { - self.get_mem_free_func()?.call(ptr.as_i32())?; - Ok(()) + Ok(ptr) } pub(super) fn take_last_panic_message(&self) -> Option { @@ -90,57 +89,71 @@ impl WasmEnv { self.last_engine_error.lock().unwrap().take() } - pub(super) fn write_to_memory(&self, ptr: &AllocPtr, data: &[u8]) -> Result<(), WasmExecutionError> { - if data.len() != ptr.len() as usize { - return Err(WasmExecutionError::InvalidWriteLength { - allocated: ptr.len(), - requested: data.len() as u32, - }); - } - // SAFETY: The pointer has been allocated by alloc above and the runtime is single-threaded so data - // races are not possible. - unsafe { - self.get_memory()? - .uint8view() - .subarray(ptr.get(), ptr.end()) - .copy_from(data); - } - Ok(()) - } - - pub(super) fn read_memory_with_embedded_len(&self, ptr: u32) -> Result, WasmExecutionError> { + pub(super) fn load_abi( + &self, + store: &mut S, + instance: &Instance, + ) -> Result { + let ptr = instance + .exports + .get_global(ABI_TEMPLATE_DEF_GLOBAL_NAME)? + .get(store) + .i32() + .ok_or(WasmExecutionError::ExportError(ExportError::IncompatibleType))? as u32; + + // Load ABI from memory + let data = self.read_memory_with_embedded_len(store, ptr)?; + let decoded = tari_bor::decode(&data).map_err(WasmExecutionError::AbiDecodeError)?; + Ok(decoded) + } + + pub(super) fn memory_writer<'a, S: AsStoreMut>( + &self, + store: &'a mut S, + ptr: WasmPtr, + ) -> Result, WasmExecutionError> { + let view = self.get_memory()?.view(store); + Ok(MemWriter::new(ptr, view)) + } + + pub(super) fn read_memory_with_embedded_len( + &self, + store: &mut S, + offset: u32, + ) -> Result, WasmExecutionError> { let memory = self.get_memory()?; - let view = memory.uint8view().subarray(ptr, memory.data_size() as u32 - 1); - let view_bytes = &*view; - if view_bytes.len() < 4 { - return Err(WasmExecutionError::MemoryUnderflow { - required: 4, - remaining: view_bytes.len(), - }); - } - + let view = memory.view(store); let mut buf = [0u8; 4]; - copy_from_cell_slice(view_bytes, &mut buf); + view.read(u64::from(offset), &mut buf)?; + let len = u32::from_le_bytes(buf); - let data = self.read_from_memory(ptr + 4, len)?; + let start = offset + 4; + let data = copy_range_to_vec(&view, start..start + len)?; Ok(data) } - pub(super) fn read_from_memory(&self, ptr: u32, len: u32) -> Result, WasmExecutionError> { + pub(super) fn read_from_memory( + &self, + store: &mut S, + ptr: WasmPtr, + len: u32, + ) -> Result, WasmExecutionError> { let memory = self.get_memory()?; - let mem_size = memory.data_size(); - let ptr_plus_len = ptr.checked_add(len).ok_or(WasmExecutionError::MaxMemorySizeExceeded)?; - if u64::from(ptr) >= mem_size || u64::from(ptr_plus_len) >= mem_size { + let view = memory.view(store); + let mem_size = view.data_size(); + let ptr_plus_len = ptr + .offset() + .checked_add(len) + .ok_or(WasmExecutionError::MaxMemorySizeExceeded)?; + if u64::from(ptr.offset()) >= mem_size || u64::from(ptr_plus_len) >= mem_size { return Err(WasmExecutionError::MemoryPointerOutOfRange { - size: memory.data_size(), - pointer: u64::from(ptr), + size: mem_size, + pointer: u64::from(ptr.offset()), len: u64::from(len), }); } - let view = memory.uint8view().subarray(ptr, ptr + len); - let mut data = vec![0u8; len as usize]; - copy_from_cell_slice(&view, &mut data); + let data = copy_range_to_vec(&view, ptr.offset()..ptr_plus_len)?; Ok(data) } @@ -148,86 +161,31 @@ impl WasmEnv { &self.state } - fn get_mem_alloc_func(&self) -> Result<&NativeFunc, WasmExecutionError> { - self.mem_alloc - .get_ref() - .ok_or_else(|| WasmExecutionError::MissingAbiFunction { - function: "tari_alloc".into(), - }) + pub fn state_mut(&mut self) -> &mut T { + &mut self.state } - fn get_mem_free_func(&self) -> Result<&NativeFunc, WasmExecutionError> { - self.mem_free - .get_ref() - .ok_or_else(|| WasmExecutionError::MissingAbiFunction { - function: "tari_free".into(), - }) + fn get_mem_alloc_func(&self) -> Result<&TypedFunction>, WasmExecutionError> { + self.mem_alloc + .as_ref() + .ok_or_else(|| WasmExecutionError::MissingAbiFunction { function: "tari_alloc" }) } fn get_memory(&self) -> Result<&Memory, WasmExecutionError> { - self.memory.get_ref().ok_or(WasmExecutionError::MemoryNotInitialized) - } - - pub fn mem_size(&self) -> Pages { - self.memory.get_ref().map(|mem| mem.size()).unwrap_or(Pages(0)) + let memory = self.memory.as_ref().ok_or_else(|| WasmExecutionError::MemoryNotSet)?; + Ok(memory) } +} - pub fn create_resolver(&self, store: &Store, tari_engine: Function) -> impl Resolver { - imports! { - "env" => { - "tari_engine" => tari_engine, - "debug" => Function::new_native_with_env(store, self.clone(), Self::debug_handler), - "on_panic" => Function::new_native_with_env(store, self.clone(), Self::on_panic_handler), - } - } +impl WasmEnv { + pub fn set_memory(&mut self, memory: Memory) -> &mut Self { + self.memory = Some(memory); + self } - fn debug_handler(env: &Self, arg_ptr: i32, arg_len: i32) { - const WASM_DEBUG_LOG_TARGET: &str = "tari::dan::wasm"; - match env.read_from_memory(arg_ptr as u32, arg_len as u32) { - Ok(arg) => { - eprintln!("DEBUG: {}", String::from_utf8_lossy(&arg)); - }, - Err(err) => { - log::error!(target: WASM_DEBUG_LOG_TARGET, "Failed to read from memory: {}", err); - }, - } - } - - fn on_panic_handler(env: &Self, msg_ptr: i32, msg_len: i32, line: i32, col: i32) { - const WASM_DEBUG_LOG_TARGET: &str = "tari::dan::wasm"; - match env.read_from_memory(msg_ptr as u32, msg_len as u32) { - Ok(msg) => { - let msg = String::from_utf8_lossy(&msg); - eprintln!("📣 PANIC: ({}:{}) {}", line, col, msg); - log::error!(target: WASM_DEBUG_LOG_TARGET, "📣 PANIC: ({}:{}) {}", line, col, msg); - *env.last_panic.lock().unwrap() = Some(msg.to_string()); - }, - Err(err) => { - log::error!( - target: WASM_DEBUG_LOG_TARGET, - "📣 PANIC: WASM template panicked but did not provide a valid memory pointer to on_panic \ - callback: {}", - err - ); - *env.last_panic.lock().unwrap() = Some(format!( - "WASM panicked but did not provide a valid message pointer to on_panic callback: {}", - err - )); - }, - } - } -} - -impl WasmerEnv for WasmEnv { - fn init_with_instance(&mut self, instance: &Instance) -> Result<(), HostEnvInitError> { - self.memory - .initialize(instance.exports.get_with_generics_weak("memory")?); - self.mem_alloc - .initialize(instance.exports.get_with_generics_weak("tari_alloc")?); - self.mem_free - .initialize(instance.exports.get_with_generics_weak("tari_free")?); - Ok(()) + pub fn set_alloc_funcs(&mut self, mem_alloc: TypedFunction>) -> &mut Self { + self.mem_alloc = Some(mem_alloc); + self } } @@ -236,28 +194,19 @@ impl Debug for WasmEnv { f.debug_struct("WasmEnv") .field("memory", &"LazyInit") .field("tari_alloc", &" LazyInit") - .field("tari_free", &"LazyInit>") .field("State", &self.state) .finish() } } -/// Efficiently copy read-only memory into a mutable buffer. -/// Panics if the length of `dest` is more than the length of `src`. -fn copy_from_cell_slice(src: &[Cell], dest: &mut [u8]) { - assert!(dest.len() <= src.len()); - let len = dest.len(); - // SAFETY: size_of::() is equal to size_of::(), we assert this below just in case. - let (head, body, tail) = unsafe { src[..len].align_to() }; - assert_eq!(head.len(), 0); - assert_eq!(tail.len(), 0); - dest.copy_from_slice(body); -} - #[derive(Debug)] pub struct AllocPtr(u32, u32); impl AllocPtr { + pub fn new(offset: u32, len: u32) -> Self { + Self(offset, len) + } + pub fn get(&self) -> u32 { self.0 } @@ -266,12 +215,25 @@ impl AllocPtr { self.1 } - pub fn end(&self) -> u32 { - self.get() + self.len() + pub fn as_wasm_ptr(&self) -> WasmPtr { + WasmPtr::new(self.get()) } +} - pub fn as_i32(&self) -> i32 { - // We want the 'u32 as i32' conversion to wrap - self.get() as i32 - } +/// Copies a range of the memory and returns it as a vector of bytes +/// This is a u32 version of MemoryView::copy_range_to_vec +fn copy_range_to_vec(view: &MemoryView, range: Range) -> Result, MemoryAccessError> { + let mut new_memory = Vec::new(); + let mut offset = range.start; + let size = u32::try_from(view.data_size()).map_err(|_| MemoryAccessError::Overflow)?; + let end = range.end.min(size); + let mut chunk = [0u8; 40960]; + while offset < end { + let remaining = end - offset; + let sublen = remaining.min(chunk.len() as u32) as usize; + view.read(u64::from(offset), &mut chunk[..sublen])?; + new_memory.extend_from_slice(&chunk[..sublen]); + offset += sublen as u32; + } + Ok(new_memory) } diff --git a/dan_layer/engine/src/wasm/error.rs b/dan_layer/engine/src/wasm/error.rs index 93cef80b2..4f323e25d 100644 --- a/dan_layer/engine/src/wasm/error.rs +++ b/dan_layer/engine/src/wasm/error.rs @@ -3,12 +3,11 @@ use tari_bor::BorError; use tari_engine_types::indexed_value::IndexedValueError; -use thiserror::Error; -use wasmer::{ExportError, HostEnvInitError, InstantiationError}; +use wasmer::{ExportError, InstantiationError, MemoryAccessError}; use crate::runtime::RuntimeError; -#[derive(Debug, Error)] +#[derive(Debug, thiserror::Error)] pub enum WasmError { #[error("Missing argument at position {position} (name: {argument_name}")] MissingArgument { argument_name: String, position: usize }, @@ -22,22 +21,22 @@ pub enum WasmExecutionError { ExportError(#[from] ExportError), #[error(transparent)] WasmRuntimeError(#[from] wasmer::RuntimeError), - #[error(transparent)] - HostEnvInitError(#[from] HostEnvInitError), #[error("Expected function {function} to return a pointer")] ExpectedPointerReturn { function: String }, - #[error("Attempted to write {requested} bytes but pointer allocated {allocated}")] - InvalidWriteLength { allocated: u32, requested: u32 }, + #[error("Memory access error: {0}")] + MemoryAccessError(#[from] MemoryAccessError), #[error("memory underflow: {required} bytes required but {remaining} remaining")] MemoryUnderflow { required: usize, remaining: usize }, #[error("memory pointer out of range: memory size of {size} but pointer is {pointer}")] MemoryPointerOutOfRange { size: u64, pointer: u64, len: u64 }, + #[error("Memory allocation too large")] + MemoryAllocationTooLarge, #[error("Memory allocation failed")] MemoryAllocationFailed, - #[error("Memory not initialized")] - MemoryNotInitialized, + #[error("BUG: memory not set in environment")] + MemoryNotSet, #[error("Missing function {function}")] - MissingAbiFunction { function: String }, + MissingAbiFunction { function: &'static str }, #[error("Runtime error: {0}")] RuntimeError(#[from] RuntimeError), #[error("Failed to decode argument for engine call: {0:?}")] @@ -48,6 +47,8 @@ pub enum WasmExecutionError { AbiDecodeError(BorError), #[error("Unexpected ABI function {name}")] UnexpectedAbiFunction { name: String }, + #[error("Encoding error: {0}")] + EncodingError(#[from] BorError), #[error("Panic! {message}")] Panic { message: String, diff --git a/dan_layer/engine/src/wasm/limiting_tunable.rs b/dan_layer/engine/src/wasm/limiting_tunable.rs new file mode 100644 index 000000000..92e3a01de --- /dev/null +++ b/dan_layer/engine/src/wasm/limiting_tunable.rs @@ -0,0 +1,126 @@ +// Copyright 2024 The Tari Project +// SPDX-License-Identifier: BSD-3-Clause + +use std::ptr::NonNull; + +use wasmer::{ + vm, + vm::{MemoryStyle, TableStyle, VMMemoryDefinition, VMTableDefinition}, + MemoryError, + MemoryType, + Pages, + TableType, + Tunables, +}; + +/// A custom tunables that allows you to set a memory limit. +/// +/// After adjusting the memory limits, it delegates all other logic +/// to the base tunables. +pub struct LimitingTunables { + /// The maximum a linear memory is allowed to be (in Wasm pages, 64 KiB each). + /// Since Wasmer ensures there is only none or one memory, this is practically + /// an upper limit for the guest memory. + limit: Pages, + /// The base implementation we delegate all the logic to + base: T, +} + +impl LimitingTunables { + pub fn new(base: T, limit: Pages) -> Self { + Self { limit, base } + } + + /// Takes an input memory type as requested by the guest and sets + /// a maximum if missing. The resulting memory type is final if + /// valid. However, this can produce invalid types, such that + /// validate_memory must be called before creating the memory. + fn adjust_memory(&self, requested: &MemoryType) -> MemoryType { + let mut adjusted = *requested; + if requested.maximum.is_none() { + adjusted.maximum = Some(self.limit); + } + adjusted + } + + /// Ensures the a given memory type does not exceed the memory limit. + /// Call this after adjusting the memory. + fn validate_memory(&self, ty: &MemoryType) -> Result<(), MemoryError> { + if ty.minimum > self.limit { + return Err(MemoryError::Generic( + "Minimum exceeds the allowed memory limit".to_string(), + )); + } + + if let Some(max) = ty.maximum { + if max > self.limit { + return Err(MemoryError::Generic( + "Maximum exceeds the allowed memory limit".to_string(), + )); + } + } else { + return Err(MemoryError::Generic("Maximum unset".to_string())); + } + + Ok(()) + } +} + +impl Tunables for LimitingTunables { + /// Construct a `MemoryStyle` for the provided `MemoryType` + /// + /// Delegated to base. + fn memory_style(&self, memory: &MemoryType) -> MemoryStyle { + let adjusted = self.adjust_memory(memory); + self.base.memory_style(&adjusted) + } + + /// Construct a `TableStyle` for the provided `TableType` + /// + /// Delegated to base. + fn table_style(&self, table: &TableType) -> TableStyle { + self.base.table_style(table) + } + + /// Create a memory owned by the host given a [`MemoryType`] and a [`MemoryStyle`]. + /// + /// The requested memory type is validated, adjusted to the limited and then passed to base. + fn create_host_memory(&self, ty: &MemoryType, style: &MemoryStyle) -> Result { + let adjusted = self.adjust_memory(ty); + self.validate_memory(&adjusted)?; + self.base.create_host_memory(&adjusted, style) + } + + /// Create a memory owned by the VM given a [`MemoryType`] and a [`MemoryStyle`]. + /// + /// Delegated to base. + unsafe fn create_vm_memory( + &self, + ty: &MemoryType, + style: &MemoryStyle, + vm_definition_location: NonNull, + ) -> Result { + let adjusted = self.adjust_memory(ty); + self.validate_memory(&adjusted)?; + self.base.create_vm_memory(&adjusted, style, vm_definition_location) + } + + /// Create a table owned by the host given a [`TableType`] and a [`TableStyle`]. + /// + /// Delegated to base. + fn create_host_table(&self, ty: &TableType, style: &TableStyle) -> Result { + self.base.create_host_table(ty, style) + } + + /// Create a table owned by the VM given a [`TableType`] and a [`TableStyle`]. + /// + /// Delegated to base. + unsafe fn create_vm_table( + &self, + ty: &TableType, + style: &TableStyle, + vm_definition_location: NonNull, + ) -> Result { + self.base.create_vm_table(ty, style, vm_definition_location) + } +} diff --git a/dan_layer/engine/src/wasm/mem_writer.rs b/dan_layer/engine/src/wasm/mem_writer.rs new file mode 100644 index 000000000..fbdca384e --- /dev/null +++ b/dan_layer/engine/src/wasm/mem_writer.rs @@ -0,0 +1,28 @@ +// Copyright 2024 The Tari Project +// SPDX-License-Identifier: BSD-3-Clause + +use wasmer::{MemoryAccessError, MemoryView, WasmPtr}; + +pub struct MemWriter<'a> { + ptr: WasmPtr, + view: MemoryView<'a>, +} +impl<'a> MemWriter<'a> { + pub fn new(ptr: WasmPtr, view: MemoryView<'a>) -> Self { + Self { ptr, view } + } +} + +impl tari_bor::Write for &mut MemWriter<'_> { + type Error = MemoryAccessError; + + fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error> { + self.view.write(u64::from(self.ptr.offset()), data)?; + self.ptr = self.ptr.add_offset(data.len() as u32)?; + Ok(()) + } + + fn flush(&mut self) -> Result<(), Self::Error> { + Ok(()) + } +} diff --git a/dan_layer/engine/src/wasm/mod.rs b/dan_layer/engine/src/wasm/mod.rs index 6cfe64c9c..130ebad83 100644 --- a/dan_layer/engine/src/wasm/mod.rs +++ b/dan_layer/engine/src/wasm/mod.rs @@ -16,4 +16,6 @@ mod process; pub use process::WasmProcess; +mod limiting_tunable; +mod mem_writer; mod version; diff --git a/dan_layer/engine/src/wasm/module.rs b/dan_layer/engine/src/wasm/module.rs index ab3620aa5..d4d422292 100644 --- a/dan_layer/engine/src/wasm/module.rs +++ b/dan_layer/engine/src/wasm/module.rs @@ -20,11 +20,13 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use std::sync::Arc; +use std::{fmt, fmt::Formatter, sync::Arc}; use tari_template_abi::{FunctionDef, TemplateDef, ABI_TEMPLATE_DEF_GLOBAL_NAME}; use wasmer::{ - BaseTunables, + imports, + sys::BaseTunables, + AsStoreMut, CompilerConfig, Cranelift, CraneliftOptLevel, @@ -32,16 +34,20 @@ use wasmer::{ ExportError, Function, Instance, + NativeEngineExt, + Pages, Store, - Universal, - WasmerEnv, + Target, + TypedFunction, + WasmPtr, }; use crate::{ template::{LoadedTemplate, TemplateLoaderError, TemplateModuleLoader}, - wasm::{environment::WasmEnv, metering, WasmExecutionError}, + wasm::{environment::WasmEnv, limiting_tunable::LimitingTunables, metering, WasmExecutionError}, }; +pub type MainFunction = TypedFunction<(WasmPtr, u32), WasmPtr>; #[derive(Debug, Clone)] pub struct WasmModule { code: Vec, @@ -53,36 +59,46 @@ impl WasmModule { } pub fn load_template_from_code(code: &[u8]) -> Result { - let store = Self::create_store(); - let module = wasmer::Module::new(&store, code)?; + let engine = Self::create_engine(); + let module = wasmer::Module::new(&engine, code)?; + let mut store = Store::new(engine); + + let imports = imports! { + "env" => { + "tari_engine" => Function::new_typed(&mut store, |_op: i32, _arg_ptr: i32, _arg_len: i32| 0i32), + "debug" => Function::new_typed(&mut store, |_arg_ptr: i32, _arg_len: i32| { }), + "on_panic" => Function::new_typed(&mut store, |_msg_ptr: i32, _msg_len: i32, _line: i32, _col: i32| { }), + } + }; + let instance = Instance::new(&mut store, &module, &imports)?; let mut env = WasmEnv::new(()); - fn stub(_env: &WasmEnv<()>, _op: i32, _arg_ptr: i32, _arg_len: i32) -> i32 { - 0 - } + let memory = instance.exports.get_memory("memory")?.clone(); + env.set_memory(memory); + let template = env.load_abi(&mut store, &instance)?; + let main_fn = format!("{}_main", template.template_name()); + validate_instance(&mut store, &instance, &main_fn)?; - let stub = Function::new_native_with_env(&store, env.clone(), stub); - let imports = env.create_resolver(&store, stub); - let instance = Instance::new(&module, &imports)?; - env.init_with_instance(&instance)?; - validate_instance(&instance)?; - validate_environment(&env)?; + let engine = store.engine().clone(); - let template = initialize_and_load_template_abi(&instance, &env)?; - Ok(LoadedWasmTemplate::new(template, module, code.len()).into()) + Ok(LoadedWasmTemplate::new(template, module, engine, code.len()).into()) } pub fn code(&self) -> &[u8] { &self.code } - fn create_store() -> Store { - let mut cranelift = Cranelift::new(); - cranelift.opt_level(CraneliftOptLevel::Speed).canonicalize_nans(true); + fn create_engine() -> Engine { + const MEMORY_PAGE_LIMIT: Pages = Pages(32); // 2MiB = 32 * 65,536 + let base = BaseTunables::for_target(&Target::default()); + let tunables = LimitingTunables::new(base, MEMORY_PAGE_LIMIT); + let mut compiler = Cranelift::new(); + compiler.opt_level(CraneliftOptLevel::Speed).canonicalize_nans(true); // TODO: Configure metering limit - cranelift.push_middleware(Arc::new(metering::middleware(100_000_000))); - let engine = Universal::new(cranelift).engine(); - let tunables = BaseTunables::for_target(engine.target()); - Store::new_with_tunables(&engine, tunables) + compiler.push_middleware(Arc::new(metering::middleware(100_000_000))); + let mut engine = Engine::from(compiler); + engine.set_tunables(tunables); + + engine } } @@ -92,36 +108,20 @@ impl TemplateModuleLoader for WasmModule { } } -fn initialize_and_load_template_abi( - instance: &Instance, - env: &WasmEnv, -) -> Result { - let ptr = instance - .exports - .get_global(ABI_TEMPLATE_DEF_GLOBAL_NAME)? - .get() - .i32() - .ok_or(WasmExecutionError::ExportError(ExportError::IncompatibleType))?; - let ptr = u32::try_from(ptr).map_err(|_| WasmExecutionError::ExportError(ExportError::IncompatibleType))?; - - // Load ABI from memory - let data = env.read_memory_with_embedded_len(ptr)?; - let decoded = tari_bor::decode(&data).map_err(WasmExecutionError::AbiDecodeError)?; - Ok(decoded) -} - -#[derive(Debug, Clone)] +#[derive(Clone)] pub struct LoadedWasmTemplate { template_def: Arc, module: wasmer::Module, + engine: Engine, code_size: usize, } impl LoadedWasmTemplate { - pub fn new(template_def: TemplateDef, module: wasmer::Module, code_size: usize) -> Self { + pub fn new(template_def: TemplateDef, module: wasmer::Module, engine: Engine, code_size: usize) -> Self { Self { template_def: Arc::new(template_def), module, + engine, code_size, } } @@ -130,6 +130,14 @@ impl LoadedWasmTemplate { &self.module } + pub fn engine(&self) -> &Engine { + &self.engine + } + + pub fn create_store(&self) -> Store { + Store::new(self.engine.clone()) + } + pub fn template_name(&self) -> &str { self.template_def.template_name() } @@ -147,23 +155,33 @@ impl LoadedWasmTemplate { } } -fn validate_environment(env: &WasmEnv) -> Result<(), WasmExecutionError> { - const MAX_MEM_SIZE: usize = 2 * 1024 * 1024; - let mem_size = env.mem_size(); - if mem_size.bytes().0 > MAX_MEM_SIZE { - return Err(WasmExecutionError::MaxMemorySizeExceeded); +impl fmt::Debug for LoadedWasmTemplate { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.debug_struct("LoadedWasmTemplate") + .field("template_name", &self.template_name()) + .field("code_size", &self.code_size()) + .field("main", &"
") + .field("module", &self.module) + .finish() } - - Ok(()) } -fn validate_instance(instance: &Instance) -> Result<(), WasmExecutionError> { +fn validate_instance( + store: &mut S, + instance: &Instance, + main_fn: &str, +) -> Result<(), WasmExecutionError> { + fn is_func_permitted(name: &str) -> bool { + name.ends_with("_main") || name == "tari_alloc" || name == "tari_free" + } + // Enforce that only permitted functions are allowed let unexpected_abi_func = instance .exports .iter() .functions() .find(|(name, _)| !is_func_permitted(name)); + if let Some((name, _)) = unexpected_abi_func { return Err(WasmExecutionError::UnexpectedAbiFunction { name: name.to_string() }); } @@ -171,13 +189,12 @@ fn validate_instance(instance: &Instance) -> Result<(), WasmExecutionError> { instance .exports .get_global(ABI_TEMPLATE_DEF_GLOBAL_NAME)? - .get() + .get(store) .i32() .ok_or(WasmExecutionError::ExportError(ExportError::IncompatibleType))?; - Ok(()) -} + // Check that the main function exists + let _main: MainFunction = instance.exports.get_typed_function(store, main_fn)?; -fn is_func_permitted(name: &str) -> bool { - name.ends_with("_main") || name == "tari_alloc" || name == "tari_free" + Ok(()) } diff --git a/dan_layer/engine/src/wasm/process.rs b/dan_layer/engine/src/wasm/process.rs index f63ebde46..cd0186089 100644 --- a/dan_layer/engine/src/wasm/process.rs +++ b/dan_layer/engine/src/wasm/process.rs @@ -21,7 +21,7 @@ // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. use serde::{de::DeserializeOwned, Serialize}; -use tari_bor::{decode_exact, encode, encode_into, encode_with_len}; +use tari_bor::{decode_exact, encode, encode_into_writer, encode_with_len_to_writer, encoded_len}; use tari_engine_types::{indexed_value::IndexedValue, instruction_result::InstructionResult}; use tari_template_abi::{CallInfo, EngineOp, FunctionDef}; use tari_template_lib::{ @@ -44,7 +44,7 @@ use tari_template_lib::{ }, AbiContext, }; -use wasmer::{Function, Instance, Module, Val, WasmerEnv}; +use wasmer::{imports, AsStoreMut, Function, FunctionEnv, FunctionEnvMut, Instance, Store, StoreMut, WasmPtr}; use super::version::are_versions_compatible; use crate::{ @@ -53,6 +53,7 @@ use crate::{ wasm::{ environment::{AllocPtr, WasmEnv}, error::WasmExecutionError, + module::MainFunction, LoadedWasmTemplate, }, }; @@ -60,7 +61,6 @@ use crate::{ const LOG_TARGET: &str = "tari::dan::engine::wasm::process"; pub const ENGINE_TARI_VERSION: &str = env!("CARGO_PKG_VERSION"); -#[derive(Debug)] pub struct WasmProcess { module: LoadedWasmTemplate, env: WasmEnv, @@ -68,114 +68,135 @@ pub struct WasmProcess { } impl WasmProcess { - pub fn start(module: LoadedWasmTemplate, state: Runtime) -> Result { - let mut env = WasmEnv::new(state); - let store = module.wasm_module().store(); - let tari_engine = Function::new_native_with_env(store, env.clone(), Self::tari_engine_entrypoint); - let resolver = env.create_resolver(store, tari_engine); - let instance = Instance::new(module.wasm_module(), &resolver)?; + pub fn init(store: &mut Store, module: LoadedWasmTemplate, state: Runtime) -> Result { Self::validate_template_tari_version(&module)?; - env.init_with_instance(&instance)?; + + let mut env = WasmEnv::new(state); + let fn_env = FunctionEnv::new(store, env.clone()); + let tari_engine = Function::new_typed_with_env(store, &fn_env, Self::tari_engine_entrypoint); + + let imports = imports! { + "env" => { + "tari_engine" => tari_engine, + "debug" => Function::new_typed_with_env(store, &fn_env, debug_handler), + "on_panic" => Function::new_typed_with_env(store,&fn_env, on_panic_handler), + } + }; + let instance = Instance::new(store, module.wasm_module(), &imports)?; + let memory = instance.exports.get_memory("memory")?.clone(); + let mem_alloc = instance.exports.get_typed_function(store, "tari_alloc")?; + fn_env + .as_mut(store) + .set_memory(memory.clone()) + .set_alloc_funcs(mem_alloc.clone()); + + // Also set these for the local copy + env.set_memory(memory).set_alloc_funcs(mem_alloc); + Ok(Self { module, env, instance }) } - fn alloc_and_write(&self, val: &T) -> Result { - let mut buf = Vec::with_capacity(512); - encode_into(val, &mut buf).unwrap(); - let ptr = self.env.alloc(buf.len() as u32)?; - self.env.write_to_memory(&ptr, &buf)?; + fn alloc_and_write( + &self, + store: &mut S, + val: &T, + ) -> Result { + let len = encoded_len(val).unwrap(); + let len = u32::try_from(len).map_err(|_| WasmExecutionError::MemoryAllocationTooLarge)?; - Ok(ptr) - } + let ptr = self.env.alloc(store, len)?; + if ptr.is_null() { + return Err(WasmExecutionError::MemoryAllocationFailed); + } + let mut writer = self.env.memory_writer(store, ptr)?; + encode_into_writer(val, &mut writer).unwrap(); - pub fn wasm_module(&self) -> &Module { - self.module.wasm_module() + Ok(AllocPtr::new(ptr.offset(), len)) } - fn tari_engine_entrypoint(env: &WasmEnv, op: i32, arg_ptr: i32, arg_len: i32) -> i32 { - let arg = match env.read_from_memory(arg_ptr as u32, arg_len as u32) { - Ok(arg) => arg, - Err(err) => { - log::error!(target: LOG_TARGET, "Failed to read from memory: {}", err); - return 0; - }, - }; - + fn tari_engine_entrypoint( + mut env: FunctionEnvMut>, + op: i32, + arg_ptr: WasmPtr, + arg_len: u32, + ) -> WasmPtr { let op = match EngineOp::from_i32(op) { Some(op) => op, None => { log::error!(target: LOG_TARGET, "Invalid opcode: {}", op); - return 0; + return WasmPtr::null(); + }, + }; + + let (env_mut, mut store) = env.data_and_store_mut(); + let arg = match env_mut.read_from_memory(&mut store, arg_ptr, arg_len) { + Ok(arg) => arg, + Err(err) => { + log::error!(target: LOG_TARGET, "Failed to read from memory: {}", err); + return WasmPtr::null(); }, }; log::debug!(target: LOG_TARGET, "Engine call: {:?}", op); let result = match op { - EngineOp::EmitLog => Self::handle(env, arg, |env, arg: EmitLogArg| { - env.state().interface().emit_log(arg.level, arg.message) + EngineOp::EmitLog => Self::handle(store, env_mut, arg, |env, arg: EmitLogArg| { + env.interface().emit_log(arg.level, arg.message) }), - EngineOp::ComponentInvoke => Self::handle(env, arg, |env, arg: ComponentInvokeArg| { - env.state() - .interface() + EngineOp::ComponentInvoke => Self::handle(store, env_mut, arg, |env, arg: ComponentInvokeArg| { + env.interface() .component_invoke(arg.component_ref, arg.action, arg.args.into()) }), - EngineOp::ResourceInvoke => Self::handle(env, arg, |env, arg: ResourceInvokeArg| { - env.state() - .interface() + EngineOp::ResourceInvoke => Self::handle(store, env_mut, arg, |env, arg: ResourceInvokeArg| { + env.interface() .resource_invoke(arg.resource_ref, arg.action, arg.args.into()) }), - EngineOp::VaultInvoke => Self::handle(env, arg, |env, arg: VaultInvokeArg| { - env.state() - .interface() - .vault_invoke(arg.vault_ref, arg.action, arg.args.into()) + EngineOp::VaultInvoke => Self::handle(store, env_mut, arg, |env, arg: VaultInvokeArg| { + env.interface().vault_invoke(arg.vault_ref, arg.action, arg.args.into()) }), - EngineOp::BucketInvoke => Self::handle(env, arg, |env, arg: BucketInvokeArg| { - env.state() - .interface() + EngineOp::BucketInvoke => Self::handle(store, env_mut, arg, |env, arg: BucketInvokeArg| { + env.interface() .bucket_invoke(arg.bucket_ref, arg.action, arg.args.into()) }), - EngineOp::WorkspaceInvoke => Self::handle(env, arg, |env, arg: WorkspaceInvokeArg| { - env.state().interface().workspace_invoke(arg.action, arg.args.into()) + EngineOp::WorkspaceInvoke => Self::handle(store, env_mut, arg, |env, arg: WorkspaceInvokeArg| { + env.interface().workspace_invoke(arg.action, arg.args.into()) }), - EngineOp::NonFungibleInvoke => Self::handle(env, arg, |env, arg: NonFungibleInvokeArg| { - env.state() - .interface() + EngineOp::NonFungibleInvoke => Self::handle(store, env_mut, arg, |env, arg: NonFungibleInvokeArg| { + env.interface() .non_fungible_invoke(arg.address, arg.action, arg.args.into()) }), EngineOp::GenerateUniqueId => { - Self::handle(env, arg, |env, _arg: ()| env.state().interface().generate_uuid()) + Self::handle(store, env_mut, arg, |env, _arg: ()| env.interface().generate_uuid()) }, - EngineOp::ConsensusInvoke => Self::handle(env, arg, |env, arg: ConsensusInvokeArg| { - env.state().interface().consensus_invoke(arg.action) + EngineOp::ConsensusInvoke => Self::handle(store, env_mut, arg, |env, arg: ConsensusInvokeArg| { + env.interface().consensus_invoke(arg.action) }), - EngineOp::CallerContextInvoke => Self::handle(env, arg, |env, arg: CallerContextInvokeArg| { - env.state() - .interface() - .caller_context_invoke(arg.action, arg.args.into()) + EngineOp::CallerContextInvoke => Self::handle(store, env_mut, arg, |env, arg: CallerContextInvokeArg| { + env.interface().caller_context_invoke(arg.action, arg.args.into()) }), - EngineOp::GenerateRandomInvoke => Self::handle(env, arg, |env, arg: GenerateRandomInvokeArg| { - env.state().interface().generate_random_invoke(arg.action) + EngineOp::GenerateRandomInvoke => Self::handle(store, env_mut, arg, |env, arg: GenerateRandomInvokeArg| { + env.interface().generate_random_invoke(arg.action) }), - EngineOp::EmitEvent => Self::handle(env, arg, |env, arg: EmitEventArg| { - env.state().interface().emit_event(arg.topic, arg.payload) + EngineOp::EmitEvent => Self::handle(store, env_mut, arg, |env, arg: EmitEventArg| { + env.interface().emit_event(arg.topic, arg.payload) }), - EngineOp::CallInvoke => Self::handle(env, arg, |env, arg: CallInvokeArg| { - env.state().interface().call_invoke(arg.action, arg.args.into()) + EngineOp::CallInvoke => Self::handle(store, env_mut, arg, |env, arg: CallInvokeArg| { + env.interface().call_invoke(arg.action, arg.args.into()) }), - EngineOp::ProofInvoke => Self::handle(env, arg, |env, arg: ProofInvokeArg| { + EngineOp::ProofInvoke => Self::handle(store, env_mut, arg, |env, arg: ProofInvokeArg| { log::debug!(target: LOG_TARGET, "proof action = {:?}", arg.action); - env.state() - .interface() - .proof_invoke(arg.proof_ref, arg.action, arg.args.into()) - }), - EngineOp::BuiltinTemplateInvoke => Self::handle(env, arg, |env, arg: BuiltinTemplateInvokeArg| { - env.state().interface().builtin_template_invoke(arg.action) + env.interface().proof_invoke(arg.proof_ref, arg.action, arg.args.into()) }), + EngineOp::BuiltinTemplateInvoke => { + Self::handle(store, env_mut, arg, |env, arg: BuiltinTemplateInvokeArg| { + env.interface().builtin_template_invoke(arg.action) + }) + }, }; result.unwrap_or_else(|err| { if let Err(err) = env + .data() .state() .interface() .emit_log(LogLevel::Error, format!("Execution error: {}", err)) @@ -185,30 +206,30 @@ impl WasmProcess { log::error!(target: LOG_TARGET, "{}", err); if let WasmExecutionError::RuntimeError(e) = err { - env.set_last_engine_error(e); + env.data_mut().set_last_engine_error(e); } - 0 + WasmPtr::null() }) } pub fn handle( - env: &WasmEnv, + mut store: StoreMut, + env_mut: &mut WasmEnv, args: Vec, - f: fn(&WasmEnv, T) -> Result, - ) -> Result + f: fn(&mut Runtime, T) -> Result, + ) -> Result, WasmExecutionError> where T: DeserializeOwned, U: Serialize, WasmExecutionError: From, { let decoded = decode_exact(&args).map_err(WasmExecutionError::EngineArgDecodeFailed)?; - let resp = f(env, decoded)?; - let encoded = encode_with_len(&resp); - let ptr = env.alloc(encoded.len() as u32)?; - env.write_to_memory(&ptr, &encoded)?; - // TODO: It's not clear how/if this memory is freed. When I drop it on the WASM side I get an - // out-of-bounds access error. - Ok(ptr.as_i32()) + let resp = f(env_mut.state_mut(), decoded)?; + let len = encoded_len(&resp)?; + let ptr = env_mut.alloc(&mut store, len as u32)?; + let mut writer = env_mut.memory_writer(&mut store, ptr)?; + encode_with_len_to_writer(&mut writer, &resp)?; + Ok(ptr) } fn encoded_abi_context(&self) -> Vec { @@ -216,7 +237,7 @@ impl WasmProcess { } /// Determine if the version of the template_lib crate in the WASM is valid. - /// This is just a placeholder that logs the result, as we don't manage version incompatiblities yet + /// This is just a placeholder that logs the result, as we don't manage version incompatibilities yet fn validate_template_tari_version(module: &LoadedWasmTemplate) -> Result<(), WasmExecutionError> { let template_tari_version = module.template_def().tari_version(); @@ -234,10 +255,15 @@ impl WasmProcess { } } -impl Invokable for WasmProcess { +impl Invokable for WasmProcess { type Error = WasmExecutionError; - fn invoke(&self, func_def: &FunctionDef, args: Vec) -> Result { + fn invoke( + &mut self, + store: &mut Store, + func_def: &FunctionDef, + args: Vec, + ) -> Result { let call_info = CallInfo { abi_context: self.encoded_abi_context(), func_name: func_def.name.clone(), @@ -245,13 +271,15 @@ impl Invokable for WasmProcess { }; let main_name = format!("{}_main", self.module.template_name()); - let func = self.instance.exports.get_function(&main_name)?; + let func: MainFunction = self.instance.exports.get_typed_function(store, &main_name)?; - let call_info_ptr = self.alloc_and_write(&call_info)?; - let res = func.call(&[Val::I32(call_info_ptr.as_i32()), Val::I32(call_info_ptr.len() as i32)]); - self.env.free(call_info_ptr)?; + let call_info_ptr = self.alloc_and_write(store, &call_info)?; + let res = func.call(store, call_info_ptr.as_wasm_ptr(), call_info_ptr.len()); + // No need to free since the exported function should free the memory by dropping it at the end - however, if it + // does not the memory will be freed once the VM is destructed + // self.env.as_ref(store).free(store, call_info_ptr)?; - let val = match res { + let ptr = match res { Ok(res) => res, Err(err) => { if let Some(err) = self.env.take_last_engine_error() { @@ -267,13 +295,9 @@ impl Invokable for WasmProcess { return Err(err.into()); }, }; - let ptr = val - .first() - .and_then(|v| v.i32()) - .ok_or(WasmExecutionError::ExpectedPointerReturn { function: main_name })?; // Read response from memory - let raw = self.env.read_memory_with_embedded_len(ptr as u32)?; + let raw = self.env.read_memory_with_embedded_len(store, ptr.offset())?; let value = IndexedValue::from_raw(&raw)?; @@ -288,3 +312,49 @@ impl Invokable for WasmProcess { }) } } + +fn debug_handler(mut env: FunctionEnvMut>, arg_ptr: WasmPtr, arg_len: u32) { + const WASM_DEBUG_LOG_TARGET: &str = "tari::dan::wasm"; + let (state, mut store) = env.data_and_store_mut(); + + match state.read_from_memory(&mut store, arg_ptr, arg_len) { + Ok(arg) => { + eprintln!("DEBUG: {}", String::from_utf8_lossy(&arg)); + }, + Err(err) => { + log::error!(target: WASM_DEBUG_LOG_TARGET, "Failed to read from memory: {}", err); + }, + } +} + +fn on_panic_handler( + mut env: FunctionEnvMut>, + msg_ptr: WasmPtr, + msg_len: i32, + line: i32, + col: i32, +) { + const WASM_DEBUG_LOG_TARGET: &str = "tari::dan::wasm"; + let (state, mut store) = env.data_and_store_mut(); + + match state.read_from_memory(&mut store, msg_ptr, msg_len as u32) { + Ok(msg) => { + let msg = String::from_utf8_lossy(&msg); + eprintln!("📣 PANIC: ({}:{}) {}", line, col, msg); + log::error!(target: WASM_DEBUG_LOG_TARGET, "📣 PANIC: ({}:{}) {}", line, col, msg); + state.set_last_panic(msg.to_string()); + }, + Err(err) => { + log::error!( + target: WASM_DEBUG_LOG_TARGET, + "📣 PANIC: WASM template panicked but did not provide a valid memory pointer to on_panic \ + callback: {}", + err + ); + state.set_last_panic(format!( + "WASM panicked but did not provide a valid message pointer to on_panic callback: {}", + err + )); + }, + } +} diff --git a/dan_layer/engine/tests/templates/buggy/src/lib.rs b/dan_layer/engine/tests/templates/buggy/src/lib.rs index b547cc8c9..caee70c5c 100644 --- a/dan_layer/engine/tests/templates/buggy/src/lib.rs +++ b/dan_layer/engine/tests/templates/buggy/src/lib.rs @@ -23,7 +23,7 @@ use core::ptr; -pub use tari_template_abi::{tari_alloc, tari_free}; +pub use tari_template_abi::tari_alloc; #[global_allocator] static ALLOC: lol_alloc::AssumeSingleThreaded = @@ -37,6 +37,30 @@ pub static _ABI_TEMPLATE_DEF: [u8; 0] = []; #[no_mangle] pub static _ABI_TEMPLATE_DEF: [u8; 4] = [0, 0, 0, 0]; +#[cfg(not(any(feature = "return_empty_abi", feature = "return_null_abi")))] +#[no_mangle] +pub static _ABI_TEMPLATE_DEF: [u8; 446] = [ + 186, 1, 0, 0, 161, 98, 86, 49, 163, 109, 116, 101, 109, 112, 108, 97, 116, 101, 95, 110, 97, 109, 101, 101, 83, + 116, 97, 116, 101, 108, 116, 97, 114, 105, 95, 118, 101, 114, 115, 105, 111, 110, 101, 48, 46, 55, 46, 48, 105, + 102, 117, 110, 99, 116, 105, 111, 110, 115, 133, 164, 100, 110, 97, 109, 101, 99, 110, 101, 119, 105, 97, 114, 103, + 117, 109, 101, 110, 116, 115, 128, 102, 111, 117, 116, 112, 117, 116, 161, 101, 79, 116, 104, 101, 114, 161, 100, + 110, 97, 109, 101, 105, 67, 111, 109, 112, 111, 110, 101, 110, 116, 102, 105, 115, 95, 109, 117, 116, 244, 164, + 100, 110, 97, 109, 101, 111, 99, 114, 101, 97, 116, 101, 95, 109, 117, 108, 116, 105, 112, 108, 101, 105, 97, 114, + 103, 117, 109, 101, 110, 116, 115, 129, 162, 100, 110, 97, 109, 101, 97, 110, 104, 97, 114, 103, 95, 116, 121, 112, + 101, 99, 85, 51, 50, 102, 111, 117, 116, 112, 117, 116, 100, 85, 110, 105, 116, 102, 105, 115, 95, 109, 117, 116, + 244, 164, 100, 110, 97, 109, 101, 106, 114, 101, 115, 116, 114, 105, 99, 116, 101, 100, 105, 97, 114, 103, 117, + 109, 101, 110, 116, 115, 128, 102, 111, 117, 116, 112, 117, 116, 161, 101, 79, 116, 104, 101, 114, 161, 100, 110, + 97, 109, 101, 105, 67, 111, 109, 112, 111, 110, 101, 110, 116, 102, 105, 115, 95, 109, 117, 116, 244, 164, 100, + 110, 97, 109, 101, 99, 115, 101, 116, 105, 97, 114, 103, 117, 109, 101, 110, 116, 115, 130, 162, 100, 110, 97, 109, + 101, 100, 115, 101, 108, 102, 104, 97, 114, 103, 95, 116, 121, 112, 101, 161, 101, 79, 116, 104, 101, 114, 161, + 100, 110, 97, 109, 101, 105, 38, 109, 117, 116, 32, 115, 101, 108, 102, 162, 100, 110, 97, 109, 101, 101, 118, 97, + 108, 117, 101, 104, 97, 114, 103, 95, 116, 121, 112, 101, 99, 85, 51, 50, 102, 111, 117, 116, 112, 117, 116, 100, + 85, 110, 105, 116, 102, 105, 115, 95, 109, 117, 116, 245, 164, 100, 110, 97, 109, 101, 99, 103, 101, 116, 105, 97, + 114, 103, 117, 109, 101, 110, 116, 115, 129, 162, 100, 110, 97, 109, 101, 100, 115, 101, 108, 102, 104, 97, 114, + 103, 95, 116, 121, 112, 101, 161, 101, 79, 116, 104, 101, 114, 161, 100, 110, 97, 109, 101, 101, 38, 115, 101, 108, + 102, 102, 111, 117, 116, 112, 117, 116, 99, 85, 51, 50, 102, 105, 115, 95, 109, 117, 116, 244, +]; + #[no_mangle] pub extern "C" fn Buggy_main(_call_info: *mut u8, _call_info_len: usize) -> *mut u8 { ptr::null_mut() diff --git a/dan_layer/engine_types/src/hashing.rs b/dan_layer/engine_types/src/hashing.rs index 5b8400843..9b0c93226 100644 --- a/dan_layer/engine_types/src/hashing.rs +++ b/dan_layer/engine_types/src/hashing.rs @@ -28,7 +28,7 @@ use blake2::{ }; use digest::Digest; use serde::Serialize; -use tari_bor::encode_into; +use tari_bor::encode_into_std_writer; use tari_crypto::hashing::DomainSeparation; use tari_hashing::TariEngineHashDomain; use tari_template_lib::Hash; @@ -73,7 +73,7 @@ impl TariHasher32 { // encoding in infallible. However this should be the case. Since it is very unergonomic to return an // error in hash chain functions, and therefore all usages of the hasher, we assume all types implement // infallible encoding. - encode_into(data, &mut self.hash_writer()).expect("encoding failed") + encode_into_std_writer(data, &mut self.hash_writer()).expect("encoding failed") } pub fn chain(mut self, data: &T) -> Self { @@ -127,7 +127,7 @@ impl TariHasher64 { // encoding in infallible. However this should be the case. Since it is very unergonomic to return an // error in hash chain functions, and therefore all usages of the hasher, we assume all types implement // infallible encoding. - encode_into(data, &mut self.hash_writer()).expect("encoding failed") + encode_into_std_writer(data, &mut self.hash_writer()).expect("encoding failed") } pub fn chain(mut self, data: &T) -> Self { diff --git a/dan_layer/p2p/src/conversions/transaction.rs b/dan_layer/p2p/src/conversions/transaction.rs index e2b50e775..8ab4ad76e 100644 --- a/dan_layer/p2p/src/conversions/transaction.rs +++ b/dan_layer/p2p/src/conversions/transaction.rs @@ -544,10 +544,8 @@ impl TryFrom for ConfidentialStatemen commitment: checked_copy_fixed(&val.commitment) .ok_or_else(|| anyhow!("Invalid length of commitment bytes"))?, sender_public_nonce, - encrypted_data: EncryptedData( - checked_copy_fixed(&val.encrypted_value) - .ok_or_else(|| anyhow!("Invalid length of encrypted_value bytes"))?, - ), + encrypted_data: EncryptedData::try_from(val.encrypted_value) + .map_err(|len| anyhow!("Invalid length ({len}) of encrypted_value bytes"))?, minimum_value_promise: val.minimum_value_promise, viewable_balance_proof: val.viewable_balance_proof.map(TryInto::try_into).transpose()?, }) diff --git a/dan_layer/state_store_sqlite/src/sql_models/block.rs b/dan_layer/state_store_sqlite/src/sql_models/block.rs index d01d231db..96fe9d3f7 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/block.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/block.rs @@ -26,7 +26,9 @@ pub struct Block { pub shard_group: i32, pub proposed_by: String, pub qc_id: String, + #[allow(dead_code)] pub qc_height: i64, + #[allow(dead_code)] pub command_count: i64, pub commands: String, pub total_leader_fee: i64, diff --git a/dan_layer/state_store_sqlite/src/sql_models/block_diff.rs b/dan_layer/state_store_sqlite/src/sql_models/block_diff.rs index 68429417b..05f0f340a 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/block_diff.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/block_diff.rs @@ -10,7 +10,9 @@ use crate::serialization::{deserialize_hex_try_from, deserialize_json}; #[derive(Debug, Clone, Queryable)] pub struct BlockDiff { + #[allow(dead_code)] pub id: i32, + #[allow(dead_code)] pub block_id: String, pub transaction_id: String, pub substate_id: String, @@ -18,6 +20,7 @@ pub struct BlockDiff { pub shard: i32, pub change: String, pub state: Option, + #[allow(dead_code)] pub created_at: PrimitiveDateTime, } diff --git a/dan_layer/state_store_sqlite/src/sql_models/foreign_proposal.rs b/dan_layer/state_store_sqlite/src/sql_models/foreign_proposal.rs index f532d6364..aab648c4d 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/foreign_proposal.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/foreign_proposal.rs @@ -27,6 +27,7 @@ pub struct ForeignProposal { pub shard_group: i32, pub proposed_by: String, pub qc: String, + #[allow(dead_code)] pub command_count: i64, pub commands: String, pub total_leader_fee: i64, @@ -38,6 +39,7 @@ pub struct ForeignProposal { pub justify_qc_id: String, pub block_pledge: String, pub proposed_in_block: Option, + #[allow(dead_code)] pub proposed_in_block_height: Option, pub status: String, pub extra_data: Option, diff --git a/dan_layer/state_store_sqlite/src/sql_models/foreign_substate_pledge.rs b/dan_layer/state_store_sqlite/src/sql_models/foreign_substate_pledge.rs index f9f69bff3..7574739a1 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/foreign_substate_pledge.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/foreign_substate_pledge.rs @@ -6,13 +6,18 @@ use time::PrimitiveDateTime; #[derive(Debug, Clone, Queryable)] pub struct ForeignSubstatePledge { + #[allow(dead_code)] pub id: i32, + #[allow(dead_code)] pub transaction_id: String, + #[allow(dead_code)] pub address: String, pub substate_id: String, pub version: i32, pub substate_value: Option, + #[allow(dead_code)] pub shard_group: i32, pub lock_type: String, + #[allow(dead_code)] pub created_at: PrimitiveDateTime, } diff --git a/dan_layer/state_store_sqlite/src/sql_models/state_transition.rs b/dan_layer/state_store_sqlite/src/sql_models/state_transition.rs index 5259c395a..3e3d71332 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/state_transition.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/state_transition.rs @@ -18,12 +18,18 @@ pub struct StateTransition { pub epoch: i64, pub shard: i32, pub seq: i64, + #[allow(dead_code)] pub substate_address: String, + #[allow(dead_code)] pub substate_id: String, + #[allow(dead_code)] pub version: i32, pub transition: String, + #[allow(dead_code)] pub state_hash: Option, + #[allow(dead_code)] pub state_version: i64, + #[allow(dead_code)] pub created_at: PrimitiveDateTime, } diff --git a/dan_layer/state_store_sqlite/src/sql_models/substate_lock.rs b/dan_layer/state_store_sqlite/src/sql_models/substate_lock.rs index b7c69909e..50f50daa2 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/substate_lock.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/substate_lock.rs @@ -12,6 +12,7 @@ use crate::{serialization::deserialize_hex_try_from, sql_models::SubstateRecord} #[derive(Debug, Clone, Queryable)] pub struct SubstateLock { + #[allow(dead_code)] pub id: i32, pub block_id: String, pub transaction_id: String, @@ -19,6 +20,7 @@ pub struct SubstateLock { pub version: i32, pub lock: String, pub is_local_only: bool, + #[allow(dead_code)] pub created_at: PrimitiveDateTime, } diff --git a/dan_layer/state_store_sqlite/src/sql_models/transaction_pool.rs b/dan_layer/state_store_sqlite/src/sql_models/transaction_pool.rs index c6fd0b5ad..a5aa9818f 100644 --- a/dan_layer/state_store_sqlite/src/sql_models/transaction_pool.rs +++ b/dan_layer/state_store_sqlite/src/sql_models/transaction_pool.rs @@ -13,6 +13,7 @@ use crate::serialization::{deserialize_hex_try_from, deserialize_json, parse_fro #[derive(Debug, Clone, Queryable)] pub struct TransactionPoolRecord { + #[allow(dead_code)] pub id: i32, pub transaction_id: String, pub original_decision: String, @@ -25,10 +26,14 @@ pub struct TransactionPoolRecord { // TODO: This is the last stage update, but does not reflect the actual stage (which comes from the // transaction_pool_state_updates table). This is kind of a hack to make transaction_pool_count work // and should not given to TransactionPoolRecord::load. + #[allow(dead_code)] pub pending_stage: Option, pub is_ready: bool, + #[allow(dead_code)] pub confirm_stage: Option, + #[allow(dead_code)] pub updated_at: PrimitiveDateTime, + #[allow(dead_code)] pub created_at: PrimitiveDateTime, } @@ -84,8 +89,10 @@ impl TransactionPoolRecord { pub struct TransactionPoolStateUpdate { #[diesel(sql_type = diesel::sql_types::Integer)] pub id: i32, + #[allow(dead_code)] #[diesel(sql_type = diesel::sql_types::Text)] pub block_id: String, + #[allow(dead_code)] #[diesel(sql_type = diesel::sql_types::BigInt)] pub block_height: i64, #[diesel(sql_type = diesel::sql_types::Text)] @@ -104,8 +111,10 @@ pub struct TransactionPoolStateUpdate { pub leader_fee: Option, #[diesel(sql_type = diesel::sql_types::Nullable < diesel::sql_types::Text >)] pub remote_decision: Option, + #[allow(dead_code)] #[diesel(sql_type = diesel::sql_types::Bool)] pub is_applied: bool, + #[allow(dead_code)] #[diesel(sql_type = diesel::sql_types::Timestamp)] pub created_at: PrimitiveDateTime, } diff --git a/dan_layer/state_tree/src/jellyfish/types.rs b/dan_layer/state_tree/src/jellyfish/types.rs index 6e6f2a418..3df342a78 100644 --- a/dan_layer/state_tree/src/jellyfish/types.rs +++ b/dan_layer/state_tree/src/jellyfish/types.rs @@ -1185,11 +1185,11 @@ impl From> for Node

{ } impl Node

{ - /// Creates the [`Internal`](Node::Internal) variant. - #[cfg(any(test, feature = "fuzzing"))] - pub fn new_internal(children: Children) -> Self { - Node::Internal(InternalNode::new(children)) - } + // /// Creates the [`Internal`](Node::Internal) variant. + // #[cfg(any(test, feature = "fuzzing"))] + // pub fn new_internal(children: Children) -> Self { + // Node::Internal(InternalNode::new(children)) + // } /// Creates the [`Leaf`](Node::Leaf) variant. pub fn new_leaf(leaf_key: LeafKey, value_hash: Hash, payload: P, version: Version) -> Self { diff --git a/dan_layer/storage/src/consensus_models/block.rs b/dan_layer/storage/src/consensus_models/block.rs index 13cbbbe55..60e226357 100644 --- a/dan_layer/storage/src/consensus_models/block.rs +++ b/dan_layer/storage/src/consensus_models/block.rs @@ -591,7 +591,7 @@ impl Block { } impl Block { - pub fn get(tx: &TTx, id: &BlockId) -> Result { + pub fn get(tx: &TTx, id: &BlockId) -> Result { tx.blocks_get(id) } @@ -607,7 +607,7 @@ impl Block { tx.blocks_get_all_between(epoch, shard_group, start_block_id, end_block_id, include_dummy_blocks) } - pub fn get_last_n_in_epoch( + pub fn get_last_n_in_epoch( tx: &TTx, n: usize, epoch: Epoch, @@ -615,15 +615,15 @@ impl Block { tx.blocks_get_last_n_in_epoch(n, epoch) } - pub fn exists(&self, tx: &TTx) -> Result { + pub fn exists(&self, tx: &TTx) -> Result { Self::record_exists(tx, self.id()) } - pub fn parent_exists(&self, tx: &TTx) -> Result { + pub fn parent_exists(&self, tx: &TTx) -> Result { Self::record_exists(tx, self.parent()) } - pub fn has_been_justified( + pub fn has_been_justified( tx: &TTx, block_id: &BlockId, ) -> Result { @@ -632,14 +632,11 @@ impl Block { Ok(b.is_justified) } - pub fn record_exists( - tx: &TTx, - block_id: &BlockId, - ) -> Result { + pub fn record_exists(tx: &TTx, block_id: &BlockId) -> Result { tx.blocks_exists(block_id) } - pub fn insert(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn insert(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.blocks_insert(self) } @@ -824,7 +821,7 @@ impl Block { tx.blocks_is_ancestor(self.parent(), ancestor) } - pub fn get_parent(&self, tx: &TTx) -> Result { + pub fn get_parent(&self, tx: &TTx) -> Result { if self.id.is_zero() && self.parent.is_zero() { return Err(StorageError::NotFound { item: "Block parent", @@ -940,7 +937,7 @@ impl Block { mut on_commit: TFnOnCommit, ) -> Result where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, TFnOnLock: FnMut(&mut TTx, &LockedBlock, &Block, &QuorumCertificate) -> Result<(), E>, TFnOnCommit: FnMut(&mut TTx, &LastExecuted, &Block) -> Result<(), E>, @@ -1038,7 +1035,7 @@ impl Block { pub fn save_foreign_send_counters(&self, tx: &mut TTx) -> Result<(), StorageError> where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, { let mut counters = ForeignSendCounters::get_or_default(&**tx, self.justify().block_id())?; @@ -1227,7 +1224,7 @@ fn on_locked_block_recurse( callback: &mut F, ) -> Result<(), E> where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, E: From, F: FnMut(&mut TTx, &LockedBlock, &Block, &QuorumCertificate) -> Result<(), E>, @@ -1247,7 +1244,7 @@ fn on_commit_block_recurse( callback: &mut F, ) -> Result<(), E> where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, E: From, F: FnMut(&mut TTx, &LastExecuted, &Block) -> Result<(), E>, diff --git a/dan_layer/storage/src/consensus_models/executed_transaction.rs b/dan_layer/storage/src/consensus_models/executed_transaction.rs index 5d3600d18..ebe90cdb8 100644 --- a/dan_layer/storage/src/consensus_models/executed_transaction.rs +++ b/dan_layer/storage/src/consensus_models/executed_transaction.rs @@ -269,10 +269,7 @@ impl ExecutedTransaction { Ok(exec.into_execution().for_block(*block_id)) } - pub fn exists( - tx: &TTx, - tx_id: &TransactionId, - ) -> Result { + pub fn exists(tx: &TTx, tx_id: &TransactionId) -> Result { match tx.transactions_get(tx_id).optional()? { Some(rec) => Ok(rec.execution_result.is_some()), None => Ok(false), diff --git a/dan_layer/storage/src/consensus_models/foreign_proposal.rs b/dan_layer/storage/src/consensus_models/foreign_proposal.rs index aeed0da62..4d80f6b3e 100644 --- a/dan_layer/storage/src/consensus_models/foreign_proposal.rs +++ b/dan_layer/storage/src/consensus_models/foreign_proposal.rs @@ -65,39 +65,33 @@ impl ForeignProposal { impl ForeignProposal { pub fn upsert(&self, tx: &mut TTx, proposed_in_block: Option) -> Result<(), StorageError> where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, { self.justify_qc().save(tx)?; tx.foreign_proposals_upsert(self, proposed_in_block) } - pub fn delete( - tx: &mut TTx, - block_id: &BlockId, - ) -> Result<(), StorageError> { + pub fn delete(tx: &mut TTx, block_id: &BlockId) -> Result<(), StorageError> { tx.foreign_proposals_delete(block_id) } - pub fn delete_in_epoch( - tx: &mut TTx, - epoch: Epoch, - ) -> Result<(), StorageError> { + pub fn delete_in_epoch(tx: &mut TTx, epoch: Epoch) -> Result<(), StorageError> { tx.foreign_proposals_delete_in_epoch(epoch) } - pub fn get_any<'a, TTx: StateStoreReadTransaction + ?Sized, I: IntoIterator>( + pub fn get_any<'a, TTx: StateStoreReadTransaction, I: IntoIterator>( tx: &TTx, block_ids: I, ) -> Result, StorageError> { tx.foreign_proposals_get_any(block_ids) } - pub fn exists(&self, tx: &TTx) -> Result { + pub fn exists(&self, tx: &TTx) -> Result { tx.foreign_proposals_exists(self.block.id()) } - pub fn get_all_new( + pub fn get_all_new( tx: &TTx, block_id: &BlockId, limit: usize, @@ -105,7 +99,7 @@ impl ForeignProposal { tx.foreign_proposals_get_all_new(block_id, limit) } - pub fn set_proposed_in( + pub fn set_proposed_in( tx: &mut TTx, block_id: &BlockId, proposed_in_block: &BlockId, @@ -113,10 +107,7 @@ impl ForeignProposal { tx.foreign_proposals_set_proposed_in(block_id, proposed_in_block) } - pub fn has_unconfirmed( - tx: &TTx, - epoch: Epoch, - ) -> Result { + pub fn has_unconfirmed(tx: &TTx, epoch: Epoch) -> Result { tx.foreign_proposals_has_unconfirmed(epoch) } } @@ -135,14 +126,11 @@ pub struct ForeignProposalAtom { } impl ForeignProposalAtom { - pub fn exists(&self, tx: &TTx) -> Result { + pub fn exists(&self, tx: &TTx) -> Result { tx.foreign_proposals_exists(&self.block_id) } - pub fn get_proposal( - &self, - tx: &TTx, - ) -> Result { + pub fn get_proposal(&self, tx: &TTx) -> Result { let mut found = tx.foreign_proposals_get_any(Some(&self.block_id))?; let found = found.pop().ok_or_else(|| StorageError::NotFound { item: "ForeignProposal", @@ -151,11 +139,11 @@ impl ForeignProposalAtom { Ok(found) } - pub fn delete(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn delete(&self, tx: &mut TTx) -> Result<(), StorageError> { ForeignProposal::delete(tx, &self.block_id) } - pub fn set_status( + pub fn set_status( &self, tx: &mut TTx, status: ForeignProposalStatus, diff --git a/dan_layer/storage/src/consensus_models/foreign_receive_counters.rs b/dan_layer/storage/src/consensus_models/foreign_receive_counters.rs index b2c502133..54d094f14 100644 --- a/dan_layer/storage/src/consensus_models/foreign_receive_counters.rs +++ b/dan_layer/storage/src/consensus_models/foreign_receive_counters.rs @@ -38,12 +38,12 @@ impl ForeignReceiveCounters { } impl ForeignReceiveCounters { - pub fn save(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn save(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.foreign_receive_counters_set(self)?; Ok(()) } - pub fn get_or_default(tx: &TTx) -> Result { + pub fn get_or_default(tx: &TTx) -> Result { Ok(tx.foreign_receive_counters_get().optional()?.unwrap_or_default()) } } diff --git a/dan_layer/storage/src/consensus_models/foreign_send_counters.rs b/dan_layer/storage/src/consensus_models/foreign_send_counters.rs index 593e59730..a3d76d9ee 100644 --- a/dan_layer/storage/src/consensus_models/foreign_send_counters.rs +++ b/dan_layer/storage/src/consensus_models/foreign_send_counters.rs @@ -44,19 +44,12 @@ impl ForeignSendCounters { } impl ForeignSendCounters { - pub fn set( - &self, - tx: &mut TTx, - block_id: &BlockId, - ) -> Result<(), StorageError> { + pub fn set(&self, tx: &mut TTx, block_id: &BlockId) -> Result<(), StorageError> { tx.foreign_send_counters_set(self, block_id)?; Ok(()) } - pub fn get_or_default( - tx: &TTx, - block_id: &BlockId, - ) -> Result { + pub fn get_or_default(tx: &TTx, block_id: &BlockId) -> Result { Ok(tx.foreign_send_counters_get(block_id).optional()?.unwrap_or_default()) } } diff --git a/dan_layer/storage/src/consensus_models/high_qc.rs b/dan_layer/storage/src/consensus_models/high_qc.rs index 49b78936a..d1ef5a9e2 100644 --- a/dan_layer/storage/src/consensus_models/high_qc.rs +++ b/dan_layer/storage/src/consensus_models/high_qc.rs @@ -67,22 +67,22 @@ impl HighQc { } impl HighQc { - pub fn get(tx: &TTx, epoch: Epoch) -> Result { + pub fn get(tx: &TTx, epoch: Epoch) -> Result { tx.high_qc_get(epoch) } - pub fn get_quorum_certificate( + pub fn get_quorum_certificate( &self, tx: &TTx, ) -> Result { QuorumCertificate::get(tx, &self.qc_id) } - pub fn get_block(&self, tx: &TTx) -> Result { + pub fn get_block(&self, tx: &TTx) -> Result { Block::get(tx, &self.block_id) } - pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.high_qc_set(self) } } diff --git a/dan_layer/storage/src/consensus_models/last_executed.rs b/dan_layer/storage/src/consensus_models/last_executed.rs index 7e5d8f34f..7d4d9b2d2 100644 --- a/dan_layer/storage/src/consensus_models/last_executed.rs +++ b/dan_layer/storage/src/consensus_models/last_executed.rs @@ -12,11 +12,11 @@ pub struct LastExecuted { } impl LastExecuted { - pub fn get(tx: &TTx) -> Result { + pub fn get(tx: &TTx) -> Result { tx.last_executed_get() } - pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.last_executed_set(self) } } diff --git a/dan_layer/storage/src/consensus_models/last_proposed.rs b/dan_layer/storage/src/consensus_models/last_proposed.rs index 66a69476b..a48212878 100644 --- a/dan_layer/storage/src/consensus_models/last_proposed.rs +++ b/dan_layer/storage/src/consensus_models/last_proposed.rs @@ -38,7 +38,7 @@ impl LastProposed { tx.last_proposed_unset(self) } - pub fn get_block(&self, tx: &TTx) -> Result { + pub fn get_block(&self, tx: &TTx) -> Result { Block::get(tx, &self.block_id) } } diff --git a/dan_layer/storage/src/consensus_models/last_sent_vote.rs b/dan_layer/storage/src/consensus_models/last_sent_vote.rs index 562eb3105..b98739242 100644 --- a/dan_layer/storage/src/consensus_models/last_sent_vote.rs +++ b/dan_layer/storage/src/consensus_models/last_sent_vote.rs @@ -15,7 +15,7 @@ pub struct LastSentVote { } impl LastSentVote { - pub fn get(tx: &TTx) -> Result { + pub fn get(tx: &TTx) -> Result { tx.last_sent_vote_get() } diff --git a/dan_layer/storage/src/consensus_models/leaf_block.rs b/dan_layer/storage/src/consensus_models/leaf_block.rs index b042e3108..92411fe1f 100644 --- a/dan_layer/storage/src/consensus_models/leaf_block.rs +++ b/dan_layer/storage/src/consensus_models/leaf_block.rs @@ -57,7 +57,7 @@ impl LeafBlock { tx.leaf_block_get(epoch) } - pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.leaf_block_set(self) } diff --git a/dan_layer/storage/src/consensus_models/locked_block.rs b/dan_layer/storage/src/consensus_models/locked_block.rs index 997fe48d1..ca1048e3b 100644 --- a/dan_layer/storage/src/consensus_models/locked_block.rs +++ b/dan_layer/storage/src/consensus_models/locked_block.rs @@ -34,7 +34,7 @@ impl LockedBlock { } impl LockedBlock { - pub fn get(tx: &TTx, epoch: Epoch) -> Result { + pub fn get(tx: &TTx, epoch: Epoch) -> Result { tx.locked_block_get(epoch) } @@ -42,7 +42,7 @@ impl LockedBlock { tx.blocks_get(&self.block_id) } - pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn set(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.locked_block_set(self) } } diff --git a/dan_layer/storage/src/consensus_models/quorum_certificate.rs b/dan_layer/storage/src/consensus_models/quorum_certificate.rs index 1293cc82e..b564a37a3 100644 --- a/dan_layer/storage/src/consensus_models/quorum_certificate.rs +++ b/dan_layer/storage/src/consensus_models/quorum_certificate.rs @@ -171,39 +171,36 @@ impl QuorumCertificate { } impl QuorumCertificate { - pub fn get(tx: &TTx, qc_id: &QcId) -> Result { + pub fn get(tx: &TTx, qc_id: &QcId) -> Result { tx.quorum_certificates_get(qc_id) } - pub fn get_all<'a, TTx: StateStoreReadTransaction + ?Sized, I: IntoIterator>( + pub fn get_all<'a, TTx: StateStoreReadTransaction, I: IntoIterator>( tx: &TTx, qc_ids: I, ) -> Result, StorageError> { tx.quorum_certificates_get_all(qc_ids) } - pub fn get_block(&self, tx: &TTx) -> Result { + pub fn get_block(&self, tx: &TTx) -> Result { Block::get(tx, &self.block_id) } - pub fn get_by_block_id( - tx: &TTx, - block_id: &BlockId, - ) -> Result { + pub fn get_by_block_id(tx: &TTx, block_id: &BlockId) -> Result { tx.quorum_certificates_get_by_block_id(block_id) } - pub fn insert(&self, tx: &mut TTx) -> Result<(), StorageError> { + pub fn insert(&self, tx: &mut TTx) -> Result<(), StorageError> { tx.quorum_certificates_insert(self) } - pub fn exists(&self, tx: &TTx) -> Result { + pub fn exists(&self, tx: &TTx) -> Result { Ok(tx.quorum_certificates_get(&self.qc_id).optional()?.is_some()) } pub fn check_high_qc(&self, tx: &mut TTx) -> Result<(bool, HighQc), StorageError> where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, { let Some(high_qc) = HighQc::get(&**tx, self.epoch).optional()? else { @@ -219,7 +216,7 @@ impl QuorumCertificate { pub fn update_high_qc(&self, tx: &mut TTx) -> Result where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, { let (is_new, high_qc) = self.check_high_qc(tx)?; @@ -268,7 +265,7 @@ impl QuorumCertificate { pub fn save(&self, tx: &mut TTx) -> Result where - TTx: StateStoreWriteTransaction + Deref + ?Sized, + TTx: StateStoreWriteTransaction + Deref, TTx::Target: StateStoreReadTransaction, { if self.exists(&**tx)? { diff --git a/dan_layer/storage/src/consensus_models/substate.rs b/dan_layer/storage/src/consensus_models/substate.rs index 73a408003..1094b0c2b 100644 --- a/dan_layer/storage/src/consensus_models/substate.rs +++ b/dan_layer/storage/src/consensus_models/substate.rs @@ -181,39 +181,32 @@ impl SubstateRecord { Ok(()) } - pub fn exists( - tx: &TTx, - id: &VersionedSubstateId, - ) -> Result { + pub fn exists(tx: &TTx, id: &VersionedSubstateId) -> Result { Self::any_exist(tx, Some(id)) } - pub fn any_exist< - TTx: StateStoreReadTransaction + ?Sized, - I: IntoIterator, - S: Borrow, - >( + pub fn any_exist, S: Borrow>( tx: &TTx, substates: I, ) -> Result { tx.substates_any_exist(substates) } - pub fn exists_for_transaction( + pub fn exists_for_transaction( tx: &TTx, transaction_id: &TransactionId, ) -> Result { tx.substates_exists_for_transaction(transaction_id) } - pub fn get( + pub fn get( tx: &TTx, address: &SubstateAddress, ) -> Result { tx.substates_get(address) } - pub fn substate_is_up( + pub fn substate_is_up( tx: &TTx, shard: &SubstateAddress, ) -> Result { @@ -222,7 +215,7 @@ impl SubstateRecord { Ok(rec.is_up()) } - pub fn get_any>( + pub fn get_any>( tx: &TTx, shards: I, ) -> Result<(Vec, HashSet), StorageError> { @@ -235,7 +228,7 @@ impl SubstateRecord { Ok((found, substate_ids)) } - pub fn get_any_max_version<'a, TTx: StateStoreReadTransaction + ?Sized, I: IntoIterator>( + pub fn get_any_max_version<'a, TTx: StateStoreReadTransaction, I: IntoIterator>( tx: &TTx, substate_ids: I, ) -> Result<(Vec, HashSet<&'a SubstateId>), StorageError> { @@ -248,14 +241,14 @@ impl SubstateRecord { Ok((found, substate_ids)) } - pub fn get_latest_version( + pub fn get_latest_version( tx: &TTx, substate_id: &SubstateId, ) -> Result<(u32, bool), StorageError> { tx.substates_get_max_version_for_substate(substate_id) } - pub fn get_latest( + pub fn get_latest( tx: &TTx, substate_id: &SubstateId, ) -> Result { diff --git a/dan_layer/storage/src/consensus_models/transaction.rs b/dan_layer/storage/src/consensus_models/transaction.rs index c9e759a1e..bab345050 100644 --- a/dan_layer/storage/src/consensus_models/transaction.rs +++ b/dan_layer/storage/src/consensus_models/transaction.rs @@ -279,14 +279,11 @@ impl TransactionRecord { tx.transactions_get(tx_id) } - pub fn exists( - tx: &TTx, - tx_id: &TransactionId, - ) -> Result { + pub fn exists(tx: &TTx, tx_id: &TransactionId) -> Result { tx.transactions_exists(tx_id) } - pub fn exists_any<'a, TTx: StateStoreReadTransaction + ?Sized, I: IntoIterator>( + pub fn exists_any<'a, TTx: StateStoreReadTransaction, I: IntoIterator>( tx: &TTx, tx_ids: I, ) -> Result { diff --git a/dan_layer/storage/src/consensus_models/vote.rs b/dan_layer/storage/src/consensus_models/vote.rs index 682e8d4db..beca58068 100644 --- a/dan_layer/storage/src/consensus_models/vote.rs +++ b/dan_layer/storage/src/consensus_models/vote.rs @@ -34,7 +34,7 @@ impl Vote { } impl Vote { - pub fn exists(&self, tx: &TTx) -> Result { + pub fn exists(&self, tx: &TTx) -> Result { Ok(tx .votes_get_by_block_and_sender(&self.block_id, &self.sender_leaf_hash) .optional()? diff --git a/dan_layer/storage_sqlite/src/global/backend_adapter.rs b/dan_layer/storage_sqlite/src/global/backend_adapter.rs index cef5e5f52..42c3bca4d 100644 --- a/dan_layer/storage_sqlite/src/global/backend_adapter.rs +++ b/dan_layer/storage_sqlite/src/global/backend_adapter.rs @@ -85,7 +85,7 @@ use crate::{ SqliteTransaction, }; -sql_function! { +define_sql_function! { #[sql_name = "COALESCE"] fn coalesce_bigint(x: diesel::sql_types::Nullable, y: BigInt) -> BigInt; } diff --git a/dan_layer/tari_bor/src/lib.rs b/dan_layer/tari_bor/src/lib.rs index 5f2d8362d..a0e617fec 100644 --- a/dan_layer/tari_bor/src/lib.rs +++ b/dan_layer/tari_bor/src/lib.rs @@ -4,11 +4,14 @@ #![cfg_attr(not(feature = "std"), no_std)] #[cfg(not(feature = "std"))] -use alloc::{format, string::ToString, vec::Vec}; +use alloc::{fmt, format, string::ToString, vec::Vec}; #[cfg(not(feature = "std"))] extern crate alloc; +#[cfg(feature = "std")] +use std::fmt; + mod tag; pub use tag::*; @@ -19,22 +22,31 @@ mod walker; pub use ciborium::{cbor, value::Value}; use ciborium::{de::from_reader, ser::into_writer}; +pub use ciborium_io::{Read, Write}; pub use error::BorError; pub use serde::{self, de::DeserializeOwned, Deserialize, Serialize}; pub use walker::*; pub fn encode_with_len(val: &T) -> Vec { let mut buf = Vec::with_capacity(512); - buf.extend([0u8; 4]); - - encode_into(val, &mut buf).expect("Vec Write impl is infallible"); - - let len = ((buf.len() - 4) as u32).to_le_bytes(); - buf[..4].copy_from_slice(&len); - + encode_with_len_to_writer(&mut buf, val).expect("Vec Write impl is infallible"); buf } +pub fn encode_with_len_to_writer(mut writer: W, val: &T) -> Result<(), BorError> +where + T: Serialize, + W: Write, + W::Error: fmt::Debug, +{ + let len = encoded_len(val)?; + writer + .write_all(&(len as u32).to_le_bytes()) + .map_err(|e| BorError::new(format!("{:?}", e)))?; + encode_into_writer(val, writer)?; + Ok(()) +} + #[cfg(not(feature = "std"))] pub fn encode_into(val: &T, writer: &mut W) -> Result<(), BorError> where @@ -46,16 +58,34 @@ where } #[cfg(feature = "std")] -pub fn encode_into(val: &T, writer: &mut W) -> Result<(), BorError> { +pub fn encode_into_std_writer( + val: &T, + writer: &mut W, +) -> Result<(), BorError> { + into_writer(&val, writer).map_err(to_bor_error) +} + +pub fn encode_into_writer(val: &T, writer: W) -> Result<(), BorError> +where + T: Serialize + ?Sized, + W: Write, + W::Error: fmt::Debug, +{ into_writer(&val, writer).map_err(to_bor_error) } pub fn encode(val: &T) -> Result, BorError> { let mut buf = Vec::with_capacity(512); - encode_into(val, &mut buf).map_err(|e| BorError::new(format!("{:?}", e)))?; + encode_into_writer(val, &mut buf).map_err(|e| BorError::new(format!("{:?}", e)))?; Ok(buf) } +pub fn encoded_len(val: &T) -> Result { + let mut counter = ByteCounter::new(); + encode_into_writer(val, &mut counter).map_err(|e| BorError::new(format!("{:?}", e)))?; + Ok(counter.get()) +} + /// Encodes any Rust type using CBOR pub fn to_value(val: &T) -> Result { Value::serialized(val).map_err(to_bor_error) @@ -74,6 +104,16 @@ fn decode_inner(input: &mut &[u8]) -> Result { Ok(result) } +pub fn decode_from_reader(reader: R) -> Result +where + T: DeserializeOwned, + R: Read, + R::Error: fmt::Debug, +{ + let result = from_reader(reader).map_err(to_bor_error)?; + Ok(result) +} + pub fn decode_exact(mut input: &[u8]) -> Result { let val = decode_inner(&mut input)?; if !input.is_empty() { @@ -97,6 +137,38 @@ pub fn decode_len(input: &[u8]) -> Result { } fn to_bor_error(e: E) -> BorError -where E: core::fmt::Display { +where E: fmt::Display { BorError::new(e.to_string()) } + +#[derive(Debug, Clone, Default)] +pub struct ByteCounter { + count: usize, +} + +impl ByteCounter { + pub fn new() -> Self { + Default::default() + } + + pub fn get(&self) -> usize { + self.count + } +} + +#[derive(Debug)] +pub struct ByteCounterError; + +impl Write for &mut ByteCounter { + type Error = ByteCounterError; + + fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error> { + let len = data.len(); + self.count += len; + Ok(()) + } + + fn flush(&mut self) -> Result<(), Self::Error> { + Ok(()) + } +} diff --git a/dan_layer/template_abi/src/abi/mod.rs b/dan_layer/template_abi/src/abi/mod.rs index cd19bc92a..e80da7b21 100644 --- a/dan_layer/template_abi/src/abi/mod.rs +++ b/dan_layer/template_abi/src/abi/mod.rs @@ -29,7 +29,7 @@ pub use wasm::*; mod non_wasm; #[cfg(not(target_arch = "wasm32"))] pub use non_wasm::*; -use tari_bor::{decode_exact, decode_len, encode_into}; +use tari_bor::{decode_exact, decode_len, encode_into_writer, encoded_len}; use crate::{ ops::EngineOp, @@ -43,19 +43,20 @@ pub fn wrap_ptr(mut v: Vec) -> *mut u8 { } pub fn call_engine(op: EngineOp, input: &T) -> U { - let mut encoded = Vec::with_capacity(512); - encode_into(input, &mut encoded).unwrap(); + let len = encoded_len(&input).unwrap(); + let mut encoded = Vec::with_capacity(len); + encode_into_writer(input, &mut encoded).unwrap(); let len = encoded.len(); let input_ptr = wrap_ptr(encoded) as *const _; let ptr = unsafe { tari_engine(op.as_i32(), input_ptr, len) }; if ptr.is_null() { panic!("Engine call returned null for op {:?}", op); } - let slice = unsafe { slice::from_raw_parts(ptr as *const _, 4) }; let len = decode_len(slice).unwrap(); - let slice = unsafe { slice::from_raw_parts(ptr.offset(4), len) }; - decode_exact(slice).unwrap_or_else(|e| { + // Take ownership of the data and deallocate it at the end of the function + let data = unsafe { Vec::from_raw_parts(ptr, len + 4, len + 4) }; + decode_exact(&data[4..4 + len]).unwrap_or_else(|e| { panic!( "Failed to decode response from engine for op {:?} with input: {:?}: {:?}", op, input, e, @@ -83,15 +84,19 @@ pub extern "C" fn tari_alloc(len: u32) -> *mut u8 { ptr } -/// Frees a block of memory allocated by `tari_alloc`. -/// -/// # Safety -/// Caller must ensure that ptr must be a valid pointer to a block of memory allocated by `tari_alloc`. -#[no_mangle] -pub unsafe extern "C" fn tari_free(ptr: *mut u8) { - let mut len = [0u8; 4]; - copy(ptr, len.as_mut_ptr(), 4); - - let cap = (u32::from_le_bytes(len) + 4) as usize; - drop(Vec::::from_raw_parts(ptr, cap, cap)); -} +// This is currently not needed as every engine alloc should be freed by the WASM template. +// Note there is no appropriate way to force this behaviour but since WASM is already sandboxed, any leaked memory is +// released after execution in any case. +// +// /// Frees a block of memory allocated by `tari_alloc`. +// /// +// /// # Safety +// /// Caller must ensure that ptr must be a valid pointer to a block of memory allocated by `tari_alloc`. +// #[no_mangle] +// pub unsafe extern "C" fn tari_free(ptr: *mut u8) { +// let mut len = [0u8; 4]; +// copy(ptr, len.as_mut_ptr(), 4); +// +// let cap = (u32::from_le_bytes(len) + 4) as usize; +// drop(Vec::::from_raw_parts(ptr, cap, cap)); +// } diff --git a/dan_layer/template_lib/src/hash.rs b/dan_layer/template_lib/src/hash.rs index 51ebc8749..8df25fe88 100644 --- a/dan_layer/template_lib/src/hash.rs +++ b/dan_layer/template_lib/src/hash.rs @@ -173,7 +173,7 @@ mod tests { fn serialize_deserialize() { let hash = Hash::default(); let mut buf = Vec::new(); - tari_bor::encode_into(&hash, &mut buf).unwrap(); + tari_bor::encode_into_std_writer(&hash, &mut buf).unwrap(); let hash2 = tari_bor::decode(&buf).unwrap(); assert_eq!(hash, hash2); } diff --git a/dan_layer/template_lib/src/models/confidential_proof.rs b/dan_layer/template_lib/src/models/confidential_proof.rs index 3c7bc58af..d1d1254ca 100644 --- a/dan_layer/template_lib/src/models/confidential_proof.rs +++ b/dan_layer/template_lib/src/models/confidential_proof.rs @@ -3,8 +3,7 @@ use std::mem::size_of; -use serde::{Deserialize, Serialize}; -use serde_with::{serde_as, Bytes}; +use serde::{de::Error, Deserialize, Serialize}; #[cfg(feature = "ts")] use ts_rs::TS; @@ -211,24 +210,51 @@ impl ConfidentialWithdrawProof { /// Used by the receiver to determine the value component of the commitment, in both confidential transfers and Minotari /// burns -#[serde_as] -#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(transparent)] -pub struct EncryptedData(#[serde_as(as = "Bytes")] pub [u8; EncryptedData::size()]); +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct EncryptedData(Vec); impl EncryptedData { - pub const fn size() -> usize { - const SIZE_NONCE: usize = 24; - const SIZE_VALUE: usize = size_of::(); - const SIZE_MASK: usize = 32; - const SIZE_TAG: usize = 16; - const STATIC_ENCRYPTED_DATA_SIZE_TOTAL: usize = SIZE_NONCE + SIZE_VALUE + SIZE_MASK + SIZE_TAG; - STATIC_ENCRYPTED_DATA_SIZE_TOTAL + pub const ENCRYPTED_DATA_SIZE_TOTAL: usize = Self::SIZE_NONCE + Self::SIZE_VALUE + Self::SIZE_MASK + Self::SIZE_TAG; + pub const SIZE_MASK: usize = 32; + pub const SIZE_NONCE: usize = 24; + pub const SIZE_TAG: usize = 16; + pub const SIZE_VALUE: usize = size_of::(); + + pub const fn min_size() -> usize { + Self::ENCRYPTED_DATA_SIZE_TOTAL + } + + pub const fn max_size() -> usize { + Self::min_size() + 256 + } + + pub fn len(&self) -> usize { + self.0.len() + } + + pub fn is_empty(&self) -> bool { + self.len() == 0 } pub fn as_bytes(&self) -> &[u8] { &self.0 } + + pub fn tag_slice(&self) -> &[u8] { + &self.0[..Self::SIZE_TAG] + } + + pub fn nonce_slice(&self) -> &[u8] { + &self.0[Self::SIZE_TAG..Self::SIZE_NONCE + Self::SIZE_TAG] + } + + pub fn payload_slice(&self) -> &[u8] { + &self.0[Self::payload_offset()..] + } + + pub const fn payload_offset() -> usize { + Self::SIZE_TAG + Self::SIZE_NONCE + } } impl AsRef<[u8]> for EncryptedData { @@ -237,21 +263,33 @@ impl AsRef<[u8]> for EncryptedData { } } -impl Default for EncryptedData { - fn default() -> Self { - Self([0u8; Self::size()]) +impl TryFrom> for EncryptedData { + type Error = usize; + + fn try_from(value: Vec) -> Result { + if value.len() < Self::min_size() { + return Err(value.len()); + } + if value.len() > Self::max_size() { + return Err(value.len()); + } + Ok(Self(value)) } } -impl TryFrom<&[u8]> for EncryptedData { - type Error = (); +impl Serialize for EncryptedData { + fn serialize(&self, __serializer: S) -> Result + where S: serde::Serializer { + serde_with::As::::serialize(&self.0, __serializer) + } +} - fn try_from(value: &[u8]) -> Result { - if value.len() != Self::size() { - return Err(()); - } - let mut out = [0_u8; Self::size()]; - out.copy_from_slice(value); - Ok(Self(out)) +impl<'de> Deserialize<'de> for EncryptedData { + fn deserialize(deserializer: D) -> Result + where D: serde::Deserializer<'de> { + // TODO: implement a deserializer that only deserializes up to some MAX_BYTES + serde_with::As::::deserialize(deserializer).and_then(|v: Vec| { + EncryptedData::try_from(v).map_err(|len| D::Error::custom(format!("EncryptedData invalid length {len}"))) + }) } } diff --git a/dan_layer/template_lib/src/models/proof.rs b/dan_layer/template_lib/src/models/proof.rs index 81254b988..5f1e72d7f 100644 --- a/dan_layer/template_lib/src/models/proof.rs +++ b/dan_layer/template_lib/src/models/proof.rs @@ -174,7 +174,7 @@ impl Drop for ProofAccess { args: invoke_args![], }); - resp.decode() + resp.decode::<()>() .unwrap_or_else(|_| panic!("Drop failed for proof {}", self.id)); } } @@ -193,7 +193,7 @@ impl Drop for ProofAuth { args: invoke_args![], }); - resp.decode() + resp.decode::<()>() .unwrap_or_else(|_| panic!("Drop failed for proof {}", self.id)); } } diff --git a/dan_layer/template_lib/src/panic_hook.rs b/dan_layer/template_lib/src/panic_hook.rs index 6ce16372c..3ee3e0dde 100644 --- a/dan_layer/template_lib/src/panic_hook.rs +++ b/dan_layer/template_lib/src/panic_hook.rs @@ -24,7 +24,7 @@ use tari_template_abi::on_panic; -fn hook(info: &std::panic::PanicInfo<'_>) { +fn hook(info: &std::panic::PanicHookInfo<'_>) { let error_msg = info .payload() .downcast_ref::() diff --git a/dan_layer/template_macros/src/template/ast.rs b/dan_layer/template_macros/src/template/ast.rs index 53eeb81dd..4fe2345fa 100644 --- a/dan_layer/template_macros/src/template/ast.rs +++ b/dan_layer/template_macros/src/template/ast.rs @@ -36,8 +36,6 @@ use syn::{ ItemUse, Result, ReturnType, - Signature, - Stmt, TypePath, TypeTuple, UseTree, @@ -140,9 +138,9 @@ impl TemplateAst { name: m.sig.ident.to_string(), input_types: Self::get_input_types(&m.sig.inputs), output_type: Self::get_output_type_token(&m.sig.output), - statements: Self::get_statements(m), - is_constructor: Self::is_constructor(&m.sig), - is_public: true, + // statements: Self::get_statements(m), + // is_constructor: Self::is_constructor(&m.sig), + // is_public: true, }) }, _ => todo!("get_function_from_item does not support anything other than methods"), @@ -205,19 +203,19 @@ impl TemplateAst { } } - fn get_statements(method: &ImplItemMethod) -> Vec { - method.block.stmts.clone() - } + // fn get_statements(method: &ImplItemMethod) -> Vec { + // method.block.stmts.clone() + // } - fn is_constructor(sig: &Signature) -> bool { - match &sig.output { - ReturnType::Default => false, // the function does not return anything - ReturnType::Type(_, t) => match t.as_ref() { - syn::Type::Path(type_path) => type_path.path.segments[0].ident == "Self", - _ => false, - }, - } - } + // fn is_constructor(sig: &Signature) -> bool { + // match &sig.output { + // ReturnType::Default => false, // the function does not return anything + // ReturnType::Type(_, t) => match t.as_ref() { + // syn::Type::Path(type_path) => type_path.path.segments[0].ident == "Self", + // _ => false, + // }, + // } + // } fn is_public_function(item: &ImplItemMethod) -> bool { matches!(item.vis, syn::Visibility::Public(_)) @@ -228,9 +226,9 @@ pub struct FunctionAst { pub name: String, pub input_types: Vec, pub output_type: Option, - pub statements: Vec, - pub is_constructor: bool, - pub is_public: bool, + // pub statements: Vec, + // pub is_constructor: bool, + // pub is_public: bool, } impl FunctionAst { diff --git a/dan_layer/template_macros/src/template/dispatcher.rs b/dan_layer/template_macros/src/template/dispatcher.rs index c2e642e31..ee4b70a40 100644 --- a/dan_layer/template_macros/src/template/dispatcher.rs +++ b/dan_layer/template_macros/src/template/dispatcher.rs @@ -34,7 +34,7 @@ pub fn generate_dispatcher(ast: &TemplateAst) -> Result { let output = quote! { #[no_mangle] - pub unsafe extern "C" fn #dispatcher_function_name(call_info: *mut u8, call_info_len: usize) -> *mut u8 { + pub unsafe extern "C" fn #dispatcher_function_name(call_info: *mut u8, call_info_len: u32) -> *mut u8 { use ::tari_template_lib::template_dependencies::*; // include all use statements from the template module here as these may be used in the function arguments. #( @@ -51,7 +51,7 @@ pub fn generate_dispatcher(ast: &TemplateAst) -> Result { panic!("call_info is null"); } - let call_data = unsafe { Vec::from_raw_parts(call_info, call_info_len, call_info_len) }; + let call_data = unsafe { Vec::from_raw_parts(call_info, call_info_len as usize, call_info_len as usize) }; let call_info: CallInfo = decode_exact(&call_data).expect("Failed to decode CallArgs"); init_context(&call_info); @@ -177,8 +177,8 @@ fn get_function_block(template_ident: &Ident, ast: FunctionAst) -> Expr { fn replace_self_in_output(ast: &FunctionAst) -> Vec { let mut stmts: Vec = vec![]; - match &ast.output_type { - Some(output_type) => match output_type { + if let Some(output_type) = &ast.output_type { + match output_type { TypeAst::Typed { type_path, .. } => { if let Some(stmt) = replace_self_in_single_value(type_path) { stmts.push(stmt); @@ -188,8 +188,7 @@ fn replace_self_in_output(ast: &FunctionAst) -> Vec { stmts.push(replace_self_in_tuple(type_tuple)); }, _ => todo!("replace_self_in_output only supports typed and tuple"), - }, - None => {}, + } } stmts diff --git a/dan_layer/template_test_tooling/src/support/confidential.rs b/dan_layer/template_test_tooling/src/support/confidential.rs index fe6570f86..9da4d540c 100644 --- a/dan_layer/template_test_tooling/src/support/confidential.rs +++ b/dan_layer/template_test_tooling/src/support/confidential.rs @@ -8,7 +8,7 @@ use tari_dan_wallet_crypto::{ConfidentialOutputMaskAndValue, ConfidentialProofSt use tari_engine_types::confidential::get_commitment_factory; use tari_template_lib::{ crypto::PedersonCommitmentBytes, - models::{Amount, ConfidentialOutputStatement, ConfidentialWithdrawProof}, + models::{Amount, ConfidentialOutputStatement, ConfidentialWithdrawProof, EncryptedData}, }; pub fn generate_confidential_proof( @@ -37,7 +37,7 @@ fn generate_confidential_proof_internal( mask: mask.clone(), sender_public_nonce: Default::default(), minimum_value_promise: 0, - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), resource_view_key: view_key.clone(), }; @@ -47,7 +47,7 @@ fn generate_confidential_proof_internal( mask: change_mask.clone(), sender_public_nonce: Default::default(), minimum_value_promise: 0, - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), resource_view_key: view_key, }); @@ -148,7 +148,7 @@ fn generate_withdraw_proof_internal( mask: output_mask.clone(), sender_public_nonce: Default::default(), minimum_value_promise: 0, - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), resource_view_key: view_key.clone(), }; let change_proof = change_amount.map(|amount| ConfidentialProofStatement { @@ -156,7 +156,7 @@ fn generate_withdraw_proof_internal( mask: change_mask.clone().unwrap(), sender_public_nonce: Default::default(), minimum_value_promise: 0, - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), resource_view_key: view_key, }); diff --git a/dan_layer/validator_node_rpc/src/client.rs b/dan_layer/validator_node_rpc/src/client.rs index 147e12be6..054f50bb5 100644 --- a/dan_layer/validator_node_rpc/src/client.rs +++ b/dan_layer/validator_node_rpc/src/client.rs @@ -50,7 +50,7 @@ pub trait ValidatorNodeRpcClient: Send + Sync { #[derive(Debug, Clone, Deserialize, Serialize)] pub enum TransactionResultStatus { Pending, - Finalized(FinalizedResult), + Finalized(Box), } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -228,13 +228,13 @@ impl ValidatorNodeRpcClient for TariValidatorNodeRpcClient Err(ValidatorNodeRpcClientError::InvalidResponse(anyhow!( "Node returned invalid payload status {}", diff --git a/dan_layer/wallet/crypto/Cargo.toml b/dan_layer/wallet/crypto/Cargo.toml index e1f50a481..64e84d63f 100644 --- a/dan_layer/wallet/crypto/Cargo.toml +++ b/dan_layer/wallet/crypto/Cargo.toml @@ -22,3 +22,4 @@ zeroize = { workspace = true } [dev-dependencies] tari_template_test_tooling = { workspace = true } +serde_json = { workspace = true } \ No newline at end of file diff --git a/dan_layer/wallet/crypto/src/proof.rs b/dan_layer/wallet/crypto/src/proof.rs index 51bec9078..76604ee07 100644 --- a/dan_layer/wallet/crypto/src/proof.rs +++ b/dan_layer/wallet/crypto/src/proof.rs @@ -1,8 +1,6 @@ // Copyright 2024 The Tari Project // SPDX-License-Identifier: BSD-3-Clause -use std::mem::size_of; - use blake2::Blake2b; use chacha20poly1305::{ aead, @@ -45,7 +43,7 @@ use tari_template_lib::{ }, }; use tari_utilities::safe_array::SafeArray; -use zeroize::Zeroizing; +use zeroize::{Zeroize, Zeroizing}; use crate::{ byte_utils::copy_fixed, @@ -193,12 +191,6 @@ pub fn create_viewable_balance_proof( } const ENCRYPTED_DATA_TAG: &[u8] = b"TARI_AAD_VALUE_AND_MASK_EXTEND_NONCE_VARIANT"; -// Useful size constants, each in bytes -const SIZE_NONCE: usize = size_of::(); -const SIZE_VALUE: usize = size_of::(); -const SIZE_MASK: usize = RistrettoSecretKey::KEY_LEN; -const SIZE_TAG: usize = size_of::(); -const SIZE_TOTAL: usize = SIZE_NONCE + SIZE_VALUE + SIZE_MASK + SIZE_TAG; pub(crate) fn encrypt_data( encryption_key: &RistrettoSecretKey, @@ -206,28 +198,42 @@ pub(crate) fn encrypt_data( value: u64, mask: &RistrettoSecretKey, ) -> Result { - // Encode the value and mask - let mut bytes = Zeroizing::new([0u8; SIZE_VALUE + SIZE_MASK]); - bytes[..SIZE_VALUE].clone_from_slice(value.to_le_bytes().as_ref()); - bytes[SIZE_VALUE..].clone_from_slice(mask.as_bytes()); + fn payload_slice_mut(bytes: &mut [u8]) -> &mut [u8] { + &mut bytes[EncryptedData::payload_offset()..] + } - // Produce a secure random nonce - let nonce = XChaCha20Poly1305::generate_nonce(&mut OsRng); + fn tag_slice_mut(bytes: &mut [u8]) -> &mut [u8] { + &mut bytes[..EncryptedData::SIZE_TAG] + } - // Set up the AEAD + fn nonce_slice_mut(bytes: &mut [u8]) -> &mut [u8] { + &mut bytes[EncryptedData::SIZE_TAG..EncryptedData::SIZE_TAG + EncryptedData::SIZE_NONCE] + } + + // Produce a secure random nonce and the AEAD + let nonce = XChaCha20Poly1305::generate_nonce(&mut OsRng); let aead_key = inner_encrypted_data_kdf_aead(encryption_key, commitment); let cipher = XChaCha20Poly1305::new(GenericArray::from_slice(aead_key.reveal())); + // Encode the value and mask + let mut bytes = vec![0; EncryptedData::min_size()]; + let payload_mut = payload_slice_mut(&mut bytes); + payload_mut[..EncryptedData::SIZE_VALUE].copy_from_slice(value.to_le_bytes().as_ref()); + payload_mut[EncryptedData::SIZE_VALUE..EncryptedData::SIZE_VALUE + EncryptedData::SIZE_MASK] + .copy_from_slice(mask.as_bytes()); // Encrypt in place - let tag = cipher.encrypt_in_place_detached(&nonce, ENCRYPTED_DATA_TAG, bytes.as_mut_slice())?; - - // Put everything together: nonce, ciphertext, tag - let mut data = [0u8; SIZE_TOTAL]; - data[..SIZE_TAG].clone_from_slice(&tag); - data[SIZE_TAG..SIZE_TAG + SIZE_NONCE].clone_from_slice(&nonce); - data[SIZE_NONCE + SIZE_TAG..SIZE_NONCE + SIZE_TAG + SIZE_VALUE + SIZE_MASK].clone_from_slice(bytes.as_slice()); - - Ok(EncryptedData(data)) + match cipher.encrypt_in_place_detached(&nonce, ENCRYPTED_DATA_TAG, payload_mut) { + Ok(tag) => { + tag_slice_mut(&mut bytes).copy_from_slice(&tag); + nonce_slice_mut(&mut bytes).copy_from_slice(&nonce); + + Ok(EncryptedData::try_from(bytes).expect("bytes length == EncryptedData::min_size()")) + }, + Err(err) => { + bytes.zeroize(); + Err(err) + }, + } } pub fn decrypt_data_and_mask( @@ -235,13 +241,10 @@ pub fn decrypt_data_and_mask( commitment: &PedersenCommitment, encrypted_data: &EncryptedData, ) -> Result<(u64, RistrettoSecretKey), aead::Error> { - // Extract the tag, nonce and ciphertext - let tag = Tag::from_slice(&encrypted_data.as_bytes()[..SIZE_TAG]); - let nonce = XNonce::from_slice(&encrypted_data.0.as_bytes()[SIZE_TAG..SIZE_TAG + SIZE_NONCE]); - let mut bytes = Zeroizing::new([0u8; SIZE_VALUE + SIZE_MASK]); - bytes.clone_from_slice( - &encrypted_data.as_bytes()[SIZE_TAG + SIZE_NONCE..SIZE_TAG + SIZE_NONCE + SIZE_VALUE + SIZE_MASK], - ); + // Extract the tag, nonce, and ciphertext + let tag = Tag::from_slice(encrypted_data.tag_slice()); + let nonce = XNonce::from_slice(encrypted_data.nonce_slice()); + let mut bytes = Zeroizing::new(encrypted_data.payload_slice().to_vec()); // Set up the AEAD let aead_key = inner_encrypted_data_kdf_aead(encryption_key, commitment); @@ -251,12 +254,14 @@ pub fn decrypt_data_and_mask( cipher.decrypt_in_place_detached(nonce, ENCRYPTED_DATA_TAG, bytes.as_mut_slice(), tag)?; // Decode the value and mask - let mut value_bytes = [0u8; SIZE_VALUE]; - value_bytes.clone_from_slice(&bytes[0..SIZE_VALUE]); + let mut value_bytes = [0u8; EncryptedData::SIZE_VALUE]; + value_bytes.copy_from_slice(&bytes[..EncryptedData::SIZE_VALUE]); Ok(( u64::from_le_bytes(value_bytes), - RistrettoSecretKey::from_canonical_bytes(&bytes[SIZE_VALUE..]) - .expect("The length of bytes is exactly SIZE_MASK"), + RistrettoSecretKey::from_canonical_bytes( + &bytes[EncryptedData::SIZE_VALUE..EncryptedData::SIZE_VALUE + EncryptedData::SIZE_MASK], + ) + .expect("The length of bytes is exactly SIZE_MASK"), )) } @@ -318,7 +323,7 @@ mod tests { minimum_value_promise, mask, sender_public_nonce: Default::default(), - encrypted_data: EncryptedData([0u8; EncryptedData::size()]), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), resource_view_key: None, }), Default::default(), diff --git a/dan_layer/wallet/crypto/tests/viewable_balance_proof.rs b/dan_layer/wallet/crypto/tests/viewable_balance_proof.rs index a812433d8..52a6dda5f 100644 --- a/dan_layer/wallet/crypto/tests/viewable_balance_proof.rs +++ b/dan_layer/wallet/crypto/tests/viewable_balance_proof.rs @@ -8,9 +8,17 @@ use tari_crypto::{ keys::{PublicKey, SecretKey}, ristretto::{pedersen::PedersenCommitment, RistrettoPublicKey, RistrettoSecretKey}, }; -use tari_dan_wallet_crypto::{create_confidential_output_statement, AlwaysMissLookupTable, ConfidentialProofStatement}; +use tari_dan_wallet_crypto::{ + create_confidential_output_statement, + create_withdraw_proof, + AlwaysMissLookupTable, + ConfidentialProofStatement, +}; use tari_engine_types::confidential::validate_elgamal_verifiable_balance_proof; -use tari_template_lib::models::Amount; +use tari_template_lib::{ + models::{Amount, EncryptedData}, + template_dependencies::{decode_exact, encode_with_len}, +}; use tari_utilities::ByteArray; fn create_output_statement(value: Amount, view_key: &RistrettoPublicKey) -> ConfidentialProofStatement { @@ -20,7 +28,7 @@ fn create_output_statement(value: Amount, view_key: &RistrettoPublicKey) -> Conf mask, sender_public_nonce: Default::default(), minimum_value_promise: 0, - encrypted_data: Default::default(), + encrypted_data: EncryptedData::try_from(vec![123; EncryptedData::min_size()]).unwrap(), resource_view_key: Some(view_key.clone()), } } @@ -99,3 +107,28 @@ fn it_generates_a_valid_proof() { println!("Validate proof time: {:?}", validate_proof_time); println!("Brute force time: {:?}", brute_force_time); } + +#[test] +fn serialize_deserialize() { + let (_view_key_secret, view_key) = keypair_from_seed(1); + let output_statement = create_output_statement(123.into(), &view_key); + let change_statement = create_output_statement(123.into(), &view_key); + + let proof = create_withdraw_proof( + &[], + Amount(123), + Some(&output_statement), + Amount(123), + Some(&change_statement), + Amount(0), + ) + .unwrap(); + + let json = serde_json::to_string(&proof).unwrap(); + let deser_proof = serde_json::from_str(&json).unwrap(); + assert_eq!(proof, deser_proof); + + let cbor = encode_with_len(&proof); + let deser_proof = decode_exact(&cbor[4..]).unwrap(); + assert_eq!(proof, deser_proof); +} diff --git a/dan_layer/wallet/sdk/src/apis/jwt.rs b/dan_layer/wallet/sdk/src/apis/jwt.rs index b9111b4a5..70dbd6a7c 100644 --- a/dan_layer/wallet/sdk/src/apis/jwt.rs +++ b/dan_layer/wallet/sdk/src/apis/jwt.rs @@ -154,7 +154,7 @@ pub struct Claims { pub id: u64, pub name: String, pub permissions: JrpcPermissions, - pub exp: usize, + pub exp: u64, } // This is used when you request permission. @@ -162,7 +162,7 @@ pub struct Claims { pub struct AuthClaims { id: u64, permissions: JrpcPermissions, - exp: usize, + exp: u64, } impl<'a, TStore: WalletStore> JwtApi<'a, TStore> { @@ -187,20 +187,23 @@ impl<'a, TStore: WalletStore> JwtApi<'a, TStore> { &self, permissions: JrpcPermissions, duration: Option, - ) -> Result<(String, SystemTime), JwtApiError> { + ) -> Result<(String, Duration), JwtApiError> { let id = self.get_index()?; let valid_till = SystemTime::now() + duration.unwrap_or(self.default_expiry); + let exp = valid_till + .duration_since(UNIX_EPOCH) + .map_err(|_| JwtApiError::InvalidExpiry)?; let my_claims = AuthClaims { id, permissions, - exp: valid_till.duration_since(UNIX_EPOCH).unwrap().as_secs() as usize, + exp: exp.as_secs(), }; let auth_token = jsonwebtoken::encode( &Header::default(), &my_claims, &EncodingKey::from_secret(self.auth_secret_key.as_ref()), )?; - Ok((auth_token, valid_till)) + Ok((auth_token, exp)) } fn check_auth_token(&self, auth_token: &str) -> Result { @@ -305,4 +308,6 @@ pub enum JwtApiError { InsufficientPermissions { required: JrpcPermission }, #[error("Token revoked")] TokenRevoked, + #[error("Invalid expiry")] + InvalidExpiry, } diff --git a/dan_layer/wallet/sdk/src/network.rs b/dan_layer/wallet/sdk/src/network.rs index 30316ddf3..bddc6a0c7 100644 --- a/dan_layer/wallet/sdk/src/network.rs +++ b/dan_layer/wallet/sdk/src/network.rs @@ -88,7 +88,7 @@ pub enum TransactionFinalizedResult { Pending, Finalized { final_decision: Decision, - execution_result: Option, + execution_result: Option>, execution_time: Duration, finalized_time: Duration, abort_details: Option, @@ -100,7 +100,7 @@ impl TransactionFinalizedResult { pub fn into_execute_result(self) -> Option { match self { TransactionFinalizedResult::Pending => None, - TransactionFinalizedResult::Finalized { execution_result, .. } => execution_result, + TransactionFinalizedResult::Finalized { execution_result, .. } => execution_result.map(|r| *r), } } } diff --git a/dan_layer/wallet/sdk/tests/confidential_output_api.rs b/dan_layer/wallet/sdk/tests/confidential_output_api.rs index 1b2d13b14..2dec63ca4 100644 --- a/dan_layer/wallet/sdk/tests/confidential_output_api.rs +++ b/dan_layer/wallet/sdk/tests/confidential_output_api.rs @@ -98,7 +98,7 @@ fn outputs_locked_and_finalized() { value: 24, sender_public_nonce: None, encryption_secret_key_index: 0, - encrypted_data: EncryptedData([0; EncryptedData::size()]), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), public_asset_tag: None, status: OutputStatus::LockedUnconfirmed, locked_by_proof: Some(proof_id), @@ -190,7 +190,7 @@ impl Test { value: amount, sender_public_nonce: None, encryption_secret_key_index: 0, - encrypted_data: EncryptedData([0; EncryptedData::size()]), + encrypted_data: EncryptedData::try_from(vec![0; EncryptedData::min_size()]).unwrap(), public_asset_tag: None, status: OutputStatus::Unspent, locked_by_proof: None, diff --git a/dan_layer/wallet/storage_sqlite/src/models/output.rs b/dan_layer/wallet/storage_sqlite/src/models/output.rs index 337796482..006912d0e 100644 --- a/dan_layer/wallet/storage_sqlite/src/models/output.rs +++ b/dan_layer/wallet/storage_sqlite/src/models/output.rs @@ -57,11 +57,11 @@ impl ConfidentialOutput { .sender_public_nonce .map(|nonce| PublicKey::from_hex(&nonce).unwrap()), encryption_secret_key_index: self.encryption_secret_key_index as u64, - encrypted_data: EncryptedData::try_from(self.encrypted_data.as_slice()).map_err(|_| { + encrypted_data: EncryptedData::try_from(self.encrypted_data).map_err(|len| { WalletStorageError::DecodingError { operation: "try_into_output", item: "output", - details: "Corrupt db: invalid encrypted data".to_string(), + details: format!("Corrupt db: invalid encrypted data length {len}"), } })?, public_asset_tag: self.public_asset_tag.map(|tag| PublicKey::from_hex(&tag).unwrap()), diff --git a/dan_layer/wallet/storage_sqlite/src/writer.rs b/dan_layer/wallet/storage_sqlite/src/writer.rs index 6376fd01f..0c76d3dd1 100644 --- a/dan_layer/wallet/storage_sqlite/src/writer.rs +++ b/dan_layer/wallet/storage_sqlite/src/writer.rs @@ -707,11 +707,11 @@ impl WalletStoreWriter for WriteTransaction<'_> { .sender_public_nonce .map(|nonce| PublicKey::from_hex(&nonce).unwrap()), encryption_secret_key_index: locked_output.encryption_secret_key_index as u64, - encrypted_data: EncryptedData::try_from(locked_output.encrypted_data.as_slice()).map_err(|_| { + encrypted_data: EncryptedData::try_from(locked_output.encrypted_data).map_err(|len| { WalletStorageError::DecodingError { operation: "outputs_lock_smallest_amount", item: "encrypted data", - details: "Corrupt db: invalid encrypted data".to_string(), + details: format!("Corrupt db: invalid encrypted data length {len}"), } })?, public_asset_tag: None, diff --git a/integration_tests/src/base_node.rs b/integration_tests/src/base_node.rs index 516a6eacf..ae933ff03 100644 --- a/integration_tests/src/base_node.rs +++ b/integration_tests/src/base_node.rs @@ -22,7 +22,7 @@ use std::{path::PathBuf, str::FromStr, sync::Arc}; -use minotari_node::{config::GrpcMethod, run_base_node, BaseNodeConfig}; +use minotari_node::{run_base_node, BaseNodeConfig, GrpcMethod}; use rand::rngs::OsRng; use tari_base_node_client::grpc::GrpcBaseNodeClient; use tari_common::{configuration::CommonConfig, exit_codes::ExitError}; @@ -132,7 +132,8 @@ pub async fn spawn_base_node(world: &mut TariWorld, bn_name: String) { GrpcMethod::GetTemplateRegistrations, GrpcMethod::GetHeaderByHash, GrpcMethod::GetSideChainUtxos, - ]; + ] + .into(); let result = run_base_node(shutdown, Arc::new(base_node_identity), Arc::new(base_node_config)).await; if let Err(e) = result { diff --git a/integration_tests/src/miner.rs b/integration_tests/src/miner.rs index 99d1b3ba7..67fcbb249 100644 --- a/integration_tests/src/miner.rs +++ b/integration_tests/src/miner.rs @@ -69,7 +69,7 @@ pub async fn mine_blocks(world: &mut TariWorld, miner_name: String, num_blocks: .await .unwrap() .into_inner() - .address, + .one_sided_address, ) .unwrap(); @@ -153,7 +153,7 @@ async fn create_block_template_with_coinbase( MicroMinotari::from(fee), MicroMinotari::from(reward), height, - &[], + &Default::default(), key_manager, script_key_id, wallet_payment_address, diff --git a/integration_tests/src/wallet.rs b/integration_tests/src/wallet.rs index 6e4312dd0..e3cb82edd 100644 --- a/integration_tests/src/wallet.rs +++ b/integration_tests/src/wallet.rs @@ -29,7 +29,6 @@ use std::{ time::Duration, }; -use log::Level; use minotari_app_grpc::{ authentication::ClientAuthenticationInterceptor, tari_rpc::{wallet_client::WalletClient, ConnectivityStatus, Empty, GetIdentityRequest, SetBaseNodeRequest}, @@ -249,10 +248,12 @@ pub fn run_wallet(runtime: Runtime, config: &mut ApplicationConfig, shutdown: &m base_path: data_dir_str, config: config_path.into_os_string().into_string().unwrap(), log_config: Some(log_config), - log_level: Some(Level::Debug), + log_path: None, config_property_overrides: vec![], network: None, }, + spend_key: None, + view_private_key: None, password: None, change_password: false, recovery: false, diff --git a/integration_tests/src/wallet_daemon.rs b/integration_tests/src/wallet_daemon.rs index 246653ba7..6b0b67296 100644 --- a/integration_tests/src/wallet_daemon.rs +++ b/integration_tests/src/wallet_daemon.rs @@ -110,7 +110,7 @@ impl DanWalletDaemonProcess { pub async fn get_authed_client(&self) -> WalletDaemonClient { let mut client = self.get_client(); // authentication - let AuthLoginResponse { auth_token } = client + let AuthLoginResponse { auth_token, .. } = client .auth_request(AuthLoginRequest { permissions: vec!["Admin".to_string()], duration: None, diff --git a/integration_tests/tests/features/claim_burn.feature b/integration_tests/tests/features/claim_burn.feature index e4e6fa377..bcac12f76 100644 --- a/integration_tests/tests/features/claim_burn.feature +++ b/integration_tests/tests/features/claim_burn.feature @@ -6,6 +6,7 @@ Feature: Claim Burn @concurrent # @serial @fixed + @doit Scenario: Claim base layer burn funds with wallet daemon # Initialize a base node, wallet, miner and VN Given a base node BASE diff --git a/integration_tests/tests/steps/wallet_daemon.rs b/integration_tests/tests/steps/wallet_daemon.rs index fbcc52dd7..5af18fd4b 100644 --- a/integration_tests/tests/steps/wallet_daemon.rs +++ b/integration_tests/tests/steps/wallet_daemon.rs @@ -5,8 +5,9 @@ use std::time::Duration; use cucumber::{then, when}; use integration_tests::{wallet_daemon_cli, TariWorld}; -use tari_common_types::types::{Commitment, PrivateKey, PublicKey}; -use tari_crypto::{ristretto::RistrettoComSig, tari_utilities::ByteArray}; +use log::info; +use tari_common_types::types::PublicKey; +use tari_crypto::tari_utilities::ByteArray; use tari_template_lib::prelude::Amount; use tari_wallet_daemon_client::{types::KeyBranch, ComponentAddressOrName}; @@ -231,6 +232,8 @@ async fn when_i_burn_funds_with_wallet_daemon( .await .unwrap(); let public_key = account.public_key; + eprintln!("Burning funds using claim key {public_key}"); + info!("Burning funds using claim key {public_key}"); let wallet = world .wallets @@ -252,16 +255,11 @@ async fn when_i_burn_funds_with_wallet_daemon( assert!(resp.is_success); world.commitments.insert(commitment_name, resp.commitment); - // TODO: use proto::transaction::CommitmentSignature to deserialize once we update tari to include https://github.com/tari-project/tari/pull/5200 + let ownership_proof = resp.ownership_proof.unwrap(); - world.commitment_ownership_proofs.insert( - ownership_proof_name, - RistrettoComSig::new( - Commitment::from_public_key(&PublicKey::from_canonical_bytes(&ownership_proof.public_nonce).unwrap()), - PrivateKey::from_canonical_bytes(&ownership_proof.u).unwrap(), - PrivateKey::from_canonical_bytes(&ownership_proof.v).unwrap(), - ), - ); + world + .commitment_ownership_proofs + .insert(ownership_proof_name, ownership_proof.try_into().unwrap()); world.rangeproofs.insert(rangeproof_name, resp.range_proof); world.claim_public_keys.insert( diff --git a/networking/core/src/handle.rs b/networking/core/src/handle.rs index fa5266978..7a55d3e7f 100644 --- a/networking/core/src/handle.rs +++ b/networking/core/src/handle.rs @@ -141,7 +141,7 @@ impl From<&[PeerId]> for MulticastDestination { impl From> for MulticastDestination { fn from(peers: Vec<&PeerId>) -> Self { - peers[..].to_vec().into() + peers.iter().map(|p| **p).collect() } } @@ -154,6 +154,12 @@ impl IntoIterator for MulticastDestination { } } +impl FromIterator for MulticastDestination { + fn from_iter>(iter: T) -> Self { + Self(iter.into_iter().collect()) + } +} + #[derive(Debug)] pub struct NetworkingHandle { tx_request: mpsc::Sender>, diff --git a/networking/core/src/spawn.rs b/networking/core/src/spawn.rs index e4947a4ab..ade70db52 100644 --- a/networking/core/src/spawn.rs +++ b/networking/core/src/spawn.rs @@ -20,13 +20,13 @@ pub const TOPIC_DELIMITER: &str = "-"; pub enum GossipSendError { #[error("Invalid token topic: {0}")] InvalidToken(String), - #[error("Send gossip error: {0}")] - SendError(Box>), + #[error("Inbound gossip channel closed")] + InboundGossipChannelClosed, } impl From> for GossipSendError { - fn from(value: mpsc::error::SendError<(PeerId, gossipsub::Message)>) -> Self { - Self::SendError(Box::new(value)) + fn from(_: mpsc::error::SendError<(PeerId, gossipsub::Message)>) -> Self { + Self::InboundGossipChannelClosed } } diff --git a/networking/core/src/worker.rs b/networking/core/src/worker.rs index fe569af0c..601eca386 100644 --- a/networking/core/src/worker.rs +++ b/networking/core/src/worker.rs @@ -496,8 +496,12 @@ where info!(target: LOG_TARGET, "📡 Dcutr failed: peer={}, error={}", remote_peer_id, err); }, }, - Identify(identify::Event::Received { peer_id, info }) => { - info!(target: LOG_TARGET, "👋 Received identify from {} with {} addresses", peer_id, info.listen_addrs.len()); + Identify(identify::Event::Received { + peer_id, + info, + connection_id, + }) => { + info!(target: LOG_TARGET, "👋 Received identify from {} with {} addresses (id={connection_id})", peer_id, info.listen_addrs.len()); self.on_peer_identified(peer_id, info)?; }, Identify(event) => { diff --git a/networking/libp2p-messaging/src/behaviour.rs b/networking/libp2p-messaging/src/behaviour.rs index 04f9f0d0b..a2266ea2c 100644 --- a/networking/libp2p-messaging/src/behaviour.rs +++ b/networking/libp2p-messaging/src/behaviour.rs @@ -8,7 +8,7 @@ use std::{ }; use libp2p::{ - core::Endpoint, + core::{transport::PortUse, Endpoint}, swarm::{ dial_opts::DialOpts, AddressChange, @@ -281,6 +281,7 @@ where TCodec: Codec + Send + Clone + 'static peer: PeerId, remote_addr: &Multiaddr, _role_override: Endpoint, + _port_use: PortUse, ) -> Result, ConnectionDenied> { let mut handler = Handler::new(peer, self.protocol.clone(), &self.config); self.on_connection_established(&mut handler, peer, connection_id, Some(remote_addr.clone())); diff --git a/networking/libp2p-peersync/src/behaviour.rs b/networking/libp2p-peersync/src/behaviour.rs index 20bb6b7af..08efef0c7 100644 --- a/networking/libp2p-peersync/src/behaviour.rs +++ b/networking/libp2p-peersync/src/behaviour.rs @@ -9,7 +9,7 @@ use std::{ }; use libp2p::{ - core::Endpoint, + core::{transport::PortUse, Endpoint}, futures::executor::block_on, identity::Keypair, swarm::{ @@ -246,6 +246,7 @@ where TPeerStore: PeerStore peer: PeerId, _remote_addr: &Multiaddr, _role_override: Endpoint, + _port_use: PortUse, ) -> Result, ConnectionDenied> { let handler = Handler::new( peer, diff --git a/networking/libp2p-substream/Cargo.toml b/networking/libp2p-substream/Cargo.toml index 49ac7f684..a99e2cbb8 100644 --- a/networking/libp2p-substream/Cargo.toml +++ b/networking/libp2p-substream/Cargo.toml @@ -7,7 +7,7 @@ repository.workspace = true license.workspace = true [dependencies] -libp2p = { workspace = true, features = ["identify"] } +libp2p = { workspace = true, features = ["identify"] } # smallvec 2.0.0 is not Send, so we use 1.11.2 smallvec = "1.11.2" diff --git a/networking/libp2p-substream/src/behaviour.rs b/networking/libp2p-substream/src/behaviour.rs index 2702930bc..0f1268dfa 100644 --- a/networking/libp2p-substream/src/behaviour.rs +++ b/networking/libp2p-substream/src/behaviour.rs @@ -7,7 +7,7 @@ use std::{ }; use libp2p::{ - core::Endpoint, + core::{transport::PortUse, Endpoint}, swarm::{ dial_opts::DialOpts, AddressChange, @@ -251,6 +251,7 @@ impl NetworkBehaviour for Behaviour { peer: PeerId, remote_addr: &Multiaddr, _role_override: Endpoint, + _port_use: PortUse, ) -> Result, ConnectionDenied> { let mut handler = Handler::new(peer, self.protocols.clone()); self.on_connection_established(&mut handler, peer, connection_id, Some(remote_addr.clone())); diff --git a/networking/rpc_macros/src/generator.rs b/networking/rpc_macros/src/generator.rs index 021600946..b0036dca0 100644 --- a/networking/rpc_macros/src/generator.rs +++ b/networking/rpc_macros/src/generator.rs @@ -54,7 +54,7 @@ impl RpcCodeGenerator { let server_struct = self.options.server_struct.as_ref().unwrap(); let trait_ident = &self.trait_ident; let protocol_name = &self.options.protocol_name; - let dep_mod = quote!(::tari_rpc_framework::__macro_reexports); + let dep_mod = &self.options.dep_module_name; let match_branches = self .rpc_methods diff --git a/networking/rpc_macros/src/options.rs b/networking/rpc_macros/src/options.rs index e11e1ebb9..e8d22c93a 100644 --- a/networking/rpc_macros/src/options.rs +++ b/networking/rpc_macros/src/options.rs @@ -20,7 +20,7 @@ // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -use proc_macro2::Span; +use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::{ parse::{Parse, ParseBuffer}, @@ -31,7 +31,7 @@ use syn::{ #[derive(Debug)] pub struct RpcTraitOptions { pub protocol_name: syn::LitStr, - pub dep_module_name: Ident, + pub dep_module_name: TokenStream, pub client_struct: Option, pub server_struct: Option, } @@ -54,7 +54,7 @@ impl Parse for RpcTraitOptions { let mut protocol_name = None; let mut server_struct = None; let mut client_struct = None; - let mut module_name = syn::Ident::new("__rpc_deps", Span::call_site()); + let mut module_name = quote!(::tari_rpc_framework::__macro_reexports); while !input.is_empty() { let name: syn::Ident = input.parse()?; @@ -67,7 +67,6 @@ impl Parse for RpcTraitOptions { "server_struct" => { server_struct = parse_value(input, &name)?; }, - "client_struct" => { client_struct = parse_value(input, &name)?; }, diff --git a/networking/swarm/src/behaviour.rs b/networking/swarm/src/behaviour.rs index ddd828af9..dd7335bca 100644 --- a/networking/swarm/src/behaviour.rs +++ b/networking/swarm/src/behaviour.rs @@ -77,11 +77,7 @@ where { let swarm = SwarmBuilder::with_existing_identity(identity) .with_tokio() - .with_tcp( - tcp::Config::new().nodelay(true).port_reuse(true), - noise_config, - yamux::Config::default, - )? + .with_tcp(tcp::Config::new().nodelay(true), noise_config, yamux::Config::default)? .with_quic() .with_relay_client(noise_config, yamux::Config::default)? .with_behaviour(|keypair, relay_client| { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index debcbafcf..1a5291bee 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -8,12 +8,9 @@ # AND update the action-buildlibs dockerfile. -# Hours spent updating the Rust Toolchain = 8 +# Hours spent updating the Rust Toolchain = 11 # other places to check: # - the CI files in .github folder # - the Makefile in base_layer/key_manager/Makefile [toolchain] -# 1.78 causes a mempory alignment panic in the version of wasmer we use. For now we'll lock to 1.77. -# https://github.com/wasmerio/wasmer/blob/2.3.0/lib/vm/src/instance/mod.rs#L968 -# Error: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap -channel = "1.77" +channel = "stable"