chore: bump deps and migrate to nostr-sdk 0.45.1 - #162
Conversation
Finish EventBuilder/finalize, ECDH, Message signing, and NIP-59 seal/PoW adaptations for nostr 0.45.1, and align rustdoc plus NIP59_TRANSPORT.md. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe pull request updates dependencies to Nostr 0.45. It replaces deprecated event-building and signing APIs, adds local secp256k1 ECDH, updates NIP-59 timestamp and PoW handling, and simplifies rating tag serialization. ChangesNostr API migration
Estimated code review effort: 3 (Moderate) | ~30 minutes 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/nip59.rs`:
- Around line 33-35: Update the documentation for
RANGE_RANDOM_TIMESTAMP_TWEAK_SECS in nip59.rs from an inclusive to an exclusive
range, stating 0..2 days, and make the matching comment change in wrap.rs. Do
not alter the constant or its behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 417579ad-602b-4826-9df7-0db5814bfd6b
📒 Files selected for processing (13)
Cargo.tomldocs/NIP59_TRANSPORT.mdsrc/chat/keys.rssrc/chat/mod.rssrc/chat/shared_key.rssrc/chat/unwrap.rssrc/chat/wrap.rssrc/dispute.rssrc/message.rssrc/nip59.rssrc/order.rssrc/rating.rssrc/transport.rs
There was a problem hiding this comment.
Reviewed the nostr-sdk/nostr 0.45.1 migration against the security-audit context. The PR removes the vulnerable 0.44 Nostr stack from mostro-core, preserves the custom Mostro NIP-59 identity/trade-key split, and the local ECDH/timestamp/PoW replacements match the 0.45 APIs. Local validation passed: cargo test, cargo fmt --check, cargo clippy --all-targets --all-features -D warnings, and cargo audit. CI is green on the current head.
Only non-blocking note: CodeRabbit's existing comment about documenting the timestamp tweak as an exclusive range is valid but cosmetic.
Summary
nostr-sdk/nostrto 0.45.1, plus related crates (sqlx,secp256k1, etc.).EventBuilder::finalize/finalize_unsigned,GiftWrapSealBuilder, local ECDH (generate_shared_key),UnsignedEvent::minefor PoW, andMessage::{sign,verify_signature}againstsecp256k10.30 digests.docs/NIP59_TRANSPORT.mdso they match the new builders and private NIP-59 timestamp helpers.Summary by CodeRabbit
Improvements
Documentation
Maintenance