• Stars
    star
    889
  • Rank 50,974 (Top 2 %)
  • Language
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Proposals for changes to the matrix specification

Matrix Specification Proposals

This repository contains proposals for changes to the Matrix Protocol, aka "Matrix Spec Changes" (MSCs). The proposals directory contains MSCs which have been accepted.

See below for instructions for creating new proposals. See also https://spec.matrix.org/proposals/ for more information on the MSC process, in particular https://spec.matrix.org/proposals/#process.

The source of the Matrix specification itself is maintained at https://github.com/matrix-org/matrix-spec.

The Matrix Spec Process

An MSC is meant to be a technical document that unambiguously describes a change to the Matrix Spec, while also justifying why the change should be made.

The document is used both to judge whether the change should be made as described and by developers to actually implement the changes. This is why it's important for an MSC to be fully fleshed out in technical detail, as once merged it's immediately part of the formal spec (even though it still needs to be transcribed into the actual spec itself).

What changes need to follow this process?

In most cases a change to the Matrix protocol will require an MSC. Changes that would not require an MSC are typically small and uncontentious, or are simply clarifications to the spec. Fixing typos in the spec do not require an MSC. In most cases, removing ambiguities do not either. The exception may be if implementations in the ecosystem have differing views on clarifying the ambiguity. In that case, an MSC is typically the best place to reach consensus.

Ultimately, the Spec Core Team have the final say on this, but generally if the change would require updates to a non-insignificant portion of the Matrix implementation ecosystem or would be met with contention, an MSC is the best route to take. You can also ask in the Matrix Spec or Office of the Spec Core Team Matrix rooms for clarification.

Summary of the process

The MSC process consists of three basic steps:

  1. Write up the proposal in a markdown document. (There's a proposal template, but don't feel bound by it.)
  2. Submit it as a Pull Request to this repo, marking it as a draft until it's ready for wider review.
  3. Seek review from the community. Once people are generally happy with it, ask the Spec Core Team to look at it in the Office of the SCT Matrix room. When the SCT are happy with the proposal, and after a successful voting process, your pull request is merged and the MSC is now officially accepted as part of the Matrix Spec and can be used 🎉

For simple changes this is really all you need to know. For larger or more controversial changes, getting an MSC merged can take more time and effort, but the overall process remains the same.

Below is various guidance to try and help make the experience smoother.

Guidance on the process

1. Writing the proposal

Come up with an idea. The idea can be for anything, but the solution (MSC) needs to benefit the Matrix ecosystem rather than yourself (or your company) specifically. Sometimes this means that the solution needs to be more generic than the specific itch that you are trying to scratch.

Remember that an MSC is a formal technical document which will be used by others in the wider community to judge if the proposal should be accepted and to actually implement the changes in clients and servers. This means that for an MSC to be accepted it should include justifications and describe the technical changes unambiguously, including specifying what happens in any and all edge cases.

There's a proposal template under docs/0000-proposal.md, but you don't necessarily need to use it. Covering the same major points is fine.

  • Note: At this stage, you won't have an MSC number, so feel free to use 0000, XXXX, or whatever other placeholder you feel comfortable with.

Some tips for MSC writing:

  • Please wrap your lines to 120 characters maximum. This allows readers to review your markdown without needing to horizontally scroll back and forth. Many markdown text editors have this a feature.
  • If you are referencing an existing endpoint in the spec, or another MSC, it is very helpful to add a link to them so the reader does not need to search themselves. Examples:
    • "This MSC proposals an alternative to MSC3030."
    • "A new field will be added to the response body of /_matrix/client/v3/sync".
      • Note: it is best to link to the latest stable version of the spec (e.g. /v1.3, not /latest) - failing that, /unstable if the change is not yet in a released spec version.
  • GitHub supports rendering fancy diagrams from text with very little effort using Mermaid. See this guide for more information.

2. Submitting a Pull Request

  1. Open a Pull Request to add your proposal document to the proposals directory. Note that this will require a GitHub account.
  2. The MSC number is the number of the pull request that is automatically assigned by GitHub. Go back through and edit the document accordingly. Don't forget the file name itself!
  3. Edit the pull request title to fit the format "MSC1234: Your proposal title".
  4. Once your proposal is correctly formatted and ready for review from the wider ecosystem, take your Pull Request out of draft status.

The Spec Core Team will notice this and apply various labels/status tracking to your MSC, which will announce it to the wider world.

3. Seeking review

Seek review from the Matrix community. Generally this will happen naturally, but if you feel that your proposal is lacking review then ask for people's opinion in the Matrix Spec room on Matrix.

Reviews can take many forms, and do not need to be done solely by members of the Spec Core Team. Getting other people who are familiar with the area of Matrix you are proposing changes to is a great first step; especially those who may be implementing these changes in clients and/or homeservers.

While the proposal is a work in progress, it's fine for it to be high level and hand-wavy in places, but remember that before it can be accepted it needs to be expanded to fully flesh out all the technical detail and edge cases.

At this stage the proposal should also be implemented as a proof of concept somewhere to show that it actually works in practice. This can be done on any client or server and doesn't need to be merged or released.

4. Entering Final Comment Period

After the MSC has been implemented, fully fleshed out, and generally feels ready for final review, you should ask a member of the Spec Core Team to review it in the public Spec Core Team Office room on Matrix. Someone from the SCT will then review it, and if all looks well will propose FCP to start.

At this point, other members of the SCT will look at the proposal and consider it for inclusion in the spec.

After enough SCT members have approved the proposal, the MSC will enter something called Final Comment Period. This is a 5 calendar day countdown to give anyone one last chance to raise any blockers or concerns about the proposed change. Typically MSCs pass this stage without incident, but it nevertheless serves as a safeguard.

5. The MSC is accepted

Once FCP has ended and the MSC pull request is merged, the proposed change is considered officially part of the spec. Congratulations!

Clients and servers can now start using the change, even though at this stage it still needs to be transcribed into the spec document. This happens over in https://github.com/matrix-org/matrix-spec/ and you are very welcome to do it yourself! Otherwise it will be handled by a Spec Core Team member. If you would like help with writing spec PRs, feel free to join and ask questions in the Matrix Spec and Docs Authoring Room on Matrix.

Other useful information

Unstable prefixes

"Unstable prefixes" are the namespaces which are used by implementations while an MSC is not yet accepted.

For instance, an MSC might propose that a m.space event type or an /_matrix/client/v1/account/whoami endpoint should exist. However, implementations cannot use these stable identifiers until the MSC has been accepted, as the underlying design may change at any time; the design is unstable.

Instead, an MSC can define a namespace such as org.matrix.msc1234 (using the real MSC number once known) which is added to the stable identifier, allowing for breaking changes between edits of the MSC itself, and preventing clashes with other MSCs that might attempt to add the same stable identifiers.

For the above examples, this would mean using org.matrix.msc1234.space and /_matrix/client/unstable/org.matrix.msc1234/account/whoami. It is also fine to use more traditional forms of namespace prefixes, such as com.example.* (e.g. com.example.space).

Note: not all MSCs need to make use of unstable prefixes. They are only needed if implementations of your MSC need to exist in the wild before your MSC is accepted, and the MSC defines new endpoints, field names, etc.

Unstable feature flags

It is common when implementing support for an MSC that a client may wish to check if the homeserver it is communicating with supports an MSC. Typically, this is handled by the MSC defining an entry in the unstable_features dictionary of the /_matrix/client/versions endpoint, in the form of a new entry:

{
  "unstable_features": {
    "org.matrix.msc1234": true
  }
}

... with a value of true indicating that the feature is supported, and false or lack of the field altogether indicating the feature is not supported.

When can I use stable identifiers?

According to the spec process: once an MSC has been accepted, implementations are allowed to switch to stable identifiers. However, the MSC is still not yet part of a released spec version.

In most cases, this is not an issue. For instance, if your MSC specifies a new event type, you can now start sending events with those types!

Some MSCs introduce functionality where coordination between implementations is needed. For instance, a client may want to know whether a homeserver supports the stable version of a new endpoint before actually attempting to request it. Or perhaps the new event type you're trying to send relies on the homeserver recognising that new event type, and doing some work when it sees it.

At this point, it may be best to wait until a new spec version is released with your changes. Homeservers that support the changes will eventually advertise that spec version under /versions, and your client can check for that.

But if you really can't wait, then there is another option: the homeserver can tell clients that it supports stable indentifiers for your MSC before it enters a spec version, using yet another unstable_features flag:

{
  "unstable_features": {
    "org.matrix.msc1234": true,
    "org.matrix.msc1234.stable": true
  }
}

If a client sees that org.matrix.msc1234.stable is true, it knows that it can start using stable identifiers for the new MSC, and the homeserver will accept and act on them accordingly.

Note: While the general pattern of using the text ".stable" has emerged from previous MSCs, you can pick any name you like. You need only to clearly state their meaning, usually under an "Unstable prefixes" header in your MSC.

See MSC3827 for a good example of an MSC that wanted to use such a flag to speed up implementation rollout, and how it did so.

Room versions

To summarize the spec on room versions: they are how servers agree upon algorithms in a decentralized world like ours. Examples of changes that require a new room version include anything that changes:

Unstable prefixes (see above) for room versions work the same as they do for other identifiers; your unstable room version may be called "org.matrix.msc1234".

In order for the changes to end up in a "real" room version (the ones listed in the spec), it will need a second MSC which aggregates a bunch of functionality from various MSCs into a single room version. Typically these sorts of curating MSCs are written by the Spec Core Team given the complexity in wording, but you're more than welcome to bring an MSC forward which makes the version real.

For an example of what introducing a new room version-required feature can look like, see MSC3667. For an example of what making a new "real" room version looks like, see MSC3604.

Ownership of MSCs and closing them

If an author decides that they would no longer like to pursue their MSC, they can either pass ownership of it off to someone else, or close it themselves.

  • The author of an MSC can close their MSC at any time before FCP by simply closing the pull request.

  • To appoint another user as an author of the MSC (either to replace the author entirely or to provide additional help), make a note in the MSC's PR description by writing the following on its own line:

    Author: @username
    

    where @username is a valid GitHub username. Multiple such lines can be added.

    Finally, give that user access to write to your fork of matrix-spec-proposals on GitHub, which your PR originates from. This will allow them to change the text of your MSC.

Similar to accepting an MSC, the Spec Core Team may propose a Final Comment Period with a disposition of "close". This can happen if the MSC appears abandoned by its author, or the idea is widely rejected by the community. A vote and final comment period will still be required for the motion to pass.

Additionally, FCP can be also proposed with a disposition of "postpone". This may be done for MSCs for which the proposed changes do not make sense for the current state of the ecosystem, but may make sense further down the road.

Asking for help

The Matrix community and members of the Spec Core Team are here to help guide you through the process!

If you'd just like to get initial feedback about an idea that's not fully fleshed out yet, creating an issue at https://github.com/matrix-org/matrix-spec/issues is a great place to start. Be sure to search for any existing issues first to see if someone has already had the same idea!

A few official rooms exist on Matrix where your questions can be answered, or feedback on your proposal can be requested:

More Repositories

1

synapse

Synapse: Matrix homeserver written in Python/Twisted.
Python
11,768
star
2

dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
Go
4,696
star
3

matrix-js-sdk

Matrix Client-Server SDK for JavaScript
TypeScript
1,505
star
4

matrix-rust-sdk

Matrix Client-Server SDK for Rust
Rust
1,151
star
5

matrix-react-sdk

Matrix SDK for React Javascript
TypeScript
1,095
star
6

matrix-appservice-discord

A bridge between Matrix and Discord.
TypeScript
790
star
7

matrix.to

A simple stateless privacy-protecting URL redirecting service for Matrix
JavaScript
766
star
8

thirdroom

Open, decentralised, immersive worlds built on Matrix
C
585
star
9

matrix-appservice-irc

Node.js IRC bridge for Matrix
TypeScript
457
star
10

matrix-ios-sdk

The Matrix SDK for iOS
Objective-C
433
star
11

