Skip to main content

PowTranscriptExt

Trait PowTranscriptExt 

Source
pub trait PowTranscriptExt: Transcript {
    // Provided method
    fn verifier_message_pow<T: FromUniform>(
        &mut self,
        config: impl PowStrategy,
    ) -> Result<T, VerificationError> { ... }
}
Expand description

Obtain verifier messages protected by a configured proof-of-work protocol.

Available both inside generic Argument::run implementations and directly on prover and verifier states. The helper owns nonce exchange, binding and verification; callers never supply a seed.

use spongefish::{Transcript, VerificationError};
use spongefish_pow::{PowStrategy, PowTranscriptExt};

fn round<T: Transcript>(
    transcript: &mut T,
    config: impl PowStrategy,
) -> Result<u64, VerificationError> {
    transcript.verifier_message_pow(config)
}

Provided Methods§

Source

fn verifier_message_pow<T: FromUniform>( &mut self, config: impl PowStrategy, ) -> Result<T, VerificationError>

Search sequentially, exchange the nonce, check it and return the protected message.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§