-
Notifications
You must be signed in to change notification settings - Fork 57
chore(l1,l2): ordered genesis files #2713
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
base: main
Are you sure you want to change the base?
Conversation
Lines of code reportTotal lines added: Detailed view
|
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.
not sure I agree with this approach, now we're mixing fork specific configs like "muirGlacierBlock" with other configs like "depositContractAddress". What is the standard across Ethereum? I have never seen it be alphabetically ordered keys
@@ -87,3 +87,7 @@ harness = false | |||
|
|||
[build-dependencies] | |||
vergen = { version = "9.0.0", features = ["rustc"] } | |||
|
|||
[[bin]] |
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.
IMO, having a binary for this niche usecase goes against the concept of minimalism/simplicity we want in the repo (the same could also be said to other binaries we have).
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.
I would probably just keep that in a branch in case we need it.
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.
Maybe we could keep a separate workspace for development tools.
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.
how would that look like?
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.
I'll discuss this offline, but this seems like a fairly simple addition.
let genesis_as_map: Map<String, Value> = serde_json::from_str(&genesis_json) | ||
.map_err(|e| format!("Failed to de-serialize genesis file: {}", e))?; | ||
// Keys sorted based off this ethpandaops example: | ||
// https://github.com/ethpandaops/ethereum-genesis-generator/blob/master/apps/el-gen/mainnet/genesis.json |
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.
Can we also order the config fields internally as in the example? That is,
- "chainId",
- "homesteadBlock"
- "daoForkBlock"
- "daoForkSupport"
- "eip150Block"
- "eip150Hash"
- "eip155Block"
- "eip158Block"
- "byzantiumBlock"
- "constantinopleBlock"
- "petersburgBlock"
- "istanbulBlock"
- "muirGlacierBlock"
- "berlinBlock"
- "londonBlock"
- "arrowGlacierBlock"
- "grayGlacierBlock"
- "terminalTotalDifficulty"
- "shanghaiTime"
- "cancunTime"
- "pragueTime"
- "ethash"
- "depositContractAddress"
- "blobSchedule"
This fields also have a reasonable order in them (forks are ordered, blob schedule is last)
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.
Sure!
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.
Done here
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.
Done
@@ -87,3 +87,7 @@ harness = false | |||
|
|||
[build-dependencies] | |||
vergen = { version = "9.0.0", features = ["rustc"] } | |||
|
|||
[[bin]] |
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.
I'll discuss this offline, but this seems like a fairly simple addition.
Motivation
Ordered genesis files make it easy to diff with one another.
Description
Closes #2706.