pub enum ProofData<I> {
ProverSetup {
prover_type: ProverType,
payload: Bytes,
},
ProverSetupACK,
InputRequest {
commit_hash: String,
prover_type: ProverType,
},
VersionMismatch,
ProverTypeNotNeeded {
prover_type: ProverType,
},
InputResponse {
id: Option<u64>,
input: Option<I>,
format: Option<ProofFormat>,
},
ProofSubmit {
id: u64,
proof: ProverOutput,
},
ProofSubmitACK {
id: u64,
},
}Expand description
Generic enum for the ProverServer <–> ProverClient Communication Protocol.
The type parameter I represents the input type sent from server to prover:
- L2 uses
ProverInputData - L1 uses
ProgramInput
Variants§
ProverSetup
The client performs any needed setup steps (e.g. key registration).
ProverSetupACK
The Server acknowledges the receipt of the setup and its completion.
InputRequest
The Client requests work from the coordinator. The commit hash ensures client and server are compatible. The prover_type tells the coordinator which backend the client runs, so it can skip work items that already have a proof for that type.
VersionMismatch
The Server responds with VersionMismatch when the prover’s code version does not match the version needed to prove the next work item.
ProverTypeNotNeeded
The Server responds with ProverTypeNotNeeded when the connecting prover’s backend type is not in the set of required proof types for this deployment.
Fields
prover_type: ProverTypeInputResponse
The Server responds with an InputResponse containing the input data. If all fields are None, the Client knows no work is available.
ProofSubmit
The Client submits the proof generated by the prover for the specified id.
ProofSubmitACK
The Server acknowledges the receipt of the proof and updates its state.
Implementations§
Source§impl<I> ProofData<I>
impl<I> ProofData<I>
pub fn prover_setup(prover_type: ProverType, payload: Bytes) -> Self
pub fn prover_setup_ack() -> Self
pub fn input_request(commit_hash: String, prover_type: ProverType) -> Self
pub fn version_mismatch() -> Self
pub fn input_response(id: u64, input: I, format: ProofFormat) -> Self
pub fn empty_input_response() -> Self
pub fn proof_submit(id: u64, proof: ProverOutput) -> Self
pub fn proof_submit_ack(id: u64) -> Self
Trait Implementations§
Source§impl<'de, I> Deserialize<'de> for ProofData<I>where
I: Deserialize<'de>,
impl<'de, I> Deserialize<'de> for ProofData<I>where
I: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<I> !Freeze for ProofData<I>
impl<I> RefUnwindSafe for ProofData<I>where
I: RefUnwindSafe,
impl<I> Send for ProofData<I>where
I: Send,
impl<I> Sync for ProofData<I>where
I: Sync,
impl<I> Unpin for ProofData<I>where
I: Unpin,
impl<I> UnsafeUnpin for ProofData<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for ProofData<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.