Skip to content

Conversation

@cawthorne
Copy link
Contributor

@cawthorne cawthorne commented Dec 8, 2025

Upgrading the LLO Feeds Verifier and Verifier Proxy to have a view function path.

Audit by dedaub:
https://docs.google.com/document/d/1zjdP_BjsHij5M76LaHfW3OoU1fbEaSj4njdcEq1syZ0/edit?usp=sharing

@cawthorne cawthorne requested a review from a team as a code owner December 8, 2025 19:12
Copilot AI review requested due to automatic review settings December 8, 2025 19:12
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

👋 cawthorne, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds view-only versions of verification functions to the Data Streams llo-feeds Verifier contracts. The new verifyView and verifyBulkView functions provide read-only access to report verification without emitting events or billing users, making them compatible with static calls and off-chain simulations.

Key Changes:

  • Added verifyView and verifyBulkView functions to both IVerifier and IVerifierProxy interfaces
  • Implemented view-only verification methods in Verifier and VerifierProxy contracts
  • Refactored existing verification logic to share code between state-changing and view-only variants

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
contracts/src/v0.8/llo-feeds/v0.5.0/interfaces/IVerifierProxy.sol Adds interface definitions for verifyView and verifyBulkView functions
contracts/src/v0.8/llo-feeds/v0.5.0/interfaces/IVerifier.sol Adds interface definition for verifyView function
contracts/src/v0.8/llo-feeds/v0.5.0/VerifierProxy.sol Implements view-only verification methods and bumps version to 2.0.1
contracts/src/v0.8/llo-feeds/v0.5.0/Verifier.sol Refactors verification logic into shared internal function and implements verifyView

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

function _verify(
bytes calldata signedReport
) internal view returns (bytes memory verifierResponse) {
if (msg.sender != i_verifierProxyAddr) revert AccessForbidden();
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The msg.sender check in _verify will fail for verifyView calls because msg.sender is only set during transactions, not view calls. This check should either be removed from the internal function and placed only in the state-changing verify function, or a sender parameter should be passed to _verify.

Suggested change
if (msg.sender != i_verifierProxyAddr) revert AccessForbidden();

Copilot uses AI. Check for mistakes.

/// @notice Internal verification logic shared by verify() and verifyView()
/// @param signedReport The signed report to verify
/// @return verifierResponse The verified report data
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The return parameter name in the documentation ('verifierResponse') doesn't match the actual implementation which uses 'verifierResponse' in the function signature but the comment could be clearer that this returns the decoded report data.

Suggested change
/// @return verifierResponse The verified report data
/// @return verifierResponse The decoded report data extracted from the signed report

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Static analysis results are available

Hey @cawthorne, you can view Slither reports in the job summary here or download them as artifact here.
Please check them before merging and make sure you have addressed all issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant