Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rust crate nostr to 0.36.0 - autoclosed #18

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 6, 2024

This PR contains the following updates:

Package Type Update Change
nostr dependencies minor 0.34.1 -> 0.36.0
nostr dependencies minor 0.35.0 -> 0.36.0

Release Notes

rust-nostr/nostr (nostr)

v0.36.0

Compare Source

Summary

Many, many improvements to Relay and RelayPool performance (reduced atomic operations and switched to async concurrency),
add NostrSigner trait, better methods and struct names (fetch_events instead of get_events_of, sync instead of reconcile,
NostrConnect instead of Nip46Signer and so on), add LocalRelay and allow to easily serve it as hidden onion service with the embedded
tor client, allow to keep track of negentropy sync progress, almost halved the weight of JavaScript SDK bindings (from ~6.3MB to ~3.6MB), some fixes and many more!

Note for Python, Kotlin, Swift and JavaScript devs: unfortunately I can't mark things as deprecated in bindings, so this release have many breaking changes, sorry :(
Note for devs who are using nostr-protocol (Python), org.rust-nostr:nostr (Kotlin), nostr-swift (Swift) or @rust-nostr/nostr (JavaScript) libraries: these packages are now deprecated. Only the nostr-sdk library will be released, which include everything that was in the nostr library.

Changed
  • Bump toolchain channel to 1.82.0
  • Convert nostr-signer crate to nostr-connect ([Yuki Kishimoto])
  • nostr: move TagsIndexes into Tags struct ([Yuki Kishimoto])
  • nostr: use OnceCell implementation from std lib instead of once_cell ([Yuki Kishimoto])
  • nostr: remove redundant public key from repost events ([Yuki Kishimoto])
  • nostr: change impl Ord for Event behaviour (descending order instead of ascending) ([Yuki Kishimoto])
  • nostr: change TagStandard::Relays variant value from Vec<UncheckedUrl> to Vec<Url> ([Yuki Kishimoto])
  • nostr: reserve capacity for tags when POW is enabled in EventBuilder ([Yuki Kishimoto])
  • nostr: add sign, sign_with_keys, sign_with_ctx, build and build_with_supplier methods to EventBuilder ([Yuki Kishimoto])
  • nostr: deprecate to_event, to_event_with_ctx and to_unsigned_event methods ([Yuki Kishimoto])
  • relay-builder: refactor Session::check_rate_limit method ([Yuki Kishimoto])
  • relay-builder: return error if event was deleted ([Yuki Kishimoto])
  • pool: changes in RelayPool::remove_relay behavior ([Yuki Kishimoto])
  • pool: allow multi-filter reconciliation ([Yuki Kishimoto])
  • pool: increase negentropy frame size limit to 60_000 ([Yuki Kishimoto])
  • pool: set default max relay message size to 5MB ([Yuki Kishimoto])
  • pool: return error when receive RelayNotification::Shutdown variant ([Yuki Kishimoto])
  • pool: rename NegentropyOptions and NegentropyDirection to SyncOptions and SyncDirection ([Yuki Kishimoto])
  • pool: join futures instead of spawning threads in RelayPool methods ([Yuki Kishimoto])
  • pool: reduce overhead by maintaining only one atomic reference count for RelayConnectionStats and RelayFiltering structs ([Yuki Kishimoto])
  • pool: switch to atomic operations for RelayStatus ([Yuki Kishimoto])
  • pool: replace RwLock with OnceCell for external_notification_sender ([Yuki Kishimoto])
  • pool: convert InternalRelay::send_notification and linked methods to sync ([Yuki Kishimoto])
  • pool: avoid RelayNotification cloning when not needed in InternalRelay::send_notification ([Yuki Kishimoto])
  • pool: avoid full InnerRelay clone when requesting NIP11 document ([Yuki Kishimoto])
  • pool: rework relay connection methods and auto-connection logic ([Yuki Kishimoto])
  • pool: increase MAX_ADJ_RETRY_SEC to 120 secs ([Yuki Kishimoto])
  • pool: return reference instead of cloned structs for some getter methods of Relay and RelayPool ([Yuki Kishimoto])
  • pool: removed unnecessary timeout during the shutdown notification process ([Yuki Kishimoto])
  • pool: deprecate RelaySendOptions::skip_disconnected ([Yuki Kishimoto])
  • pool: deprecate RelayConnectionStats::uptime ([Yuki Kishimoto])
  • pool: better error for health check if relay status is Initialized ([Yuki Kishimoto])
  • pool: connect in chunks if too many relays ([Yuki Kishimoto])
  • pool: dynamic channel size for streaming of events ([Yuki Kishimoto])
  • pool: allow to define a limit of relays allowed in RelayPool ([Yuki Kishimoto])
  • pool: refactor Relay::batch_event and Relay::auth ([Yuki Kishimoto])
  • pool: deprecate RelaySendOptions ([Yuki Kishimoto])
  • sdk: deprecate Client::get_events_of and Client::get_events_from methods ([Yuki Kishimoto])
  • sdk: use Events instead of Vec<Event> in fetch and query methods ([Yuki Kishimoto])
  • sdk: rename stream_events_of to stream_events ([Yuki Kishimoto])
  • sdk: deprecate Client::reconcile and Client::reconcile_with ([Yuki Kishimoto])
  • sdk: use by default tor for onion relays if tor feature is enabled on non-mobile targets ([Yuki Kishimoto])
  • sdk: return reference to RelayPool instead of clone in Client:pool ([Yuki Kishimoto])
  • sdk: immediately return error if gossip filters are empty ([Yuki Kishimoto])
  • signer: auto enable nip44 feature if nip59 is enabled ([Yuki Kishimoto])
  • connect: rename Nip46Signer to NostrConnect ([Yuki Kishimoto])
  • database: improve BTreeCappedSet ([Yuki Kishimoto])
  • database: not save invalid event deletion ([Yuki Kishimoto])
  • lmdb: not save event deletion ([Yuki Kishimoto])
  • lmdb: return iterator instead of vector in Lmdb::single_filter_query ([Yuki Kishimoto])
  • lmdb: mark event as deleted only if database have the target event ([Yuki Kishimoto])
  • signer: bootstrap NIP46 signer on demand ([Yuki Kishimoto])
  • bindings(nostr): adj. tag module ([Yuki Kishimoto])
  • ffi: merge nostr-ffi in nostr-sdk-ffi ([Yuki Kishimoto])
  • js: merge nostr-js into nostr-sdk-js ([Yuki Kishimoto])
  • js: change opt-level to z ([Yuki Kishimoto])
