Skip to content
Snippets Groups Projects
Commit 69222b2a authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Éloïs
Browse files

[feat] remove hash from message -> make signature mandatory

parent 0dc97a0c
Branches
No related tags found
1 merge request!8WIP: WS2P v2
......@@ -250,20 +250,19 @@ All numbers (integers and floats) are encoded in little endian.
All binary WS2P v2 messages are encapsulated in the following format :
| data name | size in bytes | data type |
|:----------------:|--------------:|-----------------:|
| :------------: | ------------: | ----------: |
| ws2p_version | 4 | u32 |
| currency_name | ? | String |
| issuer_node_id | 4 | u32 |
| issuer_pubkey | ? | PubkeyBox |
| message_type | 4 | u32 |
| payload | ? | ?* |
| message_hash | 32 | Opt([u8; 32]) |
| signature | ? | Opt(SigBox) |
| signature | ? | SigBox |
ws2p_version := This field is placed first so that future versions of WS2P are not constrained on the other fields,
`ws2p_version` := This field is placed first so that future versions of WS2P are not constrained on the other fields,
the only constraint will be to start the message with the version number stored in u32.
currency_name := Empty string is allowed, it allow the user to synchronize his node without having to manually enter the currency on which he synchronizes. The node will then adopt the currency that is specified in the CONNECT message it will receive from the selected reference node.
`currency_name` := Empty string is allowed, it allow the user to synchronize his node without having to manually enter the currency on which he synchronizes. The node will then adopt the currency that is specified in the CONNECT message it will receive from the selected reference node.
_* The type of `payload` is determined by the content of `message_type`._
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment