!OGEhHVWSdvArJzumhm:matrix.org

Matrix HQ

44650 Members
The Official Matrix HQ - please come chat here! | https://matrix.org/docs/spec | To support Matrix.org development: https://patreon.com/matrixdotorg | Looking for hosting? Check out https://upcloud.com/matrix!4698 Servers

Load older messages


SenderMessageTime
22 Nov 2019
@vurpo:hacklab.fivurpo
In reply to@smar:yuuko.smar.fi
but can’t that data just be kept in memory? it shouldn’t take too many bytes, if all that data contains is just user ids and permission bits

The room state is not just user IDs and permission bits, it's a directed acyclic graph containing which server did which modifications to the room state and when, because different servers can update it at any time they want and there needs to be some way for all servers to resolve the room state into a single consistent view of "the truth"

17:28:36
@flux:matrix.orgflux vurpo: how much of that graph is typically traversed when updating the state, though? 17:29:39
@vurpo:hacklab.fivurpoSure, the server caches that computed room state17:29:41
@smar:yuuko.smar.fiSmarI get it that you need to write everything somewhere where the data doesn’t get lost, but something feels off here... but again, I’m in no means versed in how matrix works :)17:30:07
@vurpo:hacklab.fivurpo
In reply to@flux:matrix.org
vurpo: how much of that graph is typically traversed when updating the state, though?
I don't know
17:31:00
@freenode_alexozer_:matrix.orgalexozer_ joined the room.17:31:45
@vurpo:hacklab.fivurpo
In reply to@smar:yuuko.smar.fi
I get it that you need to write everything somewhere where the data doesn’t get lost, but something feels off here... but again, I’m in no means versed in how matrix works :)
To put it briefly: try inventing a decentralized (no single node is in control of the network) group communication protocol where people can join and leave the group and send messages to it, and I think you'll find that it's a very complicated task
17:34:21
@TheFuzzStone:matrix.orgTheFuzzStone joined the room.17:34:38
@jtn:im.qub.ioJason T Nelson joined the room.17:35:03
@smar:yuuko.smar.fiSmaryes, I can believe that17:35:31
@vurpo:hacklab.fivurpoThe very first question the protocol needs to solve is: who is currently a member of the group? Remember that needs to be solved in a way that no central server decides the truth, and all servers need to agree on the answer17:36:15
@phi:qgr.sephi left the room.17:36:19
@matthew:arasphere.netMatthew joined the room.17:37:52
@disrupt_the_flow:matrix.orgdisrupt_the_flow joined the room.17:40:48
@ssorbom:matrix.orgssorbom
In reply to @vurpo:hacklab.fi

The room state is not just user IDs and permission bits, it's a directed acyclic graph containing which server did which modifications to the room state and when, because different servers can update it at any time they want and there needs to be some way for all servers to resolve the room state into a single consistent view of "the truth"

Out of curiosity, how is the truth actually enforced though? What's to stop a malicious server being part of a room and then claiming that certain events happened at a time that they didn't happen? Or claiming that certain administrative actions we're taken that were not?
17:53:07
@x:riot.ovhMichael (t3chguy)It could only claim that to its own users, or if it's users in that room had administrative privileges 17:54:26
@jack:okboomer.wtfjackI have an old channel on my homeserver that won't clear from the directory list. If I try to join it again, it says "Failed to join room. No known servers." Any idea how to remove it?17:54:53
@dandellion:dodsorf.asDandellion jack: if you are a homeserver admin shift click it in the directory 17:56:48
@dandellion:dodsorf.asDandellion * jack: if you are a homeserver admin shift click it in the directory 17:57:14
@jack:okboomer.wtfjack
In reply to @dandellion:dodsorf.as
if you are a homeserver admin shift click it in the directory
That was easy. Thanks.
17:57:15
@vurpo:hacklab.fivurpo
In reply to@ssorbom:matrix.org
Out of curiosity, how is the truth actually enforced though? What's to stop a malicious server being part of a room and then claiming that certain events happened at a time that they didn't happen? Or claiming that certain administrative actions we're taken that were not?

All servers have to sign everything they send out by their own signing key, so:

A server could not say that other servers' users did something because it can't sign the events with those servers' keys

It couldn't claim that its own users did something forbidden because all other servers will just say "no, that can't happen because that's not allowed". If the malicious server keeps living in its own alternate reality where those events did happen, then it would also be living in a detached reality where it can't communicate with other servers because they don't agree on what reality is

18:01:53
@ssorbom:matrix.orgssorbom
In reply to @x:riot.ovh
It could only claim that to its own users, or if it's users in that room had administrative privileges
Interesting, thanks.
18:07:40
@vurpo:hacklab.fivurpo

A server can indeed tell its own clients whatever it wants, because those clients don't receive information from anywhere else

18:13:16
@vurpo:hacklab.fivurpo

But it can't tell other servers that "my server's user X is now the admin of this room btw", because other servers will just say "that's not right" and then ignore it

18:14:37
@rbe:classicit.derbe joined the room.18:17:14
@ssorbom:matrix.orgssorbomInteresting.18:17:23
@cypa:matrix.orgcypa joined the room.18:18:20
@rbe:classicit.derbe left the room.18:18:53
@vurpo:hacklab.fivurpoThe state change that makes User X an admin will have to be made by some user who already has privileges to do that from before, and all servers already know from before which users have that privilege18:19:04
@MTRNord:matrix.orgMTRNord joined the room.18:19:36

There are no newer messages yet.


Back to Room List