-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version byte #4
Comments
The proper way to do this is to use 4 magic bytes at the beginning. One byte is not enough to uniquely distinguish the protocol for, say, Wireshark analysis. Also, a single byte is a little bit less efficient in parsing than 4 bytes because of alignment issues. It is always a good idea to put longer-aligned scalar fields first. Please, look into best practices on this. |
We (@jonay2000, @dsluijk and I) think that |
Transferring, as this is more about the protocol definition |
sources for choices made to get to the number: https://tools.ietf.org/html/draft-main-magic-00 |
We have a couple of options for the first byte in the ipv8 packet.
Right now the header looks like
0x00 0x02
where as far as we know0x02
is the version and the first byte is hardcoded to 0.There are a few logical options for a new header:
0x00 0x03
for rust-ipv8 messages0x01
and everything after will be new rust-ipv8 messages with slightly different architecture.0b00101010
.Advantages of this kind of proper magic byte is that few other protocols use it so it is very easily detectable. If this is actually an advantage is debatable.
We should decide upon this soon as this it is rather important to distinguish the two kinds of messages. By then legacy py-ipv8 messages will be interpreted by rust and converted to a rust-readable standard.
The text was updated successfully, but these errors were encountered: