Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit efd694e

Browse files
committed
simplify active_migration object.
1 parent 5d24494 commit efd694e

File tree

1 file changed

+15
-31
lines changed
  • docs/Protocol Specifications

1 file changed

+15
-31
lines changed

docs/Protocol Specifications/core.md

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -320,16 +320,18 @@ the server.
320320
The "Hello" event is sent by the server to the client upon establishing a connection. The `d` payload
321321
for a "Hello" event is an object containing a `heartbeat_interval` field, which specifies the interval
322322
in milliseconds at which the client should send heartbeat events to the server. The payload might also
323-
contain a `resigning_active` key with a `boolean` value, indicating whether there is an unfinished
324-
message re-signing process which can be resumed.
323+
contain an `active_migration` object, indicating that there is an unfinished migration which can be
324+
resumed. This object should only be sent by a server if both the "old" and the "new" have confirmed
325+
the setup of the migration.
325326

326327
!!! danger
327328

328329
User-operated clients **must not** automatically continue
329-
re-signing messages when receiving this property with a `true` value. Instead, the user should be
330-
prompted whether they intend to continue re-signing messages. The reason for this is that servers
330+
re-signing messages when receiving this object. Manual confirmation and verification **is necessary**,
331+
since this "notice" does not contain any cryptographic properties. If this is not done, servers
331332
could theoretically send this property even though the user has not previously enabled re-signing
332-
in a malicious identity takeover attempt.
333+
in a malicious identity takeover attempt, or get the user to sign key trials in order to impersonate
334+
them.
333335

334336
!!! example "Example hello event payload"
335337

@@ -340,38 +342,20 @@ message re-signing process which can be resumed.
340342
"d": {
341343
"heartbeat_interval": 45000,
342344
"active_migration": {
343-
"messages_left": "1413",
344-
"confirmed_keys": ["2958364756734892245", "5167892139244614332", "..."],
345-
"unconfirmed_keys": ["192346785523467891", "52345678924536789", "..."],
346-
"target": "[email protected]",
347-
"source": "[email protected]"
345+
"from": "[email protected]",
346+
348347
},
349348
},
350349
"s": 0
351350
}
352351
```
353352

354-
<!-->
355-
Several issues:
356-
357-
target or source need to present to give users an idea about who the migration is for. ideally, the
358-
signatures of these actions are also included for safety. needs to be ux friendly regardless!
359-
360-
if target is present, then present list of confirmed/unconfirmed keys
361-
362-
if source is present, other information needs to be displayed
363-
364-
i am eepy
365-
<-->
366-
367-
| Field | Type | Description |
368-
| ----------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
369-
| `heartbeat_interval` | uint32 | Interval in milliseconds at which the client should send heartbeat events to the server. |
370-
| `active_migration` | object? | If present indicates that there is an unfinished message re-signing process active, which can be resumed. Contains information about this process. |
371-
| \|__ `messages_left` | uint64 | An estimate of how many messages are currently left to be re-signed. Integers are transferred as |
372-
| \|__ `confirmed_keys` | array[uint64] | An array containing the serial numbers of keys, for which a key trial has already been performed successfully. |
373-
| \|__ `unconfirmed_keys` | array[uint64] | An array containing the serial numbers of keys, for which a key trial has not yet been performed successfully. |
374-
| \|__ `target` | string? | Either this field or `source` is present, never both. |
353+
| Field | Type | Description |
354+
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
355+
| `heartbeat_interval` | uint32 | Interval in milliseconds at which the client should send heartbeat events to the server. |
356+
| `active_migration` | object? | If present, indicates that there is an unfinished migration from actor `from` to actor `to`, which can be resumed. |
357+
| \| `from` | string | Federation ID of the actor who is the source of the migration. |
358+
| \| `to` | string | Federation ID of the actor who is the target of the migration. |
375359

376360
##### 3.2.3.2 Identify event
377361

0 commit comments

Comments
 (0)