Added
  • nostr: add TagKind::Client variant ([Yuki Kishimoto])
  • nostr: add some shorthand constructors for TagKind::SingleLetter ([Yuki Kishimoto])
  • nostr: add Tags struct ([Yuki Kishimoto])
  • nostr: add d tag extraction test from Tags ([Yuki Kishimoto])
  • nostr: add TagStandard::GitClone and TagKind::Clone variants ([Yuki Kishimoto])
  • nostr: add TagStandard::GitCommit and TagKind::Commit variants ([Yuki Kishimoto])
  • nostr: add TagStandard::GitEarliestUniqueCommitId variant ([Yuki Kishimoto])
  • nostr: add TagStandard::GitMaintainers and TagKind::Maintainers variants ([Yuki Kishimoto])
  • nostr: add TagStandard::Web and TagKind::Web variants ([Yuki Kishimoto])
  • nostr: add EventBuilder::git_repository_announcement ([Yuki Kishimoto])
  • nostr: add EventBuilder::git_issue ([Yuki Kishimoto])
  • nostr: add EventBuilder::git_patch ([Yuki Kishimoto])
  • nostr: add Tag::reference constructor ([Yuki Kishimoto])
  • nostr: add nip59::make_seal function ([Yuki Kishimoto])
  • nostr: add NostrSigner trait ([Yuki Kishimoto])
  • database: add Backend::is_persistent method ([Yuki Kishimoto])
  • database: add Events struct ([Yuki Kishimoto])
  • relay-builder: add LocalRelay and RelayBuilder ([Yuki Kishimoto])
  • relay-builder: allow to serve local relay as hidden service ([Yuki Kishimoto])
  • relay-builder: allow to set number of max connections allowed ([Yuki Kishimoto])
  • relay-builder: add RelayBuilderMode ([Yuki Kishimoto])
  • relay-builder: add min POW difficulty option to RelayBuilder ([Yuki Kishimoto])
  • relay-builder: handle ephemeral events ([Yuki Kishimoto])
  • pool: add RelayPool::force_remove_relay method ([Yuki Kishimoto])
  • pool: add RelayFiltering::overwrite_public_keys method ([Yuki Kishimoto])
  • pool: add RelayPool::sync_targeted ([Yuki Kishimoto])
  • pool: add Relay::reconcile_multi ([Yuki Kishimoto])
  • pool: negentropy sync progress ([Yuki Kishimoto])
  • pool: add RelayConnectionStats::success_rate ([Yuki Kishimoto])
  • sdk: add Client::fetch_events and Client::fetch_events_from methods ([Yuki Kishimoto])
  • sdk: add Client::sync and Client::sync_with methods ([Yuki Kishimoto])
  • sdk: add gossip support to Client::sync ([Yuki Kishimoto])
  • sdk: add Client::force_remove_all_relays ([Yuki Kishimoto])
  • sdk: add Client::reset and switch-account example ([Yuki Kishimoto])
  • signer: add NostrSigner::gift_wrap ([Yuki Kishimoto])
  • zapper: add WebLNZapper struct (moved from nostr-webln crate) ([Yuki Kishimoto])
  • ffi(nostr): add tag_kind_to_string func ([Yuki Kishimoto])
  • ffi(nostr): add Tag::kind_str method ([Yuki Kishimoto])
  • ffi(nostr): impl Display for Kind ([Yuki Kishimoto])
  • js(nostr): add JsKind::_to_string method ([Yuki Kishimoto])
  • js(nostr): expose from_nostr_uri and to_nostr_uri for PublicKey and EventId ([Yuki Kishimoto])
  • cli: show negentropy sync progress ([Yuki Kishimoto])
  • book: add some examples ([RydalWater])
  • book: add NIP17 example ([rodant])
