Skip to content

Releases: matrix-org/dendrite

Dendrite 0.6.4

22 Feb 16:55
2b0a5ad
Compare
Choose a tag to compare

Features

  • All Client-Server API endpoints are now available under the /v3 namespace
  • The /whoami response format now matches the latest Matrix spec version
  • Support added for the /context endpoint, which should help clients to render quote-replies correctly
  • Accounts now have an optional account type field, allowing admin accounts to be created
  • Server notices are now supported
  • Refactored the user API storage to deduplicate a significant amount of code, as well as merging both user API databases into a single database
    • The account database is now used for all user API storage and the device database is now obsolete
    • For some installations that have separate account and device databases, this may result in access tokens being revoked and client sessions being logged out — users may need to log in again
    • The above can be avoided by moving the device_devices table into the account database manually
  • Guest registration can now be separately disabled with the new client_api.guests_disabled configuration option
  • Outbound connections now obey proxy settings from the environment, deprecating the federation_api.proxy_outbound configuration options

Fixes

  • The roomserver input API will now strictly consume only one database transaction per room, which should prevent situations where the roomserver can deadlock waiting for database connections to become available
  • Room joins will now fall back to federation if the local room state is insufficient to create a membership event
  • Create events are now correctly filtered from federation /send transactions
  • Excessive logging when federation is disabled should now be fixed
  • Dendrite will no longer panic if trying to retire an invite event that has not been seen yet
  • The device list updater will now wait for longer after a connection issue, rather than flooding the logs with errors
  • The device list updater will no longer produce unnecessary output events for federated key updates with no changes, which should help to reduce CPU usage
  • Local device name changes will now generate key change events correctly
  • The sync API will now try to share device list update notifications even if all state key NIDs cannot be fetched
  • An off-by-one error in the sync stream token handling which could result in a crash has been fixed
  • State events will no longer be re-sent unnecessary by the roomserver to other components if they have already been sent, which should help to reduce the NATS message sizes on the roomserver output topic in some cases
  • The roomserver input API now uses the process context and should handle graceful shutdowns better
  • Guest registration is now correctly disabled when the client_api.registration_disabled configuration option is set
  • One-time encryption keys are now cleaned up correctly when a device is logged out or removed
  • Invalid state snapshots in the state storage refactoring migration are now reset rather than causing a panic at startup

Dendrite 0.6.3

10 Feb 13:50
9ac27ca
Compare
Choose a tag to compare

Features

  • Initial support for m.login.token
  • A number of regressions from earlier v0.6.x versions should now be corrected

Fixes

  • Missing state is now correctly retrieved in cases where a gap in the timeline was closed but some of those events were missing state snapshots, which should help to unstick slow or broken rooms
  • Fixed a transaction issue where inserting events into the database could deadlock, which should stop rooms from getting stuck
  • Fixed a problem where rejected events could result in rolled back database transactions
  • Avoided a potential race condition on fetching latest events by using the room updater instead
  • Processing events from /get_missing_events will no longer result in potential recursion
  • Federation events are now correctly generated for updated self-signing keys and signed devices
  • Rejected events can now be un-rejected if they are reprocessed and all of the correct conditions are met
  • Fetching missing auth events will no longer error as long as all needed events for auth were satisfied
  • Users can now correctly forget rooms if they were not a member of the room

Dendrite 0.6.2

04 Feb 17:49
908d881
Compare
Choose a tag to compare

Fixes

  • Resolves an issue where the key change consumer in the keyserver could consume extreme amounts of CPU

Dendrite 0.6.1

04 Feb 14:45
585ced8
Compare
Choose a tag to compare

Features

  • Roomserver inputs now take place with full transactional isolation in PostgreSQL deployments
  • Pull consumers are now used instead of push consumers when retrieving messages from NATS to better guarantee ordering and to reduce redelivery of duplicate messages
  • Further logging tweaks, particularly when joining rooms
  • Improved calculation of servers in the room, when checking for missing auth/prev events or state
  • Dendrite will now skip dead servers more quickly when federating by reducing the TCP dial timeout
  • The key change consumers have now been converted to use native NATS code rather than a wrapper
  • Go 1.16 is now the minimum supported version for Dendrite

