Skip to content

Commit

Permalink
Update contracts/src/IRiscZeroSelectable.sol
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Graf <[email protected]>
  • Loading branch information
capossele and nategraf authored Nov 15, 2024
1 parent fc13aec commit b77accf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contracts/src/IRiscZeroSelectable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ pragma solidity ^0.8.9;

/// @notice Selectable interface for RISC Zero verifier.
interface IRiscZeroSelectable {
/// @notice The selector for the verifier.
/// @notice A short key attached to the seal to select the correct verifier implementation.
/// @dev The selector is taken from the hash of the verifier parameters If two
/// receipts have different selectors (i.e. different verifier parameters), then it can
/// generally be assumed that they need distinct verifier implementations. This is used as
/// part of the RISC Zero versioning mechanism.
///
/// A selector is not intended to be collision resistant, in that it is possible to find
/// two preimages that result in the same selector. This is acceptable since it's purpose
/// to a route a request among a set of trusted verifiers, and to make errors of sending a
/// receipt to a mismatching verifiers easier to debug. It is analogous to the ABI
/// function selectors.
function SELECTOR() external view returns (bytes4);
}

0 comments on commit b77accf

Please sign in to comment.