Fixed
  • nostr: adj. NostrConnectURI de/serialization according to NIP46 ([Yuki Kishimoto])
  • connect: fix NostrConnect according to NIP46
  • lmdb: add missing commit method call in Store::delete ([Yuki Kishimoto])
  • lmdb: fix unit tests ([Yuki Kishimoto])
  • lmdb: fix Store::save_event issues ([Yuki Kishimoto])
  • sdk: fix filters empty error when gossip option is enabled ([Yuki Kishimoto])
Removed
  • Remove deprecated ([Yuki Kishimoto])
  • pool: remove RelayPool::reconcile_advanced ([Yuki Kishimoto])
  • pool: remove RelayPool::reconcile_with_items ([Yuki Kishimoto])
  • webln: remove nostr-webln crate ([Yuki Kishimoto])
  • sqlite: remove nostr-sqlite crate ([Yuki Kishimoto])

v0.35.0

Summary

Add gossip model support, deprecate SQLite database in favor of LMDB
(fork of pocket database),
add support to negentropy v1 (old version is still supported!), add MockRelay (a local disposable relay for tests),
allow usage of embedded tor client on mobile devices, many improvements, bugs fix and more!

Changed
  • nostr: bump bitcoin to v0.32 ([Yuki Kishimoto])
  • nostr: bump base64 to v0.22 ([Yuki Kishimoto])
  • nostr: deprecate Event::from_value ([Yuki Kishimoto])
  • nostr: deprecate Tag::as_vec ([Yuki Kishimoto])
  • nostr: re-write RawRelayMessage parsing ([Yuki Kishimoto])
  • nostr: update Event fields ([Yuki Kishimoto])
  • nostr: deprecate Event::is_* kind related methods ([Yuki Kishimoto])
  • nostr: change TryIntoUrl::Err to Infallible for Url ([Yuki Kishimoto])
  • nostr: change Event::verify_id and Event::verify_signature fingerprint ([Yuki Kishimoto])
  • nostr: impl custom Debug, PartialEq and Eq for Keys ([Yuki Kishimoto])
  • nostr: impl PartialOrd, Ord and Hash for Keys ([Yuki Kishimoto])
  • nostr: change Keys::secret_key and Keys::sign_schnorr methods fingerprint ([Yuki Kishimoto])
  • nostr: deprecate Keys::generate_without_keypair ([Yuki Kishimoto])
  • nostr: change NIP26 functions fingerprint ([Yuki Kishimoto])
  • nostr: improve NostrWalletConnectURI parsing ([Yuki Kishimoto])
  • nostr: update EventBuilder::job_feedback method fingerprint ([Yuki Kishimoto])
  • nostr: deprecate EventBuilder::to_pow_event ([Yuki Kishimoto])
  • nostr: impl Display for MachineReadablePrefix ([Yuki Kishimoto])
  • nostr: improve Keys docs ([Yuki Kishimoto])
  • nostr: change visibility of public_key field in Keys struct ([Yuki Kishimoto])
  • nostr: deprecate Keys::public_key_ref ([Yuki Kishimoto])
  • nostr: use OsRng instead of ThreadRng for SECP256K1 global context and schnorr signing ([Yuki Kishimoto])
  • nostr: improve Timestamp::to_human_datetime performance ([Yuki Kishimoto])
  • nostr: deprecate EventId::owned ([Yuki Kishimoto])
  • nostr: convert EventId::all_zeroes to const function ([Yuki Kishimoto])
  • nostr: convert Timestamp::from_secs to const function ([Yuki Kishimoto])
  • nostr: deprecate Kind::as_u32 and Kind::as_u64 ([Yuki Kishimoto])
  • database: update NostrDatabase supertraits ([Yuki Kishimoto])
  • database: impl Clone for MemoryDatabase ([Yuki Kishimoto])
  • database: update NostrDatabase::event_by_id fingerprint ([Yuki Kishimoto])
  • relay-builder: bump tokio-tungstenite to v0.24 ([Yuki Kishimoto])
  • pool: bump async-wsocket to v0.8 ([Yuki Kishimoto])
  • pool: avoid unnecessary Url and Relay clone in RelayPool methods ([Yuki Kishimoto])
  • pool: avoid Relay clone in RelayPool::connect_relay method ([Yuki Kishimoto])
  • pool: RelayPool::send_event and RelayPool::batch_event send only to relays with WRITE flag ([Yuki Kishimoto])
  • pool: RelayPool::subscribe_with_id, RelayPool::get_events_of and RelayPool::stream_events_of REQ events only to relays with READ flag ([Yuki Kishimoto])
  • pool: bump async-wsocket to v0.9 ([Yuki Kishimoto])
  • pool: improve Relay::support_negentropy method ([Yuki Kishimoto])
  • pool: change handle relay message log level from error to warn ([Yuki Kishimoto])
  • signer: update NIP04 and NIP44 methods signature ([Yuki Kishimoto])
  • webln: bump webln to v0.3 ([Yuki Kishimoto])
  • sqlite: deprecate SQLiteDatabase in favor of LMDB ([Yuki Kishimoto])
  • sdk: bump lnurl-pay to v0.6 ([Yuki Kishimoto])
  • sdk: update Client::gift_wrap and Client::gift_wrap_to methods signature ([Yuki Kishimoto])
  • sdk: document and rename Client::metadata to Client::fetch_metadata ([Janek])
  • sdk: update Client::shutdown method fingerprint ([Yuki Kishimoto])
  • sdk: deprecate Client::add_relay_with_opts and Client::add_relays ([Yuki Kishimoto])
  • sdk: deprecate RelayPool::send_msg and RelayPool::batch_msg ([Yuki Kishimoto])
  • sdk: inherit pool subscriptions only when calling Client::add_relay or Client::add_read_relay methods ([Yuki Kishimoto])
  • ffi(nostr): impl Display for Coordinate ([Yuki Kishimoto])
  • ffi(sdk): change Connection::embedded_tor fingerprint for android and ios targets ([Yuki Kishimoto])
  • cli: rename open command to shell ([Yuki Kishimoto])
  • cli: rename serve-signer command to bunker ([Yuki Kishimoto])
Added
  • nostr: impl TryFrom<Vec<Tag>> for LiveEvent ([w3irdrobot])
  • nostr: add Tag::as_slice ([Yuki Kishimoto])
  • nostr: add NostrWalletConnectURI::parse ([Yuki Kishimoto])
  • nostr: add JobFeedbackData struct ([Yuki Kishimoto])
  • nostr: add EventBuilder::pow method ([Yuki Kishimoto])
  • nostr: add TagKind::custom constructor ([Yuki Kishimoto])
  • nostr: add Timestamp::from_secs ([Yuki Kishimoto])
  • nostr: add EventId::from_byte_array ([Yuki Kishimoto])
  • nostr: add Timestamp::min and Timestamp::max ([Yuki Kishimoto])
  • nostr: add nip65::extract_owned_relay_list ([Yuki Kishimoto])
  • nostr: add Kind::from_u16 ([Yuki Kishimoto])
  • database: add DatabaseHelper::fast_query ([Yuki Kishimoto])
  • database: add NostrDatabase::check_id ([Yuki Kishimoto])
  • database: add NostrDatabaseExt::relay_lists ([Yuki Kishimoto])
  • lmdb: add LMDB storage backend ([Yuki Kishimoto])
  • relay-builder: add MockRelay ([Yuki Kishimoto])
  • pool: add RelayPool::disconnect_relay method ([Yuki Kishimoto])
  • pool: add RelayPool::relays_with_flag and RelayPool::all_relays ([Yuki Kishimoto])
  • pool: add support to negentropy v1 ([Yuki Kishimoto])
  • pool: add whitelist support ([Yuki Kishimoto])
  • sdk: add Client::add_discovery_relay ([Yuki Kishimoto])
  • sdk: add Client::add_read_relay and Client::add_write_relay ([Yuki Kishimoto])
  • sdk: add Client::stream_events_targeted ([Yuki Kishimoto])
  • sdk: add Client::subscribe_targeted ([Yuki Kishimoto])
  • sdk: add gossip support to Client::send_event ([Yuki Kishimoto])
  • sdk: add gossip support to Client::get_events_of and Client::stream_events_of ([Yuki Kishimoto])
  • sdk: add gossip support to Client::subscribe and Client::subscribe_with_id ([Yuki Kishimoto])
  • bindings(nostr): expose as_pretty_json for some structs ([Yuki Kishimoto])
  • bindings(sdk): expose Client::fetch_metadata ([Yuki Kishimoto])
  • bindings(sdk): expose Client::pool method ([Yuki Kishimoto])
  • ffi(nostr): expose Kind::is_* methods ([Yuki Kishimoto])
  • ffi(sdk): expose MockRelay ([Yuki Kishimoto])
  • js(nostr): add Kind object ([Yuki Kishimoto])
  • js(nostr): expose getNip05Profile function ([Yuki Kishimoto])
  • js(nostr): expose missing methods to JsCoordinate ([Yuki Kishimoto])
  • js(sdk): expose RelayPool::relays ([Yuki Kishimoto])
  • cli: add serve command ([Yuki Kishimoto])
  • cli: add shell history ([Yuki Kishimoto])
  • book: add some examples ([RydalWater])
