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

remove arbitrary precision feature #2617

Merged
merged 6 commits into from
Nov 4, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Sep 28, 2023

closes #2206

this feature is kinda horrible and we should not force anyone into using it.

this is also only useful when deserializing json large numbers but since u256 are supposed to be hex it's fine to not support deserializing arbitrary numbers

@mattsse
Copy link
Collaborator Author

mattsse commented Sep 28, 2023

fixing clippy rn

@mattsse
Copy link
Collaborator Author

mattsse commented Sep 28, 2023

I know now why this was added...

geth emits large ints for "terminalTotalDifficulty\":58750000000000000000000 which serde json can not capture

https://github.com/ethereum/go-ethereum/blob/adb9b319c9c61f092755000bf0fc4b3349f5cbbc/params/config.go#L322-L324

@mattsse
Copy link
Collaborator Author

mattsse commented Sep 28, 2023

@Rjected should we remove the totaldifficulty from the object?

@Rjected
Copy link
Contributor

Rjected commented Oct 5, 2023

@Rjected should we remove the totaldifficulty from the object?

We probably can, IIRC this is not required for spawning geth with a normal genesis, and we don't use ethers for hive tests / hive genesis

@mattsse
Copy link
Collaborator Author

mattsse commented Nov 4, 2023

@Rjected turns out this can be fixed by manually converting the captured float, let's do that on reth as well

@mattsse mattsse merged commit 66b81d7 into gakonst:master Nov 4, 2023
17 of 19 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.

serde_json arbitrary_precision flag causes conflicts
3 participants