-
Notifications
You must be signed in to change notification settings - Fork 397
Stabilize ChainConfig serde for Human-Readable & Binary Formats #2436
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
Merged
+184
−148
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5fc68e7
make serialization symmetric
Wollac 5485320
add hoodi dumpgenesis
Wollac fad683e
keep deserialize_json_ttd_opt
Wollac a848124
fix clippy warning
Wollac a7e3847
support string and float when deserialiting TTD
Wollac d6521f1
Revert "add hoodi dumpgenesis"
Wollac 95ed52f
fix clippy warning
Wollac 7113751
improve documentation
Wollac 7dd02a1
improve test
Wollac 3c528a3
add missing #[serde(untagged)]
Wollac 823a16b
keep backwards compatibility
Wollac 6b7f2a9
Merge branch 'main' into serialize-genesis
Wollac ada2e77
Merge branch 'main' into serialize-genesis
Wollac 575d226
add accidentally removed tests
Wollac 08a6d86
move private functions to end of file
Wollac 9ee6aa4
Merge branch 'main' into serialize-genesis
Wollac fddda2f
adapt new fields
Wollac 39c007d
Merge branch 'main' into serialize-genesis
Wollac 07f3c06
Update crates/genesis/src/lib.rs
mattsse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing hex support will break existing setups, so we cant remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for JSON files that contain hex, which neither alloy nor geth ever produce. Do you still think we should support hex deserialization in human-readable input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguably, using
alloy-serde::opt
also for serialization, would be an even more breaking change.So the only alternative would be to add a alloy-genesis specific deserializer, which uses default when non-human-readable and alloy_serde::quantity::opt::deserialize when human-readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 823a16b