Fix ambiguous empty brackets in Appendix D #852
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Appendix B (Recursive Length Prefix) defines two sets of possible inputs to the RLP function: lists and byte arrays.

An empty list must be distinguishable from an empty byte array because RLP of an empty list is (0xC0) while RLP of an empty byte array is (0x80).
Appendix D (Modified Merkle Patricia Tree) uses empty round brackets in two equations. In both cases it is unclear whether these empty round brackets represent an empty list or an empty byte array. It should be fixed in this PR.


In both cases, these empty brackets should represent an empty byte array, which I checked against geth source code (https://github.com/ethereum/go-ethereum/blob/5079e3c6e5f2096e32b2216d1119db66fe0ff531/trie/node_enc.go#L37 and https://github.com/ethereum/go-ethereum/blob/5079e3c6e5f2096e32b2216d1119db66fe0ff531/trie/node_enc.go#L49).
Modified equations look like this:

