ZIP 302: Update 0xF5 section.

This commit is contained in:
Kris Nuttycombe 2021-03-18 11:16:46 -06:00 committed by GitHub
parent 2cbfb93ac9
commit 4e32c8da28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -48,13 +48,10 @@ contents of a memo. It does not define consensus requirements.
+ Interpret the next few bytes (1 to 9 of them) as a 64-bit unsigned variable-length + Interpret the next few bytes (1 to 9 of them) as a 64-bit unsigned variable-length
integer [#Bitcoin-CompactSize]_, and use it as an arbitrary application-defined integer [#Bitcoin-CompactSize]_, and use it as an arbitrary application-defined
"type" field. "type" field.
+ Interpret the next bytes (1 to 2 of them) as a 16-bit unsigned ULEB, and use it as + Interpret the next 1 or 2 bytes as a CompactSize value constrained to the range 0..510, and use
the length field. (The length can be at most 510 bytes due to the overall memo the resulting value as the length of the remaining data.
length, and that is why the length field can only be 1 or 2 bytes.)
+ If 1 + the number bytes used for the type field + the number of bytes used for the + If 1 + the number bytes used for the type field + the number of bytes used for the
length field + the length > 512 then error out, i.e. do not do any further length field + the length > 512 then report an error.
processing of the memo, and do not return any information about the memo to the
caller other than the fact that it was incorrectly formatted.
+ Inspect the padding after the end of the indicated length, and if it + Inspect the padding after the end of the indicated length, and if it
contains anything other than bytes of value 0x00 then report an error. contains anything other than bytes of value 0x00 then report an error.
+ Return to the caller a 3-tuple of the following data: + Return to the caller a 3-tuple of the following data: