Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the definition of RLP trees. #739

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

acoglio
Copy link
Member

@acoglio acoglio commented Apr 13, 2019

According to equations (177) and (178), the empty list is () and the empty byte
array is also (). So, if \mathbb{T} is defined as set union, it would contain a
single empty sequence. But the empty byte array and the empty list are encoded
differently, according to equations (180) and (183) -- as the 128 and as 192,
respectively. So \mathbb{T} must contain separate elements for the empty byte
array and for the empty list, which is achieved via a disjoint union. Non-empty
byte arrays and non-empty lists are inherently distinct, since a byte is a
number.

This changes
176-before
to
176-after
and also adds
text

According to equations (177) and (178), the empty list is () and the empty byte
array is also (). So, if \mathbb{T} is defined as set union, it would contain a
single empty sequence. But the empty byte array and the empty list are encoded
differently, according to equations (180) and (183) -- as the 128 and as 192,
respectively. So \mathbb{T} must contain separate elements for the empty byte
array and for the empty list, which is achieved via a disjoint union. Non-empty
byte arrays and non-empty lists are inherently distinct, since a byte is a
number.
@nicksavers nicksavers merged commit c9dccad into ethereum:master Apr 15, 2019
@acoglio acoglio deleted the disjoint-union branch May 2, 2019 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants