uint256 icon indicating copy to clipboard operation
uint256 copied to clipboard

feat(json): introduce MarshalJSONHex

Open itsdevbear opened this issue 1 year ago • 4 comments

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

itsdevbear avatar Jul 30 '24 21:07 itsdevbear

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). Report is 5 commits behind head on master.

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     

codecov[bot] avatar Jul 30 '24 21:07 codecov[bot]

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.

holiman avatar Aug 08 '24 13:08 holiman

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

itsdevbear avatar Aug 08 '24 13:08 itsdevbear

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?

holiman avatar Aug 08 '24 14:08 holiman

Seems abandoned. Please reopen if that was not the case

holiman avatar Jan 08 '25 12:01 holiman