-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 Mock out blanket fault solver impl
- Loading branch information
Showing
4 changed files
with
50 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,30 @@ | ||
//! This module contains the various implementations of the [crate::FaultDisputeSolver] trait. | ||
//! | ||
//! TODO | ||
|
||
#![allow(dead_code, unused_variables)] | ||
|
||
use crate::{FaultDisputeState, FaultSolverResponse, TraceProvider}; | ||
use durin_primitives::DisputeSolver; | ||
use std::marker::PhantomData; | ||
|
||
/// A [FaultDisputeSolver] is a [DisputeSolver] that is played over a fault proof VM backend. The | ||
/// solver is responsible for honestly responding to any given [ClaimData] in a given | ||
/// [FaultDisputeState]. It uses a [TraceProvider] to fetch the absolute prestate of the VM as | ||
/// well as the state at any given [Position] within the tree. | ||
pub struct FaultDisputeSolver<T, P> | ||
where | ||
T: AsRef<[u8]>, | ||
P: TraceProvider<T>, | ||
{ | ||
pub provider: P, | ||
_phantom: PhantomData<T>, | ||
} | ||
|
||
impl<T, P> DisputeSolver<FaultDisputeState, FaultSolverResponse> for FaultDisputeSolver<T, P> | ||
where | ||
T: AsRef<[u8]>, | ||
P: TraceProvider<T>, | ||
{ | ||
fn available_moves(&self, game: &FaultDisputeState) -> &[FaultSolverResponse] { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters