Skip to content

Commit

Permalink
Update 03-Protocol-Overview.md
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
Fi3 authored Oct 18, 2024
1 parent bedbf97 commit 81b61b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions 03-Protocol-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Multibyte data types are always serialized as little-endian.
| SIGNATURE | 64 | Schnorr signature on Secp256k1 (see BIP 340) |
| SHORT_TX_ID | 6 | SipHash-2-4(TX_ID, k0, k1) where two most significant bytes are dropped from the SipHash output to make it 6 bytes. TX_ID is 32 byte transaction id and k0 and k1 are U64 siphash keys. |
| OPTION[T] | 1 + (occupied ? size(T) : 0) | Alias for SEQ0_1[T]. Identical representation to SEQ0_255 but enforces the maximum size of 1 |
| SEQ0_32[T] | Fixed size T: `1 + LENGTH * size(T) Variable length T: 1 + seq.map(\|x\| x.length).sum()` | 1-byte length L, unsigned integer 8-bits, followed by a sequence of L elements of type T. Allowed range of length is 0 to 32. |
| SEQ0_255[T] | Fixed size T: `1 + LENGTH * size(T) Variable length T: 1 + seq.map(\|x\| x.length).sum()` | 1-byte length L, unsigned integer 8-bits, followed by a sequence of L elements of type T. Allowed range of length is 0 to 255. |
| SEQ0_64K[T] | Fixed size T: `2 + LENGTH * size(T)Variable length T: 2 + seq.map(\|x\| x.length).sum()` | 2-byte length L, unsigned little-endian integer 16-bits, followed by a sequence of L elements of type T. Allowed range of length is 0 to 65535. |

Expand All @@ -95,7 +94,7 @@ The protocol is binary, with fixed message framing.
Each message begins with the extension type, message type, and message length (six bytes in total), followed by a variable length message.
The message framing is outlined below:

| Protocol Type | Byte Length | Description |
| Field Name | Type | Description |
| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| extension_type | U16 | Unique identifier of the extension describing this protocol message. <br>Most significant bit (i.e.bit 15, 0-indexed, aka channel_msg) indicates a message which is specific to a channel, whereas if the most significant bit is unset, the message is to be interpreted by the immediate receiving device. <br>Note that the channel_msg bit is ignored in the extension lookup, i.e.an extension_type of 0x8ABC is for the same "extension" as 0x0ABC. <br>If the channel_msg bit is set, the first four bytes of the payload field is a U32 representing the channel_id this message is destined for (these bytes are repeated in the message framing descriptions below). <br>Note that for the Job Declaration and Template Distribution Protocols the channel_msg bit is always unset. |
| msg_type | U8 | Unique identifier of the extension describing this protocol message |
Expand Down

0 comments on commit 81b61b5

Please sign in to comment.