-
Notifications
You must be signed in to change notification settings - Fork 82
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: implement anvil_zks_{prove,execute}Batch
#586
base: main
Are you sure you want to change the base?
Conversation
|
||
#[method(name = "proveBatch")] | ||
async fn prove_batch(&self, batch_number: L1BatchNumber) -> RpcResult<H256>; | ||
|
||
#[method(name = "executeBatch")] | ||
async fn execute_batch(&self, batch_number: L1BatchNumber) -> RpcResult<H256>; |
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.
Should we be documenting these API endpoints in https://github.com/matter-labs/anvil-zksync/blob/main/SUPPORTED_APIS.md?
// Batches are not being used when running in forking mode | ||
batches: HashMap::from_iter([]), |
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.
Why would batches not be used during forking?
// Our version of contracts has system log and data availability verification disabled. | ||
// Hence, we are free to create a zeroed out dummy header without any logs whatsoever. | ||
let header = L1BatchHeader::new( | ||
self.current_batch, | ||
0, | ||
// We could use contract hashes that were actually used, but they might differ from what | ||
// L1 expects due to impersonation |
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.
If a user checkouts different system contracts that has system log and data availability verification enabled will that be a problem? Just thinking about our own protocol devs usage.
What 💻
Next part of #536
Introduces support for proving and executing on L1. Adds persistent batches to
Blockchain
as we must submit batches with consistent root hash. So now L1 sidecar loads batch headers fromcore
which is more realistic to what would usually happen and bring us one step closer to having proper system logs (we need to makeInMemoryNode
persist them in the resulting batch).Why ✋
L1-L2 communication