pinecone

Peer-to-peer overlay routing for the Matrix ecosystem
Go
421
star
12

matrix.org

matrix.org public website
JavaScript
396
star
13

matrix-android-sdk

The Matrix SDK for Android - DEPRECATED
Java
376
star
14

mjolnir

A moderation tool for Matrix
TypeScript
301
star
15

go-neb

Extensible matrix bot written in Go
Go
281
star
16

pantalaimon

E2EE aware proxy daemon for matrix clients.
Python
279
star
17

matrix-appservice-slack

A Matrix <--> Slack bridge
TypeScript
271
star
18

gomatrix

A Golang Matrix client
Go
269
star
19

sydent

Sydent: Reference Matrix Identity Server
Python
259
star
20

matrix-python-sdk

Matrix Client-Server SDK for Python 2 and 3
Python
256
star
21

sliding-sync

Proxy implementation of MSC3575's sync protocol.
Go
230
star
22

purple-matrix

Libpurple protocol plugin for matrix
C
224
star
23

matrix-ircd

An IRCd implementation backed by Matrix.
Rust
224
star
24

matrix-android-sdk2

Matrix SDK for Android, extracted from the Element Android application
Kotlin
185
star
25

matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
TypeScript
185
star
26

matrix-spec

The Matrix protocol specification
HTML
171
star
27

matrix-bifrost

General purpose bridging with a variety of backends including libpurple and xmpp.js
TypeScript
162
star
28

vodozemac

An implementation of Olm and Megolm in pure Rust.
Rust
145
star
29

matrix-appservice-bridge

Bridging infrastructure for Application Services
TypeScript
141
star
30

rust-synapse-compress-state

A tool to compress some state in a Synapse instance's database
Rust
141
star
31

matrix-ios-kit

Reusable UI interfaces to ease building of Matrix client apps
Objective-C
128
star
32

sygnal

Sygnal: reference Push Gateway for Matrix
Python
128
star
33

matrix-synapse-ldap3

An LDAP3 auth provider for Synapse
Python
107
star
34

matrix-authentication-service

OAuth2.0 + OpenID Provider for Matrix Homeservers
Rust
106
star
35

cerulean

An experimental Matrix client for playing with freestyle public threaded conversations
JavaScript
101
star
36

waterfall

A cascading stream forwarding unit for scalable, distributed voice and video conferencing over Matrix
Go
97
star
37

synapse-s3-storage-provider

Synapse storage provider to fetch and store media in Amazon S3
Python
92
star
38

meshsim

Matrix mesh simulator
Python
90
star
39

matrix-static

A static golang generated preview of public world readable Matrix rooms.
Go
87
star
40

seshat

A Matrix message database/indexer
Rust
86
star
41

matrix-rich-text-editor

Matrix Rich Text Editor
Rust
82
star
42

matrix-appservice-node

Matrix Application Service framework in Node.js
TypeScript
71
star
43

matrix-viewer

View the history of public and world readable Matrix rooms
JavaScript
71
star
44

sytest

Black-box integration testing for Matrix homeservers
Perl
66
star
45

matrix-federation-tester

Tester for matrix federation written in golang.
Go
61
star
46

complement

Matrix compliance test suite
Go
61
star
47

docker-jitsi

Docker files for building images and running jitsi-meet in Docker containers
Lua
58
star
48

matrix-widget-api

JavaScript/TypeScript API for widgets & web clients to communicate
TypeScript
57
star
49

gomatrixserverlib

Go library for matrix federation.
Go
56
star
50

olm

An implementation of the Double Ratchet cryptographic ratchet in C++/C
54
star
51

Matrix-NEB

N E Bot: Generic bot for Matrix with plugin support
Python
49
star
52

rust-opa-wasm

Open Policy Agent WebAssembly Rust SDK
Rust
46
star
53

naffka

Single in-process implementation of the sarama golang kafka APIs
Go
45
star
54

matrix-ios-console

The sample Matrix client for iOS
Objective-C
45
star
55

gsoc

JavaScript
43
star
56

conference-bot

