PrecompileVerifier

Trait PrecompileVerifier 

Source
pub trait PrecompileVerifier: Send + Sync {
    // Required method
    fn verify(
        &self,
        calldata: &[u8],
    ) -> Result<PrecompileCommitment, PrecompileError>;
}
Expand description

Trait for verifying precompile computations.

Each precompile type must implement this trait to enable verification of its computations during proof verification. The verifier validates that the computation was performed correctly and returns a precompile commitment.

§Stability

⚠️ Alpha Status: This trait and the broader precompile verification framework are under active development. The interface and behavior may change in future releases as the framework evolves. Production use should account for potential breaking changes.

Required Methods§

Source

fn verify( &self, calldata: &[u8], ) -> Result<PrecompileCommitment, PrecompileError>

Verifies a precompile computation from the given call data.

§Arguments
  • calldata - The byte data containing the inputs to evaluate the precompile.
§Returns

Returns a precompile commitment containing both tag and commitment word on success.

§Errors

Returns an error if the verification fails.

Implementors§