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

feat(json): introduce MarshalJSONHex #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsdevbear
Copy link

@itsdevbear itsdevbear commented Jul 30, 2024

A bit of an edge case, but cannot seem to get payload unmarshalling to be happy.

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.88%. Comparing base (ce90883) to head (8e56e89).

Additional details and impacted files
@@             Coverage Diff             @@
##            master     #182      +/-   ##
===========================================
- Coverage   100.00%   99.88%   -0.12%     
===========================================
  Files            5        5              
  Lines         1666     1668       +2     
===========================================
  Hits          1666     1666              
- Misses           0        2       +2     

@holiman
Copy link
Owner

holiman commented Aug 8, 2024

I don't quite see the point of this. The MarshalJSONHex is not part of any interface that I know of, so it cannot be auto-detected and used by encoders. And if you need to explicitly use it, you might aswell just use Hex() directly.

@itsdevbear
Copy link
Author

I was torn about this PR as well. The reason here was to provide api surface to allow uint256's to be used in an ExecutionPayload more naturally.

In geth right now you have to write a custom marshal function if the consensus side type of your ExecutionPayload uses a uint256, else geth will freak out.

This is the broader issue i'm trying to tackle, open to other suggestions

@holiman
Copy link
Owner

holiman commented Aug 8, 2024

In geth right now you have to write a custom marshal function if the consensus side type of your ExecutionPayload uses a uint256, else geth will freak out.

How does this PR make any difference, though?

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