Skip to main content

GpuFiatShamirTranscript

Trait GpuFiatShamirTranscript 

Source
pub trait GpuFiatShamirTranscript<Config: StarkProtocolConfig>: FiatShamirTranscript<Config> {
    // Required method
    fn grind_gpu(
        &mut self,
        bits: usize,
        device_ctx: &GpuDeviceCtx,
    ) -> Result<Config::F, GrindError>;
}
Expand description

Marker trait for GPU-compatible Fiat-Shamir transcripts.

Extends FiatShamirTranscript with a GPU-accelerated proof-of-work grind method. Implementers maintain a device-side state buffer and can off-load the grinding loop to a CUDA kernel.

Required Methods§

Source

fn grind_gpu( &mut self, bits: usize, device_ctx: &GpuDeviceCtx, ) -> Result<Config::F, GrindError>

GPU-accelerated proof-of-work grinding.

Finds a witness value w of type Config::F such that after observing w and sampling, the result has bits trailing zero bits. Implementations should sync host state to device, launch a CUDA grinding kernel, then update the host state to match (observe witness + consume one sample).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§