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

Revert to raw encoding for non-list entries #80

Merged
merged 3 commits into from
Jun 16, 2024
Merged

Conversation

AgeManning
Copy link
Member

The standard convention for signing RLP field data is to do so without the RLP header.

This was a point of confusion in the last version upgrade where no one had really accounted for RLP lists as values. The last version introduced storing the RLP header along with the value when decoding or reading an ENR. This goes against common convention and as a result, the current version cannot read a variety of common ENRs which are implementing fields with non-list RLP types.

This PR reverts the previous changes such that the signature is over RLP data without the header.

However if there is an RLP list object being encoded, we maintain the header. This may not be the common convention with other ENR crates and we might want to consider spec'ing the case of RLP list fields to avoid this confusion between various ENR implementations.

@AgeManning
Copy link
Member Author

@emhane @jxs

src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/lib.rs Outdated Show resolved Hide resolved
@AgeManning AgeManning merged commit 4e56f1c into master Jun 16, 2024
9 checks passed
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.

3 participants