-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(protocol): proof verification aggregation #17938
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,7 +148,8 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents { | |
/// @inheritdoc ITaikoL1 | ||
function proveBlocks( | ||
uint64[] calldata _blockIds, | ||
bytes[] calldata _inputArr | ||
bytes[] calldata _inputArr, | ||
bytes proof | ||
) | ||
external | ||
whenNotPaused | ||
|
@@ -162,9 +163,14 @@ contract TaikoL1 is EssentialContract, ITaikoL1, TaikoEvents { | |
|
||
TaikoData.Config memory config = getConfig(); | ||
|
||
IVerifier.Context[] memory ctxs = new IVerifier.Context[](_blockIds.length); | ||
Brechtpd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
TaikoData.Transition[] memory trans = new TaikoData.Transition[](_blockIds.length); | ||
|
||
for (uint256 i; i < _blockIds.length; ++i) { | ||
_proveBlock(_blockIds[i], _inputArr[i], config); | ||
(ctxs[i], trans[i]) = _proveBlock(_blockIds[i], _inputArr[i], config); | ||
} | ||
|
||
IVerifier(verifier).verifyProof(ctxs, trans, proof); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a compilation error, due to this outter And also this yields into another problem, with an example: And thus, the verifier contract address itself differs from block to block. so aggregating multiple, continuous blocks and verify with one go, will only work (in the current design at least!) if we have the exact same logic (contract) to verify (so same tiers), otherwise no. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can only aggregate proofs for the same tier together, but the proofs may correspond to blocks that are not consecutive. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but then with ever 500-100th zk tier blocks in practice it will be useful for tee only. (At least for now.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I have now added the required checks to make sure only the same proofs can be aggregrated. |
||
} | ||
|
||
/// @inheritdoc ITaikoL1 | ||
|
Uh oh!
There was an error while loading. Please reload this page.