Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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