-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plasma): Online Plasma Input Fetcher (#167)
* feat(plasma): Online Plasma Input Fetcher Stub * Update crates/plasma/src/lib.rs Co-authored-by: clabby <ben@clab.by> --------- Co-authored-by: clabby <ben@clab.by>
- Loading branch information
Showing
4 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,54 @@ | ||
//! Module contains an online implementation of the Plasma Input Fetcher. | ||
use crate::{ | ||
traits::PlasmaInputFetcher, | ||
types::{FinalizedHeadSignal, PlasmaError}, | ||
}; | ||
use alloc::boxed::Box; | ||
use alloy_primitives::Bytes; | ||
use async_trait::async_trait; | ||
use kona_derive::online::AlloyChainProvider; | ||
use kona_primitives::{ | ||
block::{BlockID, BlockInfo}, | ||
system_config::SystemConfig, | ||
}; | ||
|
||
/// An Online Plasma Input Fetcher. | ||
#[derive(Debug, Clone)] | ||
pub struct OnlinePlasmaInputFetcher {} | ||
|
||
#[async_trait] | ||
impl PlasmaInputFetcher<AlloyChainProvider> for OnlinePlasmaInputFetcher { | ||
async fn get_input( | ||
&mut self, | ||
_fetcher: &AlloyChainProvider, | ||
_commitment: Bytes, | ||
_block: BlockID, | ||
) -> Option<Result<Bytes, PlasmaError>> { | ||
unimplemented!() | ||
} | ||
|
||
async fn advance_l1_origin( | ||
&mut self, | ||
_fetcher: &AlloyChainProvider, | ||
_block: BlockID, | ||
) -> Option<Result<(), PlasmaError>> { | ||
unimplemented!() | ||
} | ||
|
||
async fn reset( | ||
&mut self, | ||
_block_number: BlockInfo, | ||
_cfg: SystemConfig, | ||
) -> Option<Result<(), PlasmaError>> { | ||
unimplemented!() | ||
} | ||
|
||
async fn finalize(&mut self, _block_number: BlockInfo) -> Option<Result<(), PlasmaError>> { | ||
unimplemented!() | ||
} | ||
|
||
fn on_finalized_head_signal(&mut self, _callback: FinalizedHeadSignal) { | ||
unimplemented!() | ||
} | ||
} |