chore: deprecate the gift-wrap (protocol v1) transport variant#158
Conversation
Mark Transport::GiftWrap with #[deprecated]: mostrod v0.19.0 removes its `transport` setting and runs protocol v2 (nip44) only, and the variant will be removed from mostro-core in a following release once the ecosystem completes the v2 migration (MostroP2P/mostro#786). The variant stays fully functional meanwhile — clients still need it to talk to pre-v2 nodes — so the enum's own impls and the tests that exercise it carry explicit #[allow(deprecated)] markers. Default had to become a manual impl: #[derive(Default)] + #[default] on a deprecated variant trips the deprecation lint at the definition site (and the release hook runs clippy with -D warnings). Behavior, wire format and serde representation are unchanged.
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mostro-core 0.14.1 marks Transport::GiftWrap #[deprecated] (MostroP2P/mostro-core#158), completing the compiler layer of the v0.19.0 deprecation notices: every downstream use of the protocol-v1 transport now warns. The one intentional use this bump surfaced — the startup deprecation-warning check itself in main.rs — gets the same explicit #[allow(deprecated)] marker as the rest of the transitional call sites.
…800) * chore: standardize v0.19.0 deprecation notices for the v1 transport (#786) The transport = "gift-wrap" knob and the version-follows-transport stamping from PR #785 are transitional: v0.19.0 removes them and runs protocol v2 (nip44) only. Mark every site that goes away with three layers of notice: - Runtime: mostrod logs a startup WARN when it runs the deprecated gift-wrap (protocol v1) transport, pointing operators to issue #786. - Compiler: #[deprecated(since = "0.18.0")] on the transport setting field, Settings::get_transport() and stamp_protocol_version(), so every internal use carries an explicit #[allow(deprecated)] marker. - Greppable comments: DEPRECATED(v0.19.0, #786) at each site, so `grep -rn "DEPRECATED(v0.19.0"` yields the removal checklist when preparing that release. No behavior change beyond the new startup warning. * chore: bump mostro-core to 0.14.1 (deprecated gift-wrap variant) mostro-core 0.14.1 marks Transport::GiftWrap #[deprecated] (MostroP2P/mostro-core#158), completing the compiler layer of the v0.19.0 deprecation notices: every downstream use of the protocol-v1 transport now warns. The one intentional use this bump surfaced — the startup deprecation-warning check itself in main.rs — gets the same explicit #[allow(deprecated)] marker as the rest of the transitional call sites.
Summary
Companion to MostroP2P/mostro#786 and MostroP2P/mostro#800: mark
Transport::GiftWrapwith#[deprecated]so every downstream use of the protocol-v1 transport surfaces a compiler warning during the v1→v2 migration window.#[deprecated]onTransport::GiftWrapwith a note pointing to Remove configurable transport and run protocol v2 only in v0.19.0 (revert #785) mostro#786: mostrod v0.19.0 removes itstransportsetting and runs protocol v2 (nip44) only; the variant will be removed from mostro-core in a following release once the ecosystem completes the migration.event_kind,protocol_version,FromStr,Display,wrap_message_with) and the tests that exercise it carry explicit#[allow(deprecated)]markers — which double as the greppable removal checklist.Defaultbecame a manual impl:#[derive(Default)]+#[default]on a deprecated variant trips the deprecation lint at the definition site, and the release hook runs clippy with-D warnings. The default remainsGiftWrapfor backward compatibility until the v0.19.0 cutover.No behavior change: wire format, serde representation (
"gift-wrap"/"nip44") and all signatures are untouched. Downstream crates that still referenceTransport::GiftWrap(mostrod until v0.19.0, mostro-cli) will see a deprecation warning on their next mostro-core bump — that is the point; they silence intentional transitional uses with#[allow(deprecated)], as MostroP2P/mostro#800 already does.Test plan
cargo clippy --all-targets --all-features -- -D warnings— clean (same gate as the release hook)cargo test— 83 unit + 4 doc tests passcargo fmtFromStr/Display/default round-trip covered by the existingtransport_config_parsingtest (unchanged assertions, still passing)