-
Notifications
You must be signed in to change notification settings - Fork 51
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(driver): Multi-block derivation #888
base: main
Are you sure you want to change the base?
Conversation
|
||
// Wrap the cursor in a shared read-write lock | ||
Ok(Arc::new(RwLock::new(cursor))) |
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.
Is there a reason you chose to return the Arc<RwLock<PipelineCursor>>
instead of doing this when it's consumed?
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.
There's just one usage of the method in client so I thought not to clog up the client's run
code.
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.
I support this - one pedantic nit is holding the RwLock across multiple asynchronous operations, but since it will not deadlock, it's acceptable.
This PR adds an optional
PipelineCursor
instance intoOracleL2ChainProvider
which enables the forward movement of the reference L2 block hash used to verifiably query L2 block data by number.Using this cursor in the provider enables providing authenticated data to the pipeline beyond what could previously be validating only using the commitments in
BootInfo
.This allows
Driver::advance_to_target
to iteratively process multiple sequential blocks, extending the usability of Kona in ZK fault proofs.The PR also reduces some boilerplate by introducing convenience methods in
HintType
andOracleL2ChainProvider
.Closes #795