The conductor for your orchestra^Wconference
TypeScript
43
star
57

matrix-appservice-gitter

Matrix <-> Gitter bridge
JavaScript
40
star
58

coap-proxy

HTTP<->CoAP proxy
Go
39
star
59

matrix-appservice-tg

Matrix<->Telegram user-puppeting portal
JavaScript
37
star
60

dendron

Dendron was an experimental Matrix homeserver, succeeded by Dendrite.
Go
35
star
61

matrix-vr-demo

Matrix.org Virtual Reality Demo
JavaScript
31
star
62

python-canonicaljson

Canonical JSON
Python
31
star
63

bullettime

An experimental golang Matrix homeserver
Go
31
star
64

matrix-angular-sdk

JavaScript
28
star
65

rageshake

Bug report server
Go
27
star
66

matrix-android-console

Java
26
star
67

fed-tester-ui

UI for the matrix federation tester (forked from https://git.lain.haus/f0x/fed-tester)
JavaScript
26
star
68

matrix-android-sdk2-sample

Example project for using the android sdk
Kotlin
25
star
69

lb

MSC3079 Low Bandwidth library for servers and clients
Go
24
star
70

voip-tester

Tests VoIP
JavaScript
23
star
71

prosody-mod-auth-matrix-user-verification

Matrix user verification auth for Prosody
Lua
23
star
72

thirdroom-unity-exporter

C#
23
star
73

matrix-search

A generic search engine daemon
Go
22
star
74

matrix-rust-components-swift

Swift package providing components from the matrix-rust-sdk
Swift
21
star
75

matrix-user-verification-service

Service to verify details of a user based on a Open ID token.
JavaScript
21
star
76

tardis

Time Agnostic Room DAG Inspection Service
JavaScript
20
star
77

libp2p-proxy

A p2p transport shim for p2p matrix.
Go
18
star
78

patience

Full stack integration testing for Matrix clients and servers
TypeScript
18
star
79

matrix-sentry-webhooks

Sentry webhooks integration bot for Matrix.
JavaScript
17
star
80

matrix-appservice-verto

A Matrix <--> Verto bridge, designed for conferencing
JavaScript
16
star
81

synapse-auto-accept-invite

Synapse module to automatically accept invites
Python
15
star
82

go-sqlite3-js

Go SQL driver for sqlite3 in browser (sql.js) from go-wasm
Go
15
star
83

matrix-appservice-rocketchat

JavaScript
15
star
84

matrix-content-scanner

[DEPRECATED] A web service for scanning media hosted by a Matrix media repository. Replaced by https://github.com/vector-im/matrix-content-scanner-python
JavaScript
13
star
85

docker-dehydrated

A docker image we use internally for managing certificates.
Shell
13
star
86

matrix-websockets-proxy

Websockets wrapper for matrix.org homeservers
Go
12
star
87

panopticon

panopticon records usage metrics from homeservers
Go
11
star
88

matrix-files-sdk

JS/TS SDK for working with files and folders in Matrix
TypeScript
11
star
89

remember-this-rs

A simple Rust crate to cache data both in-memory and on disk
Rust
11
star
90

matrix-rust-sdk-crypto-wasm

Rust
11
star
91

matrix-rust-components-kotlin

Kotlin
10
star
92

allchange

A multi-project changelog generator
TypeScript
10
star
93

python-unpaddedbase64

Unpadded Base64
Python
10
star
94

matrixmon

A small end-to-end prober and Prometheus stats exporter for a Matrix homeserver
Perl
10
star
95

matrix-synapse-saml-mozilla

Mozilla flavour of a Synapse SAML mapping provider
Python
9
star
96

vodozemac-bindings

Language bindings for vodozemac
Rust
9
star
97

synapse-config-generator

A web based synapse config generator
JavaScript
9
star
98

synapse-user-restrictions

This module allows restricting users from performing actions such as creating rooms or sending invites.
Python
9
star
99

eigen-server

Example server and development test client for Linearized Matrix
TypeScript
9
star
100

matrix-analytics-events

Cross-platform definitions of analytics events raised by matrix SDKs
Kotlin
8
star