Fixes

  • Local clients should now be notified correctly of invites
  • The roomserver input API now has more time to process events, particularly when fetching missing events or state, which should fix a number of errors from expired contexts
  • Fixed a panic that could happen due to a closed channel in the roomserver input API
  • Logging in with uppercase usernames from old installations is now supported again (contributed by hoernschen)
  • Federated room joins now have more time to complete and should not fail due to expired contexts
  • Events that were sent to the roomserver along with a complete state snapshot are now persisted with the correct state, even if they were rejected or soft-failed

Dendrite 0.6

28 Jan 14:14
4281976
Compare
Choose a tag to compare

Features

  • NATS JetStream is now used instead of Kafka and Naffka
    • For monolith deployments, a built-in NATS Server is embedded into Dendrite or a standalone NATS Server deployment can be optionally used instead
    • For polylith deployments, a standalone NATS Server deployment is required
    • Requires the version 2 configuration file — please see the new dendrite-config.yaml sample config file
    • Kafka and Naffka are no longer supported as of this release
  • The roomserver is now responsible for fetching missing events and state instead of the federation API
    • Removes a number of race conditions between the federation API and roomserver, which reduces duplicate work and overall lowers CPU usage
  • The roomserver input API is now strictly ordered with support for asynchronous requests, smoothing out incoming federation significantly
  • Consolidated the federation API, federation sender and signing key server into a single component
    • If multiple databases are used, tables for the federation sender and signing key server should be merged into the federation API database (table names have not changed)
  • Device list synchronisation is now database-backed rather than using the now-removed Kafka logs

Fixes

  • The code for fetching missing events and state now correctly identifies when gaps in history have been closed, so federation traffic will consume less CPU and memory than before
  • The stream position is now correctly advanced when typing notifications time out in the sync API
  • Event NIDs are now correctly returned when persisting events in the roomserver in SQLite mode
    • The built-in SQLite was updated to version 3.37.0 as a result
  • The /event_auth endpoint now strictly returns the auth chain for the requested event without loading the room state, which should reduce spikes in memory usage
  • Filters are now correctly sent when using federated public room directories (contributed by S7evinK)
  • Login usernames are now squashed to lower-case (contributed by BernardZhao)
  • The logs should no longer be flooded with Failed to get server ACLs for room warnings at startup
  • Backfilling will now attempt federation as a last resort when trying to retrieve missing events from the database fails

Dendrite 0.5.1

16 Nov 11:37
e81ef16
Compare
Choose a tag to compare

Features

  • Experimental (although incomplete) support for joining version 8 and 9 rooms
  • State resolution v2 optimisations (close to 20% speed improvement thanks to reduced allocations)
  • Optimisations made to the federation /send endpoint which avoids duplicate work, reduces CPU usage and smooths out incoming federation
  • The sync API now consumes less CPU when generating sync responses (optimised SelectStateInRange)
  • Support for serving the .well-known/matrix/server endpoint from within Dendrite itself (contributed by twentybit)
  • Support for thumbnailing WebP media (contributed by hacktivista)

Fixes

  • The /publicRooms handler now handles POST requests in addition to GET correctly
  • Only valid canonical aliases will be returned in the /publicRooms response
  • The media API now correctly handles max_file_size_bytes being configured to 0 (contributed by database64128)
  • Unverifiable auth events in /send_join responses no longer result in a panic
  • Build issues on Windows are now resolved (contributed by S7evinK)
  • The default power levels in a room now set the invite level to 50, as per the spec
  • A panic has been fixed when malformed messages are received in the key change consumers

Dendrite 0.5.0

24 Aug 14:04
037ff4f
Compare
Choose a tag to compare

Features

  • Support for serverside key backups has been added, allowing your E2EE keys to be backed up and to be restored after logging out or when logging in from a new device
  • Experimental support for cross-signing has been added, allowing verifying your own device keys and verifying other user's public keys
  • Dendrite can now send logs to a TCP syslog server by using the syslog logger type (contributed by sambhavsaggi)
  • Go 1.15 is now the minimum supported version for Dendrite

Fixes

  • Device keys are now cleaned up from the keyserver when the user API removes a device session
  • The M_ROOM_IN_USE error code is now returned when a room alias is already taken (contributed by nivekuil)
  • A bug in the state storage migration has been fixed where room create events had incorrect state snapshots
  • A bug when deactivating accounts caused by only reading the deprecated username field has been fixed

Dendrite 0.4.1

26 Jul 11:52
e367979
Compare
Choose a tag to compare

Features

  • Support for room version 7 has been added
  • Key notary support is now more complete, allowing Dendrite to be used as a notary server for looking up signing keys
  • State resolution v2 performance has been optimised further by caching the create event, power levels and join rules in memory instead of parsing them repeatedly
  • The media API now handles cases where the maximum file size is configured to be less than 0 for unlimited size
  • The initial_state in a /createRoom request is now respected when creating a room
  • Code paths for checking if servers are joined to rooms have been optimised significantly

Fixes

  • A bug resulting in cannot xref null state block with snapshot during the new state storage migration has been fixed
  • Invites are now retired correctly when rejecting an invite from a remote server which is no longer reachable
  • The DNS cache cache_lifetime option is now handled correctly (contributed by S7evinK)
  • Invalid events in a room join response are now dropped correctly, rather than failing the entire join
  • The prev_state of an event will no longer be populated incorrectly to the state of the current event
  • Receiving an invite to an unsupported room version will now correctly return the M_UNSUPPORTED_ROOM_VERSION error code instead of M_BAD_JSON (contributed by meenal06)

Dendrite 0.4.0

12 Jul 10:49
89a16bd
Compare
Choose a tag to compare

Features

  • All-new state storage in the roomserver, which dramatically reduces disk space utilisation
    • State snapshots and blocks are now aggressively deduplicated and reused wherever possible, with state blocks being reduced by up to 15x and snapshot references being reduced up to 2x
    • Dendrite will upgrade to the new state storage automatically on the first run after upgrade, although this may take some time depending on the size of the state storage
  • Appservice support has been improved significantly, with many bridges now working correctly with Dendrite
    • Events are now correctly sent to appservices based on room memberships
    • Aliases and namespaces are now handled correctly, calling the appservice to query for aliases as needed
    • Appservice user registrations are no longer being subject to incorrect validation checks
  • Shared secret registration has now been implemented correctly
  • The roomserver input API implements a new queuing system to reduce backpressure across rooms
  • Checking if the local server is in a room has been optimised substantially, reducing CPU usage
  • State resolution v2 has been optimised further by improving the power level checks, reducing CPU usage
  • The federation API /send endpoint now deduplicates missing auth and prev events more aggressively to reduce memory usage
  • The federation API /send endpoint now uses workers to reduce backpressure across rooms
  • The bcrypt cost for password storage is now configurable with the user_api.bcrypt_cost option
  • The federation API will now use significantly less memory when calling /get_missing_events
  • MSC2946 Spaces endpoints have been updated to stable endpoint naming
  • The media API can now be configured without a maximum file size
  • A new dendrite-upgrade-test test has been added for verifying database schema upgrades across versions
  • Added Prometheus metrics for roomserver backpressure, excessive device list updates and federation API event processing summaries
  • Sentry support has been added for error reporting

Fixes

  • Removed the legacy /v1 register endpoint. Dendrite only implements /r0 of the CS API, and the legacy /v1 endpoint had implementation errors which made it possible to bypass shared secret registration (thanks to Jakob Varmose Bentzen for reporting this)
  • Attempting to register an account that already exists now returns a sensible error code rather than a HTTP 500
  • Dendrite will no longer attempt to /make_join with itself if listed in the request server_names
  • /sync will no longer return immediately if there is nothing to sync, which happened particularly with new accounts, causing high CPU usage
  • Malicious media uploads can no longer exhaust all available memory (contributed by S7evinK)
  • Selecting one-time keys from the database has been optimised (contributed by S7evinK)
  • The return code when trying to fetch missing account data has been fixed (contributed by adamgreig)
  • Dendrite will no longer attempt to use /make_leave over federation when rejecting a local invite
  • A panic has been fixed in QueryMembershipsForRoom
  • A panic on duplicate membership events has been fixed in the federation sender
  • A panic has been fixed in in IsInterestedInRoomID (contributed by bodqhrohro)
  • A panic in the roomserver has been fixed when handling empty state sets
  • A panic in the federation API has been fixed when handling cached events

Dendrite 0.3.11

02 Mar 11:48
6a35d9f
Compare
Choose a tag to compare

This is a security release to fix an identified vulnerability in SQLite deployments — if you are running Dendrite in SQLite mode, please upgrade immediately.

Fixes

  • SECURITY: A bug in SQLite mode which could cause the registration flow to complete unexpectedly for existing accounts has been fixed (PostgreSQL deployments are not affected)
  • A panic in the federation sender has been fixed when shutting down destination queues
  • The /keys/upload endpoint now correctly returns the number of one-time keys in response to an empty upload request