chore: remove revm-primitives re-export (#12599)

This commit is contained in:
Matthias Seitz
2024-11-16 11:33:09 +01:00
committed by GitHub
parent d52c7194d1
commit d9ed07a367
28 changed files with 94 additions and 105 deletions

3
Cargo.lock generated
View File

@ -7463,7 +7463,6 @@ dependencies = [
"reth-transaction-pool",
"reth-trie",
"revm",
"revm-primitives",
"tracing",
]
@ -8001,6 +8000,7 @@ dependencies = [
"reth-tokio-util",
"reth-tracing",
"reth-transaction-pool",
"revm-primitives",
"secp256k1",
"tempfile",
"tokio",
@ -8482,6 +8482,7 @@ dependencies = [
"reth-errors",
"reth-primitives",
"reth-transaction-pool",
"revm-primitives",
"serde",
"thiserror 1.0.69",
"tokio",

View File

@ -27,14 +27,18 @@ use reth_node_api::{
};
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_primitives::{
revm_primitives::KzgSettings, BlobTransaction, PooledTransactionsElement, SealedBlock,
SealedBlockWithSenders, SealedHeader, Transaction, TransactionSigned,
BlobTransaction, PooledTransactionsElement, SealedBlock, SealedBlockWithSenders, SealedHeader,
Transaction, TransactionSigned,
};
use reth_provider::{
providers::BlockchainProvider, BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider,
ProviderFactory, StageCheckpointReader, StateProviderFactory,
};
use reth_revm::{cached::CachedReads, database::StateProviderDatabase, primitives::EnvKzgSettings};
use reth_revm::{
cached::CachedReads,
database::StateProviderDatabase,
primitives::{EnvKzgSettings, KzgSettings},
};
use reth_stages::StageId;
use reth_transaction_pool::{
blobstore::InMemoryBlobStore, BlobStore, EthPooledTransaction, PoolConfig, TransactionOrigin,

View File

@ -1388,7 +1388,6 @@ mod tests {
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_primitives::{
proofs::{calculate_receipt_root, calculate_transaction_root},
revm_primitives::AccountInfo,
Account, BlockBody, Transaction, TransactionSigned, TransactionSignedEcRecovered,
};
use reth_provider::{
@ -1398,6 +1397,7 @@ mod tests {
},
ProviderFactory,
};
use reth_revm::primitives::AccountInfo;
use reth_stages_api::StageCheckpoint;
use reth_trie::{root::state_root_unhashed, StateRoot};
use std::collections::HashMap;

View File

@ -201,10 +201,10 @@ mod tests {
use alloy_primitives::{B256, U256};
use reth_chainspec::{Chain, ChainSpec, MAINNET};
use reth_evm::execute::ProviderError;
use reth_primitives::revm_primitives::{BlockEnv, CfgEnv, SpecId};
use reth_revm::{
db::{CacheDB, EmptyDBTyped},
inspectors::NoOpInspector,
primitives::{BlockEnv, CfgEnv, SpecId},
JournaledState,
};
use revm_primitives::{CfgEnvWithHandlerCfg, EnvWithHandlerCfg, HandlerCfg};

View File

@ -30,7 +30,6 @@ reth-chainspec.workspace = true
# ethereum
revm.workspace = true
revm-primitives.workspace = true
# alloy
alloy-eips.workspace = true

View File

@ -26,7 +26,6 @@ use reth_payload_builder::{EthBuiltPayload, EthPayloadBuilderAttributes};
use reth_payload_primitives::{PayloadBuilderAttributes, PayloadBuilderError};
use reth_primitives::{
proofs::{self},
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
Block, BlockBody, EthereumHardforks, Receipt,
};
use reth_provider::{ChainSpecProvider, StateProviderFactory};
@ -38,10 +37,12 @@ use reth_transaction_pool::{
use reth_trie::HashedPostState;
use revm::{
db::{states::bundle_state::BundleRetention, State},
primitives::{EVMError, EnvWithHandlerCfg, InvalidTransaction, ResultAndState},
primitives::{
calc_excess_blob_gas, BlockEnv, CfgEnvWithHandlerCfg, EVMError, EnvWithHandlerCfg,
InvalidTransaction, ResultAndState, TxEnv,
},
DatabaseCommit,
};
use revm_primitives::{calc_excess_blob_gas, TxEnv};
use std::sync::Arc;
use tracing::{debug, trace, warn};

View File

@ -63,6 +63,7 @@ reth-transaction-pool.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types = { workspace = true, features = ["engine"] }
alloy-consensus.workspace = true
revm-primitives.workspace = true
## async
futures.workspace = true

View File

@ -2,13 +2,6 @@
#![allow(clippy::type_complexity, missing_debug_implementations)]
pub mod add_ons;
mod states;
pub use states::*;
use std::sync::Arc;
use crate::{
common::WithConfigs,
components::NodeComponentsBuilder,
@ -38,13 +31,19 @@ use reth_node_core::{
node_config::NodeConfig,
primitives::Head,
};
use reth_primitives::revm_primitives::EnvKzgSettings;
use reth_provider::{providers::BlockchainProvider, ChainSpecProvider, FullProvider};
use reth_tasks::TaskExecutor;
use reth_transaction_pool::{PoolConfig, TransactionPool};
use revm_primitives::EnvKzgSettings;
use secp256k1::SecretKey;
use std::sync::Arc;
use tracing::{info, trace, warn};
pub mod add_ons;
mod states;
pub use states::*;
/// The adapter type for a reth node with the builtin provider type
// Note: we need to hardcode this because custom components might depend on it in associated types.
pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<

View File

@ -17,12 +17,12 @@ use alloy_consensus::Header;
use alloy_primitives::{Address, U256};
use reth_evm::{ConfigureEvm, ConfigureEvmEnv, NextBlockEnvAttributes};
use reth_optimism_chainspec::{DecodeError, OpChainSpec};
use reth_primitives::{
revm_primitives::{AnalysisKind, CfgEnvWithHandlerCfg, TxEnv},
transaction::FillTxEnv,
Head, TransactionSigned,
use reth_primitives::{transaction::FillTxEnv, Head, TransactionSigned};
use reth_revm::{
inspector_handle_register,
primitives::{AnalysisKind, CfgEnvWithHandlerCfg, TxEnv},
Database, Evm, EvmBuilder, GetInspector,
};
use reth_revm::{inspector_handle_register, Database, Evm, EvmBuilder, GetInspector};
mod config;
pub use config::{revm_spec, revm_spec_by_timestamp_after_bedrock};
@ -211,14 +211,12 @@ mod tests {
AccountRevertInit, BundleStateInit, Chain, ExecutionOutcome, RevertsInit,
};
use reth_optimism_chainspec::BASE_MAINNET;
use reth_primitives::{
revm_primitives::{AccountInfo, BlockEnv, CfgEnv, SpecId},
Account, Log, Receipt, Receipts, SealedBlockWithSenders, TxType,
};
use reth_primitives::{Account, Log, Receipt, Receipts, SealedBlockWithSenders, TxType};
use reth_revm::{
db::{BundleState, CacheDB, EmptyDBTyped},
inspectors::NoOpInspector,
primitives::{AccountInfo, BlockEnv, CfgEnv, SpecId},
JournaledState,
};
use revm_primitives::{CfgEnvWithHandlerCfg, EnvWithHandlerCfg, HandlerCfg};

View File

@ -17,11 +17,7 @@ use reth_optimism_consensus::calculate_receipt_root_no_memo_optimism;
use reth_optimism_forks::OpHardforks;
use reth_payload_primitives::{PayloadBuilderAttributes, PayloadBuilderError};
use reth_payload_util::PayloadTransactions;
use reth_primitives::{
proofs,
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
Block, BlockBody, Receipt, SealedHeader, TransactionSigned, TxType,
};
use reth_primitives::{proofs, Block, BlockBody, Receipt, SealedHeader, TransactionSigned, TxType};
use reth_provider::{ProviderError, StateProofProvider, StateProviderFactory, StateRootProvider};
use reth_revm::database::StateProviderDatabase;
use reth_transaction_pool::{
@ -30,7 +26,10 @@ use reth_transaction_pool::{
use reth_trie::HashedPostState;
use revm::{
db::{states::bundle_state::BundleRetention, State},
primitives::{EVMError, EnvWithHandlerCfg, InvalidTransaction, ResultAndState, TxEnv},
primitives::{
BlockEnv, CfgEnvWithHandlerCfg, EVMError, EnvWithHandlerCfg, InvalidTransaction,
ResultAndState, TxEnv,
},
Database, DatabaseCommit,
};
use tracing::{debug, trace, warn};

View File

@ -3,10 +3,10 @@
use alloy_rpc_types_eth::{error::EthRpcErrorCode, BlockError};
use jsonrpsee_types::error::INTERNAL_ERROR_CODE;
use reth_optimism_evm::OpBlockExecutionError;
use reth_primitives::revm_primitives::{InvalidTransaction, OptimismInvalidTransaction};
use reth_rpc_eth_api::AsEthApiError;
use reth_rpc_eth_types::EthApiError;
use reth_rpc_server_types::result::{internal_rpc_err, rpc_err};
use revm::primitives::{InvalidTransaction, OptimismInvalidTransaction};
/// Optimism specific errors, that extend [`EthApiError`].
#[derive(Debug, thiserror::Error)]

View File

@ -1,15 +1,14 @@
use crate::{OpEthApi, OpEthApiError};
use alloy_consensus::Header;
use alloy_primitives::{Bytes, TxKind, U256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use reth_evm::ConfigureEvm;
use reth_primitives::revm_primitives::{BlockEnv, OptimismFields, TxEnv};
use reth_rpc_eth_api::{
helpers::{estimate::EstimateCall, Call, EthCall, LoadPendingBlock, LoadState, SpawnBlocking},
FromEthApiError, IntoEthApiError, RpcNodeCore,
};
use reth_rpc_eth_types::{revm_utils::CallFees, RpcInvalidTransactionError};
use crate::{OpEthApi, OpEthApiError};
use revm::primitives::{BlockEnv, OptimismFields, TxEnv};
impl<N> EthCall for OpEthApi<N>
where

View File

@ -1,12 +1,13 @@
//! Loads OP pending block for a RPC response.
use crate::OpEthApi;
use alloy_consensus::Header;
use alloy_eips::BlockNumberOrTag;
use alloy_primitives::{BlockNumber, B256};
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_evm::ConfigureEvm;
use reth_optimism_consensus::calculate_receipt_root_no_memo_optimism;
use reth_primitives::{revm_primitives::BlockEnv, Receipt, SealedBlockWithSenders};
use reth_primitives::{Receipt, SealedBlockWithSenders};
use reth_provider::{
BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ExecutionOutcome,
ReceiptProvider, StateProviderFactory,
@ -17,8 +18,7 @@ use reth_rpc_eth_api::{
};
use reth_rpc_eth_types::{EthApiError, PendingBlock};
use reth_transaction_pool::TransactionPool;
use crate::OpEthApi;
use revm::primitives::BlockEnv;
impl<N> LoadPendingBlock for OpEthApi<N>
where

View File

@ -25,6 +25,8 @@ alloy-primitives.workspace = true
alloy-rpc-types-engine = { workspace = true, features = ["serde"] }
op-alloy-rpc-types-engine = { workspace = true, optional = true }
revm-primitives.workspace = true
# async
async-trait.workspace = true
tokio = { workspace = true, features = ["sync"] }

View File

@ -2,8 +2,8 @@
use alloy_primitives::B256;
use reth_errors::{ProviderError, RethError};
use reth_primitives::revm_primitives::EVMError;
use reth_transaction_pool::BlobStoreError;
use revm_primitives::EVMError;
use tokio::sync::oneshot;
/// Possible error variants during payload building.

View File

@ -53,7 +53,6 @@ pub use transaction::{
// Re-exports
pub use reth_ethereum_forks::*;
pub use revm_primitives::{self, JumpTable};
#[cfg(any(test, feature = "arbitrary"))]
pub use arbitrary;

View File

@ -545,8 +545,7 @@ impl Encodable for ReceiptWithBloomEncoder<'_> {
#[cfg(test)]
mod tests {
use super::*;
use crate::revm_primitives::Bytes;
use alloy_primitives::{address, b256, bytes, hex_literal::hex};
use alloy_primitives::{address, b256, bytes, hex_literal::hex, Bytes};
use reth_codecs::Compact;
#[test]

View File

@ -4,7 +4,7 @@ use alloy_primitives::{
Address, B256, U256,
};
use core::cell::RefCell;
use reth_primitives::revm_primitives::{
use revm::primitives::{
db::{Database, DatabaseRef},
AccountInfo, Bytecode,
};

View File

@ -18,14 +18,16 @@ use alloy_rpc_types_eth::{
use futures::Future;
use reth_chainspec::EthChainSpec;
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
use reth_primitives::{
revm_primitives::{
use reth_primitives::TransactionSigned;
use reth_provider::{BlockIdReader, ChainSpecProvider, HeaderProvider};
use reth_revm::{
database::StateProviderDatabase,
db::CacheDB,
primitives::{
BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ExecutionResult, ResultAndState, TxEnv,
},
TransactionSigned,
DatabaseRef,
};
use reth_provider::{BlockIdReader, ChainSpecProvider, HeaderProvider};
use reth_revm::{database::StateProviderDatabase, db::CacheDB, DatabaseRef};
use reth_rpc_eth_types::{
cache::db::{StateCacheDbRefMutWrapper, StateProviderTraitObjWrapper},
error::ensure_success,

View File

@ -6,11 +6,12 @@ use alloy_primitives::U256;
use alloy_rpc_types_eth::{state::StateOverride, transaction::TransactionRequest, BlockId};
use futures::Future;
use reth_chainspec::{EthChainSpec, MIN_TRANSACTION_GAS};
use reth_primitives::revm_primitives::{
BlockEnv, CfgEnvWithHandlerCfg, ExecutionResult, HaltReason, TransactTo,
};
use reth_provider::{ChainSpecProvider, StateProvider};
use reth_revm::{database::StateProviderDatabase, db::CacheDB};
use reth_revm::{
database::StateProviderDatabase,
db::CacheDB,
primitives::{BlockEnv, CfgEnvWithHandlerCfg, ExecutionResult, HaltReason, TransactTo},
};
use reth_rpc_eth_types::{
revm_utils::{apply_state_overrides, caller_gas_allowance},
EthApiError, RevertError, RpcInvalidTransactionError,

View File

@ -1,10 +1,8 @@
//! Loads a pending block from database. Helper trait for `eth_` block, transaction, call and trace
//! RPC methods.
use std::time::{Duration, Instant};
use super::SpawnBlocking;
use crate::{EthApiTypes, FromEthApiError, FromEvmError, RpcNodeCore};
use alloy_consensus::{Header, EMPTY_OMMER_ROOT_HASH};
use alloy_eips::{
eip4844::MAX_DATA_GAS_PER_BLOCK, eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE,
@ -19,27 +17,28 @@ use reth_evm::{
};
use reth_execution_types::ExecutionOutcome;
use reth_primitives::{
proofs::calculate_transaction_root,
revm_primitives::{
BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction,
ResultAndState, SpecId,
},
Block, BlockBody, Receipt, SealedBlockWithSenders, SealedHeader, TransactionSignedEcRecovered,
proofs::calculate_transaction_root, Block, BlockBody, Receipt, SealedBlockWithSenders,
SealedHeader, TransactionSignedEcRecovered,
};
use reth_provider::{
BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderError,
ReceiptProvider, StateProviderFactory,
};
use reth_revm::database::StateProviderDatabase;
use reth_revm::{
database::StateProviderDatabase,
primitives::{
BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction,
ResultAndState, SpecId,
},
};
use reth_rpc_eth_types::{EthApiError, PendingBlock, PendingBlockEnv, PendingBlockEnvOrigin};
use reth_transaction_pool::{BestTransactionsAttributes, TransactionPool};
use reth_trie::HashedPostState;
use revm::{db::states::bundle_state::BundleRetention, DatabaseCommit, State};
use std::time::{Duration, Instant};
use tokio::sync::Mutex;
use tracing::debug;
use super::SpawnBlocking;
/// Loads a pending block from database.
///
/// Behaviour shared by several `eth_` RPC methods, not exclusive to `eth_` blocks RPC methods.

View File

@ -10,7 +10,6 @@ use alloy_primitives::{Address, Bytes, U256};
use alloy_rpc_types_eth::{error::EthRpcErrorCode, request::TransactionInputError, BlockError};
use alloy_sol_types::decode_revert_reason;
use reth_errors::RethError;
use reth_primitives::revm_primitives::InvalidHeader;
use reth_rpc_server_types::result::{
block_id_to_str, internal_rpc_err, invalid_params_rpc_err, rpc_err, rpc_error_with_code,
};
@ -20,6 +19,7 @@ use reth_transaction_pool::error::{
};
use revm::primitives::{EVMError, ExecutionResult, HaltReason, InvalidTransaction, OutOfGasError};
use revm_inspectors::tracing::MuxError;
use revm_primitives::InvalidHeader;
use tracing::error;
/// A trait to convert an error to an RPC error.

View File

@ -1,31 +1,26 @@
//! `Eth` bundle implementation and helpers.
use std::sync::Arc;
use alloy_primitives::{Keccak256, U256};
use alloy_rpc_types_mev::{EthCallBundle, EthCallBundleResponse, EthCallBundleTransactionResult};
use jsonrpsee::core::RpcResult;
use reth_chainspec::EthChainSpec;
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
use reth_primitives::{
revm_primitives::db::{DatabaseCommit, DatabaseRef},
PooledTransactionsElement,
};
use reth_primitives::PooledTransactionsElement;
use reth_provider::{ChainSpecProvider, HeaderProvider};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_eth_api::{FromEthApiError, FromEvmError, RpcNodeCore};
use reth_rpc_eth_api::{
helpers::{Call, EthTransactions, LoadPendingBlock},
EthCallBundleApiServer, FromEthApiError, FromEvmError, RpcNodeCore,
};
use reth_rpc_eth_types::{utils::recover_raw_transaction, EthApiError, RpcInvalidTransactionError};
use reth_tasks::pool::BlockingTaskGuard;
use revm::{
db::CacheDB,
db::{CacheDB, DatabaseCommit, DatabaseRef},
primitives::{ResultAndState, TxEnv},
};
use revm_primitives::{EnvKzgSettings, EnvWithHandlerCfg, SpecId, MAX_BLOB_GAS_PER_BLOCK};
use std::sync::Arc;
use reth_provider::{ChainSpecProvider, HeaderProvider};
use reth_rpc_eth_api::{
helpers::{Call, EthTransactions, LoadPendingBlock},
EthCallBundleApiServer,
};
use reth_rpc_eth_types::{utils::recover_raw_transaction, EthApiError, RpcInvalidTransactionError};
/// `Eth` bundle implementation.
pub struct EthBundle<Eth> {
/// All nested fields bundled together.

View File

@ -10,10 +10,7 @@ use alloy_rpc_types_mev::{
use jsonrpsee::core::RpcResult;
use reth_chainspec::EthChainSpec;
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
use reth_primitives::{
revm_primitives::db::{DatabaseCommit, DatabaseRef},
TransactionSigned,
};
use reth_primitives::TransactionSigned;
use reth_provider::{ChainSpecProvider, HeaderProvider};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::MevSimApiServer;
@ -26,6 +23,7 @@ use reth_tasks::pool::BlockingTaskGuard;
use revm::{
db::CacheDB,
primitives::{Address, EnvWithHandlerCfg, ResultAndState, SpecId, TxEnv},
DatabaseCommit, DatabaseRef,
};
use std::{sync::Arc, time::Duration};
use tracing::info;

View File

@ -265,8 +265,7 @@ mod tests {
use alloy_primitives::{hex, map::HashMap, Address, U256};
use reth_db::test_utils::create_test_rw_db;
use reth_db_api::database::Database;
use reth_primitives::revm_primitives::AccountInfo;
use revm::db::BundleState;
use revm::{db::BundleState, primitives::AccountInfo};
#[test]
fn from_bundle_state_with_rayon() {

View File

@ -15,7 +15,10 @@ use reth::{
providers::ProviderError,
revm::{
interpreter::Host,
primitives::{Env, TransactTo, TxEnv},
primitives::{
address, Address, BlockEnv, Bytes, CfgEnvWithHandlerCfg, Env, EnvWithHandlerCfg,
TransactTo, TxEnv, U256,
},
Database, DatabaseCommit, Evm, State,
},
};
@ -26,12 +29,7 @@ use reth_evm::execute::{
};
use reth_evm_ethereum::EthEvmConfig;
use reth_node_ethereum::{node::EthereumAddOns, BasicBlockExecutorProvider, EthereumNode};
use reth_primitives::{
revm_primitives::{
address, Address, BlockEnv, Bytes, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, U256,
},
BlockWithSenders, Receipt,
};
use reth_primitives::{BlockWithSenders, Receipt};
use std::{fmt::Display, sync::Arc};
pub const SYSTEM_ADDRESS: Address = address!("fffffffffffffffffffffffffffffffffffffffe");

View File

@ -11,12 +11,11 @@ use reth::{
BuilderContext, NodeBuilder,
},
payload::{EthBuiltPayload, EthPayloadBuilderAttributes},
primitives::revm_primitives::{Env, PrecompileResult},
revm::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileOutput, PrecompileSpecId},
primitives::BlockEnv,
primitives::{BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
ContextPrecompiles, Database, Evm, EvmBuilder, GetInspector,
},
rpc::types::engine::PayloadAttributes,
@ -34,10 +33,7 @@ use reth_node_ethereum::{
node::{EthereumAddOns, EthereumPayloadBuilder},
BasicBlockExecutorProvider, EthExecutionStrategyFactory, EthereumNode,
};
use reth_primitives::{
revm_primitives::{CfgEnvWithHandlerCfg, TxEnv},
TransactionSigned,
};
use reth_primitives::TransactionSigned;
use reth_tracing::{RethTracer, Tracer};
use std::{convert::Infallible, sync::Arc};

View File

@ -9,11 +9,14 @@ use parking_lot::RwLock;
use reth::{
api::NextBlockEnvAttributes,
builder::{components::ExecutorBuilder, BuilderContext, NodeBuilder},
primitives::revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
revm::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileSpecId},
primitives::{
BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, SpecId, StatefulPrecompileMut,
TxEnv,
},
ContextPrecompile, ContextPrecompiles, Database, Evm, EvmBuilder, GetInspector,
},
tasks::TaskManager,
@ -25,10 +28,7 @@ use reth_node_ethereum::{
node::EthereumAddOns, BasicBlockExecutorProvider, EthEvmConfig, EthExecutionStrategyFactory,
EthereumNode,
};
use reth_primitives::{
revm_primitives::{SpecId, StatefulPrecompileMut},
TransactionSigned,
};
use reth_primitives::TransactionSigned;
use reth_tracing::{RethTracer, Tracer};
use schnellru::{ByLength, LruMap};
use std::{collections::HashMap, convert::Infallible, sync::Arc};