mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-22 01:29:06 +02:00
More explanation of federation keys.
This commit is contained in:
parent
1a32b1f002
commit
f68dbbd3da
1 changed files with 124 additions and 8 deletions
|
@ -1511,6 +1511,31 @@ Each transaction has:
|
||||||
- A list of "previous IDs".
|
- A list of "previous IDs".
|
||||||
- A list of PDUs and EDUs - the actual message payload that the Transaction carries.
|
- A list of PDUs and EDUs - the actual message payload that the Transaction carries.
|
||||||
|
|
||||||
|
``origin``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
DNS name of homeserver making this transaction.
|
||||||
|
|
||||||
|
``ts``
|
||||||
|
Type:
|
||||||
|
Integer
|
||||||
|
Description:
|
||||||
|
Timestamp in milliseconds on originating homeserver when this transaction
|
||||||
|
started.
|
||||||
|
|
||||||
|
``previous_ids``
|
||||||
|
Type:
|
||||||
|
List of strings
|
||||||
|
Description:
|
||||||
|
List of transactions that were sent immediately prior to this transaction.
|
||||||
|
|
||||||
|
``pdus``
|
||||||
|
Type:
|
||||||
|
List of Objects.
|
||||||
|
Description:
|
||||||
|
List of updates contained in this transaction.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1551,9 +1576,99 @@ All PDUs have:
|
||||||
- A list of other PDU IDs that have been seen recently on that context (regardless of which origin
|
- A list of other PDU IDs that have been seen recently on that context (regardless of which origin
|
||||||
sent them)
|
sent them)
|
||||||
|
|
||||||
|
``context``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
Event context identifier
|
||||||
|
|
||||||
|
``origin``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
DNS name of homeserver that created this PDU.
|
||||||
|
|
||||||
|
``pdu_id``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
Unique identifier for PDU within the context for the originating homeserver
|
||||||
|
|
||||||
|
``ts``
|
||||||
|
Type:
|
||||||
|
Integer
|
||||||
|
Description:
|
||||||
|
Timestamp in milliseconds on originating homeserver when this PDU was created.
|
||||||
|
|
||||||
|
``pdu_type``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
PDU event type.
|
||||||
|
|
||||||
|
``prev_pdus``
|
||||||
|
Type:
|
||||||
|
List of pairs of strings
|
||||||
|
Description:
|
||||||
|
The originating homeserver and PDU ids of the most recent PDUs the
|
||||||
|
homeserver was aware of for this context when it made this PDU.
|
||||||
|
|
||||||
|
``depth``
|
||||||
|
Type:
|
||||||
|
Integer
|
||||||
|
Description:
|
||||||
|
The maximum depth of the previous PDUs plus one.
|
||||||
|
|
||||||
|
|
||||||
|
.. TODO paul
|
||||||
[[TODO(paul): Update this structure so that 'pdu_id' is a two-element
|
[[TODO(paul): Update this structure so that 'pdu_id' is a two-element
|
||||||
[origin,ref] pair like the prev_pdus are]]
|
[origin,ref] pair like the prev_pdus are]]
|
||||||
|
|
||||||
|
|
||||||
|
For state updates:
|
||||||
|
|
||||||
|
``is_state``
|
||||||
|
Type:
|
||||||
|
Boolean
|
||||||
|
Description:
|
||||||
|
True if this PDU is updating state.
|
||||||
|
|
||||||
|
``state_key``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
Optional key identifying the updated state within the context.
|
||||||
|
|
||||||
|
``power_level``
|
||||||
|
Type:
|
||||||
|
Integer
|
||||||
|
Description:
|
||||||
|
The asserted power level of the user performing the update.
|
||||||
|
|
||||||
|
``min_update``
|
||||||
|
Type:
|
||||||
|
Integer
|
||||||
|
Description:
|
||||||
|
The required power level needed to replace this update.
|
||||||
|
|
||||||
|
``prev_state_id``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
PDU event type.
|
||||||
|
|
||||||
|
``prev_state_origin``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
The PDU id of the update this replaces.
|
||||||
|
|
||||||
|
``user``
|
||||||
|
Type:
|
||||||
|
String
|
||||||
|
Description:
|
||||||
|
The user updating the state.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1593,6 +1708,7 @@ keys exist to support this:
|
||||||
"prev_state_id":TODO
|
"prev_state_id":TODO
|
||||||
"prev_state_origin":TODO}
|
"prev_state_origin":TODO}
|
||||||
|
|
||||||
|
.. TODO paul
|
||||||
[[TODO(paul): At this point we should probably have a long description of how
|
[[TODO(paul): At this point we should probably have a long description of how
|
||||||
State management works, with descriptions of clobbering rules, power levels, etc
|
State management works, with descriptions of clobbering rules, power levels, etc
|
||||||
etc... But some of that detail is rather up-in-the-air, on the whiteboard, and
|
etc... But some of that detail is rather up-in-the-air, on the whiteboard, and
|
||||||
|
|
Loading…
Reference in a new issue