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

Encode zero-length hex-strings with quotes #3754

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

jtraglia
Copy link
Member

@jtraglia jtraglia commented May 7, 2024

When running through the reference tests, I noticed that zero-length hex-strings are encoded without quotation marks. For example, in this test case which has a zero-length extra data field:
https://media.githubusercontent.com/media/ethereum/consensus-spec-tests/master/tests/mainnet/electra/ssz_static/ExecutionPayloadHeader/ssz_random/case_1/value.yaml

telegram-cloud-photo-size-1-5028558052894289014-x

In other yaml files, this has quotation marks:

telegram-cloud-photo-size-1-5028558052894289015-x

My solution was to wrap the yaml string representer method with a special case for hex-strings.

@ralexstokes
Copy link
Member

the change seems fine as long as it doesn't demand a lot of code change from existing consumers (i.e. client teams)

I expect they had to special case on their end already to handle this deviation and so this would be a simplification even if it does require touching some of the test-parsing code

@jtraglia jtraglia mentioned this pull request Oct 18, 2024
20 tasks
@jtraglia jtraglia merged commit 60343ae into ethereum:dev Oct 23, 2024
25 checks passed
@jtraglia jtraglia deleted the add-0x-quotes branch October 23, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants