14 KiB
14 KiB
Changelog
v0.44.0 - 2025/11/06
Breaking changes
- Rename
BoxSinkandBoxStreamtoWebSocketSinkandWebSocketStream(https://github.com/rust-nostr/nostr/pull/1086) - Replace
ReceiverStreamwithBoxedStream(https://github.com/rust-nostr/nostr/pull/1087 and https://github.com/rust-nostr/nostr/pull/1121) - Update
Relay::subscriptionsandRelay::subscriptionoutputs (https://github.com/rust-nostr/nostr/pull/1102) - Update
RelayPool::subscriptionsandRelayPool::subscriptionoutputs (https://github.com/rust-nostr/nostr/pull/1102)
Changed
- Add checks to ensure REQ limits are respected before receiving the EOSE message (https://github.com/rust-nostr/nostr/pull/1024)
Added
- Add
Relay::stream_eventsmethod (https://github.com/rust-nostr/nostr/pull/1088) - Re-add support for multi-filter REQ (https://github.com/rust-nostr/nostr/pull/1102)
Fixed
ban_relay_on_mismatchno longer requiresverify_subscriptionsto be enabled (https://github.com/rust-nostr/nostr/pull/1023)
Removed
- Remove
Error::NegentropyReconciliationFailedvariant (https://github.com/rust-nostr/nostr/commit/6befa6de8ab080a8153b7f8b788981d7be365ebf)
v0.43.1 - 2025/10/03
Changed
- Rework event stream ensuring that all REQs are sent before continuing with the code execution (https://github.com/rust-nostr/nostr/pull/1088)
v0.43.0 - 2025/07/28
Breaking changes
- Drop NIP-11 support (https://github.com/rust-nostr/nostr/pull/950)
- Update
RelayPool::subscriptionsandRelayPool::subscriptionoutputs (https://github.com/rust-nostr/nostr/pull/980)
Changed
- Refine notification sending depending on event database saving status (https://github.com/rust-nostr/nostr/pull/911)
- Simplify received message logging (https://github.com/rust-nostr/nostr/pull/945)
- Trim incoming relay messages before processing
- Verify that the received events belong to a subscription (https://github.com/rust-nostr/nostr/pull/979)
- Disable the default event max size limit (https://github.com/rust-nostr/nostr/pull/996)
- Bump lru from 0.14 to 0.16
Added
- Allow putting relays to sleep when idle (https://github.com/rust-nostr/nostr/pull/926)
- An option to ban relays that send events which don't match the subscription filter (https://github.com/rust-nostr/nostr/pull/981)
- Add
RelayOptions::verify_subscriptionsoption (https://github.com/rust-nostr/nostr/pull/997)
Fixed
- Fix panic after a broken pipe error in the relay connection (https://github.com/rust-nostr/nostr/pull/1007)
v0.42.0 - 2025/05/20
Breaking changes
- Drop support for deprecated negentropy protocol (https://github.com/rust-nostr/nostr/pull/853)
Changed
- Bump
lrufrom 0.13.0 to 0.14.0
Added
- Add relay monitor (https://github.com/rust-nostr/nostr/pull/851)
Fixed
- Fix wrong conversion from u8 to RelayStatus (https://github.com/rust-nostr/nostr/pull/878)
v0.41.0 - 2025/04/15
Breaking changes
- Remove
Error::Failedvariant - Returns
Outputinstead of an error if the message/event sending fails for all relays - Add
reasonfield toAdmitStatus::Rejectedvariant
Changed
- Extend unit tests
- Better handling of
CLOSEDmessage for REQs (https://github.com/rust-nostr/nostr/pull/778)
Added
- Add
Relay::banmethod - Add
AdmitPolicy::admit_connectionmethod (https://github.com/rust-nostr/nostr/pull/831)
v0.40.1 - 2025/03/24
Fixed
- Fix
Relay::unsubscribe_allmethod hangs
v0.40.0 - 2025/03/18
Breaking changes
- Drop
RelayFiltering - Remove
Relayconstructors - Change
RelayPool::newsignature - Allow setting the notification channel size of a single
RelayusingRelayOptions
Changed
- Take event reference in
send_eventmethods - Use the relay ingester to perform actions
- Avoid spawning a task for every authentication request
- Use
std::sync::OnceLockinstead oftokio::sync::OnceCell - Better handling of auto-closing subscription activity when fetching events (https://github.com/rust-nostr/nostr/pull/798)
- Reduce
WAIT_FOR_OK_TIMEOUTto 10 secs - Handle CLOSED message when syncing
Added
- Event verification cache (https://github.com/rust-nostr/nostr/pull/746)
- Add
AdmitPolicytrait (https://github.com/rust-nostr/nostr/pull/774) - Add
ReqExitPolicy::WaitForEventsvariant (https://github.com/rust-nostr/nostr/pull/798) - Add
RelayPoolBuilder - Add
RelayPool::is_shutdownmethod
Removed
- Remove min POW difficulty check in favor of
AdmitPolicytrait
v0.39.0 - 2025/01/31
Breaking changes
- Change
Relay::connectmethod signature - Change
Relay::disconnectmethod signature - Change
RelayPool::disconnectmethod signature - Update
targetsarg type inRelayPool::stream_events_targetedmethod - Update
RelayPool::remove_all_relaysmethod signature - Update
RelayPool::force_remove_all_relaysmethod signature - Update
RelayPool::shutdownmethod signature
Changed
- Bump
async-wsocketto 0.13 - Bump
negentropyto 0.5 - Update
Error::WebSocketvariant inner type - Refactor negentropy sync methods
- Refactor relay pinger
- Refactor relay disconnect logic
- Check if pool was already shutdown when calling
RelayPool::shutdown - Avoid repeatedly locking the relay channel receiver
- Refactor
RelayPool::stream_events_targeted - Refactor relay removal logic and add unit tests
- Handle
closeWebSocket message - Always close WebSocket connection when handlers terminate
- Better control over the handling of the termination request
- Ensure notification subscription in subscribe auto-close logic
Added
- Add
Relay::try_connect - Add
Relay::wait_for_connection - Add
RelayPool::try_connect - Add
RelayPool::try_connect_relay - Add
RelayPool::wait_for_connection - Add WebSocket transport abstraction
v0.38.0 - 2024/12/31
Breaking changes
- Replace
Option<String>withStringinOutput::failed
Changed
- Bump
async-utilityto 0.3,async-wsocketto 0.12 andatomic-destructorto 0.3 - Add
PingTrackerand improve relay ping management - Cleanup relay
Errorvariants - Acquire service watcher receiver outside the auto-connect loop
- Decrease
MAX_RETRY_INTERVALto 60 secs - Rework retry interval calculation
- Improve shutdown docs
- Rename
FilterOptionstoReqExitPolicy - Log WebSocket connection error only if different from the last one
- Reduce atomic operations when cloning
- Derive
PartialOrd,OrdandHashforRelayPoolNotification
Added
- Add
ReceiverStream - Add
SubscribeAutoCloseOptions::idle_timeout
Removed
- Remove
thiserrorandtokio-streamdeps - Remove minimum interval constraint in
RelayOptions::retry_interval
Deprecated
- Deprecated batch event methods
- Deprecate
FilterOptions
v0.37.0 - 2024/11/27
Breaking changes
- Switch from async to sync message sending for
Relay
Changed
- Rework latency tracking
- Increase negentropy batch size down to 100
- Increase ping interval to 55 secs
- Increase max retry interval to 10 min
- Update retry interval calculation
- Try fetch relay information document only once every hour
- Not allow to add relays after
RelayPoolshutdown - Rename
RelayOptions::retry_sectoRelayOptions::retry_interval - Rename
RelayOptions::adjust_retry_sectoRelayOptions::adjust_retry_interval - Request NIP11 document only after a successful WebSocket connection
- Immediately terminate relay connection on
Relay::disconnectcall - Return error if relay doesn't exist when removing it
Added
- Add relay reconnection and disconnection unit tests
- Add
RelayServiceFlags::GOSSIPflag
Fixed
- Fix relay can't manually connect if reconnection is disabled
- Fix reconnect loop not break if relay is disconnected while calling
Relay::disconnect
Removed
- Remove
Relay::support_negentropy - Remove
Error::NotConnectedStatusChangedvariant - Remove
INBOXandOUTBOXflags
Deprecated
- Deprecate
RelayPoolNotification::RelayStatusvariant
v0.36.0 - 2024/11/05
Changed
- Changes in
RelayPool::remove_relaybehavior - Allow multi-filter reconciliation
- Increase negentropy frame size limit to
60_000 - Set default max relay message size to 5MB
- Return error when receive
RelayNotification::Shutdownvariant - Rename
NegentropyOptionsandNegentropyDirectiontoSyncOptionsandSyncDirection - Join futures instead of spawning threads in
RelayPoolmethods - Reduce overhead by maintaining only one atomic reference count for
RelayConnectionStatsandRelayFilteringstructs - Switch to atomic operations for
RelayStatus - Replace
RwLockwithOnceCellforexternal_notification_sender - Convert
InternalRelay::send_notificationand linked methods to sync - Avoid
RelayNotificationcloning when not needed inInternalRelay::send_notification - Avoid full
InnerRelayclone when requesting NIP11 document - Rework relay connection methods and auto-connection logic
- Increase
MAX_ADJ_RETRY_SECto 120 secs - Return reference instead of cloned structs for some getter methods of
RelayandRelayPool - Removed unnecessary timeout during the shutdown notification process
- Deprecate
RelaySendOptions::skip_disconnected - Deprecate
RelayConnectionStats::uptime - Better error for health check if relay status is
Initialized - Connect in chunks if too many relays
- Dynamic channel size for streaming of events
- Allow to define a limit of relays allowed in
RelayPool - Refactor
Relay::batch_eventandRelay::auth - Deprecate
RelaySendOptions
Added
- Add
RelayPool::force_remove_relaymethod - Add
RelayFiltering::overwrite_public_keysmethod - Add
RelayPool::sync_targeted - Add
Relay::reconcile_multi - Negentropy sync progress
- Add
RelayConnectionStats::success_rate
Removed
- Remove
RelayPool::reconcile_advanced - Remove
RelayPool::reconcile_with_items
v0.35.0 - 2024/09/19
Changed
- Bump
async-wsockettov0.8 - Avoid unnecessary
UrlandRelayclone inRelayPoolmethods - Avoid
Relayclone inRelayPool::connect_relaymethod RelayPool::send_eventandRelayPool::batch_eventsend only to relays withWRITEflagRelayPool::subscribe_with_id,RelayPool::get_events_ofandRelayPool::stream_events_ofREQ events only to relays withREADflag- Bump
async-wsockettov0.9 - Improve
Relay::support_negentropymethod - Change handle relay message log level from
errortowarn
Added
- Add
RelayPool::disconnect_relaymethod - Add
RelayPool::relays_with_flagandRelayPool::all_relays - Add support to negentropy v1
- Add whitelist support
Removed
- Remove high latency log
- Remove
Error::OneShotRecvErrorvariant
v0.34.0 - 2024/08/15
Changed
- Bump MSRV to v1.70.0
- Take mutex ownership instead of clone in
InternalRelayPool::get_events_from - Remove IDs collection from
InternalRelayPool::get_events_from - Better checks before perform queries or send messages to relays
- Bump
async-wsockettov0.7 - Get events only from remote relay when calling
get_events_oforget_events_from
Added
- Add
RelayPoolNotification::Authenticatedvariant - Add
RelayPool::save_subscription
Fixed
- Fix
Eventnotification variant sent also for events sent by the SDK
v0.33.0 - 2024/07/16
Changed
- Use per-purpose dedicated relay channels
- Return relay urls to which
messages/eventshave or not been sent forsend_*andbatch_*methods - Return relay urls to which
subscriptionhave or not been success forsubscribe*methods - Rename
Relay::terminatetoRelay::disconnect - Always send
RelayPoolNotification::Messagevariant - Return report for negentropy reconciliation
Added
- Add
Output<T>struct - Add
Output<EventId>::idandOutput<SubscriptionId>::idmethods - Add dry run option for negentropy reconciliation
Fixed
- Fix shutdown notification sent to external channel on
Relay::terminatemethod call - Fix
RelayPool::reconcile_advancedmethod uses database items instead of the passed ones
Removed
- Remove
RelayPoolNotification::Stop - Remove
RelayStatus::Stop - Remove
startandstopmethods
v0.32.0 - 2024/06/07
Changed
- Bump
atomic-destructortov0.2 - Increase default kind 3 event limit to
840000bytes and10000tags - Improve accuracy of latency calculation
- Refactoring and adj.
relayinternal module - Log when websocket messages are successfully sent
- Always close the WebSocket when receiver loop is terminated
- Use timeout for WebSocket message sender
- Bump
async-wsockettov0.5
Added
- Allow to set event limits per kind
- Log warn when high latency
Fixed
- Fix relay doesn't auto reconnect in certain cases
v0.31.0 - 2024/05/17
Added
- Add
RelayPool::start - Add
NegentropyDirectiondefault
v0.30.0 - 2024/04/15
Changed
- Bump
async-wsocketto0.4 - Return error if
urlsarg is empty inInternalRelayPool::get_events_from - Allow to disable
RelayLimits
Added
- Add
Relay::handle_notifications
v0.29.4 - 2024/04/08
- Fix
InternalRelay::get_events_of_with_callbacktimeout
v0.29.3 - 2024/04/04
- Check filter limit in
InternalRelayPool::get_events_from
v0.29.2 - 2024/03/27
Fixed
- Fix
get_events_ofissues
v0.29.1 - 2024/03/26
Fixed
- Fix spurious send_event timeout error (https://github.com/rust-nostr/nostr/pull/375)