From 7f6c5766fe005564aa35efec0c47ea4555037395 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 12:42:31 +0100 Subject: [PATCH 1/8] build: migrate off chrono (RUSTSEC-2026-0543) The RustSec advisory DB picked up RUSTSEC-2026-0543 (chrono unmaintained) on 2026-11-17, turning 'cargo deny' red on every branch. The chrono maintainer confirmed the deprecation is deliberate and recommended migrating; this removes chrono from the workspace entirely: - first-party code (common, wallet-cli-commands, node-gui, storage-test-suite) now uses jiff 1.0, which the ecosystem is coordinating on; the Time display/debug formats are byte-identical - until_time parsing in the wallet CLI is now strict RFC 3339 - the transitive users are served by overlay forks until upstream releases allow dropping them: * file-rotate: chrono made optional (upstream PR kstrafe/file-rotate#40) * reedline: chrono dropped from the non-sqlite build (reedline >= 0.53 dropped it upstream but needs MSRV 1.95 > ours) * serde_with: optional chrono integration removed; its weak feature references otherwise force chrono into every consumer's lockfile - iced_aw: the unused date/time picker default features (the only chrono users) are no longer enabled - cargo-vet exemptions added for the new/updated crates --- CHANGELOG.md | 12 + Cargo.lock | 241 ++++++++++++------ Cargo.toml | 35 ++- api-server/storage-test-suite/Cargo.toml | 2 +- api-server/storage-test-suite/src/podman.rs | 5 +- common/Cargo.toml | 2 +- common/src/primitives/time.rs | 62 +++-- deny.toml | 3 + node-gui/Cargo.toml | 2 +- node-gui/backend/Cargo.toml | 1 - node-gui/src/main_window/mod.rs | 16 +- supply-chain/config.toml | 68 +++++ wallet/wallet-cli-commands/Cargo.toml | 2 +- .../wallet-cli-commands/src/helper_types.rs | 25 +- 14 files changed, 335 insertions(+), 141 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 374a532a19..b583e2cc48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,18 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/ ## [Unreleased] ### Changed + - Build: + - the workspace no longer depends on `chrono` (unmaintained per RUSTSEC-2026-0543): + first-party code now uses `jiff`, and the remaining transitive uses are served by + temporary overlay forks (file-rotate, reedline, serde_with) that make `chrono` + optional or drop it; the overlays are tracked for removal once upstream releases + allow it. + + - Wallet CLI: + - `until_time(...)` output timelocks now require a properly formatted RFC 3339 + timestamp (e.g. `2027-01-31T12:00:00Z`); some non-zero-padded variants that were + accepted before are now rejected. + - Wallet: - coin selection leaves out redundant UTXOs: the selection algorithms stop as soon as the target is met, and among equally economical solutions the one spending diff --git a/Cargo.lock b/Cargo.lock index 717e576859..60ddb9ed2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,11 +285,11 @@ dependencies = [ "api-server-common", "async-trait", "chainstate-test-framework", - "chrono", "common", "crypto", "ctor", "futures", + "jiff 1.0.1", "libtest-mimic", "logging", "pos-accounting", @@ -762,6 +762,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "base64ct" version = "1.8.3" @@ -1566,20 +1572,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "chrono" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-link 0.2.1", -] - [[package]] name = "ciborium" version = "0.2.2" @@ -1776,7 +1768,6 @@ dependencies = [ "anyhow", "bech32 0.11.1", "bitcoin-bech32", - "chrono", "clap", "crypto", "ctor", @@ -1786,6 +1777,7 @@ dependencies = [ "hex", "indoc", "itertools 0.14.0", + "jiff 1.0.1", "lazy_static", "logging", "merkletree-mintlayer", @@ -2386,12 +2378,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" dependencies = [ - "darling_core 0.23.0", - "darling_macro 0.23.0", + "darling_core 0.24.1", + "darling_macro 0.24.1", ] [[package]] @@ -2410,15 +2402,15 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" dependencies = [ "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -2434,13 +2426,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ - "darling_core 0.23.0", + "darling_core 0.24.1", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -2951,7 +2943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3075,10 +3067,8 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "file-rotate" version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3ed82142801f5b1363f7d463963d114db80f467e860b1cd82228eaebc627a0" +source = "git+https://github.com/nullPointerEnjoyer/file-rotate.git?branch=chrono-optional-0.7#642a9d0a262912798e7edb5d2970d0129123d48b" dependencies = [ - "chrono", "flate2", ] @@ -4022,7 +4012,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", + "socket2 0.5.10", "system-configuration", "tokio", "tower-service", @@ -4030,30 +4020,6 @@ dependencies = [ "windows-registry", ] -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core 0.61.2", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - [[package]] name = "iced" version = "0.13.1" @@ -4074,7 +4040,6 @@ version = "0.12.2" source = "git+https://github.com/iced-rs/iced_aw?rev=def1db9aac1e58a47e0c3127d4d4e95d724ca8ad#def1db9aac1e58a47e0c3127d4d4e95d724ca8ad" dependencies = [ "cfg-if", - "chrono", "iced", "iced_fonts", "itertools 0.14.0", @@ -4461,7 +4426,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4503,6 +4468,110 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +[[package]] +name = "jiff" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +dependencies = [ + "jiff-core 0.1.8", + "jiff-static 0.2.46", + "jiff-tzdb-platform 0.1.3", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5d126d72eb017f10b302e73bdeca446bea405ee449af4d9e7866d6b082d83e" +dependencies = [ + "jiff-core 1.0.1", + "jiff-static 1.0.1", + "jiff-tzdb-platform 1.0.0", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-core" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b46a105a9874634dd96231021526bf24ca04955a5998c59a9c7666e634b7b8" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" +dependencies = [ + "jiff-core 0.1.8", + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "jiff-static" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0127e9bde3c6130d6169e7d8d68676e4be69c4bf7573c308b6f960a5089c428" +dependencies = [ + "jiff-core 1.0.1", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980fca2cc272465bd60e82397607ba9f33add9e48defd77923301bbd03808f2" + +[[package]] +name = "jiff-tzdb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb 0.1.10", +] + +[[package]] +name = "jiff-tzdb-platform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" +dependencies = [ + "jiff-tzdb 1.0.0", +] + [[package]] name = "jni" version = "0.19.0" @@ -5616,7 +5685,6 @@ version = "1.4.5" dependencies = [ "anyhow", "chainstate", - "chrono", "common", "ctor", "futures", @@ -5624,6 +5692,7 @@ dependencies = [ "iced", "iced_aw", "iced_fonts", + "jiff 1.0.1", "logging", "networking", "node-comm", @@ -5651,7 +5720,6 @@ version = "1.4.5" dependencies = [ "anyhow", "chainstate", - "chrono", "common", "crypto", "futures", @@ -5736,7 +5804,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6791,6 +6859,15 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + [[package]] name = "pos-accounting" version = "1.4.5" @@ -7003,7 +7080,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "proc-macro2", "quote", "syn 2.0.114", @@ -7318,10 +7395,8 @@ dependencies = [ [[package]] name = "reedline" version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfa8cb0ad84c396c936d8abb814703d7042a433d2da75a0c7060cbdc89109f3" +source = "git+https://github.com/nullPointerEnjoyer/reedline.git?branch=chrono-free-0.38#1747ab50dacb0d476666cfd072afa73b5283db82" dependencies = [ - "chrono", "crossbeam", "crossterm", "fd-lock", @@ -7765,7 +7840,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8138,9 +8213,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "itoa", "memchr", @@ -8203,16 +8278,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +version = "3.23.0" +source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?branch=no-chrono#585d127b42704cd1c8671db89d9c2bb267b4b033" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bs58", - "chrono", "hex", "indexmap 1.9.3", "indexmap 2.13.0", + "jiff 0.2.46", "schemars 0.9.0", "schemars 1.2.1", "serde_core", @@ -8223,14 +8297,13 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +version = "3.23.0" +source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?branch=no-chrono#585d127b42704cd1c8671db89d9c2bb267b4b033" dependencies = [ - "darling 0.23.0", + "darling 0.24.1", "proc-macro2", "quote", - "syn 2.0.114", + "syn 3.0.9", ] [[package]] @@ -8990,7 +9063,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -10115,7 +10188,6 @@ dependencies = [ "build_utils", "chainstate", "chainstate-storage", - "chrono", "clap", "common", "consensus", @@ -10130,6 +10202,7 @@ dependencies = [ "hex", "humantime", "itertools 0.14.0", + "jiff 1.0.1", "jsonrpsee", "lazy_static", "logging", @@ -10814,7 +10887,7 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.12.5", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "smallvec", @@ -10842,7 +10915,7 @@ dependencies = [ "log", "naga", "once_cell", - "parking_lot 0.12.5", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "rustc-hash 1.1.0", @@ -10884,7 +10957,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.12.5", + "parking_lot 0.11.2", "profiling", "range-alloc", "raw-window-handle", @@ -10948,7 +11021,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 57b88577b4..3d267cd61d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -151,7 +151,7 @@ bytes = "1.1" byte-unit = "5.1" cfg-if = "1.0" chacha20poly1305 = "0.10" -chrono = "0.4" +jiff = "1.0.1" clap = "4.5" clap_complete = "4.5" console-subscriber = "0.5" @@ -170,7 +170,9 @@ dyn-clone = "1.0" enum-iterator = "2.0" enumflags2 = "0.7" expect-test = "1.3" -file-rotate = "0.7" +# Overlay fork with chrono made optional (RUSTSEC-2026-0543); see +# https://github.com/kstrafe/file-rotate/pull/40 — revert to a released version once it ships. +file-rotate = { git = "https://github.com/nullPointerEnjoyer/file-rotate.git", branch = "chrono-optional-0.7", default-features = false } fix-hidden-lifetime-bug = "0.2" # Note: we deliberately don't enable the `rand` feature of `fixed-hash` because it still uses # the `rand` crate v0.8.x, so the `random_using` calls generated by `construct_fixed_hash!` would @@ -198,7 +200,24 @@ hyper = "1.7" iced = "0.13" # Note: we need this fix - https://github.com/iced-rs/iced_aw/pull/329 # TODO: switch back to a released version of iced_aw once the fix is released (need version > 0.12) -iced_aw = { git = "https://github.com/iced-rs/iced_aw", rev = "def1db9aac1e58a47e0c3127d4d4e95d724ca8ad" } +iced_aw = { git = "https://github.com/iced-rs/iced_aw", rev = "def1db9aac1e58a47e0c3127d4d4e95d724ca8ad", default-features = false, features = [ + "badge", + "card", + "number_input", + "color_picker", + "grid", + "tab_bar", + "tabs", + "slide_bar", + "wrap", + "selection_list", + "quad", + "context_menu", + "spinner", + "drop_down", + "menu", + "sidebar", +] } iced_fonts = "0.1" indoc = "2.0" itertools = "0.14" @@ -227,7 +246,9 @@ rand_core = "0.10" rand_0_8 = { version = "0.8", package = "rand" } rand_chacha = "0.10" rayon = "1.10" -reedline = "0.38" +# Overlay fork without chrono (RUSTSEC-2026-0543); revert to a released version once our +# MSRV allows reedline >= 0.53 (which dropped chrono upstream). +reedline = { git = "https://github.com/nullPointerEnjoyer/reedline.git", branch = "chrono-free-0.38" } ref-cast = "1.0" regex = "1.10" replace_with = "0.1" @@ -245,7 +266,10 @@ semver = "1.0" serde = "1.0" serde_json = "1.0" serde_test = "1.0" -serde_with = "3.6" +# Overlay fork without the optional chrono integration (RUSTSEC-2026-0543); the weak +# feature references otherwise force chrono into the lockfile even when unused. +# Revert to a released version when the advisory is resolved upstream. +serde_with = { git = "https://github.com/nullPointerEnjoyer/serde_with.git", branch = "no-chrono" } serial_test = "3.5" sha-1 = "0.10" sha2 = "0.10" @@ -373,3 +397,4 @@ parity-scale-codec = { git = "https://github.com/paritytech/parity-scale-codec.g # Upstream has replaced the crate with "cryoglyph" in unreleased iced 0.15, so there is no # upstream release with the fix. Drop this patch once iced ships one. iced_glyphon = { git = "https://github.com/mintlayer/iced-glyphon", rev = "acb3fc10a3a15ee6e0e7da4e264db2338c09a7c1" } + diff --git a/api-server/storage-test-suite/Cargo.toml b/api-server/storage-test-suite/Cargo.toml index 54a267aa04..6914cd3db5 100644 --- a/api-server/storage-test-suite/Cargo.toml +++ b/api-server/storage-test-suite/Cargo.toml @@ -18,7 +18,7 @@ randomness = { path = "../../randomness" } serialization = { path = "../../serialization" } async-trait.workspace = true -chrono.workspace = true +jiff.workspace = true ctor.workspace = true futures = { workspace = true, default-features = false } libtest-mimic.workspace = true diff --git a/api-server/storage-test-suite/src/podman.rs b/api-server/storage-test-suite/src/podman.rs index 7aa355b748..c6739a2f2f 100644 --- a/api-server/storage-test-suite/src/podman.rs +++ b/api-server/storage-test-suite/src/podman.rs @@ -67,7 +67,10 @@ fn random_string(length: usize) -> String { } fn current_datetime_as_string() -> String { - chrono::Utc::now().format("%Y%m%d_%H%M%S").to_string() + jiff::Timestamp::now() + .to_zoned_datetime(jiff::tz::TimeZone::UTC) + .strftime("%Y%m%d_%H%M%S") + .to_string() } pub struct Podman { diff --git a/common/Cargo.toml b/common/Cargo.toml index f5f1dee55b..a1e7a71931 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -18,7 +18,7 @@ utils = { path = "../utils" } anyhow.workspace = true bech32.workspace = true -chrono = { workspace = true } +jiff = { workspace = true } clap = { workspace = true, features = ["derive"] } fixed-hash.workspace = true generic-array.workspace = true diff --git a/common/src/primitives/time.rs b/common/src/primitives/time.rs index f6f06f3717..cc1a913b3b 100644 --- a/common/src/primitives/time.rs +++ b/common/src/primitives/time.rs @@ -19,7 +19,6 @@ use std::{ time::{Duration, SystemTime}, }; -use chrono::TimeZone; use serde::{Deserialize, Serialize}; use rpc_description::HasValueHint; @@ -110,28 +109,26 @@ impl Time { self.time.saturating_sub(t.time) } - /// Convert this `Time` instance to `chrono::DateTime`. + /// Convert this `Time` instance to a `jiff::Timestamp`. /// - /// This may fail if the time is too far into the future. - pub fn as_absolute_time(&self) -> Option> { - TryInto::::try_into(self.time.as_secs()).ok().and_then(|secs| { - // Note: chrono::DateTime supports time values up to about 262,000 years away - // from the common era, which is still way below i64::MAX; i.e. timestamp_opt - // may still return None here. - chrono::Utc.timestamp_opt(secs, self.time.subsec_nanos()).single() - }) + /// This may fail if the time is too far into the future: `jiff::Timestamp` + /// supports dates up to the end of year 9999. + pub fn as_absolute_time(&self) -> Option { + TryInto::::try_into(self.time.as_secs()) + .ok() + .and_then(|secs| jiff::Timestamp::new(secs, self.time.subsec_nanos() as i32).ok()) } - /// Create a new `Time` instance from `chrono::DateTime`. + /// Create a new `Time` instance from a `jiff::Timestamp`. /// /// This will fail if the date-time is before the Unix epoch or if it doesn't represent /// a whole number of seconds. - pub fn from_absolute_time(time: &chrono::DateTime) -> Option { - if time.timestamp_subsec_nanos() != 0 { + pub fn from_absolute_time(time: &jiff::Timestamp) -> Option { + if time.subsec_nanosecond() != 0 { return None; } - let seconds: u64 = time.timestamp().try_into().ok()?; + let seconds: u64 = time.as_second().try_into().ok()?; Some(Self::from_secs_since_epoch(seconds)) } } @@ -165,7 +162,9 @@ impl Debug for Time { let utc_time = self.as_absolute_time(); if let Some(time) = utc_time { - write!(f, "{time:?}") + // `jiff::Timestamp`'s Display renders RFC 3339 (e.g. "2024-01-12T12:54:52Z"), + // which is what the Debug output looked like with `chrono`. + write!(f, "{time}") } else { write!(f, "Time({:?})", self.time) } @@ -177,7 +176,17 @@ impl Display for Time { let utc_time = self.as_absolute_time(); if let Some(time) = utc_time { - write!(f, "{time}") + // Same format that `chrono`'s Display used to produce, e.g. + // "2024-01-12 12:54:52 UTC" / "2024-01-12 12:54:52.123 UTC". + let subsec_nanos = time.subsec_nanosecond(); + let base = + time.to_zoned_datetime(jiff::tz::TimeZone::UTC).strftime("%Y-%m-%d %H:%M:%S"); + if subsec_nanos == 0 { + write!(f, "{base} UTC") + } else { + let subsec = format!("{subsec_nanos:09}"); + write!(f, "{base}.{} UTC", subsec.trim_end_matches('0')) + } } else { // Note: we could use humantime::format_duration here, but the output won't be // very nice, e.g. for Duration::MAX it'll be: @@ -268,26 +277,24 @@ mod tests { #[trace] #[case(Seed::from_entropy())] fn from_to_absolute_time(#[case] seed: Seed) { - use chrono::prelude::*; - let mut rng = make_seedable_rng(seed); for _ in 0..10 { let year = rng.random_range(1970..=3000); let month = rng.random_range(1..=12); let days_in_month = - NaiveDate::from_ymd_opt(year, month, 1).unwrap().num_days_in_month(); + jiff::civil::date(year, month.try_into().unwrap(), 1).days_in_month(); let day = rng.random_range(1..=days_in_month); let hour = rng.random_range(0..24); let min = rng.random_range(0..60); let sec = rng.random_range(0..60); - let abs_time = DateTime::from_naive_utc_and_offset( - NaiveDateTime::new( - NaiveDate::from_ymd_opt(year, month, day.into()).unwrap(), - NaiveTime::from_hms_opt(hour, min, sec).unwrap(), - ), - Utc, - ); + let abs_time = jiff::tz::TimeZone::UTC + .to_zoned_datetime( + jiff::civil::date(year, month.try_into().unwrap(), day.try_into().unwrap()) + .at(hour, min, sec, 0), + ) + .unwrap() + .timestamp(); let time = Time::from_absolute_time(&abs_time).unwrap(); let abs_time_from_conversion = time.as_absolute_time().unwrap(); @@ -295,7 +302,8 @@ mod tests { // Only a whole number of seconds should be allowed. let millis = rng.random_range(1..1000); - let abs_time_with_millis = abs_time + Duration::from_millis(millis); + let abs_time_with_millis = + abs_time.checked_add(jiff::SignedDuration::from_millis(millis)).unwrap(); assert!(Time::from_absolute_time(&abs_time_with_millis).is_none()); } } diff --git a/deny.toml b/deny.toml index b6d431259f..7809641a8a 100644 --- a/deny.toml +++ b/deny.toml @@ -2,6 +2,9 @@ github = [ "mintlayer", # allow any code from mintlayer's github "paritytech", # we have to use an unreleased version of parity-scale-codec at this moment + # Temporary overlay of file-rotate (chrono made optional, RUSTSEC-2026-0543) until + # https://github.com/kstrafe/file-rotate/pull/40 is released. + "nullPointerEnjoyer", ] [licenses] diff --git a/node-gui/Cargo.toml b/node-gui/Cargo.toml index 8e5e165866..f478dfad3b 100644 --- a/node-gui/Cargo.toml +++ b/node-gui/Cargo.toml @@ -25,7 +25,7 @@ wallet-types = { path = "../wallet/types", default-features = false } wallet-storage = { path = "../wallet/storage", default-features = false } anyhow.workspace = true -chrono.workspace = true +jiff.workspace = true ctor.workspace = true futures.workspace = true heck.workspace = true diff --git a/node-gui/backend/Cargo.toml b/node-gui/backend/Cargo.toml index a53801f9ae..c16ebd9d69 100644 --- a/node-gui/backend/Cargo.toml +++ b/node-gui/backend/Cargo.toml @@ -26,7 +26,6 @@ wallet-rpc-lib = { path = "../../wallet/wallet-rpc-lib", default-features = fals wallet-types = { path = "../../wallet/types", default-features = false } anyhow.workspace = true -chrono.workspace = true futures.workspace = true itertools.workspace = true semver.workspace = true diff --git a/node-gui/src/main_window/mod.rs b/node-gui/src/main_window/mod.rs index b9f51091e4..f08be98f52 100644 --- a/node-gui/src/main_window/mod.rs +++ b/node-gui/src/main_window/mod.rs @@ -106,13 +106,15 @@ fn print_coin_amount_with_ticker(chain_config: &ChainConfig, value: Amount) -> S fn print_timestamp(timestamp: Duration) -> Option { let timestamp: i64 = timestamp.as_secs().try_into().ok()?; - let timestamp = chrono::DateTime::from_timestamp(timestamp, 0); - - // To print in local timezone - // use chrono::TimeZone; - // let timestamp = chrono::Local.from_utc_datetime(×tamp); - - timestamp.map(|t| t.format("%Y-%m-%d %H:%M:%S").to_string()) + let timestamp = jiff::Timestamp::from_second(timestamp).ok()?; + + // To print in local timezone, use `jiff::tz::TimeZone::system()` instead of UTC. + Some( + timestamp + .to_zoned_datetime(jiff::tz::TimeZone::UTC) + .strftime("%Y-%m-%d %H:%M:%S") + .to_string(), + ) } fn print_block_timestamp(timestamp: BlockTimestamp) -> String { diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 477399d33a..2722de72e3 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -115,6 +115,10 @@ criteria = "safe-to-deploy" version = "1.1.1" criteria = "safe-to-deploy" +[[exemptions.base64]] +version = "0.23.1" +criteria = "safe-to-deploy" + [[exemptions.bigdecimal]] version = "0.4.10" criteria = "safe-to-deploy" @@ -343,6 +347,10 @@ criteria = "safe-to-deploy" version = "0.23.0" criteria = "safe-to-deploy" +[[exemptions.darling]] +version = "0.24.1" +criteria = "safe-to-deploy" + [[exemptions.darling_core]] version = "0.14.4" criteria = "safe-to-deploy" @@ -351,6 +359,10 @@ criteria = "safe-to-deploy" version = "0.23.0" criteria = "safe-to-deploy" +[[exemptions.darling_core]] +version = "0.24.1" +criteria = "safe-to-deploy" + [[exemptions.darling_macro]] version = "0.14.4" criteria = "safe-to-deploy" @@ -359,6 +371,10 @@ criteria = "safe-to-deploy" version = "0.23.0" criteria = "safe-to-deploy" +[[exemptions.darling_macro]] +version = "0.24.1" +criteria = "safe-to-deploy" + [[exemptions.dashmap]] version = "5.5.3" criteria = "safe-to-deploy" @@ -707,6 +723,50 @@ criteria = "safe-to-deploy" version = "0.7.10" criteria = "safe-to-run" +[[exemptions.itertools]] +version = "0.10.5" +criteria = "safe-to-deploy" + +[[exemptions.jiff]] +version = "0.2.46" +criteria = "safe-to-deploy" + +[[exemptions.jiff]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.jiff-core]] +version = "0.1.8" +criteria = "safe-to-deploy" + +[[exemptions.jiff-core]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.jiff-static]] +version = "0.2.46" +criteria = "safe-to-deploy" + +[[exemptions.jiff-static]] +version = "1.0.1" +criteria = "safe-to-deploy" + +[[exemptions.jiff-tzdb]] +version = "0.1.10" +criteria = "safe-to-deploy" + +[[exemptions.jiff-tzdb]] +version = "1.0.0" +criteria = "safe-to-deploy" + +[[exemptions.jiff-tzdb-platform]] +version = "0.1.3" +criteria = "safe-to-deploy" + +[[exemptions.jiff-tzdb-platform]] +version = "1.0.0" +criteria = "safe-to-deploy" + [[exemptions.jni]] version = "0.19.0" criteria = "safe-to-deploy" @@ -1055,6 +1115,10 @@ criteria = "safe-to-deploy" version = "1.15.0" criteria = "safe-to-deploy" +[[exemptions.portable-atomic-util]] +version = "0.2.8" +criteria = "safe-to-deploy" + [[exemptions.ppv-lite86]] version = "0.2.21" criteria = "safe-to-deploy" @@ -1275,6 +1339,10 @@ criteria = "safe-to-deploy" version = "0.8.2" criteria = "safe-to-deploy" +[[exemptions.serde_json]] +version = "1.0.154" +criteria = "safe-to-deploy" + [[exemptions.serde_urlencoded]] version = "0.7.1" criteria = "safe-to-deploy" diff --git a/wallet/wallet-cli-commands/Cargo.toml b/wallet/wallet-cli-commands/Cargo.toml index 3b15d57e20..3754b0de65 100644 --- a/wallet/wallet-cli-commands/Cargo.toml +++ b/wallet/wallet-cli-commands/Cargo.toml @@ -28,7 +28,7 @@ wallet-types = { path = "../types", default-features = false } async-trait.workspace = true bigdecimal.workspace = true -chrono.workspace = true +jiff.workspace = true clap = { workspace = true, features = ["derive"] } crossterm.workspace = true derive_more.workspace = true diff --git a/wallet/wallet-cli-commands/src/helper_types.rs b/wallet/wallet-cli-commands/src/helper_types.rs index 902bf6de87..bda63ba5b2 100644 --- a/wallet/wallet-cli-commands/src/helper_types.rs +++ b/wallet/wallet-cli-commands/src/helper_types.rs @@ -648,7 +648,7 @@ impl FromStr for CliOutputTimeLock { Self::UntilHeight(parse_u64(arg)?.into()) } else if lock_type.eq_ignore_ascii_case("until_time") { let date_time = arg - .parse::>() + .parse::() .map_err(|_| ParseError::InvalidTime(arg.to_owned()))?; let time = Time::from_absolute_time(&date_time).ok_or(ParseError::BadTime(date_time))?; @@ -821,7 +821,7 @@ pub enum ParseError { InvalidTime(String), #[error("Bad time: {0}")] - BadTime(chrono::DateTime), + BadTime(jiff::Timestamp), #[error("Invalid currency: {0}")] InvalidCurrency(String), @@ -1248,8 +1248,6 @@ mod tests { #[trace] #[case(Seed::from_entropy())] fn test_parse_output_timelock(#[case] seed: Seed) { - use chrono::prelude::*; - let mut rng = make_seedable_rng(seed); for _ in 0..10 { @@ -1276,28 +1274,31 @@ mod tests { let year = rng.random_range(1970..=3000); let month = rng.random_range(1..=12); let days_in_month = - NaiveDate::from_ymd_opt(year, month, 1).unwrap().num_days_in_month(); + jiff::civil::date(year, month.try_into().unwrap(), 1).days_in_month(); let day = rng.random_range(1..=days_in_month); let hour = rng.random_range(0..24); let min = rng.random_range(0..60); let sec = rng.random_range(0..60); - let expected_time = NaiveDateTime::new( - NaiveDate::from_ymd_opt(year, month, day.into()).unwrap(), - NaiveTime::from_hms_opt(hour, min, sec).unwrap(), - ); - let expected_time_utc = DateTime::from_naive_utc_and_offset(expected_time, Utc); + let expected_time_utc = jiff::tz::TimeZone::UTC + .to_zoned_datetime( + jiff::civil::date(year, month.try_into().unwrap(), day.try_into().unwrap()) + .at(hour, min, sec, 0), + ) + .unwrap() + .timestamp(); let tz_hours = rng.random_range(0..24); let tz_mins = rng.random_range(0..60); let tz_positive = rng.random_bool(0.5); let expected_time_with_tz = { - let offset = Duration::from_secs(tz_hours * 3600 + tz_mins * 60); + let offset = jiff::SignedDuration::from_secs(tz_hours * 3600 + tz_mins * 60); if tz_positive { expected_time_utc - offset } else { expected_time_utc + offset } }; - let datetime_base_str = format!("{year}-{month}-{day}T{hour}:{min}:{sec}"); + let datetime_base_str = + format!("{year:04}-{month:02}-{day:02}T{hour:02}:{min:02}:{sec:02}"); let datetime_str_utc = format!("{datetime_base_str}Z"); let tz_plus_minus = if tz_positive { "+" } else { "-" }; let tz_str = format!("{tz_plus_minus}{tz_hours:02}:{tz_mins:02}"); From fbbfe6c7cdcc590a860eda41f5c3ea0caa01a276 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 13:07:02 +0100 Subject: [PATCH 2/8] build: address review findings on the chrono migration - rev-pin the three overlay fork dependencies (branch refs could be moved by any writer on the fork account; the locked commits are now pinned in the manifest itself, matching the repo's git-dep convention) - deny.toml: replace the org-wide sources allowlist expansion with exact-URL allow-git entries - cargo-vet: exemption rows for the fork versions in the x@git:rev convention, stale rows pruned (iana-time-zone, chrono trust entry, orphaned imports.lock publishers) - Time Display: replicate chrono's 3/6/9-digit subsecond grouping (trailing-zero trimming was a formatting regression), pinned by tests - until_time parsing: pin both strictness directions with tests (unpadded rejected, space-separator accepted, bare epoch rejected) and describe the actual parser behavior in the CHANGELOG - untangle the duplicated sentences in the pre-existing Node CLI CHANGELOG entry touched by this PR --- CHANGELOG.md | 17 ++-- Cargo.lock | 97 +++++-------------- Cargo.toml | 8 +- common/src/primitives/time.rs | 18 +++- deny.toml | 14 ++- supply-chain/audits.toml | 6 -- supply-chain/config.toml | 32 +----- .../wallet-cli-commands/src/helper_types.rs | 32 ++++++ 8 files changed, 95 insertions(+), 129 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b583e2cc48..18ff96c082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,11 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/ allow it. - Wallet CLI: - - `until_time(...)` output timelocks now require a properly formatted RFC 3339 - timestamp (e.g. `2027-01-31T12:00:00Z`); some non-zero-padded variants that were - accepted before are now rejected. + - `until_time(...)` output timelocks are now parsed as zero-padded, RFC 3339-style + timestamps (e.g. `2027-01-31T12:00:00Z`). Several lenient variants that were + accepted before (non-zero-padded fields such as `2027-1-31T12:0:0Z`) are now + rejected, while some extensions (space separator, omitted seconds, short + offsets, zone annotations) remain accepted. - Wallet: - coin selection leaves out redundant UTXOs: the selection algorithms stop as soon @@ -45,13 +47,8 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/ likewise now require an explicit `true`/`false` value. This makes the absence of an option distinguishable from an explicit opt-out, so a value from the configuration file is no longer silently overridden by the command line or the environment. - corresponding `ML_NODE_*` environment variables likewise now require an explicit - `true`/`false` value. This makes the absence of an option distinguishable from an - explicit opt-out, so a value from the configuration file is no longer silently - overridden by the command line or the environment. - `--enable-db-reckless-mode-in-ibd true`) instead of working as value-less flags; this - makes the absence of an option distinguishable from an explicit opt-out, so a value - from the configuration file is no longer silently overridden by the command line. + + ## [1.4.5] - 2026-11-10 ### Added diff --git a/Cargo.lock b/Cargo.lock index 60ddb9ed2d..91d683eae5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -289,7 +289,7 @@ dependencies = [ "crypto", "ctor", "futures", - "jiff 1.0.1", + "jiff", "libtest-mimic", "logging", "pos-accounting", @@ -1777,7 +1777,7 @@ dependencies = [ "hex", "indoc", "itertools 0.14.0", - "jiff 1.0.1", + "jiff", "lazy_static", "logging", "merkletree-mintlayer", @@ -2943,7 +2943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3046,7 +3046,7 @@ checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix 1.1.3", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3067,7 +3067,7 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "file-rotate" version = "0.7.6" -source = "git+https://github.com/nullPointerEnjoyer/file-rotate.git?branch=chrono-optional-0.7#642a9d0a262912798e7edb5d2970d0129123d48b" +source = "git+https://github.com/nullPointerEnjoyer/file-rotate.git?rev=642a9d0a262912798e7edb5d2970d0129123d48b#642a9d0a262912798e7edb5d2970d0129123d48b" dependencies = [ "flate2", ] @@ -3377,7 +3377,7 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.2.1", + "windows-link 0.1.3", "windows-result 0.4.1", ] @@ -4426,7 +4426,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4468,31 +4468,15 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "jiff" -version = "0.2.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" -dependencies = [ - "jiff-core 0.1.8", - "jiff-static 0.2.46", - "jiff-tzdb-platform 0.1.3", - "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", - "windows-link 0.2.1", -] - [[package]] name = "jiff" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5d126d72eb017f10b302e73bdeca446bea405ee449af4d9e7866d6b082d83e" dependencies = [ - "jiff-core 1.0.1", - "jiff-static 1.0.1", - "jiff-tzdb-platform 1.0.0", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", @@ -4500,15 +4484,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "jiff-core" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" -dependencies = [ - "log", -] - [[package]] name = "jiff-core" version = "1.0.1" @@ -4518,58 +4493,31 @@ dependencies = [ "log", ] -[[package]] -name = "jiff-static" -version = "0.2.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" -dependencies = [ - "jiff-core 0.1.8", - "proc-macro2", - "quote", - "syn 2.0.114", -] - [[package]] name = "jiff-static" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0127e9bde3c6130d6169e7d8d68676e4be69c4bf7573c308b6f960a5089c428" dependencies = [ - "jiff-core 1.0.1", + "jiff-core", "proc-macro2", "quote", "syn 3.0.9", ] -[[package]] -name = "jiff-tzdb" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0980fca2cc272465bd60e82397607ba9f33add9e48defd77923301bbd03808f2" - [[package]] name = "jiff-tzdb" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" -[[package]] -name = "jiff-tzdb-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" -dependencies = [ - "jiff-tzdb 0.1.10", -] - [[package]] name = "jiff-tzdb-platform" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" dependencies = [ - "jiff-tzdb 1.0.0", + "jiff-tzdb", ] [[package]] @@ -5692,7 +5640,7 @@ dependencies = [ "iced", "iced_aw", "iced_fonts", - "jiff 1.0.1", + "jiff", "logging", "networking", "node-comm", @@ -5804,7 +5752,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -7395,7 +7343,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.38.0" -source = "git+https://github.com/nullPointerEnjoyer/reedline.git?branch=chrono-free-0.38#1747ab50dacb0d476666cfd072afa73b5283db82" +source = "git+https://github.com/nullPointerEnjoyer/reedline.git?rev=1747ab50dacb0d476666cfd072afa73b5283db82#1747ab50dacb0d476666cfd072afa73b5283db82" dependencies = [ "crossbeam", "crossterm", @@ -7827,7 +7775,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -7840,7 +7788,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -7897,7 +7845,7 @@ dependencies = [ "security-framework 3.5.1", "security-framework-sys", "webpki-root-certs 0.26.11", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -8279,14 +8227,13 @@ dependencies = [ [[package]] name = "serde_with" version = "3.23.0" -source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?branch=no-chrono#585d127b42704cd1c8671db89d9c2bb267b4b033" +source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?rev=9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135#9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" dependencies = [ "base64 0.23.1", "bs58", "hex", "indexmap 1.9.3", "indexmap 2.13.0", - "jiff 0.2.46", "schemars 0.9.0", "schemars 1.2.1", "serde_core", @@ -8298,7 +8245,7 @@ dependencies = [ [[package]] name = "serde_with_macros" version = "3.23.0" -source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?branch=no-chrono#585d127b42704cd1c8671db89d9c2bb267b4b033" +source = "git+https://github.com/nullPointerEnjoyer/serde_with.git?rev=9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135#9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" dependencies = [ "darling 0.24.1", "proc-macro2", @@ -9063,7 +9010,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -10202,7 +10149,7 @@ dependencies = [ "hex", "humantime", "itertools 0.14.0", - "jiff 1.0.1", + "jiff", "jsonrpsee", "lazy_static", "logging", diff --git a/Cargo.toml b/Cargo.toml index 3d267cd61d..f298bc2e34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -151,7 +151,6 @@ bytes = "1.1" byte-unit = "5.1" cfg-if = "1.0" chacha20poly1305 = "0.10" -jiff = "1.0.1" clap = "4.5" clap_complete = "4.5" console-subscriber = "0.5" @@ -172,7 +171,7 @@ enumflags2 = "0.7" expect-test = "1.3" # Overlay fork with chrono made optional (RUSTSEC-2026-0543); see # https://github.com/kstrafe/file-rotate/pull/40 — revert to a released version once it ships. -file-rotate = { git = "https://github.com/nullPointerEnjoyer/file-rotate.git", branch = "chrono-optional-0.7", default-features = false } +file-rotate = { git = "https://github.com/nullPointerEnjoyer/file-rotate.git", rev = "642a9d0a262912798e7edb5d2970d0129123d48b", default-features = false } fix-hidden-lifetime-bug = "0.2" # Note: we deliberately don't enable the `rand` feature of `fixed-hash` because it still uses # the `rand` crate v0.8.x, so the `random_using` calls generated by `construct_fixed_hash!` would @@ -221,6 +220,7 @@ iced_aw = { git = "https://github.com/iced-rs/iced_aw", rev = "def1db9aac1e58a47 iced_fonts = "0.1" indoc = "2.0" itertools = "0.14" +jiff = "1.0.1" jsonrpsee = { version = "0.26", default-features = false } lazy_static = "1.4" libtest-mimic = "0.8" @@ -248,7 +248,7 @@ rand_chacha = "0.10" rayon = "1.10" # Overlay fork without chrono (RUSTSEC-2026-0543); revert to a released version once our # MSRV allows reedline >= 0.53 (which dropped chrono upstream). -reedline = { git = "https://github.com/nullPointerEnjoyer/reedline.git", branch = "chrono-free-0.38" } +reedline = { git = "https://github.com/nullPointerEnjoyer/reedline.git", rev = "1747ab50dacb0d476666cfd072afa73b5283db82" } ref-cast = "1.0" regex = "1.10" replace_with = "0.1" @@ -269,7 +269,7 @@ serde_test = "1.0" # Overlay fork without the optional chrono integration (RUSTSEC-2026-0543); the weak # feature references otherwise force chrono into the lockfile even when unused. # Revert to a released version when the advisory is resolved upstream. -serde_with = { git = "https://github.com/nullPointerEnjoyer/serde_with.git", branch = "no-chrono" } +serde_with = { git = "https://github.com/nullPointerEnjoyer/serde_with.git", rev = "9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" } serial_test = "3.5" sha-1 = "0.10" sha2 = "0.10" diff --git a/common/src/primitives/time.rs b/common/src/primitives/time.rs index cc1a913b3b..eeffb1c199 100644 --- a/common/src/primitives/time.rs +++ b/common/src/primitives/time.rs @@ -177,15 +177,19 @@ impl Display for Time { if let Some(time) = utc_time { // Same format that `chrono`'s Display used to produce, e.g. - // "2024-01-12 12:54:52 UTC" / "2024-01-12 12:54:52.123 UTC". + // "2024-01-12 12:54:52 UTC" / "2024-01-12 12:54:52.123 UTC"; the subsecond + // part uses chrono's grouping (3, 6 or 9 digits, no trailing-zero trimming). let subsec_nanos = time.subsec_nanosecond(); let base = time.to_zoned_datetime(jiff::tz::TimeZone::UTC).strftime("%Y-%m-%d %H:%M:%S"); if subsec_nanos == 0 { write!(f, "{base} UTC") + } else if subsec_nanos % 1_000_000 == 0 { + write!(f, "{base}.{:03} UTC", subsec_nanos / 1_000_000) + } else if subsec_nanos % 1_000 == 0 { + write!(f, "{base}.{:06} UTC", subsec_nanos / 1_000) } else { - let subsec = format!("{subsec_nanos:09}"); - write!(f, "{base}.{} UTC", subsec.trim_end_matches('0')) + write!(f, "{base}.{:09} UTC", subsec_nanos) } } else { // Note: we could use humantime::format_duration here, but the output won't be @@ -266,6 +270,14 @@ mod tests { let s = format!("{t}"); assert_eq!(s, "2024-01-12 12:54:52.123 UTC"); + // Subsecond digits use chrono's 3/6/9 grouping (no trailing-zero trimming). + let t = Time::from_duration_since_epoch(Duration::from_millis(1705064092100)); + assert_eq!(format!("{t}"), "2024-01-12 12:54:52.100 UTC"); + let t = Time::from_duration_since_epoch(Duration::from_micros(1705064092001100)); + assert_eq!(format!("{t}"), "2024-01-12 12:54:52.001100 UTC"); + let t = Time::from_duration_since_epoch(Duration::from_nanos(1705064092_000000001)); + assert_eq!(format!("{t}"), "2024-01-12 12:54:52.000000001 UTC"); + let t = Time::from_duration_since_epoch(Duration::MAX); let s = format!("{t:?}"); assert_eq!(s, "Time(18446744073709551615.999999999s)"); diff --git a/deny.toml b/deny.toml index 7809641a8a..dc8c354619 100644 --- a/deny.toml +++ b/deny.toml @@ -1,10 +1,18 @@ +[sources] +# Temporary overlays (RUSTSEC-2026-0543 chrono removal) — narrow, exact-URL allows +# instead of an org-wide expansion; remove when upstream releases land +# (file-rotate: kstrafe/file-rotate#40; reedline >= 0.53 after an MSRV bump; serde_with +# once chrono's status is resolved upstream). +allow-git = [ + "https://github.com/nullPointerEnjoyer/file-rotate", + "https://github.com/nullPointerEnjoyer/reedline", + "https://github.com/nullPointerEnjoyer/serde_with", +] + [sources.allow-org] github = [ "mintlayer", # allow any code from mintlayer's github "paritytech", # we have to use an unreleased version of parity-scale-codec at this moment - # Temporary overlay of file-rotate (chrono made optional, RUSTSEC-2026-0543) until - # https://github.com/kstrafe/file-rotate/pull/40 is released. - "nullPointerEnjoyer", ] [licenses] diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index 00160da8ef..ad73bebd0c 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -312,12 +312,6 @@ user-id = 267 # Tony Arcieri (tarcieri) start = "2019-08-30" end = "2026-10-15" -[[trusted.chrono]] -criteria = "safe-to-deploy" -user-id = 4556 # Dirkjan Ochtman (djc) -start = "2022-07-25" -end = "2026-12-08" - [[trusted.clap]] criteria = "safe-to-deploy" user-id = 6743 # Ed Page (epage) diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 2722de72e3..16f0641410 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -536,7 +536,7 @@ version = "1.0.0" criteria = "safe-to-deploy" [[exemptions.file-rotate]] -version = "0.7.6" +version = "0.7.6@git:642a9d0a262912798e7edb5d2970d0129123d48b" criteria = "safe-to-deploy" [[exemptions.find-msvc-tools]] @@ -695,10 +695,6 @@ criteria = "safe-to-deploy" version = "0.5.2" criteria = "safe-to-deploy" -[[exemptions.iana-time-zone]] -version = "0.1.65" -criteria = "safe-to-deploy" - [[exemptions.iced_aw]] version = "0.12.2@git:def1db9aac1e58a47e0c3127d4d4e95d724ca8ad" criteria = "safe-to-deploy" @@ -727,42 +723,22 @@ criteria = "safe-to-run" version = "0.10.5" criteria = "safe-to-deploy" -[[exemptions.jiff]] -version = "0.2.46" -criteria = "safe-to-deploy" - [[exemptions.jiff]] version = "1.0.1" criteria = "safe-to-deploy" -[[exemptions.jiff-core]] -version = "0.1.8" -criteria = "safe-to-deploy" - [[exemptions.jiff-core]] version = "1.0.1" criteria = "safe-to-deploy" -[[exemptions.jiff-static]] -version = "0.2.46" -criteria = "safe-to-deploy" - [[exemptions.jiff-static]] version = "1.0.1" criteria = "safe-to-deploy" -[[exemptions.jiff-tzdb]] -version = "0.1.10" -criteria = "safe-to-deploy" - [[exemptions.jiff-tzdb]] version = "1.0.0" criteria = "safe-to-deploy" -[[exemptions.jiff-tzdb-platform]] -version = "0.1.3" -criteria = "safe-to-deploy" - [[exemptions.jiff-tzdb-platform]] version = "1.0.0" criteria = "safe-to-deploy" @@ -1228,7 +1204,7 @@ version = "0.4.6" criteria = "safe-to-deploy" [[exemptions.reedline]] -version = "0.38.0" +version = "0.38.0@git:1747ab50dacb0d476666cfd072afa73b5283db82" criteria = "safe-to-deploy" [[exemptions.rend]] @@ -1348,11 +1324,11 @@ version = "0.7.1" criteria = "safe-to-deploy" [[exemptions.serde_with]] -version = "3.21.0" +version = "3.23.0@git:9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" criteria = "safe-to-deploy" [[exemptions.serde_with_macros]] -version = "3.21.0" +version = "3.23.0@git:9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" criteria = "safe-to-deploy" [[exemptions.serial_test]] diff --git a/wallet/wallet-cli-commands/src/helper_types.rs b/wallet/wallet-cli-commands/src/helper_types.rs index bda63ba5b2..71a12d0bd3 100644 --- a/wallet/wallet-cli-commands/src/helper_types.rs +++ b/wallet/wallet-cli-commands/src/helper_types.rs @@ -1327,6 +1327,38 @@ mod tests { Time::from_absolute_time(&expected_time_with_tz).unwrap() )) ); + + // Non-zero-padded variants that the previous parser accepted are + // now rejected (fixed single-digit fields, independent of the + // random values above). + let unpadded_str = "2419-3-29T6:7:5Z"; + let res = CliOutputTimeLock::from_str(&format!("until_time({unpadded_str})")); + assert!(matches!( + res, + Err(ParseError::InvalidTime(_)) | Err(ParseError::BadTime(_)) + )); + + // Some lenient extensions remain accepted (Temporal-style parsing): + // space separator and omitted seconds. + let space_str = + format!("{year:04}-{month:02}-{day:02} {hour:02}:{min:02}:{sec:02}Z"); + let parsed: OutputTimeLock = + CliOutputTimeLock::from_str(&format!("until_time({space_str})")) + .unwrap() + .into(); + assert_eq!( + parsed, + OutputTimeLock::UntilTime(BlockTimestamp::from_time( + Time::from_absolute_time(&expected_time_utc).unwrap() + )) + ); + + // Bare epoch seconds are not a valid timestamp here. + let res = CliOutputTimeLock::from_str(&format!("until_time({})", 1705064092_u64)); + assert!(matches!( + res, + Err(ParseError::InvalidTime(_)) | Err(ParseError::BadTime(_)) + )); } let sec_frac = rng.random_range(1..1000); From 3294ff1fbd5b2abc86d97b3e5dfe77746b9a028a Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 13:23:55 +0100 Subject: [PATCH 3/8] build: close review round-2 findings on the chrono migration - cargo-vet: record explicit audit-as-crates-io=false policies for the three overlay forks, per the house convention for non-crates.io sources; the previous commit's message inaccurately described exemption rows being added, while 'cargo vet prune' had in fact removed the fork rows (git-sourced crates are outside the crates.io audit scope by default) - the policies make that state an explicit, recorded decision - CHANGELOG: note the Bad-time error message now rendering timestamps in RFC 3339 form (accepted user-visible drift) - until_time boundary tests: pin the exact error stage (InvalidTime) - user-facing strings: RFC 3339 -> RFC 3339-style, matching the actual (Temporal-hybrid) parser acceptance set - .gitignore: drop the two local-agent-workspace lines (long-tracked hygiene item) --- .gitignore | 2 - CHANGELOG.md | 4 +- supply-chain/config.toml | 51 ++++++------------- supply-chain/imports.lock | 29 ++++------- .../wallet-cli-commands/src/helper_types.rs | 12 ++--- wallet/wallet-cli-commands/src/lib.rs | 4 +- wallet/wallet-cli-commands/src/wizard/mod.rs | 2 +- 7 files changed, 33 insertions(+), 71 deletions(-) diff --git a/.gitignore b/.gitignore index 8dc09ba907..9221b1f7d6 100644 --- a/.gitignore +++ b/.gitignore @@ -52,5 +52,3 @@ target-debian/ /Mintlayer_Node_win_*_Setup.exe /Mintlayer_Node_GUI_win_*_Setup.exe -# local agent workspace -.opencode/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ff96c082..0bfbebcfd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,9 @@ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/ timestamps (e.g. `2027-01-31T12:00:00Z`). Several lenient variants that were accepted before (non-zero-padded fields such as `2027-1-31T12:0:0Z`) are now rejected, while some extensions (space separator, omitted seconds, short - offsets, zone annotations) remain accepted. + offsets, zone annotations) remain accepted. The `Bad time` error message now + renders timestamps in RFC 3339 form (e.g. `2024-01-12T12:54:52Z`) instead of the + previous `2024-01-12 12:54:52 UTC`. - Wallet: - coin selection leaves out redundant UTXOs: the selection algorithms stop as soon diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 16f0641410..0e69b1a196 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -343,10 +343,6 @@ criteria = "safe-to-deploy" version = "0.14.4" criteria = "safe-to-deploy" -[[exemptions.darling]] -version = "0.23.0" -criteria = "safe-to-deploy" - [[exemptions.darling]] version = "0.24.1" criteria = "safe-to-deploy" @@ -355,10 +351,6 @@ criteria = "safe-to-deploy" version = "0.14.4" criteria = "safe-to-deploy" -[[exemptions.darling_core]] -version = "0.23.0" -criteria = "safe-to-deploy" - [[exemptions.darling_core]] version = "0.24.1" criteria = "safe-to-deploy" @@ -367,10 +359,6 @@ criteria = "safe-to-deploy" version = "0.14.4" criteria = "safe-to-deploy" -[[exemptions.darling_macro]] -version = "0.23.0" -criteria = "safe-to-deploy" - [[exemptions.darling_macro]] version = "0.24.1" criteria = "safe-to-deploy" @@ -535,10 +523,6 @@ criteria = "safe-to-deploy" version = "1.0.0" criteria = "safe-to-deploy" -[[exemptions.file-rotate]] -version = "0.7.6@git:642a9d0a262912798e7edb5d2970d0129123d48b" -criteria = "safe-to-deploy" - [[exemptions.find-msvc-tools]] version = "0.1.9" criteria = "safe-to-deploy" @@ -719,10 +703,6 @@ criteria = "safe-to-deploy" version = "0.7.10" criteria = "safe-to-run" -[[exemptions.itertools]] -version = "0.10.5" -criteria = "safe-to-deploy" - [[exemptions.jiff]] version = "1.0.1" criteria = "safe-to-deploy" @@ -1203,10 +1183,6 @@ criteria = "safe-to-deploy" version = "0.4.6" criteria = "safe-to-deploy" -[[exemptions.reedline]] -version = "0.38.0@git:1747ab50dacb0d476666cfd072afa73b5283db82" -criteria = "safe-to-deploy" - [[exemptions.rend]] version = "0.4.2" criteria = "safe-to-deploy" @@ -1315,22 +1291,10 @@ criteria = "safe-to-deploy" version = "0.8.2" criteria = "safe-to-deploy" -[[exemptions.serde_json]] -version = "1.0.154" -criteria = "safe-to-deploy" - [[exemptions.serde_urlencoded]] version = "0.7.1" criteria = "safe-to-deploy" -[[exemptions.serde_with]] -version = "3.23.0@git:9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" -criteria = "safe-to-deploy" - -[[exemptions.serde_with_macros]] -version = "3.23.0@git:9fdd6874f5e2e7ea5a6be56d279d9db4b60ca135" -criteria = "safe-to-deploy" - [[exemptions.serial_test]] version = "3.5.0" criteria = "safe-to-run" @@ -1710,3 +1674,18 @@ criteria = "safe-to-deploy" [[exemptions.zeno]] version = "0.2.3" criteria = "safe-to-deploy" + +# Overlay forks of crates.io packages (RUSTSEC-2026-0543 work): not published to +# crates.io, so crates.io publisher identity does not apply; they are rev-pinned in +# the workspace manifest and reviewed as part of the migration PR. +[policy.file-rotate] +audit-as-crates-io = false + +[policy.reedline] +audit-as-crates-io = false + +[policy.serde_with] +audit-as-crates-io = false + +[policy.serde_with_macros] +audit-as-crates-io = false diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index a69f2d551a..c8914b5759 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -308,13 +308,6 @@ user-id = 267 user-login = "tarcieri" user-name = "Tony Arcieri" -[[publisher.chrono]] -version = "0.4.43" -when = "2026-01-14" -user-id = 4556 -user-login = "djc" -user-name = "Dirkjan Ochtman" - [[publisher.clap]] version = "4.5.57" when = "2026-02-03" @@ -879,6 +872,13 @@ user-id = 6743 user-login = "epage" user-name = "Ed Page" +[[publisher.itertools]] +version = "0.10.5" +when = "2022-09-20" +user-id = 1442 +user-login = "jswrenn" +user-name = "Jack Wrenn" + [[publisher.itertools]] version = "0.12.1" when = "2024-01-29" @@ -1506,8 +1506,8 @@ user-login = "dtolnay" user-name = "David Tolnay" [[publisher.serde_json]] -version = "1.0.149" -when = "2026-01-06" +version = "1.0.154" +when = "2026-10-11" user-id = 3618 user-login = "dtolnay" user-name = "David Tolnay" @@ -2811,11 +2811,6 @@ criteria = "safe-to-deploy" delta = "1.0.0-rc.2 -> 1.0.0" notes = "Only minor changes made for a stable release." -[[audits.bytecode-alliance.audits.iana-time-zone-haiku]] -who = "Dan Gohman " -criteria = "safe-to-deploy" -version = "0.1.2" - [[audits.bytecode-alliance.audits.idna]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -3663,12 +3658,6 @@ delta = "2.0.0-beta1 -> 2.0.0-beta2" notes = "from_utf8_unchecked unsafe remove, all other unsafe not meaningfully changed" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" -[[audits.google.audits.itertools]] -who = "ChromeOS" -criteria = "safe-to-run" -version = "0.10.5" -aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" - [[audits.google.audits.lazy_static]] who = "Lukasz Anforowicz " criteria = "safe-to-deploy" diff --git a/wallet/wallet-cli-commands/src/helper_types.rs b/wallet/wallet-cli-commands/src/helper_types.rs index 71a12d0bd3..be656e94d9 100644 --- a/wallet/wallet-cli-commands/src/helper_types.rs +++ b/wallet/wallet-cli-commands/src/helper_types.rs @@ -613,7 +613,7 @@ impl CliTokenTotalSupply { } /// An OutputTimeLock that can be parsed from strings of the form "block_count(num)", "seconds(num)", -/// "until_height(num)" and "until_time(RFC 3339 datetime)". +/// "until_height(num)" and "until_time(RFC 3339-style datetime)". #[derive(Debug, Clone)] pub enum CliOutputTimeLock { UntilHeight(BlockHeight), @@ -1333,10 +1333,7 @@ mod tests { // random values above). let unpadded_str = "2419-3-29T6:7:5Z"; let res = CliOutputTimeLock::from_str(&format!("until_time({unpadded_str})")); - assert!(matches!( - res, - Err(ParseError::InvalidTime(_)) | Err(ParseError::BadTime(_)) - )); + assert!(matches!(res, Err(ParseError::InvalidTime(_)))); // Some lenient extensions remain accepted (Temporal-style parsing): // space separator and omitted seconds. @@ -1355,10 +1352,7 @@ mod tests { // Bare epoch seconds are not a valid timestamp here. let res = CliOutputTimeLock::from_str(&format!("until_time({})", 1705064092_u64)); - assert!(matches!( - res, - Err(ParseError::InvalidTime(_)) | Err(ParseError::BadTime(_)) - )); + assert!(matches!(res, Err(ParseError::InvalidTime(_)))); } let sec_frac = rng.random_range(1..1000); diff --git a/wallet/wallet-cli-commands/src/lib.rs b/wallet/wallet-cli-commands/src/lib.rs index 83f965cf2e..5cc04d8fbf 100644 --- a/wallet/wallet-cli-commands/src/lib.rs +++ b/wallet/wallet-cli-commands/src/lib.rs @@ -1050,7 +1050,7 @@ pub enum HtlcGroupSubCommand { secret_hash: String, /// The address that can spend the HTLC providing the secret. spend_address: String, - /// The refund timelock, e.g. block_count(720) or until_time(RFC 3339). + /// The refund timelock, e.g. block_count(720) or until_time(RFC 3339-style). refund_timelock: CliOutputTimeLock, /// The address that can refund the HTLC after the refund timelock expires. refund_address: String, @@ -2601,7 +2601,7 @@ pub enum WalletCommand { /// The refund timelock. /// - /// The format is one of: block_count(num), seconds(num), until_height(num) and until_time(RFC 3339 datetime), + /// The format is one of: block_count(num), seconds(num), until_height(num) and until_time(RFC 3339-style datetime), /// e.g. block_count(720), seconds(86400), until_height(500000), until_time(2026-02-26T12:30:00Z). refund_timelock: CliOutputTimeLock, diff --git a/wallet/wallet-cli-commands/src/wizard/mod.rs b/wallet/wallet-cli-commands/src/wizard/mod.rs index 9859680801..f4e5c8dec6 100644 --- a/wallet/wallet-cli-commands/src/wizard/mod.rs +++ b/wallet/wallet-cli-commands/src/wizard/mod.rs @@ -419,7 +419,7 @@ pub fn htlc_create(backend: &mut impl PromptBackend) -> Result "Refund time (RFC 3339):", + 3 => "Refund time (RFC 3339-style):", _ => "Timelock value:", }, None, From 8c93c4a2c7a591b8301d0d89d3822dc61d2d0662 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 13:24:43 +0100 Subject: [PATCH 4/8] build: place the fork vet policies in their canonical config slots cargo-vet's store consistency check requires [policy.*] entries in alphabetical order within the policy block, not appended at the end of the file. --- supply-chain/config.toml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 0e69b1a196..85dfc3b305 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -28,6 +28,9 @@ url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml" [imports.zcash] url = "https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/audits.toml" +[policy.file-rotate] +audit-as-crates-io = false + [policy.fontconfig-parser] audit-as-crates-io = true @@ -52,6 +55,15 @@ audit-as-crates-io = true [policy.parity-scale-codec-derive] audit-as-crates-io = true +[policy.reedline] +audit-as-crates-io = false + +[policy.serde_with] +audit-as-crates-io = false + +[policy.serde_with_macros] +audit-as-crates-io = false + [policy.trezor-client] audit-as-crates-io = false @@ -1674,18 +1686,3 @@ criteria = "safe-to-deploy" [[exemptions.zeno]] version = "0.2.3" criteria = "safe-to-deploy" - -# Overlay forks of crates.io packages (RUSTSEC-2026-0543 work): not published to -# crates.io, so crates.io publisher identity does not apply; they are rev-pinned in -# the workspace manifest and reviewed as part of the migration PR. -[policy.file-rotate] -audit-as-crates-io = false - -[policy.reedline] -audit-as-crates-io = false - -[policy.serde_with] -audit-as-crates-io = false - -[policy.serde_with_macros] -audit-as-crates-io = false From af98f4b3a38db3fd7b2fb9ebd1983b631828abe0 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 13:42:08 +0100 Subject: [PATCH 5/8] fix: satisfy clippy on the migrated time tests - group the nanosecond literal consistently - drop a useless try_into on an i8 day value Clippy with --all-targets is now part of the pre-push local battery. --- common/src/primitives/time.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/src/primitives/time.rs b/common/src/primitives/time.rs index eeffb1c199..a75162a0a1 100644 --- a/common/src/primitives/time.rs +++ b/common/src/primitives/time.rs @@ -302,8 +302,7 @@ mod tests { let sec = rng.random_range(0..60); let abs_time = jiff::tz::TimeZone::UTC .to_zoned_datetime( - jiff::civil::date(year, month.try_into().unwrap(), day.try_into().unwrap()) - .at(hour, min, sec, 0), + jiff::civil::date(year, month.try_into().unwrap(), day).at(hour, min, sec, 0), ) .unwrap() .timestamp(); From 172df2ffe959bee6f2b94c426ee470946cf7f847 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 14:29:01 +0100 Subject: [PATCH 6/8] fix: actually apply the nanosecond literal regrouping The previous attempt was lost to an aborted edit script, and the local default clippy (1.98) does not fire inconsistent_digit_grouping on the old literal while CI's 1.92 toolchain does. Verified this time with cargo +1.92.0 clippy --all-targets; pinning the CI toolchain version in the local pre-push battery. --- common/src/primitives/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/primitives/time.rs b/common/src/primitives/time.rs index a75162a0a1..8adca29ae9 100644 --- a/common/src/primitives/time.rs +++ b/common/src/primitives/time.rs @@ -275,7 +275,7 @@ mod tests { assert_eq!(format!("{t}"), "2024-01-12 12:54:52.100 UTC"); let t = Time::from_duration_since_epoch(Duration::from_micros(1705064092001100)); assert_eq!(format!("{t}"), "2024-01-12 12:54:52.001100 UTC"); - let t = Time::from_duration_since_epoch(Duration::from_nanos(1705064092_000000001)); + let t = Time::from_duration_since_epoch(Duration::from_nanos(1_705_064_092_000_000_001)); assert_eq!(format!("{t}"), "2024-01-12 12:54:52.000000001 UTC"); let t = Time::from_duration_since_epoch(Duration::MAX); From 0084f351ea8448d26b18e68a971097d21be2da7a Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 15:15:11 +0100 Subject: [PATCH 7/8] fix: remaining clippy 1.92 findings in the wallet timelock tests - drop a Duration import left unused by the jiff migration - drop a useless try_into on an i8 day value Verified with cargo +1.92.0 clippy --all-targets and its real exit code (the previous check read the exit code of a pipeline tail and could not fail). --- wallet/wallet-cli-commands/src/helper_types.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wallet/wallet-cli-commands/src/helper_types.rs b/wallet/wallet-cli-commands/src/helper_types.rs index be656e94d9..61681b322a 100644 --- a/wallet/wallet-cli-commands/src/helper_types.rs +++ b/wallet/wallet-cli-commands/src/helper_types.rs @@ -840,7 +840,6 @@ pub enum ParseError { #[cfg(test)] mod tests { - use std::time::Duration; use rstest::rstest; @@ -1281,8 +1280,7 @@ mod tests { let sec = rng.random_range(0..60); let expected_time_utc = jiff::tz::TimeZone::UTC .to_zoned_datetime( - jiff::civil::date(year, month.try_into().unwrap(), day.try_into().unwrap()) - .at(hour, min, sec, 0), + jiff::civil::date(year, month.try_into().unwrap(), day).at(hour, min, sec, 0), ) .unwrap() .timestamp(); From d86ff75b085667eea7c7200ed1337ed903ab6359 Mon Sep 17 00:00:00 2001 From: nullPointerEnjoyer Date: Wed, 18 Nov 2026 16:20:16 +0100 Subject: [PATCH 8/8] build: use a minor-only version for the jiff workspace dependency The code checker requires workspace dependency versions to be major.minor without a patch component; the lockfile still pins jiff 1.0.1 exactly. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f298bc2e34..e5695b442c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -220,7 +220,7 @@ iced_aw = { git = "https://github.com/iced-rs/iced_aw", rev = "def1db9aac1e58a47 iced_fonts = "0.1" indoc = "2.0" itertools = "0.14" -jiff = "1.0.1" +jiff = "1.0" jsonrpsee = { version = "0.26", default-features = false } lazy_static = "1.4" libtest-mimic = "0.8"