mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-02 22:18:38 +01:00
Original proposal: https://github.com/matrix-org/matrix-doc/pull/1659 Implementation proofs (some traversing of the PR tree may be required to get all of them): * https://github.com/matrix-org/synapse/pull/4483 * https://github.com/matrix-org/synapse/pull/4499 This doesn't intentionally change anything from the proposal. **Implementation details**: The simple part of this is the introduction of a rooms/v3.html document. The somewhat unclear part is the stuff done to the s2s definitions. This pulls `unsigned_pdu` out to `unsigned_pdu_base` (all fields except `event_id`) where it can be reused in `pdu` and `pdu_v3` (for rooms v3). These definitions are further moved into the room version specifications where they can highlight the exact schemas in detail. Version 1 has been updated to include the pre-existing event format, however the core principles of the room have not been changed. The same applies to room version 2. Room versions have immutable core principles once in the spec, otherwise these format changes would land in a pre-existing version. The client-server API event formats will need updating, however that is being punted to a different commit to try and keep these changes reviewable.
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
# Copyright 2019 New Vector Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
type: object
|
|
title: Persistent Data Unit
|
|
description: A persistent data unit (event) for room version 3.
|
|
example:
|
|
$ref: "../examples/pdu_v3.json"
|
|
allOf:
|
|
- $ref: "unsigned_pdu_base.yaml"
|
|
- type: object
|
|
properties:
|
|
auth_events:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: Event ID.
|
|
description: |-
|
|
Event IDs and reference hashes for the authorization events that would
|
|
allow this event to be in the room.
|
|
example: ["$abase64encodedhash", "$anotherevent"]
|
|
prev_events:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: Event ID.
|
|
description: |-
|
|
Event IDs and reference hashes for the most recent events in the room
|
|
that the homeserver was aware of when it made this event.
|
|
example: ["$abase64encodedhash", "$anotherevent"]
|
|
hashes:
|
|
type: object
|
|
title: Event Hash
|
|
description: |-
|
|
Content hashes of the PDU, following the algorithm specified in `Signing Events`_.
|
|
example: {
|
|
"sha256": "thishashcoversallfieldsincasethisisredacted"
|
|
}
|
|
properties:
|
|
sha256:
|
|
type: string
|
|
description: The hash.
|
|
example: thishashcoversallfieldsincasthisisredacted
|
|
required: ['sha256']
|
|
signatures:
|
|
type: object
|
|
description: |-
|
|
Signatures for the PDU, following the algorithm specified in `Signing Events`_.
|
|
example: {
|
|
"example.com": {
|
|
"ed25519:key_version:": "these86bytesofbase64signaturecoveressentialfieldsincludinghashessocancheckredactedpdus"
|
|
}
|
|
}
|
|
additionalProperties:
|
|
type: object
|
|
title: Server Signatures
|
|
additionalProperties:
|
|
type: string
|
|
required:
|
|
- auth_events
|
|
- prev_events
|
|
- hashes
|
|
- signatures
|