feat: move configurable initial data to genesis#450
Open
Conversation
aef3df9 to
d6abc12
Compare
moudyellaz
reviewed
Apr 16, 2026
moudyellaz
reviewed
Apr 16, 2026
moudyellaz
reviewed
Apr 16, 2026
moudyellaz
approved these changes
Apr 16, 2026
Collaborator
moudyellaz
left a comment
There was a problem hiding this comment.
lgtm thanks, left some comments
Collaborator
Author
|
Interesting side effect -- |
Pravdyvy
approved these changes
Apr 20, 2026
Collaborator
Pravdyvy
left a comment
There was a problem hiding this comment.
lgtm. Mostly agree, Moudy's comments are valid. Left one suggestion about is_genesis flag.
b986145 to
965e042
Compare
…midway" This reverts commit 0baafc3.
…and validation logics Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
d2315a4 to
77de02d
Compare
77de02d to
f38b9aa
Compare
f38b9aa to
67937a9
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🎯 Purpose
After #439 it was clear that state syncing between sequencer and indexer is a bit odd in terms of initial state. Before this PR we shared common initial accounts configuration between them, which was leading to exceptional handling for genesis on indexer side and unclear world state for external viewer.
This PR is the first part of the two. It moves configurable initial accounts data into genesis. In the future PR we will move
testnet_initial_stateinto genesis as well, so that our mainnet and testnet differ only in config files, not in code.⚙️ Approach
There were a lot of changes, here are the main ones:
importcommand should be used to import external public and private keys.account_labelwithCliAccountMentiontype to use account ids and labels interchangeably which also reduced a lot of code. Some types were a bit restructured to provide more type-safety and incapsulation. And etc.genesis_supply_accountprogram. This program is specific to genesis (same asclockprogram). This program initialize account underauthenticated_transferprogram and then mints configured amount of native tokens.is_genesisoption was added to validation.🧪 How to Test
See CI.
🔗 Dependencies
None
🔜 Future Work
Move state hardcoding into genesis configuration.
📋 PR Completion Checklist
Mark only completed items. A complete PR should have all boxes ticked.