Skip to content

Commit a71c816

Browse files
committed
chore(swip-26): update migration path to breaking change
- Remove backward compatibility with legacy messages - Specify lazy determination and population of type information for existing localstore data
1 parent 234ffb9 commit a71c816

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

SWIPs/swip-26.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ This pattern applies universally: any protocol message that transmits chunk cont
171171

172172
#### Migration Path
173173

174-
During the transition period, implementations should:
174+
This specification represents a breaking change; implementations MUST use the typed `Chunk` message for all wire protocol communications.
175175

176-
1. Accept both legacy `Delivery` messages (with raw bytes) and new typed `Delivery` messages
177-
2. When receiving legacy messages, attempt heuristic type detection for backward compatibility
178-
3. When sending, prefer the new typed format if the peer supports it
176+
For existing data in the localstore that lacks type information, implementations should:
177+
178+
1. Determine the chunk type heuristically upon access (e.g. by examining the chunk structure)
179+
2. Lazily populate the type information in the localstore when chunks are retrieved
180+
3. Avoid a large upfront migration by only updating type metadata as chunks are accessed
179181

180182
## Rationale
181183

0 commit comments

Comments
 (0)