generated from MetaMask/metamask-module-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Problem: When a peer reconnects, we can't tell if it's the same kernel or a new incarnation. Promises from the previous incarnation should be rejected, but we currently treat all reconnections as the same kernel.
Expected Behavior:
- Detect when a reconnected peer is a new kernel incarnation (different from previous)
- Reject all promises from the previous incarnation when new incarnation detected
- Track incarnation identity (could be part of peer identity or handshake)
- Handle incarnation changes gracefully without breaking new connections
Implementation:
- Add incarnation tracking to connection/channel state
- Implement incarnation detection mechanism (peer identity comparison, handshake, or protocol-level)
- On incarnation change detection, find and reject promises from old incarnation (using Task
#2pattern) - Update
RemoteHandleor promise management to track incarnation - Coordinate with
RemoteManagerfor promise rejection - Add tests for incarnation detection and promise rejection
Acceptance Criteria:
- Incarnation changes are detected
- Promises from previous incarnation are rejected on new incarnation
- New connections work normally after incarnation change
- Tests verify incarnation detection and promise cleanup
Dependencies: Remote comms: Promise rejection on give-up
Metadata
Metadata
Assignees
Labels
No labels