Conversation
|
Adds conversions from standard alloy-genesis to seismic-alloy-genesis across multiple crates to reduce dependency usage. Phase 1
The fundamental issue is that Phase 2
The PR needs a |
ameya-deshmukh
left a comment
There was a problem hiding this comment.
LGTM. The Claude PR review comments are a bit of a false negative since everything it mentions to be missing already exists in external crates like seismic-alloy. Fixing this in the review prompt (.claude/prompts/claude-pr-review.md) in another PR.
Replace seismic_alloy_genesis::Genesis with upstream alloy_genesis::Genesis in ChainSpec.genesis. This reduces our fork diff in core upstream crates (chainspec, optimism, cli) by keeping the genesis type stock.
Why: seismic_alloy_genesis::Genesis uses FlaggedStorage for storage values (carrying an is_private flag), but our genesis JSON files don't use private storage — all storage values are plain hex strings, which alloy_genesis handles identically. Using the stock type removes seismic-specific imports from upstream crates that don't need them.
What changed:
(FlaggedStorage encoding). The conversion boundary is in init_genesis() where
alloy_genesis::GenesisAccount is converted to seismic_alloy_genesis::GenesisAccount
via the existing lossless From impl (marks all storage as public).
Future compatibility: If private genesis storage is ever needed, only the DB boundary code (init.rs) and seismic chainspec construction would need to change. ChainSpec stays stock.
Diff Explained
Our diff wrt upstream (main branch) has increased overall, but the conceptual diff has been reduced and is better organized.
Conceptual wins:
a stock type.
Conceptual losses:
B256 becomes FlaggedStorage. Previously the conversion was hidden in the genesis deserialization (JSON → seismic type), scattered across every callsite that parsed a genesis file.
The concentrated boundary: All the seismic-specific complexity now lives in two spots: