-
Notifications
You must be signed in to change notification settings - Fork 296
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
feat: Sync from L1 #1224
Comments
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
Our team has essentially implemented this feature. This is our PR: #1296 |
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. |
Enable Madara to Sync it's state from L1.
As Starknet is a Validity Rollup on top of an L1 (Ethereum) we can query the base chain to retrieve all of the information needed to recompute the
last proved
state of Starknet.The information needed to recompute the state is known as a StateDiff and it includes pertinent changes to the Starknet State per block:
This information is encoded by the Starknet OS as calldata, encoding defined here. This calldata is PUBLISHED AND LOGGED to the L1 Core Contracts and checked against the verifier's fact registry in the following function
updateState
Each state update is tied to a
Fact
which is a hash represents the output of the StarknetOS and its program hash and serves as an attestation of the block verification(simple fact hash example). These facts can be registered as mulitple MemoryPages in the verifier fact registry.Syncing
The implementation will involve(w/ python examples):
LogMemoryPageFactContinuous
events from the MemoryPageFactRegistryThe text was updated successfully, but these errors were encountered: