chore: standardize v0.19.0 deprecation notices for the v1 transport#800
Conversation
…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.
WalkthroughThis PR deprecates the transport configuration path and its dependent call sites ahead of v0.19.0 removal, adds a runtime GiftWrap warning, updates related documentation and tests, and bumps ChangesTransport deprecation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbee975391
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # "gift-wrap" - protocol v1, NIP-59 gift wraps (kind 1059). DEPRECATED, | ||
| # will be removed in v0.19.0. | ||
| # will be removed in v0.19.0 — mostrod will then run protocol | ||
| # v2 only and this setting disappears. See | ||
| # https://github.com/MostroP2P/mostro/issues/786 |
There was a problem hiding this comment.
Use the greppable deprecation marker here
This template is listed as part of the v0.19.0 removal checklist, but it is the only touched site that does not include the exact DEPRECATED(v0.19.0, #786) marker. As a result, the documented grep -rn "DEPRECATED(v0.19.0" checklist will miss settings.tpl.toml, making it easy to leave the deprecated transport default advertised when the knob is removed.
Useful? React with 👍 / 👎.
Summary
Before tagging v0.18.0, mark everything that #786 schedules for removal in v0.19.0 (the
transportknob and the version-follows-transport stamping from #785) with a standard, three-layer deprecation notice:Runtime warning (operator-facing). On startup with
transport = "gift-wrap"— the v0.18 default — mostrod now logs aWARNsaying protocol v1 is deprecated, v0.19.0 runs protocol v2 only, and linking to Remove configurable transport and run protocol v2 only in v0.19.0 (revert #785) #786. This is the notice that actually reaches node operators during the transition window.Rust
#[deprecated]attribute (compiler-enforced). Applied to the three items that get deleted:MostroSettings::transport(src/config/types.rs)Settings::get_transport()(src/config/settings.rs)stamp_protocol_version()(src/util.rs)Every internal use now carries an explicit
#[allow(deprecated)], so when preparing v0.19.0 a grep forallow(deprecated)lists every call site to revert.Greppable comment convention.
DEPRECATED(v0.19.0, #786): <what goes away>at each affected site (main.rssubscription,app.rskind filter,nip33.rsprotocol_versiontag,settings.tpl.toml).grep -rn "DEPRECATED(v0.19.0"yields the complete removal checklist for that release.mostro-core 0.14.1 bump. chore: deprecate the gift-wrap (protocol v1) transport variant mostro-core#158 (released as 0.14.1) marks
Transport::GiftWrapitself#[deprecated], so the compiler layer also covers direct uses of the v1 variant. The one intentional use it surfaced here — the startup deprecation-warning check inmain.rs— carries the same explicit#[allow(deprecated)]marker.No behavior change beyond the new startup warning: the
protocol_versioninfo tag, the subscription kind, and all message stamping are byte-identical.Related: #786 (lifecycle plan), #785 (transitional mechanism being marked), MostroP2P/mostro-core#158 (core-side deprecation).
Test plan
cargo build— clean, no deprecation warnings escape theirallowmarkers (including serde derive on the config struct)cargo clippy --all-targets --all-features -- -D warnings— clean, on mostro-core 0.14.1cargo test— 501 passed, 0 failedcargo fmtWARNappears once at startupSummary by CodeRabbit
Bug Fixes
Documentation
Chores
mostro-coredependency patch version.