Commit 69222b2a authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Éloïs

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

parent 0dc97a0c
......@@ -249,21 +249,20 @@ 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) |
ws2p_version := This field is placed first so that future versions of WS2P are not constrained on the other fields,
| 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 | ? | ?* |
| signature | ? | SigBox |
`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`._
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment