-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
refactor #17951
refactor #17951
Conversation
refactor
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
/// @notice This contract is a verifier for the Mainnet ZkVM that composes RiscZero and SP1 | ||
/// Verifiers. | ||
/// @custom:security-contact [email protected] | ||
contract ZkVMVerifier is ComposeVerifier { |
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.
Just think maybe also impl TEEVerifier in this PR since the framework code is exactly the same.
for (uint256 i; i < verifiers.length; ++i) { | ||
// Store the value 1 in the temporary storage slot using inline assembly |
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 not we have a safeguard to not possibly reuse verifiers ? 🤔
Something like:
address prevVerifier;
for (uint256 i; i < verifiers.length; ++i) {
if (uint160(prevVerifier) >= uint160(verifiers[i])) {
revert L1_INVALID_VERIFIER();
}
...
prevVerifier = verifiers[i];
}
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.
The verifier is coded by us and is not dynamically configured by proposers/provers.
No description provided.