Hot on the heels of Synapse 1.16.1, 1.17.0 is a bug fix release most notably containing a fix for 'stuck invites' which happen when we are unable to reject a room invite received over federation.
Get the new releases from any of the usual sources mentioned at https://github.com/matrix-org/synapse/blob/master/INSTALL.md. 1.17.0 is on github here.
Changelog for 1.17.0 follows:
Synapse 1.17.0 (2020-07-13)
Synapse 1.17.0 is identical to 1.17.0rc1, with the addition of the fix that was included in 1.16.1.
Synapse 1.17.0rc1 (2020-07-09)
Bugfixes
Fix inconsistent handling of upper and lower case in email addresses when used as identifiers for login, etc. Contributed by @dklimpel. (#7021)
Fix "Tried to close a non-active scope!" error messages when opentracing is enabled. (#7732)
Fix incorrect error message when database CTYPE was set incorrectly. (#7760)
Fix to not ignore set_tweak actions in Push Rules that have no value, as permitted by the specification. (#7766)
Fix synctl to handle empty config files correctly. Contributed by @kotovalexarian. (#7779)
Fixes a long standing bug in worker mode where worker information was saved in the devices table instead of the original IP address and user agent. (#7797)
Fix 'stuck invites' which happen when we are unable to reject a room invite received over federation. (#7804, #7809, #7810)
Updates to the Docker image
Include libwebp in the Docker file to properly handle webp image uploads. (#7791)
Improved Documentation
Improve the documentation of the non-standard JSON web token login type. (#7776)
Update doc links for caddy. Contributed by Nicolai Søborg. (#7789)
Internal Changes
Refactor getting replication updates from database. (#7740)
Send push notifications with a high or low priority depending upon whether they may generate user-observable effects. (#7765)
Use symbolic names for replication stream names. (#7768)
Add early returns to _check_for_soft_fail. (#7769)
Fix up synapse.handlers.federation to pass mypy. (#7770)
Convert the appserver handler to async/await. (#7775)
Allow to use higher versions of prometheus_client <0.9.0 which are expected to introduce no breaking changes. Contributed by Oliver Kurz. (#7780)
Update linting scripts and codebase to be compatible with isort v5. (#7786)
Ania M. Piotrowska (@aniampiotrowska), known for her work on Nym, Loopix, and at UCL presented "Building private future for the internet with the Nym mixnet".
Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at https://matrix.org/docs/spec/proposals.
Note that a majority of those new MSCs are split out from MSC1849 (the aggregations MSC) to make it easier to review 🙂
Spec Core Team
In terms of Spec Core Team MSC focus for this week, we're sticking to implementation work. anoa did have some time this week to make the graphs more useful though:
work is still being done on the bot's functionality to test different crypto functionalities of other Matrix clients when thrown in a room with them
slight improvements to mautrix-go (sql store can now store multiple Olm accounts and their sessions, key rotation params taken from encryption event, other minor things)
add some simple instructions to the readme for enabling e2ee for neb as well as integrate these mautrix changes (PR #330)
room_key_requests will probably be the next thing to be developed for mautrix-go
Nheko (GSoC)
Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE (with the notable exception being device verification for now) and intends to be full featured and nice to look at
Over the last couple of weeks I have been working on the next P2P demo, using Yggdrasil as the transport instead of libp2p. Although libp2p is arguably more featureful in many ways, Yggdrasil does have one major benefit in that it provides full overlay routing. Participants in the network can carry traffic on behalf of other participants, resulting in something much closer to a true mesh network.
The mad science doesn't end there however. I've also built a custom Riot iOS build that includes the full Dendrite P2P demo (yes, that's a homeserver running locally on your phone). If you have an iPhone or iPad, it's available in public TestFlight right now and you can play with it!
The demo still is very experimental and has a number of bugs still (including but not limited to messages occasionally taking a while to deliver, the app crashing when going into the background sometimes etc.) but we'll be improving it further in the coming weeks and it's quite fun to play with, particularly if you can do so with other people nearby.
Thanks to the same technology that powers AirDrop, the demo will automatically find and connect to other nearby devices running the demo and build up a network automatically - even if you are not on the same Wi-Fi network (or indeed connected to Wi-Fi at all)! If you don't have any other nearby peers to test with then fear not - you can still configure a public static peer in the app settings and join the wider network that way.
With any luck the room directory will even work too, showing published rooms from other nearby devices. If not, try joining #beachparty:b5ae50589e50991dd9dd7d59c5c5f7a4521e8da5b603b7f57076272abc58b374 from within the app.
Questions, comments or feedback? Join us in #p2p:matrix.org!
Many of you know that I work on a Go homeserver called Dendrite, and so I've had to get familiar with SyTest: a black-box homeserver integration testing project. Unfortunately SyTest has a number of problems: from the dialect of perl, lack of documentation for federation bits, the inability to run a single test, and so on. Having a solid black-box integration testing project is crucial for the ecosystem to ensure spec compliance (and hence compatibility between server implementations) and for making all servers more stable and reliable.
As a side project I've been working on a modern Go rewrite called Complement which is now ready for a bit more exposure. It currently only has a handful of SyTests converted but I hope to rapidly expand the number in the coming weeks. Complement makes heavy use of Docker to agnostically run homeservers, and already includes a Dockerfile for configuring a Dendrite instance. To try it out, clone the repo and run:
(cd dockerfiles && docker build -t complement-dendrite -f Dendrite.Dockerfile .)
COMPLEMENT_BASE_IMAGE=complement-dendrite:latest go test -v ./tests
If you're interested in learning more and maybe adding some tests check out ONBOARDING.md.
My overall hope is that Complement will lower the barrier to entry when adding tests by so much that it encourages any bugfix/feature in any homeserver implementation to result in a new test. This will benefit everyone and create a feedback loop which will make Matrix even more reliable.
Asked about Sytest and SyTS, Kegan added:
Complement currently implements the same tests as sytest, so tests which pass sytest will pass complement (though that will diverge as complement will guard against more race conditions by default). There's about 9 different kinds of tests currently testing CS-API and Federation (outbound to a dummy server and inbound via a federation client)
The problem with SyTS was that the test tooling around it ultimately wasn't expressive enough. I was using Jest and kept finding myself fighting it by bumping up against issues like https://github.com/facebook/jest/pull/8751 and the multi-process parallelisation stuff was too opaque. The assertion helper functions also lacked context because they rely on behavioural testing names like describe("foo") { it("should say bar") { ... } etc so when your assertion fails (eg wrong value for a JSON key using assert equals) it just says unhelpfully "foo != bar" where what I really want is to know what it actually does say then, and other contextual info around the object (maybe the key name was typod). When I realised that the assertion lib didn't have this and I'd need to add it, coupled with parallelisation concerns and head-desking against Jest, I found myself wishing I just used something else. I stuck with it though and then realised that all the federation stuff (signature checking, canonical JSON, etc) would need to re-implemented when I knew I had working code in Go. Both of these things combined and I thought "you know what, I'm just going to do this in Go" but you'll note that the architecture is identical, so SyTS lives on as an early prototype for Complement ;)
Hi everyone, here are some things we worked on this week:
Work on to-device sending improvements
Work on room tags (thanks to @gnieto)
Merged /logout/all endpoint (thanks to @CapsizeGlimmer)
Work on /joined_members (thanks to @CapsizeGlimmer)
Last week we had a list of major features still missing. Here's a list of what already works:
Registering, logging in, creating rooms, room visibility, join rules, basic permission management, public room list, inviting, creating DMs, e2e encryption, key backups, device verification, cross signing, notifications, uploading media/files (also user/room avatars), lower-resolution media thumbnails, voip calls and a few other thing's I'm forgetting right now.
So it's useable for non-federating chats already.
Thanks to everyone who supports me on Liberapay or Bitcoin!
In Synapse land this week, we shipped 1.16.0 and err 1.16.1.
Lifting from the blog post, the highlights are:-
An important performance fix to improve room state resolution.
An option to enable e2e by default for new rooms.
Ability to run multiple media repo workers side by side.
Ability to mark specific content as being safe from quarantine.
Bug fixes to make migrating from SQLite to Postgres more reliable - if you are running sqlite for anything other than evaluation purposes then please migrate!
Continuing our matrix.org performance theme, having now got the CS API largely into a good state of responsiveness, we are looking at federation lag. Today we shipped a sharded Federation Reader to matrix.org which has reduced the average lag from seconds to milliseconds. We are just running two currently and are still tuning as we figure out how to get the best from it. Initial impressions seem promising. Watch this space.
We also have a PR out for review to shard the Federation Sender, which will have much the same effect in the other direction.
Once we have sending messages via the Client-Server API, much reduced federation lag and a sharded Pusher we’ll take a look at room joins.
Hi everyone, my friend Patrick and I have been working on making Matrix more accessible in the context of personal overlay networks powered by WireGuard. We’ve built a 1-click deployment solution for Synapse & Riot based on docker. The interesting part is that it gives you public addressability via a distributed proxy service that we have been developing. We are free and open source and welcoming contributors and testers ASAP! We are imagining an ecosystem for building collaborative intranets and see them as foundational to a freer, more equitable internet. Please join us at #noteworthy:tincan.community See https://www.patrickdlg.com/personal-messaging/ and https://noteworthy.tech/start/
I fixed some bugs in matrix-sms-bridge and added a feature that allows delayed sending of sms messages with the sms send command. It runs very fast and stable in my production environment.
Dept of Clients 📱
Nheko
Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE (with the notable exception being device verification for now) and intends to be full featured and nice to look at
Not much to talk about currently, since I'm breaking my Nheko to replace the entire event store at this moment, but I have some heads up on an annoying bug that I fixed on my branch:
Sometimes we had a weird issue, where Nheko wouldn't load the language the user set on their system. This was especially annoying when I wanted to test a specific language, like Japanese, and I couldn't figure out the right LANG* variables to set the language to Japanese in Nheko. Turns out, this was a bug in Nheko and you wouldn't have guessed so, when looking at the examples in the Qt documentation. Anyway, KDAB wrote a nice blogpost explaining this issue: https://www.kdab.com/fixing-a-common-antipattern-when-loading-translations-in-qt/
If you are a Qt developer, you may want to check your applications, if you are also affected.
We will release a beta (0.91.5) of Riot-Android this evening, including all the recent changes and lots of fixes. We are still working to prepare the great release!
When I initially implemented end-to-bridge encryption in mautrix-python, I used matrix-nio in a slightly hacky way to get it done quickly. It worked fine in some cases, but also caused some undecryptable messages. I tried switching to using matrix-nio's crypto module directly, but the sans-I/O design made that difficult: there were too many parts that needed to be hooked up to the actual I/O and I wasn't able to find them all. In the end, I just decided to implement the basic e2ee stuff directly in mautrix-python the same way it's implemented in mautrix-go.
All my bridges based on mautrix-python (Telegram, Facebook and Hangouts) have been switched to use the new crypto stuff. After a few initial bugs that are already fixed, it seems to work better than the old system. I'll probably add native e2ee to maubot soon too, which is my last main project that's still missing e2ee.
Version 0.3 brings the ability to use room aliases instead of internal room ids.
Furthermore, you can configure it to accept invites and follow room upgrades.
Due to utter negligence and malpractice by myself, we missed the update for this project last week. Of course, 0.2 is now superseded by 0.3, but here is the 0.2 update anyway:
I wrote a pretty simple Matrix bot in Rust which is loosely based on Cat Disruptor 6000. It will react with 🐈️ to any message containing the string "cat" *. Since it is a small project, I hope it can be used as an example for other people interested in writing Matrix bots in Rust. It implements several important features (crypto/device store, auto-accepting invites, crafting custom events, etc.) You can host it yourself, or you can try it out by inviting the user "@catdisruptor:m.scd31.com" to your room! https://git.scd31.com/stephen/cat-disruptor-7000
* Cat Disruptor 6000 does not do this (it is used for disrupting monologues with cat pictures). However, many instances of Cat Disruptor 6000 also include a separate bot, which is what Cat Disruptor 7000 is mimicking.
Heya, we (famedly) are looking for about 2-3 more flutter developers. We are a german startup which works on revolutionizing communication in the medical area. We build on top of matrix, so having some matrix-knowledge would be very beneficial.
While we are based in Berlin we do allow remote work, and communication in english is fine, too.
If you are interested or have more questions, please message Niklas Zender.
Dept of Ping 🏓
Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server. Join #ping:maunium.net to experience the fun live, and to find out how to add YOUR server to the game.
Rank
Hostname
Median MS
1
fairydust.space
334
2
matrix.vgorcum.com
637.5
3
lossy.network
657
4
asra.gr
795
5
swag.industries
1407.5
6
lo.hn
1481
7
finallycoffee.eu
1804
8
nzbr.de
1885.5
9
halogen.city
2275
10
utzutzutz.net
2462.5
That's all I know 🏁
See you next week, and be sure to stop by #twim:matrix.org with your updates!
An important performance fix to improve room state resolution.
An option to enable e2e by default for new rooms.
Ability to run multiple media repo workers side by side.
Ability to mark specific content as being safe from quarantine.
Bug fixes to make migrating from SQLite to Postgres more reliable - if you are running sqlite for anything other than evaluation purposes then please migrate!
Note, we have deprecated the m.login.jwt login method in favour of org.matrix.login.jwt see the changelog for more details.
Enjoy!
Get the new releases from any of the usual sources mentioned at https://github.com/matrix-org/synapse/blob/master/INSTALL.md. 1.16.0 is on github here.
Changelog for 1.16.0 follows:
Synapse 1.16.0 (2020-07-08)
No significant changes since 1.16.0rc2.
Note that this release deprecates the m.login.jwt login method, renaming it to org.matrix.login.jwt, as m.login.jwt is not part of the Matrix spec. Otherwise the behaviour is identical. Synapse will accept both names for now, but this may change in a future release.
Synapse 1.16.0rc2 (2020-07-02)
Synapse 1.16.0rc2 includes the security fixes released with Synapse 1.15.2.
Please see the 1.15.2 release notes for more details.
Improved Documentation
Update postgres image in example docker-compose.yaml to tag 12-alpine. (#7696)
Internal Changes
Add some metrics for inbound and outbound federation latencies: synapse_federation_server_pdu_process_time and synapse_event_processing_lag_by_event. (#7771)
Synapse 1.16.0rc1 (2020-07-01)
Features
Add an option to enable encryption by default for new rooms. (#7639)
Add support for running multiple media repository workers. See docs/workers.md for instructions. (#7706)
Media can now be marked as safe from quarantined. (#7718)
Expand the configuration options for auto-join rooms. (#7763)
Bugfixes
Remove user_id from the response to GET /_matrix/client/r0/presence/{userId}/status to match the specification. (#7606)
In worker mode, ensure that replicated data has not already been received. (#7648)
Fix intermittent exception during startup, introduced in Synapse 1.14.0. (#7663)
Include a user-agent for federation and well-known requests. (#7677)
Accept the proper field (phone) for the m.id.phone identifier type. The legacy field of number is still accepted as a fallback. Bug introduced in v0.20.0. (#7687)
Fix "Starting db txn 'get_completed_ui_auth_stages' from sentinel context" warning. The bug was introduced in 1.13.0. (#7688)
Compare the URI and method during user interactive authentication (instead of the URI twice). Bug introduced in 1.13.0. (#7689)
Fix a long standing bug where the response to the GET room_keys/version endpoint had the incorrect type for the etag field. (#7691)
Fix logged error during device resync in opentracing. Broke in v1.14.0. (#7698)
Do not break push rule evaluation when receiving an event with a non-string body. This is a long-standing bug. (#7701)
Fixs a long standing bug which resulted in an exception: "TypeError: argument of type 'ObservableDeferred' is not iterable". (#7708)
The synapse_port_db script no longer fails when the ui_auth_sessions table is non-empty. This bug has existed since v1.13.0. (#7711)
Synapse will now fetch media from the proper specified URL (using the r0 prefix instead of the unspecified v1). (#7714)
Fix the tables ignored by synapse_port_db to be in sync the current database schema. (#7717)
Fix missing Content-Length on HTTP responses from the metrics handler. (#7730)
Fix large state resolutions from stalling Synapse for seconds at a time. (#7735, #7746)
Improved Documentation
Spelling correction in sample_config.yaml. (#7652)
Added instructions for how to use Keycloak via OpenID Connect to authenticate with Synapse. (#7659)
Move flake8 to the end of scripts-dev/lint.sh as it takes the longest and could cause the script to exit early. (#7738)
Explain the "test" conditional requirement for dependencies is not all of the modules necessary to run the unit tests. (#7751)
Add some metrics for inbound and outbound federation latencies: synapse_federation_server_pdu_process_time and synapse_event_processing_lag_by_event. (#7755)
Ania M. Piotrowska (@aniampiotrowska), known for her work on Nym, Loopix, and at UCL will present "Building private future for the internet with the Nym mixnet".
Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at https://matrix.org/docs/spec/proposals.
e2ee merged and some bugs fixed (pr #324)! You should be able to use neb normally in an encrypted room now, if that's not the case please let us know!
Added integration tests for both encrypted and unencrypted rooms to neb in order to catch things that might break some core functionality in a subtle way (issue #326)
Similarly, created a PR for mautrix-go for testing the Olm and Megolm session establishment and message encryption / decryption (pr #12)
Next up, working on a service for neb for testing the crypto functionality of other clients: neb will send messages to a room, rotate keys etc. and your client is supposed to respond!
Dept of Servers 🏢
Dendrite / gomatrixserverlib
Dendrite is a next-generation homeserver written in Go
This week has seen some new architectural changes and a number of bugs fixed:
A new Current State Server component has been added, which tracks room state
The Public Rooms API has been deprecated in favour of the Current State Server
Event size limits are now honoured with the correct return code
Invites have seen some refactoring and retiring invites should work better now
The federation sender now persists unsent PDUs to the database and will automatically retry when Dendrite is restarted, making resend behaviour much more reliable (particularly in the P2P demos)
Some room checks in /state and /state_ids have been fixed
Some additional restrictions have been added to /send and we now return the correct error codes
A bug where current state was incorrectly used when getting missing/backfill events has been fixed
A bug where you couldn't rejoin a room that you created after wiping your database has been fixed
Synapse 1.15.2 shipped this week with some important security fixes - if you haven't already upgraded, please do asap! Meanwhile, we're also preparing a 1.16 release with the normal round of bugfixes and incremental improvements.
The big focus in the Synapse team continues to be on performance for larger Synapse instances, which is reflected in the support in 1.16 for running multiple media worker processes. We're working on giving other worker processes the same treatment, so expect more of the same in the weeks to come!
The avhost image including coturn, jemalloc, and mjolnir for synapse 1.15.2 was released at avhost/docker-matrix:v1.15.2, while the RCs images were released on my personal repo; mvgorcum/docker-matrix:v1.16.0rc1 and mvgorcum/docker-matrix:v1.16.0rc2
I wrote a very simple Twilio & Maubot based SMS bridge recently which I've been running for long enough with no delivery errors that I'd consider it stable. It's oriented towards bridging many individuals to single rooms via SMS. You'll need to have a Maubot instance in order to run it.
There has been a lot of under the hood work that users won’t notice and which we won’t delve into. In addition to them, we have a few nice things:
Matrix API tokens are redacted in logs for better privacy when submitting bug reports.
A send button was added next the message entry. This is especially relevant for touch screens.
We are less noisy with typing notifications that we send out.
We support SOCKS proxies.
Notifications for non text messages have been tweaked.
We gained support for edited message display. They are replaced with the newer content and a little icon is shown next to them. Editing messages is not supported yet though.
Fixed a ton of reliability bugs in the 7 bridges we support (changelog)
We are hiring (full-time or part-time) remote React developers to work on our (source available, still TBD on final license) Riot fork Send me a DM if interested.
RiotX is now published in the beta channel of the Riot-Android app: https://play.google.com/store/apps/details?id=im.vector.app. You can get the last beta version by becoming a tester if you want to. There will be no more update of RiotX on the PlayStore. Current RiotX users should signout from RiotX and signin again on Riot-Android. Riot-Android users do not have to do that. The changelog can be read here https://github.com/vector-im/riotX-android/releases/tag/v0.91.3-beta. And this week we are working on implementing what's remain on our list, and we are fixing as many bugs as we can before the great release.
Hello, I am announcing my first matrix bot - cody - that will evaluate code snippets in your Matrix rooms and return the result. Here is an example interaction:
This initial release only supports Python, but the plan is to add support for more languages in the next few weeks. The repo might also be of interest to some of you as it has CI, CD to DockerHub, complete dev environment with cody, pantalaimon, synapse and riot using docker-compose, simple metrics and Grafana-dashboards-as-code.
New version of logootish-js with a completely new algorithm
In particular, I should note that this new algorithm is tested extensively, so I think the bugs should be out
Corresponding updates to internal event structure
Fixed UI & CSS bugs
Improved UX for room title editor
Currently, conflicting text will be displayed, but conflicts will not be indicated in any way
I almost forgot to mention: The room list is now filtered using the typed rooms MSC (event ID org.matrix.msc1840). #test-document0:kb1rd.net is a room with that state event set.
I also made a flame graph of the internal algorithm and I'm surprised by some of the results. The good thing is that I think there's quite a few ways to speed up the algorithm. Here it is:
Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server. Join #ping:maunium.net to experience the fun live, and to find out how to add YOUR server to the game.
Folks, today we are releasing Synapse 1.15.2, which is a security release which contains fixes to two separate problems. We are also putting out the second release candidate for the forthcoming Synapse 1.16, including the same fixes.
Firstly, we have fixed a bug in the implementation of the room state resolution algorithm which could cause users to be unexpectedly ejected from rooms (Synapse issue #7742).
Secondly, we have improved the security of pages served as part of the Single-Sign-on login flows to prevent clickjacking attacks. Thank you to Quentin Gliech for reporting this.
We are not aware of either of these vulnerabilities being exploited in the wild, but we recommend that administrators upgrade as soon as possible. Those on Synapse 1.15.1 or earlier should upgrade to Synapse 1.15.2, while those who have already upgraded to Synapse 1.16.0rc1 should upgrade to 1.16.0rc2.
Get the new releases from any of the usual sources mentioned at https://github.com/matrix-org/synapse/blob/master/INSTALL.md. 1.15.2 is on github here, and 1.16.0rc2 is here.
Changelog for 1.15.2 follows:
Synapse 1.15.2 (2020-07-02)
Due to the two security issues highlighted below, server administrators are
encouraged to update Synapse. We are not aware of these vulnerabilities being
exploited in the wild.
Security advisory
A malicious homeserver could force Synapse to reset the state in a room to a
small subset of the correct state. This affects all Synapse deployments which
federate with untrusted servers. (96e9afe6)
HTML pages served via Synapse were vulnerable to clickjacking attacks. This
predominantly affects homeservers with single-sign-on enabled, but all server
administrators are encouraged to upgrade. (ea26e9a9)
Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at https://matrix.org/docs/spec/proposals.
In terms of Spec Core Team MSC focus for this week, unfortunately our three MSCs from last week ( MSC2366 (verification flows), MSC2403 (knocking), and MSC2630 (SAS security)) are still pre-FCP. Most of the team has been quite busy with implementation for the past few weeks. Instead of advertising those 3 MSCs again, we're going to switch the focus to "implementation" for a bit until we're freed up again.
So the focus for this week is: MSC implementation work. However, this should not discourage any MSC authors from responding to MSC feedback in the meantime 🙂
This week in the ruma/matrix Google Summer of Code project, ruma-events was made ready for use! After adding stripped and sync event generation to the event_enum! macro there were only a few small tweaks needed to try it out in some dependent rust crates. I spent a few days converting matrix-rust-sdk to use the ruma-monorepo. Since ruma is used on both client and server-side, I also opened a PR to update Conduit, a homeserver implementation written in Rust. To test that everything worked together, I updated rumatui, my command-line client written in rust.
Then I could test that Conduit sent, and matrix-rust-sdk received the new ruma events successfully. While updating, I felt the pain of not having accessor methods for the Any*Event enums to get at the event fields held within. I have opened a pull request to add the generation of these methods to the event_enums! macro. Hopefully, the Conduit and matrix-sdk PR's will be merged and the ruma monorepo can be tested in the wild!
Moved matrix protocol, irc protocol, and bridge module to futures 0.3. Converted some utility functions to new futures, and updated the http implementation to use the standardized Hyper library instead of using a custom http implementation.
Created PR for enabling e2ee across all services! This required a few changes to how the bot client is initialised, as well as changes to all services to use the new functionality instead of directly sending messages to a room. https://github.com/matrix-org/go-neb/pull/324
Added code from another of tulir's projects to Mautrix to allow storing the crypto material (olm / megolm sessions, accounts etc.) in a SQL database, adding a second way besides using Gob storage. https://github.com/tulir/mautrix-go/pull/10
Future plans are to work on the library itself to add any features that might be missing.
Using the same design as Riot. However, I am just using flexbox and text instead of drawing on an HTML5 canvas. The HSL color is generated by hashing the user ID.
Quoting and replying
Added on-hover buttons and reply popup above message composer similar to Riot web. Quoting prepends the message (quoted) to the message composer similar to Riot web and replying would also work similar to Riot web. It will be fully functional once markdown parsing is added.
Guest access
The client now supports guest access. If no access token or user ID is provided in the configuration file, the client attempts to register a guest account on the home server. Room contents are viewed using peekInRoom.
If the guest attempts to send a message, only then joinRoom is called to avoid spam (each page load would lead to a guest joining the room).
This week has been mainly about testing to ensure that all the progress over the past few months is kept up-to-date and correct. We've also added a few features in order to get certain sytests working. To that end:
Invites can now be declined over federation and they will be reflected in /sync responses.
Errors encountered when joining a room over federation are now sent back to the client.
Errors encountered when accepting an invite over federation are now sent back to the client.
Dendrite will now check server names meet the server name grammar in the specification.
A bug which caused client-api-proxy to not actually proxy correctly has been fixed, thanks @fantashley !
/send now abides by the limits in the specification: 50 PDUs / 100 EDUs.
The docker-compose scripts now include appservice_api, thanks @fantashley !
Sending invites over federation will now fall back to v1 if v2 fails with a 404.
Dendrite now implements room.timeline.limit completely (in both in-line and stored filter formats).
Dendrite now sets the limited flag on /sync responses correctly.
In addition, we now have support for collecting code coverage output from SyTest. This indicates we are testing roughly 70% of the Dendrite codebase. The remaining 30% are hard to reach via integration tests (e.g database failures, communication problems between internal APIs).
Spec compliance:
Client-Server APIs: 45%, up from 40% last week
Server-Server APIs: 50%, up from 38% last week
In total, we've made an additional 45 sytests pass this week.
This week we’ve been working on further improvements to event persistence and ironed out a nasty bug where an unusually long state resolution could block the reactor overall and impact send times. We seem to have got to the bottom of this and m.org has improved a lot as of today.
More generally we’ve been trying to characterise matrix.org performance so that we can continue to improve over the coming months.
We are going to focus on:-
Client send event
Outbound Federation Latency
Inbound Federation Latency
Room joins
As well as tracking the CS API generally.
We are using apdex with a satisfied limit of 250 ms and a tolerating limit of 1000 ms. By the end of the Summer we will aim to hit an apdex score of 0.9 for each area.
For instance here is Federation Send Event Apdex graphed overtime. You can see that we are averaging about ~0.8 currently, so plenty to keeping us busy!
Next up will be to work on Outbound Federation Latency
Aside from that we’ve been working hard on the upcoming Notifications improvements. Mapping the push rules to the demands of the UI has been challenging and we’ve been through several iterations. If you’d like to learn more take a look at Michael and Rich’s explanation in this week’s Matrix Live. Rich’s presentation has Sheltie pictures #justsayin’
The Telegram bridge now supports logging in by scanning a QR code, although it requires using the master branch of Telethon instead of a release. I also fixed bridging captions in file messages, so they're now bridged as separate messages like with images
Hey all, I've got several releases to talk about this week!
First, matrix-appservice-slack has been updated to 1.4.0 with several quality of life changes such as automatically setting the bot profile on startup, supporting logging out of slack accounts and adding a health checkpoint. There are also quite a few bugfixes so make sure you update.
matrix-appservice-irc was also bumped to 0.18.0 with the headline features being Node 14.x support.
We've also shipped 0.19.0-rc1 which has stopped support for Node 10.x. Why? Because we're adding worker support to the bridge! This release starts to make use of the new(ish) worker_threads feature so that we can dish out processing to separate threads (running their own UV event loops, for node enthusiasts). The first thing to be workerized is metrics, so that metrics may still be reported should the bridge become saturated, but we plan to split out more work as things progress.
Finally matrix-appservice-bridge got a few fixes to support our new worker land, as well as being updated to support matrix-js-sdk 6.0.0. You can checkout the changes for 1.13.1 here.
Fluffychat Version 0.15.0 is released, and should be available in the Play Store, on F-Droid and in IOS Testflight soon! This makes Fluffychat the first non-Riot matrix client that supports Cross-Signing.
Features:
New room list app bar design
Chat app bar transparent
Implement web file picker
Minor design and UX improvements
Implement Cross Signing
Restore keys from online key backup
Added translations: Czech, Spanish, Slovakian
Changes:
Show presences of users sharing a direct chat
Big refactoring
Fixes:
Various fixes, including e2ee fixes and olm session recovery
Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE (with the notable exception being device verification for now) and intends to be full featured and nice to look at
Most of our time this week was spent trying out device verification with Chethan. It's fun and I could finally file bugs in Nheko against someone else!
We fixed some issues that should hopefully make text in the timeline less blurry again.
Fixed a bug which cause some clients like fluffychat to break in E2EE rooms (we accidentally sent a null relation when not replying...)
Fixed an issue, where Nheko didn't verify the format of html formatted messages correctly, causing it to render messages in a way which wasn't compliant to the spec.
Thanks to the work of a Pirate and his friends, current versions of Nheko should be available in backports for Debian Buster once again!
Riot Chat for Nextcloud 0.5.0 The new version updated the Riot.im version to 1.6.6 and added the ability for admins to set their own custom config for Riot rather then using the settings interface in addition to a few bug fixes.
Riot Chat for Nextcloud allows individuals and organizations with a Nextcloud instance to easily set up and configure their own Riot instance with just a few clicks on a web interface without the need to write a config file.
This week, we completed UX for cross-signing and secure backup. We made associated settings but we still need to polish them.
Sygnal and the new push extension have been updated to match Apple requirement and our privacy concerns. Events content are no more sent anymore.
We started to implement the new room notifications settings UI.
We will publish at the beginning of next week a beta version of the migration to RiotX codebase on the beta channel of the PlayStore, to be able to ensure the migration works fine, before release it to production.
joepie91 discovered this project, presented yesterday at Conference in the Cloud:
Net::Matrix::Webhook implements a webhook, so you can easily post messages to your matrix chat rooms via HTTP requests. It uses IO::Async to start a web server and connect as a client to matrix. It will then forward your messages.
Soru wrote a quick program that scrapes riot-web, riot-x and riot-ios for translations of the emoji names for emoji verification and combines them all into an easily-readable json file, so that other client developers can use it. Since all three riot versions have a different set of translations, it might also be helpful for them. You can find the source code along with the outputted json files here.
Like the other bots, you can self-host it, use my instance (@satw:maunium.net) in your own room or simply join #satwcomic:maunium.net to automatically get the latest comics in Matrix.
A bot that will allow to room administrators and moderators to generate room custom commands (in a similar way how telegram commands are thought).
When they are invoked it will post the message event object data and a predefined context object along with a token to a custom url. More information in: https://gitlab.com/communia/matrix-webhooker
Drupal module to receive links shared from a matrix room. Get links provided by a matrix bot in a room.
With this module one can get media from a matrix own bot to any drupal site. Once installed and bot is created through matrix-webhooker bot.
A blog entry about it (in spanish) in https://planet.communia.org/content/enlaces-desde-matrix
Dept of Interesting Projects 🛰
Pollvis - new poll visualiser project
We have a couple of conferences coming up who are planning to use Matrix as part of their offering, much as we do with Open Tech Will Save Us. To help add some more features, I created an MVP "poll visualiser", which watches a room and works in tandem with the poll-bot from Brendan Abolivier . This project is still at the beginning, but might be interesting to some! Find the code at https://github.com/benparsons/pollvis.
Dept of Ping 🏓
Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server. Join #ping:maunium.net to experience the fun live, and to find out how to add YOUR server to the game.
Rank
Hostname
Median MS
1
fairydust.space
331
2
services.pyrahex.com
537
3
heitkoetter.net
604
4
nitro.chat
646.5
5
mchus.pro
660
6
privacytools.io
671
7
matrix.vgorcum.com
727.5
8
eiselecloud.de
740
9
aruiz.io
855
10
neko.dev
923.5
That's all I know 🏁
See you next week, and be sure to stop by #twim:matrix.org with your updates!
Are you emerging from lockdown? Dazed and wondering what to wear? Need some apparel which says "I'm cool and I have great taste in decentralised communications protocols"? Then you should visit The Matrix Merch Store!
T-Shirts, Hoodies, Zipped Hoodies and Stickers available now!
Matrix Decomposition: Analysis of an Access Control Approach on Transaction-based DAGs without Finality
We published another scientific paper on Matrix, this time it is called Matrix Decomposition: Analysis of an Access Control Approach on Transaction-based DAGs without Finality!
Its main topic is the question of how access control can work based on a structure that only provides a partial order on events and no consensus on the current state, i.e. the Matrix Event Graph. We found some concrete, non-critical security issues related to both incorrect specification as well as divergent homeserver behaviour. While the last remaining mitigations found their way into Synapse 1.14.0, we provide ideas on structural solutions to avoid both problem classes in the future using formal verification.
Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at https://matrix.org/docs/spec/proposals.
In terms of Spec Core Team MSC focus for this week, the team has been spread a bit thin with other work. As such, we're still on the same three MSCs: MSC2366 (verification flows), MSC2403 (knocking), and MSC2630 (SAS security). We're hoping this week will be more productive in terms of spec.
Dept of Servers 🏢
Dendrite / gomatrixserverlib
Dendrite is a next-generation homeserver written in Go
This week has seen a lot of work put into fixing broken tests and refactoring parts of the codebase.
The media API has had quite a bit of attention this week and now media over federation works properly, as well as much better filename handling
A new user API component is now responsible for user accounts, devices, access tokens and account data
The server key API has been updated with more reliable validity checking and new tests
Logging into Dendrite using Riot iOS is now supported thanks to some minor tweaks/fixes
URL handling for version 3 rooms has been improved
A bug in the format of /v1/send_join has been fixed
The /joined_members response has now been fixed
In addition to that, we've made good progress on embedding the Dendrite-powered Yggdrasil demo into Riot iOS, which we'll hopefully be demoing in a couple of weeks!
We released 1.15.1, this is a bug fix release, sorry if you were bitten.
Changelog in full
Bugfixes
Fix a bug introduced in v1.15.0 that would crash Synapse on start when using certain password auth providers.
Fix a bug introduced in v1.15.0 which meant that some 3PID management endpoints were not accessible on the correct URL.
Outside of that
Implemented unread message counts (MSC 2625) - This is part of the a more general notifications improvement project in conjunction with the Riot teams. The aim being to make Notifications easier to configure. We’ve also been working on push rule definitions for the default behaviour. More on that next week.
Have the ability to shard the media repository worker. This means we can now run an arbitrary number in parallel, thereby improving upload reliability and performance, we are running this on Matrix.org.
Re-enabled Jaeger on matrix.org - previously we needed to switch it off due to the performance overhead, we needed a few tweaks but now it is working well and helping us to determine the cause of slow requests. It seems like the HTTP requests between the event creator and event persister workers can sometimes be slow - we are not sure of the cause yet, we are working on it but it will mean further performance improvements to message sending.
Next up performance wise is working on sharding the federation sender to improve federation lag. We’ll also try replacing simplejson with stdlib json which seems to be much faster at dumps nowadays.
Finally, we’ve fixed a bug that meant that quarantining media would from time to time include quarantining sticker packs
Other interesting bugs
We fixed a spec compliance bug in fetching remote media raised by our pals in Dendrite-land. We fixed a bug causing federation .well-known requests to fail due to not including the user-agent header. We removed references to six (thanks @ilmari) and finally, fixed a bug that caused stream id to go backwards on the replication stream.
Wondering how quick this weeks synapse release was adopted by homeserver admins? Head over to https://graph.settgast.org/ and see yourself that it only took a little over 2 days for 1.15.1 to become the most used synapse version. I plot hourly distribution of synapse versions there. (Disclaimer: Only collects stats for homeservers that my homeserver sees in any of its rooms, which are around 2000 at the moment)
This is super cool! I love that this has been created, and also how well it reflects on homeserver admins! /me scurries to update to 1.15.1...
This week I worked on server-side key backups and cross-signing - the second most requested features (federation being the first one). Key backups are already working! Take a look:
Cross-signing should be working, but there is a bug where emoji verification gets stuck. I hope we can find the mistakes and finish the PR next week.
Thanks to everyone who supports me on Liberapay or (new!) Bitcoin!
To make the bridge info state events a bit more useful, all my bridges now include the room name and avatar URL in them. The events are also updated whenever the name or avatar changes, and there's a new option to re-send the event to all existing portals so old portals would get it too.
RiotX: Version 0.22.0 has been released on Tuesday, it includes integration manager support, sending stickers, modifying power levels, and lots of other things! See https://github.com/vector-im/riotX-android/releases/tag/v0.22.0 for a complete list of the changes.
This week we've been working on audio and video calls (The PR is in review). We are also trying to improve the performance of the application. We are adding room settings, and we have started to work on the migration Riot-Android -> RiotX.
PS check out Valere trying the new features:
Arch Linux (AUR) package for Revolution - a Riot fork by ponies.im
After some slow progress, rumatui, the rust command line chat client, is usable by anyone. You no longer need an account or have previously joined rooms. Registration and room search have been implemented! Using left/right arrow keys from the login screen will toggle to registration. Once registered hitting the left arrow will bring up the room search window. After typing your search term hit Enter and select the room to join by pressing Ctrl-d.
For the brave who would like to give it a trycargo install --git <https://github.com/DevinR528/rumatui> --branch room-search.
Added since last update
Room search is now available
Public rooms can be joined from the room search window
A user can register from the new register window
This features complete User Interactive Authentication by opening a web browser
Message edits are shown
When markdown is part of the message they are properly formatted
Reactions display under the respective message
Redaction events are handled for reactions (emoji) and messages
"Basically usable" is a standard we can all aspire to for our projects and endeavours.
This week, we worked on the new UX for cross-signing and secure backup. In parallel, we continued to improve the new push implementation. We are very closed to complete the two features.
This week we had an off-cycle 1.6.5 release to fix registration on some homeservers when email validation is required. After that, we've made a 1.6.6 RC including:
Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE (with the notable exception being device verification for now) and intends to be full featured and nice to look at
We released 0.7.2, which was a bit more messy than we would have liked...
As with every release we are currently working through the new bug reports. :D
I started working on SSSS and online key backup support. For this I wrote my own base64 and base58 encoders. As a result of this we dropped libsodium as a dependency, which should make Nheko a bit easier to package or build. It's also fun to write base conversions, although 58 is a horrible base!
From the changelog:
Reactions
React to a message with an emoji! 🎉
Reactions are shown below a message in a small bubble with a counter.
By clicking on that, others can add to the reaction count.
It may help you celebrating a new Nheko Release or react with a 👎 to a failed build to express your frustration.
This uses a new emoji picker. The picker will be improved in the near future (better scrolling, sections, favorites, recently used or similar) and then probably replace the current picker.
Support for tagging rooms [tag]
Assign custom tags to rooms from the context menu in the room list.
This allows filtering rooms via the group list. This puts you in a focus mode showing only the selected tags.
You can assign multiple tags to group rooms however you like.
SSO Login
With this you can now login on servers, that only provide SSO.
Just enter any mxid on the server. Nheko will figure out that you need to use SSO and redirect your browser to the login page.
Complete the login in your browser and Nheko should automatically log you in.
Presence
Shows online status of the people you are talking to.
You can define a custom status message to tell others what you are currently up to.
The status message appears next to the usernames in the timeline.
Your server needs to have presence enabled for this to work.
after a couple of setbacks that didn't let us to make the releases earlier, the Quotient project has finally made two new releases:
GTAD (the piece of code magically producing readable C++ code from a Swagger API description) has achieved version 0.7 (https://github.com/KitsuneRal/gtad/releases/tag/v0.7.0) adding a few tricks in order to make...
...libQuotient 0.6 beta2 (https://github.com/quotient-im/libQuotient/releases/tag/0.6-beta2) rely entirely on the upstream matrix-doc specification, rather than a soft fork closely following the main sources! From now on it's "upstream first", in a sense that the original matrix-doc will be used to build Quotient codebase. Let's see how often it breaks ;)
In other news from the last few weeks:
some housekeeping and deprecation work in the API has been done in preparation to getting User Interactive Authentication along the next (post-0.6) release cycle of libQuotient.
also thanks to the updated code generator, the CS API code has been optimised, consolidating more code in the header files and making data deserialisation lazy; this helped significantly reduce compilation times, and runtime performance also improved a bit.
the number of configurations tested by CI has been extended, allowing to chase down a few more bugs that managed to go under the radar before.
when used with new enough Qt, CBOR is used to cache data locally - entirely transparently for clients.
Expect more news in the coming weeks, including continued work on matrix: URI proposal and its implementation in Quotient.
This week in ruma-events' Google Summer of Code project, after trying out the new Any*Event enums matrix-rust-sdk, we found a few big flaws. There was no easy way to go from StateEvent<AnyStateEventContent> to StateEvent<SpecificEventContent>, the other issue was one could create a StateEvent with differing content and prev_content fields using the AnyStateEventContent enum. The 0.22 ruma-events will be similar to the existing API; each event type has a corresponding event enum variant.
There were a few minor fixes during the week also. Unknown field deserialization is fixed, allowing deserialization of a JSON blob that has extra fields which are ignored. Custom events are now present in the Any*EventContent enums, although now they have to be moved up to be included in Any*Event enums. Benchmarks for deserialization have been added and used to increase performance.
Polyjuice Client, a Matrix library for Elixir, had a new release. This release fixes syncs, which apparently were completely broken in the last release (whoops). The wizarding community also welcomes a new contributor, Pierre de Lacroix.
I heard that you people like IoT?! With the Mozilla WebThings Matrix Adapter your Raspberry Pi sends you messages about your home. Want a log of when the front door has been opened? Need a low battery alert for your IoT devices? With the Mozilla IoT gateway and this adapter, you can send these events to a Matrix room of your choice!
Ever since m.room.aliases was replaced with alt_aliases, there hasn't really been any way to find aliases on other servers, since most room admins don't bother finding and publishing alternate aliases. To help solve that problem, I made a maubot plugin to let users publish alternate aliases in rooms: https://github.com/maubot/altalias
By default it lets users publish aliases with the same localpart as any already published alias. If that behavior is sufficient, you can simply invite it to a room and give it permissions to send m.room.canonical_alias events. Alternatively, it can be configured to allow aliases that match specific regexes.
Once it's set up, users can create a local alias and use !altalias publish <their alias> to publish it. The bot will make sure the alias points to the right room, check that the localpart is allowed and then add it to alt_aliases.
I have it running at @alias:maunium.net and I've added it to all my rooms already. Other rooms are also free to use that instance.
As of https://github.com/NixOS/nixpkgs/pull/89327 a go-neb module was added to nixos and will soon be available on nixos-unstable and in the 20.09 release. You can use it to declaratively install and configure go-neb matrix bots on nixos. I use it for prometheus alertmanager alerts and it works really cool! Thx to hexa- who did most of the work on it.
opsdroid 0.19 has been released, not many matrix specific features in this release, just making it slightly easier to get a connector or database instance by name. However, this release paves the way for the merge of the pull request transitioning opsdroid to use the matrix-nio Python library, so the next release should be packed full of matrix stuff 😀
Dept of Ping 🏓
Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server. Join #ping:maunium.net to experience the fun live, and to find out how to add YOUR server to the game.
Rank
Hostname
Median MS
1
fairydust.space
384.5
2
maescool.be
390
3
gottliebtfreitag.de
453
4
construct.grin.hu
610
5
aragon.sh
639.5
6
privacytools.io
670
7
matrix.vgorcum.com
734
8
envs.net
756
9
settgast.org
865
10
intothecyber.space
1005
That's all I know 🏁
Thanks to Alexander and Nico for their help editing this edition.
See you next week, and be sure to stop by #twim:matrix.org with your updates!
Regular readers of TWIM may be familiar with the Decentralized Systems and Network Services Research Group at Karlsruhe Institute of Technology, who have been busy over the last few years analysing Matrix from an independent academic point of view. The work started in 2018 with Florian Jacob’s DSN Traveler spidering project, resulting in the Glimpse of the Matrix paper analysing Matrix’s scale and room/server distribution (at least as it was back then).
Now, the new paper is an absolutely fascinating deep dive analysis into State Resolution v2 - the algorithm at the heart of Matrix which defines how servers merge together their potentially conflicting copies of a given room, such that everyone ends up eventually with a consistent view… even in the face of bad actors. This means that Matrix effectively implements a decentralised access control system - ensuring that users stay banned, and only users with permission can ban, etc. You can see the slides below, and read the full paper here. The video of Florian’s talk from SACMAT should be published shortly.
To give some context from the Matrix side: designing and implementing State Resolution v2 back in 2018 was a bit of a mission. Our original v1 implementation had some bugs which meant that the result of the merge could unexpectedly favour historical state over the current state (so called ‘state resets’) - thus giving an attacker a way to maliciously revert the state of the room. In v2 we thought much more carefully about the algorithm, considering state present in one version of the room but not the other as a conflict, separating and applying access control events from regular events, and adding additional ordering of the state in the room by considering events in the context of their authorisation chain (the ‘auth DAG’). The end result is that we feel confident in v2 State Res, and we haven’t seen any problems with it in the wild since we shipped it in July 2018.
However: state resolution is not intuitive at first - for instance, when you merge two versions of a room together, you treat the state events as unordered sets… even though they are ordered in the context of the room DAG. The reason is that state res needs to work even if you don’t have a copy of the whole room DAG (otherwise you’d have to download way too much data to participate in a large room). Another example is the sequence in which orderings are then applied to the state events - and how that interacts with re-authorising those events, to stop malicious ones creeping in. In the core team, we’ve end up describing it several different ways to try to help folks understand: first Erik’s original MSC1442, then uhoreg’s literary Haskell implementation, then the terse reference version in the Spec itself, and most recently Neil Alexander’s State Resolution v2 for the Hopelessly Unmathematical.
As a result we are very excited and happy that Florian and the DSN team have now published the first ever independent in-depth analysis of the algorithm, particularly in the context of decentralised access control (i.e. enforcing bans, power levels, etc). We’re pleasantly surprised that apparently “To the best of our knowledge, Matrix is the only system that implements access control based on an eventually consistent partial order without finality and without a consensus algorithm”.
Even better, the DSN team found some remaining thinkos in Synapse’s implementation and the Matrix specification, which could have caused resolution results to diverge from other implementations, specifically:
All of these have now been fixed in Synapse and the latest versions of the spec (room v6), and we’d like to sincerely thank Florian and Luca for rapidly and responsibly disclosing the issues to us. In other words: this research is directly improving Matrix, and it’s even more exciting that the stated future work for the DSN team is to work on a formal verification for the security of Matrix’s authorisation rules and state resolution. This stuff is tough, as anyone who’s played with TLA+ will know, and we are incredibly glad that the research community is helping out to formalise and hopefully prove that State Res v2 is as good as we think it is.
We should stress that DSN’s work is completely independent of The Matrix.org Foundation or anyone else building on the protocol; we’re just writing about it here because we think it’s incredibly cool and deserves the attention of the whole Matrix ecosystem.
Thanks again to Florian and the team - we look forward to seeing what comes next!
Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at https://matrix.org/docs/spec/proposals.
In terms of Spec Core Team MSC focus for this week, we're sticking with the same three from last week: MSC2366 (verification flows), MSC2403 (knocking), and MSC2630 (SAS security).
In possibly more exciting news, the Spec Core Team has decided to start separating the scattered casual implementation tips and notes in the spec out and putting them in a series of implementation guides! These will take the form of gitbook-style things, and will initially feature front-to-back implementation guides for a generic Matrix client and homeserver. For more details to provide feedback, check out the associated MSC2618!
Dept of GSoC 🎓
This is the second week of the coding phase of GSoC 2020. Find updates from the students below:
The port from matrix-python-sdk to matrix-nio is almost completed. Sending and receiving most events works properly. Changes are expected be merged in a few days. This PR itself doesn't implement E2EE, that will be a different PR
Alongside that I've been working on implementing E2EE with nio which is partially done, sending and receiving messages works so far. some changes to the MatrixStore interaction and testing is left.
Implementing end-to-end encryption for go-neb turns out to be a lot easier than expected thanks to the https://github.com/tulir/mautrix library, which contains out of the box e2ee support!
The first week of GSoC was spent switching go-neb's usage of gomatrix for mautrix, which was easy as the latter is a fork of the former. This caused a pretty big PR that touched most of go-neb's files, although the changes were simple and easy to review. The PR was merged shortly after into go-neb.
During the second week, it was time to add some basic e2ee support to go-neb. This was complicated slightly due to the bot's ability to create multiple clients and its treatment of /sync responses, however in the end e2ee is now working.
The code is still of course a mess and session keys are often lost in the void. The code will be cleaned up and tested further next week, bugs will be (hopefully) fixed and another PR will be submitted to go-neb then to officially add e2ee support!
Matrix has enormous potential to be used in many different use cases be it embedded chat rooms, comments section, chat boxes, etc. This project aims to fill that niche by providing an easy to use and easy to deploy client for users to embed on their webpages.
The client would mesh well wherever it is embedded by providing a postMessage interface to allow the parent webpage to interact with the client and dynamically modify it whenever needed (For example:- A comments section that is always the same theme as its parent webpage).
Features
As of now, the following features have been added (with more on the way)
List of joined rooms that can be selected
Live room timeline events
Support for image-based messages
Message composer and ability to send messages to a room
Dark and light themes for the client
Changeable highlight colors
Toggleable room header, room timeline, and message composer components
postMessage interface for sending commands from the parent window
Currently, I'm working on adding more options to the postMessage interface as well as adding more interactivity to the client itself.
This week in ruma-events' Google Summer of Code project, I was able to finish the macros needed to generate the event content enums and trait implementations required for events. I started by defining the generic event structs (state, message, etc.) and manually writing the Serialize and Deserialize implementations. Over the next few days, this was moved into a custom derive macro called Event. The derive now implements all necessary traits with appropriate bounds, so a StateEvent<C> can not contain any ephemeral event content and so forth. I have removed the raw mod and related FromRaw and TryFromRaw traits, moving the validation into the deserialization and constructor for the few types that needed it. On the event content side of things, a function like procedural macro was used to allow declaring the enum using Matrix event type identifiers.
Much of this week's work has been maintenance-related with refactoring, cleaning up etc.
Key fetching/expiry behaviour has been fixed, improving the reliability of federation.
The monolith and component setup has now been refactored.
A number of unused internal APIs have now been removed.
Other internal roomserver APIs have been streamlined.
We have also started building an Yggdrasil-powered P2P demo (as opposed to the previous demos built using libp2p) and even includes support for embedding Riot Web in the single binary. It's not very stable/usable yet but there will be more news on that to follow within the next couple of weeks.
We have also started building and releasing Docker images for Dendrite on Docker Hub for those who want to use Docker to test Dendrite deployment.
Welcome back! This week I focused my efforts on better error handling. My goal was that every problem would be forwarded to the client (e.g. InternalServerError response) and also be logged. Yesterday I merged the giant PR this resulted in. Hopefully this will make Conduit easier to debug in the future.
Here are some other things I finished this week:
User-interactive authentication (e.g. you need to type your password again if you want to delete devices)
Config option to disable registration
I also found the problem with Riot not showing notifications for new messages and created a bug report. With a few tweaks, I managed to solve this on my account and now mentions, DMs and more play the notification sound (it also works on Riot X!).
@gnieto fixed a bug that prevented Riot from loading history when you join a room and @PublicByte implemented the /whoami endpoint.
This week we shipped 1.15.0, edited highlights include:
Features
Add admin APIs to allow server admins to manage users' devices. Contributed by @dklimpel. (#7481)
Add an option to disable autojoining rooms for guest accounts. (#6637)
For SAML authentication, add the ability to pass email addresses to be added to new users' accounts via SAML attributes. Contributed by Christopher Cooper. (#7385)
Add support for generating thumbnails for WebP images. Previously, users would see an empty box instead of preview image. Contributed by @WGH-. (#7586)
Support the standardized m.login.sso user-interactive authentication flow. (#7630)
Bugfixes
Allow new users to be registered via the admin API even if the monthly active user limit has been reached. Contributed by @dklimpel. (#7263)
Fix a bug in automatic user creation during first time login with m.login.jwt. Regression in v1.6.0. Contributed by @olof. (#7585)
Fix a bug causing the cross-signing keys to be ignored when resyncing a device list. (#7594)
Fix bug where returning rooms for a group would fail if it included a room that the server was not in. (#7599)
Fix duplicate key violation when persisting read markers. (#7607)
Prevent an entire iteration of the device list resync loop from failing if one server responds with a malformed result. (#7609)
Pass device information through to the login endpoint when using the login fallback. (#7629)
Advertise the m.login.token login flow when OpenID Connect is enabled. (#7631)
Fix bug in account data replication stream. (#7656)
Internal Changes
Improve query performance for fetching state from a PostgreSQL database. Contributed by @ilmari. (#7567)
Speed up processing of federation stream RDATA rows. (#7584)
Refactor Ratelimiter to limit the amount of expensive config value accesses. (#7595)
Clean up exception handling in SAML2ResponseResource. (#7614)
Check if the localpart of a Matrix ID is reserved for guest users earlier in the registration flow, as well as when responding to requests to /register/available. (#7625)
Aside from that we continue out push towards improving performance both in terms of sharding workers but also improving tools to manage disk space usage. Specifically this week and next we are looking at db tuning and sharding the media repo worker. We are also noticing that the typing handler is chewing more CPU than would be expected. It could be a good candidate for moving away from the master process.
More broadly we are changing the defaults for notifications and making changes to support a more general overhaul of notifications.
Finally we are looking at how to not only delete messages after a certain time period, but also how to delete the associated media (which becomes difficult when considering e2e content along side long lived content such as avatars and sticker packs).
For more detail on what is coming next, take a look at our public task board.
The WhatsApp bridge can now bridge location messages from WhatsApp to m.location on Matrix and contact messages as vCard files (until Matrix gets a native contact message type).
It also now encrypts media properly when bridging messages in encrypted rooms. I had apparently missed that when adding end-to-bridge encryption earlier.
mautrix-facebook got a few improvements and bugfixes:
Added timestamp massaging
Added support for bridging video and file messages to Matrix
Fixed backfilling with SQLite (it didn't work due to the python timezone mess, fix contributed by erdnaxeli)
Improved options for automatic reconnecting. The bridge should now work fairly reliably when using all the auto-reconnect options and backfilling, it only breaks if facebook decides you've been hacked
Since MSC2190 and the related Synapse PR aren't moving much, all my bridges now generate appservice registration files with the workaround. The workaround is needed to avoid patching synapse or using other hacks, and I decided to enable it by default as many people had problems related to having to apply it manually.
The WhatsApp, Facebook and Hangouts bridges now have an option to use double puppeting to disable notifications when backfilling. It can be useful if you want to copy chat history to Matrix, but don't want to be spammed with hundreds of notifications while it's happening.
To get things ready for NovaChat launch, we added a bunch of new features to a fork of the mx-puppet-slack client that Sorunome created. You can try it out here. We'll be pushing our changes upstream soon.
New features:
message backfilling at room creation and reconnect
syncs read status to/from Slack.com
adds all users to bridged room during initial creation
automatically bridges all channels and DMs that you are part of during initial setup, so you don't have to wait for a message to arrive for it to appear in Matrix
My matrix-sms-bridge got an large update, which introduced an automated way to create and write messages to telephone numbers via commands in a bot room. See the docs for more information, how to use it.
a set of Matrix bridges configured to run on a private server called a bridgebox
Matrix bridges are awesome but generally require you to run own homeserver. NovaChat removes that restriction, without sacrificing security and privacy. Your remote chat network credentials never leave your bridgebox, and messages are encrypted* on the bridgebox before being sent to the NovaChat homeserver.
*Encryption is currently enabled on Telegram/FB/Hangouts/Whatsapp bridges, mx-puppet-bridges coming shortly)
Fancy new UI, heavily inspired by Telegram. See photo below or see it in action
Easy graphical bridge set up (no more fiddling with config files)
Reliable bridging, with delivery confirmations and bridge disconnect warnings
Includes 8 pre-configured bridges: Facebook/Whatsapp/Hangouts/Telegram/Slack/Instagram/Twitter/Skype. Planning to add more soon, or submit a PR!
Works on Mac OS, Linux and Windows
You don't need to be technical to use NovaChat, it's designed to Just WorkTM. If you need help setting up a bridgebox, we are offering hosting and maintenance for USD $5 per month.
The vast majority of this software has been created by the talented tulir and dm0141. I personally am a terrible coder (you can tell which parts I did), but I do have experience building products and teams, and I'm excited to begin working in the Matrix universe. I wrote recently about how I believe Matrix is the Universal Communication Bus! Thanks goes to Sorunome for creating the mx-puppet-bridges!
We're developing the whole project in the open (though not all components are open source), check the issue backlog :)
Want to help? We're hiring Matrix developer to work on the project with us. Send me a message if you're interested! Particularly looking for a React dev to help with frontend on nova-web.
Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE (with the notable exception being device verification for now) and intends to be full featured and nice to look at
nheko 0.7.2 is ready for release. Here's the summary of changes:
Highlights
Reactions
React to a message with an emoji! 🎉
Reactions are shown below a message in a small bubble with a counter.
By clicking on that, others can add to the reaction count.
It may help you celebrating a new Nheko Release or react with a 👎 to a failed build to express your frustration.
This uses a new emoji picker. The picker will be improved in the near future (better scrolling, sections, favorites, recently used or similar) and then probably replace the current picker.
Support for tagging rooms [tag]
Assign custom tags to rooms from the context menu in the room list.
This allows filtering rooms via the group list. This puts you in a focus mode showing only the selected tags.
You can assign multiple tags to group rooms however you like.
SSO Login
With this you can now login on servers, that only provide SSO.
Just enter any mxid on the server. Nheko will figure out that you need to use SSO and redirect your browser to the login page.
Complete the login in your browser and Nheko should automatically log you in.
Features
Support for showing users presence and status message as well as setting your own status message"
Respect exif rotation of images
An italian translation (contributed by Lorenzo Ancora)
Optional alerts in your taskbar (contributed by z33ky)
Optional bigger emoji only messages in the timeline (contributed by lkito)
Optional hover feedback on messages (contributed by lkito)
/roomnick to change your displayname in a single room.
Preliminary support for showing inline images.
Warn about unencrypted messages in encrypted rooms.
Improvements
perf: Use less CPU to sort the room list.
Limit size of replies. This currently looks a bit rough, but should improve in the future with a gradient or at some other transition.
perf: Only clean out old messages from the database every 500 syncs. (There is usually more than one sync every second)
Improve the login and register masks a bit with hints and validation.
Descriptions for settings (contributed by lkito)
A visual indicator, that nheko is fetching messages and improved scrolling (contributed by Lasath Fernando)
Bugfixes
Fix not being able to join rooms
Fix scale factor setting
Buildfixes against gcc10 and Qt5.15 (missing includes)
Settings now apply immediately again after changing them (only exception should be the scale factor)
Join messages should never have empty texts now
Timeline should now fail to render less often on platforms with native sibling windows.
Don't rescale images on every frame on highdpi screens.
This week, we continued to iterate on the implementation of the new push notification service thanks to user feedbacks. Those feedbacks also show that the app uses less battery.
On login, this is now possible to recover your cross-signing and your key backup from your recovery passphrase or key.
libolm 3.1.5 has been released. It mainly collects the various build system and documentation fixes that have accumulated since the last release. It also includes a new wasm build target (which apparently is used for running matrix-rust-sdk in the browser), as well as TypeScript definitions for the JavaScript bindings.
Ruma
Ruma is a Rust project to create a comprehensive set of APIs for Matrix. Previously there was a Ruma homeserver project.
Most of the work this past week was on ruma-events, for more on that see the GSoC section! Devin got far enough with that so we now know it all works out and can replace the previous ruma-events API. When that was clear, ruma-events was also merged into our new monorepo; now the only remaining crate to be merged is ruma-client (where I'm also waiting for some pending changes).
Dept of Ops 🛠
Matrix Helm chart
Kubernetes Helm chart for easily deploying a Matrix homeserver stack
Version 2 of my Matrix Helm chart is out! It now allows for running a federating homeserver without needing an external load balancer for the federation service, potentially lowering costs (depending on your cloud provider), and definitely reducing the headache of managing TLS certificates!
dacruz21/matrix-chart is a Kubernetes Helm chart for easily deploying a Matrix homeserver stack, complete with Synapse, Riot, VoIP calls, bridges, and other backing services. It's ideal for anyone looking to run a large homeserver, or for corporate environments where security is paramount!
Anyone running a federating instance of Synapse will likely have seen this: Synapse is database-hungry. It tends to take a lot of space. In this post, I'm documenting how I shrunk my homeserver database from 100GB to a little under 8GB, during a long maintenance cleanup. https://levans.fr/shrink-synapse-database.html
Very pleased to see this, I have a feeling I'm going to be running it in the near future...
There's a new room "Matrix Outreach" #matrix-outreach:matrix.org for folks interested in "Helping each other explain and promote Matrix to the public: creating slogans, introduction leaflets, info-graphics, elevator pitch, Wikipedia articles, and so on."
Dept of Ping 🏓
Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server. Join #ping:maunium.net to experience the fun live, and to find out how to add YOUR server to the game.
Rank
Hostname
Median MS
1
fairydust.space
391
2
envs.net
443.5
3
maunium.net
506
4
tum.de
603.5
5
neko.dev
822
6
maclemon.at
887
7
cyllos.me
916
8
shortestpath.dev
1072.5
9
settgast.org
1079
10
maescool.be
1324
That's all I know 🏁
See you next week, and be sure to stop by #twim:matrix.org with your updates!