diff --git a/firewood/src/api.rs b/firewood/src/api.rs deleted file mode 100644 index 0dad80b05..000000000 --- a/firewood/src/api.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. -// See the file LICENSE.md for licensing terms. - -use std::io::Write; - -use crate::db::DbError; -use crate::merkle::MerkleError; -use crate::merkle::TrieHash; -use crate::v2::api::Proof; - -use async_trait::async_trait; - -pub type Nonce = u64; - -#[async_trait] -pub trait Db, N: Send> { - async fn get_revision(&self, root_hash: TrieHash) -> Option; -} - -#[async_trait] -pub trait Revision -where - Self: Sized, -{ - async fn kv_root_hash(&self) -> Result; - async fn kv_get + Send + Sync>(&self, key: K) -> Result, DbError>; - - async fn kv_dump(&self, writer: W) -> Result<(), DbError>; - async fn root_hash(&self) -> Result; - async fn dump(&self, writer: W) -> Result<(), DbError>; - - async fn prove + Send + Sync>(&self, key: K) -> Result, MerkleError>; - async fn verify_range_proof + Send + Sync>( - &self, - proof: Proof, - first_key: K, - last_key: K, - keys: Vec, - values: Vec, - ); -} diff --git a/firewood/src/lib.rs b/firewood/src/lib.rs index 24682eda7..9c7b09548 100644 --- a/firewood/src/lib.rs +++ b/firewood/src/lib.rs @@ -191,7 +191,6 @@ pub mod merkle_util; pub mod proof; pub mod storage; -pub mod api; pub(crate) mod config; pub mod nibbles;