Fixed
  • nostr: fix TagStanderd::to_vec ([nanikamado])
  • nostr: fix broken intra doc links ([Yuki Kishimoto])
  • nostr: fix JsonUtil::try_as_pretty_json method ([Yuki Kishimoto])
  • nostr: fix Kind::is_regular method ([Yuki Kishimoto])
Removed
  • Drop support for rocksdb ([Yuki Kishimoto])
  • nostr: remove bech32 from the public API ([Yuki Kishimoto])
  • nostr: remove Keys::from_public_key ([Yuki Kishimoto])
  • nostr: remove tracing dep ([Yuki Kishimoto])
  • nostr: remove impl fmt::Display for SecretKey ([Yuki Kishimoto])
  • database: remove has_event_already_been_saved, has_event_already_been_seen and has_event_id_been_deleted methods from NostrDatabase ([Yuki Kishimoto])
  • database: remove Err from NostrDatabase ([Yuki Kishimoto])
  • database: remove NostrDatabase::bulk_import ([Yuki Kishimoto])
  • database: remove DatabaseError::NotFound variant ([Yuki Kishimoto])
  • database: remove DatabaseError::Nostr variant ([Yuki Kishimoto])
  • database: remove Order enum ([Yuki Kishimoto])
  • database: remove order arg from NostrDatabase::query ([Yuki Kishimoto])
  • pool: remove high latency log ([Yuki Kishimoto])
  • pool: remove Error::OneShotRecvError variant ([Yuki Kishimoto])
  • zapper: remove Err from NostrZapper and unnecessary variants from ZapperError ([Yuki Kishimoto])
  • js(nostr): remove Keys::vanity ([Yuki Kishimoto])
  • cli: remove reverse flag from query command ([Yuki Kishimoto])

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Nov 6, 2024

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path crates/Cargo.toml --workspace
error: failed to parse manifest at `/tmp/renovate/repos/github/AreaLayer/rust-l402/crates/Cargo.toml`

Caused by:
  no targets specified in the manifest
  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path example/Cargo.toml --workspace
error: failed to parse manifest at `/tmp/renovate/repos/github/AreaLayer/rust-l402/example/Cargo.toml`

Caused by:
  no targets specified in the manifest
  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path nostr/Cargo.toml --workspace
error: failed to parse manifest at `/tmp/renovate/repos/github/AreaLayer/rust-l402/nostr/Cargo.toml`

Caused by:
  no targets specified in the manifest
  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present

@renovate renovate bot changed the title Update Rust crate nostr to 0.36.0 Update Rust crate nostr to 0.36.0 - autoclosed Nov 6, 2024
@renovate renovate bot closed this Nov 6, 2024
@renovate renovate bot deleted the renovate/nostr-0.x branch November 6, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants