diff options
| author | bt <bt@rctt.net> | 2026-03-29 21:18:03 +0200 |
|---|---|---|
| committer | bt <bt@rctt.net> | 2026-03-29 21:18:03 +0200 |
| commit | d464f63284fef47b71442d4c2bb93c699a6e4e44 (patch) | |
| tree | 5e855aeabcbc83cfa7d0651196e5d1a9e093de7f | |
| parent | 222dc7162616bd90548534c86569cb44d188dad1 (diff) | |
| download | solec-d464f63284fef47b71442d4c2bb93c699a6e4e44.tar.gz solec-d464f63284fef47b71442d4c2bb93c699a6e4e44.zip | |
[docs] Use tables for payload types description
| -rw-r--r-- | docs/rfc.html | 188 | ||||
| -rw-r--r-- | docs/rfc.md | 86 | ||||
| -rw-r--r-- | docs/rfc.txt | 109 |
3 files changed, 218 insertions, 165 deletions
diff --git a/docs/rfc.html b/docs/rfc.html index 796825f..62a6738 100644 --- a/docs/rfc.html +++ b/docs/rfc.html @@ -1494,6 +1494,7 @@ spec</a>. Following types are in use:<a href="#section-2.3.1-1" class="pilcrow"> <li class="compact" id="section-2.3.1-2.4">uint64<a href="#section-2.3.1-2.4" class="pilcrow">¶</a> </li> </ul> +<p id="section-2.3.1-3">Number in numeric type name is number of bits used to encode this type.<a href="#section-2.3.1-3" class="pilcrow">¶</a></p> </section> </div> <div id="timestamp"> @@ -1609,21 +1610,28 @@ Text is encoded using UTF-8.<a href="#section-2.3.3-1" class="pilcrow">¶</a></p <h4 id="name-error"> <a href="#section-2.4.2" class="section-number selfRef">2.4.2. </a><a href="#name-error" class="section-name selfRef">Error</a> </h4> -<div class="lang-ascii-art sourcecode" id="section-2.4.2-1"> -<pre> 0 - 0 1 2 3 4 5 6 7 - +-+-+-+-+-+-+-+-+ - | Error Type | - +-+-+-+-+-+-+-+-+ -</pre><a href="#section-2.4.2-1" class="pilcrow">¶</a> -</div> +<table class="center" id="table-2"> + <caption><a href="#table-2" class="selfRef">Table 2</a></caption> +<thead> + <tr> + <th class="text-left" rowspan="1" colspan="1">Type</th> + <th class="text-left" rowspan="1" colspan="1">Name</th> + </tr> + </thead> + <tbody> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint8</td> + <td class="text-left" rowspan="1" colspan="1">error_type</td> + </tr> + </tbody> + </table> <div id="error-types"> <section id="section-2.4.2.1"> <h5 id="name-error-types"> <a href="#section-2.4.2.1" class="section-number selfRef">2.4.2.1. </a><a href="#name-error-types" class="section-name selfRef">Error types</a> </h5> -<table class="center" id="table-2"> - <caption><a href="#table-2" class="selfRef">Table 2</a></caption> +<table class="center" id="table-3"> + <caption><a href="#table-3" class="selfRef">Table 3</a></caption> <thead> <tr> <th class="text-left" rowspan="1" colspan="1">Type</th> @@ -1646,14 +1654,25 @@ Text is encoded using UTF-8.<a href="#section-2.3.3-1" class="pilcrow">¶</a></p <h4 id="name-handshake"> <a href="#section-2.4.3" class="section-number selfRef">2.4.3. </a><a href="#name-handshake" class="section-name selfRef">Handshake</a> </h4> -<div class="lang-ascii-art sourcecode" id="section-2.4.3-1"> -<pre> 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | ver_major | ver_minor | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -</pre><a href="#section-2.4.3-1" class="pilcrow">¶</a> -</div> +<table class="center" id="table-4"> + <caption><a href="#table-4" class="selfRef">Table 4</a></caption> +<thead> + <tr> + <th class="text-left" rowspan="1" colspan="1">Type</th> + <th class="text-left" rowspan="1" colspan="1">Name</th> + </tr> + </thead> + <tbody> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint8</td> + <td class="text-left" rowspan="1" colspan="1">ver_major</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint8</td> + <td class="text-left" rowspan="1" colspan="1">ver_minor</td> + </tr> + </tbody> + </table> </section> </div> <div id="auth"> @@ -1661,16 +1680,25 @@ Text is encoded using UTF-8.<a href="#section-2.3.3-1" class="pilcrow">¶</a></p <h4 id="name-auth"> <a href="#section-2.4.4" class="section-number selfRef">2.4.4. </a><a href="#name-auth" class="section-name selfRef">Auth</a> </h4> -<div class="lang-ascii-art sourcecode" id="section-2.4.4-1"> -<pre> 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | username (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | password (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -</pre><a href="#section-2.4.4-1" class="pilcrow">¶</a> -</div> +<table class="center" id="table-5"> + <caption><a href="#table-5" class="selfRef">Table 5</a></caption> +<thead> + <tr> + <th class="text-left" rowspan="1" colspan="1">Type</th> + <th class="text-left" rowspan="1" colspan="1">Name</th> + </tr> + </thead> + <tbody> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">username</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">password</td> + </tr> + </tbody> + </table> </section> </div> <div id="message"> @@ -1678,21 +1706,33 @@ Text is encoded using UTF-8.<a href="#section-2.3.3-1" class="pilcrow">¶</a></p <h4 id="name-message"> <a href="#section-2.4.5" class="section-number selfRef">2.4.5. </a><a href="#name-message" class="section-name selfRef">Message</a> </h4> -<div class="lang-ascii-art sourcecode" id="section-2.4.5-1"> -<pre> 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | source_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | target_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | timestamp | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | message_content (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -</pre><a href="#section-2.4.5-1" class="pilcrow">¶</a> -</div> +<table class="center" id="table-6"> + <caption><a href="#table-6" class="selfRef">Table 6</a></caption> +<thead> + <tr> + <th class="text-left" rowspan="1" colspan="1">Type</th> + <th class="text-left" rowspan="1" colspan="1">Name</th> + </tr> + </thead> + <tbody> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">source_address</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">target_address</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">timestamp</td> + <td class="text-left" rowspan="1" colspan="1">send_time</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">message_content</td> + </tr> + </tbody> + </table> </section> </div> <div id="test"> @@ -1702,25 +1742,49 @@ Text is encoded using UTF-8.<a href="#section-2.3.3-1" class="pilcrow">¶</a></p </h4> <p id="section-2.4.6-1">Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload.<a href="#section-2.4.6-1" class="pilcrow">¶</a></p> -<div class="lang-ascii-art sourcecode" id="section-2.4.6-2"> -<pre> 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num1 (uint8) | time1 (timestamp) | - | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | str1 (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num2 (uint16) | str2 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num3 (uint32) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | str3 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num4 (uint64) | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -</pre><a href="#section-2.4.6-2" class="pilcrow">¶</a> -</div> +<table class="center" id="table-7"> + <caption><a href="#table-7" class="selfRef">Table 7</a></caption> +<thead> + <tr> + <th class="text-left" rowspan="1" colspan="1">Type</th> + <th class="text-left" rowspan="1" colspan="1">Name</th> + </tr> + </thead> + <tbody> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint8</td> + <td class="text-left" rowspan="1" colspan="1">num1</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">timestamp</td> + <td class="text-left" rowspan="1" colspan="1">time1</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">str1</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint16</td> + <td class="text-left" rowspan="1" colspan="1">num2</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">str2</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint32</td> + <td class="text-left" rowspan="1" colspan="1">num3</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">string</td> + <td class="text-left" rowspan="1" colspan="1">str3</td> + </tr> + <tr> + <td class="text-left" rowspan="1" colspan="1">uint64</td> + <td class="text-left" rowspan="1" colspan="1">num4</td> + </tr> + </tbody> + </table> </section> </div> </section> diff --git a/docs/rfc.md b/docs/rfc.md index db79839..3bed7fc 100644 --- a/docs/rfc.md +++ b/docs/rfc.md @@ -113,6 +113,8 @@ spec](https://go.dev/ref/spec#Numeric_types). Following types are in use: * uint32 * uint64 +Number in numeric type name is number of bits used to encode this type. + ### Timestamp Uint64 containing Unix timestamp in UTC timezone. @@ -167,13 +169,9 @@ Payload is always empty for this type. ### Error -~~~ ascii-art - 0 - 0 1 2 3 4 5 6 7 - +-+-+-+-+-+-+-+-+ - | Error Type | - +-+-+-+-+-+-+-+-+ - ~~~ +| Type | Name | +|-------|------------| +| uint8 | error_type | #### Error types @@ -183,68 +181,42 @@ Payload is always empty for this type. ### Handshake -~~~ ascii-art - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | ver_major | ver_minor | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|-------|-----------| +| uint8 | ver_major | +| uint8 | ver_minor | ### Auth -~~~ ascii-art - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | username (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | password (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|--------|----------| +| string | username | +| string | password | ### Message -~~~ ascii-art - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | source_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | target_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | timestamp | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | message_content (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ - - +| Type | Name | +|-----------|-----------------| +| string | source_address | +| string | target_address | +| timestamp | send_time | +| string | message_content | ### Test Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload. -~~~ ascii-art - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num1 (uint8) | time1 (timestamp) | - | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | str1 (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num2 (uint16) | str2 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num3 (uint32) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | str3 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num4 (uint64) | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|-----------|-------| +| uint8 | num1 | +| timestamp | time1 | +| string | str1 | +| uint16 | num2 | +| string | str2 | +| uint32 | num3 | +| string | str3 | +| uint64 | num4 | ## Sequential operations diff --git a/docs/rfc.txt b/docs/rfc.txt index 8d889df..02ad60a 100644 --- a/docs/rfc.txt +++ b/docs/rfc.txt @@ -117,6 +117,9 @@ Table of Contents * uint32 * uint64 + Number in numeric type name is number of bits used to encode this + type. + 2.3.2. Timestamp Uint64 containing Unix timestamp in UTC timezone. @@ -176,11 +179,13 @@ Table of Contents 2.4.2. Error - 0 - 0 1 2 3 4 5 6 7 - +-+-+-+-+-+-+-+-+ - | Error Type | - +-+-+-+-+-+-+-+-+ + +=======+============+ + | Type | Name | + +=======+============+ + | uint8 | error_type | + +-------+------------+ + + Table 2 2.4.2.1. Error types @@ -190,62 +195,74 @@ Table of Contents | 0x01 | Auth failed. Invalid username or password. | +------+---------------------------------------------+ - Table 2 + Table 3 2.4.3. Handshake - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | ver_major | ver_minor | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +=======+===========+ + | Type | Name | + +=======+===========+ + | uint8 | ver_major | + +-------+-----------+ + | uint8 | ver_minor | + +-------+-----------+ + + Table 4 2.4.4. Auth - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | username (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | password (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +========+==========+ + | Type | Name | + +========+==========+ + | string | username | + +--------+----------+ + | string | password | + +--------+----------+ + + Table 5 2.4.5. Message - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | source_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | target_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | timestamp | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | message_content (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +===========+=================+ + | Type | Name | + +===========+=================+ + | string | source_address | + +-----------+-----------------+ + | string | target_address | + +-----------+-----------------+ + | timestamp | send_time | + +-----------+-----------------+ + | string | message_content | + +-----------+-----------------+ + + Table 6 2.4.6. Test Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload. - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num1 (uint8) | time1 (timestamp) | - | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | str1 (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num2 (uint16) | str2 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num3 (uint32) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | str3 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num4 (uint64) | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +===========+=======+ + | Type | Name | + +===========+=======+ + | uint8 | num1 | + +-----------+-------+ + | timestamp | time1 | + +-----------+-------+ + | string | str1 | + +-----------+-------+ + | uint16 | num2 | + +-----------+-------+ + | string | str2 | + +-----------+-------+ + | uint32 | num3 | + +-----------+-------+ + | string | str3 | + +-----------+-------+ + | uint64 | num4 | + +-----------+-------+ + + Table 7 2.5. Sequential operations |
