tosc-rs / mgnp

MnemOS Global Networking Protocol
Creative Commons Attribution Share Alike 4.0 International
14 stars 1 forks source link

all MGNP frames should include a version #26

Open hawkw opened 8 months ago

hawkw commented 8 months ago

currently, MGNP lacks any kind of provision for versioning wire frames. this will be an issue if we want to stabilize the wire format in the future.

we should consider adding a version identifier to wire messages now. we could do this either by adding an integer version to the frame header, or by wrapping the entire frame in a

#[derive(Serialize, Deserialize)]
#[non_exhaustive]
pub enum Version {
   V1(Frame),
}
hawkw commented 8 months ago

IMHO the enum is probably the Right Thing, especially because we can then just remove #[non_exhaustive] from most of the other enums. but i think @jamesmunns has opinions on this?