From d804c05e7566da060af038bf6ad202901712b158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BCrderer?= Date: Sun, 25 Feb 2024 14:32:57 +0100 Subject: [PATCH] Describe block transfer and list hash messages --- docs/protocol-v0.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/protocol-v0.md b/docs/protocol-v0.md index d8ea711..19c259b 100644 --- a/docs/protocol-v0.md +++ b/docs/protocol-v0.md @@ -85,3 +85,45 @@ If the list contains less than 1024 entries, set "transaction fee", "sender pubk The difficulty sum is sent as 2^28 if only one block is known or as 0 if no block is known. partner IPv6 and partner port may be nullbytes (no partner included). + +### block request + +| content | size (bytes) | +|---|---| +| protocol version = 0 (BE) | 2 | +| capable version = 0 (BE) | 2 | +| type = 1 (BE) | 1 | +| block hash | 32 | + +A block request is sent from node A to node B in order to transfer a block from node B to node A. +Node B should answer with a "block transfer" message that includes the requested block (as given by "block hash") + +### block transfer + +| content | size (bytes) | +|---|---| +| protocol version = 0 (BE) | 2 | +| capable version = 0 (BE) | 2 | +| type = 2 (BE) | 1 | +| block | 292 | + +A "block transfer" message is sent back in response to a "block request" message. + +### open transaction list hash request + +| content | size (bytes) | +|---|---| +| protocol version = 0 (BE) | 2 | +| capable version = 0 (BE) | 2 | +| type = 3 (BE) | 1 | +| list position (0 <= x < 1024) (BE) | 2 | + +### open transaction list hash response + +| content | size (bytes) | +|---|---| +| protocol version = 0 (BE) | 2 | +| capable version = 0 (BE) | 2 | +| type = 4 (BE) | 1 | +| list position (0 <= x < 1024) (BE) | 2 | +| "open transaction" hash value | 32 |