-
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.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//! This module contains the implementation of the [crate::TraceProvider] trait for calling out to `cannon` to fetch | ||
//! state witnesses and proof values. | ||
|
||
use crate::{Gindex, Position, TraceProvider}; | ||
use alloy_primitives::keccak256; | ||
use anyhow::Result; | ||
use durin_primitives::Claim; | ||
use std::{marker::PhantomData, sync::Arc}; | ||
|
||
/// The [CannonTraceProvider] is a [TraceProvider] that runs `cannon` to retrieve state witnesses and proof values. | ||
pub struct CannonTraceProvider { | ||
pub split_depth: u8, | ||
} | ||
|
||
#[async_trait::async_trait] | ||
impl TraceProvider<[u8; 32]> for CannonTraceProvider { | ||
async fn absolute_prestate(&self) -> Result<Arc<[u8; 32]>> { | ||
todo!() | ||
} | ||
|
||
async fn absolute_prestate_hash(&self) -> Result<Claim> { | ||
todo!() | ||
} | ||
|
||
async fn state_at(&self, position: Position) -> Result<Arc<[u8; 32]>> { | ||
todo!() | ||
} | ||
|
||
async fn state_hash(&self, position: Position) -> Result<Claim> { | ||
todo!() | ||
} | ||
|
||
async fn proof_at(&self, _: Position) -> Result<Arc<[u8]>> { | ||
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