pub trait StatelessValidator: Send + Sync {
// Required method
fn verify(&self, input: &SszStatelessInput) -> Result<Vec<u8>, VMError>;
}Expand description
Trait for stateless block validation, used by the EXECUTE precompile.
Implemented in crates/blockchain/ to break the dependency cycle:
LEVM defines the trait, the blockchain crate implements it with
verify_stateless_new_payload.
Required Methods§
Sourcefn verify(&self, input: &SszStatelessInput) -> Result<Vec<u8>, VMError>
fn verify(&self, input: &SszStatelessInput) -> Result<Vec<u8>, VMError>
Validate a stateless block execution.
Input: the already-decoded StatelessInput. The EXECUTE precompile
decodes the SSZ calldata once up front (to charge gas and check L2
constraints) and hands the decoded value here, so the witness is not
parsed a second time.
Output: SSZ-encoded StatelessValidationResult bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".