Skip to content
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

Merge katana integration changes #1

Merged
merged 8 commits into from
Jan 28, 2025

Conversation

kariy
Copy link
Member

@kariy kariy commented Jan 27, 2025

Assumption(s):-

  1. The rollup chain's fee token address is 0x2e7442625bab778683501c0eadbc1ea17b3535da040a12ac7d281066e915eea
    • Currently, all chain initialized with katana init has the same fee token, and there's only 1 token as opposed to 2, for Starknet chains.
  2. The blocks must be executed using the same VersionedConstant, otherwise this would result in mismatch outcome (esp in terms of fee calculation).
    • We use version constants used by Starknet v0.13.3, and this is matched by katana.

@kariy kariy merged commit d7e67ff into main Jan 28, 2025
3 of 5 checks passed
kariy added a commit to dojoengine/dojo that referenced this pull request Jan 28, 2025
The main idea of this PR is **(1)** to define concrete types for the different ways the node chain spec can be configured, and **(2)** implement different genesis initialization procedures based on the chain spec types.

We define two separate chain spec types (but combined as an enum when it is consumed by the node):-

1. `katana_chain_spec::dev::ChainSpec`
	- Use the same genesis initialization function as it is now.
	- No execution, genesis block and states are embedded directly into the database. 
	- Node running with this chain spec type is not meant to be provable (as the block 0 is not provable).
	
2. `katana_chain_spec::rollup::ChainSpec`
	- Initialized by executing the block returned by `rollup::ChainSpec::block()`.
	- The block contains valid, executable transactions generated from the chain spec's genesis.
	- The transactions are guaranteed to be valid when they are executed by `snos`*, as they are meant to be provable.
	
By defining these types separately, the node can handle the different setup processes more clearly.

---

\* Our version of [`snos`](cartridge-gg/snos#1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant