From 0343f22e3842fcdb4ddb58a2165d3d268d87e0ac Mon Sep 17 00:00:00 2001 From: Vladimir Petrzhikovskii Date: Wed, 21 Feb 2024 17:09:32 +0100 Subject: [PATCH] refactor(storage): remove unused methods --- Cargo.lock | 10 +- Cargo.toml | 2 +- block-util/Cargo.toml | 5 +- block-util/src/block.rs | 6 +- block-util/src/block_proof.rs | 138 +-------------- block-util/src/conversions.rs | 11 -- block-util/src/extensions.rs | 49 ------ block-util/src/lib.rs | 10 -- block-util/src/operations_pool.rs | 160 ------------------ block-util/src/shard_state.rs | 2 +- block-util/src/shard_states_cache.rs | 2 +- block-util/src/top_blocks.rs | 3 +- constansts/Cargo.toml | 11 -- constansts/src/archive.rs | 1 - constansts/src/lib.rs | 1 - storage/Cargo.toml | 2 +- storage/src/block_handle_storage/mod.rs | 7 +- storage/src/db/tables.rs | 4 +- storage/src/models/block_handle.rs | 7 +- storage/src/models/block_meta.rs | 6 - .../src/shard_state_storage/cell_storage.rs | 3 +- .../src/shard_state_storage/cell_writer.rs | 2 +- .../replace_transaction.rs | 4 +- util/src/lib.rs | 1 + 24 files changed, 26 insertions(+), 421 deletions(-) delete mode 100644 block-util/src/conversions.rs delete mode 100644 block-util/src/extensions.rs delete mode 100644 block-util/src/operations_pool.rs delete mode 100644 constansts/Cargo.toml delete mode 100644 constansts/src/archive.rs delete mode 100644 constansts/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index aab98c37d..6adf491dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2011,10 +2011,8 @@ dependencies = [ name = "tycho-block-util" version = "0.1.0" dependencies = [ - "ahash", "anyhow", "bytes", - "dashmap", "everscale-types", "hex", "libc", @@ -2024,8 +2022,8 @@ dependencies = [ "sha2", "smallvec", "thiserror", - "tokio", "tracing", + "tycho-util", ] [[package]] @@ -2046,10 +2044,6 @@ dependencies = [ "weedb", ] -[[package]] -name = "tycho-constansts" -version = "0.1.0" - [[package]] name = "tycho-core" version = "0.0.1" @@ -2127,7 +2121,7 @@ dependencies = [ "tracing", "triomphe", "tycho-block-util", - "tycho-constansts", + "tycho-util", "weedb", ] diff --git a/Cargo.toml b/Cargo.toml index 98ede2eee..229343dd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["consensus", "constansts", "core", "network", "util", "storage", "block-util"] +members = ["consensus", "core", "network", "util", "storage", "block-util"] [profile.release] debug = true diff --git a/block-util/Cargo.toml b/block-util/Cargo.toml index 72e9eba5c..92572529f 100644 --- a/block-util/Cargo.toml +++ b/block-util/Cargo.toml @@ -6,10 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ahash = "0.8.8" anyhow = "1.0.79" bytes = "1.5.0" -dashmap = "5.5.3" everscale-types = "0.1.0-rc.6" hex = "0.4.3" libc = "0.2.153" @@ -19,8 +17,9 @@ serde = { version = "1.0.196", features = ["derive"] } sha2 = "0.10.8" smallvec = "1.13.1" thiserror = "1.0.57" -tokio = { version = "1.36.0", features = ["sync", "time"] } tracing = "0.1.40" +tycho-util = { path = "../util" } + [lints] workspace = true diff --git a/block-util/src/block.rs b/block-util/src/block.rs index 1043adc5b..9951ec487 100644 --- a/block-util/src/block.rs +++ b/block-util/src/block.rs @@ -1,12 +1,10 @@ -// This file is a modified copy of the file from https://github.com/tonlabs/ton-labs-node -// -// Changes: -// - replaced old `failure` crate with `anyhow` use anyhow::{anyhow, Context, Result}; use everscale_types::models::*; use everscale_types::prelude::*; use sha2::Digest; +use tycho_util::FastHashMap; + use crate::*; pub type BlockStuffAug = WithArchiveData; diff --git a/block-util/src/block_proof.rs b/block-util/src/block_proof.rs index aa22cbc41..2fcbadf34 100644 --- a/block-util/src/block_proof.rs +++ b/block-util/src/block_proof.rs @@ -1,7 +1,3 @@ -// This file is a modified copy of the file from https://github.com/tonlabs/ton-labs-node -// -// Changes: -// - replaced old `failure` crate with `anyhow` use anyhow::{anyhow, Context, Result}; use everscale_types::merkle::*; use everscale_types::models::*; @@ -451,8 +447,6 @@ pub fn check_with_master_state( pub struct ValidatorSubsetInfo { pub validators: Vec, pub short_hash: u32, - #[cfg(feature = "venom")] - pub collator_range: Option, } impl ValidatorSubsetInfo { @@ -469,136 +463,6 @@ impl ValidatorSubsetInfo { Ok(ValidatorSubsetInfo { validators, short_hash, - #[cfg(feature = "venom")] - collator_range: None, }) } - - #[cfg(feature = "venom")] - pub fn compute_for_workchain_venom( - validator_set: &ton_block::ValidatorSet, - block_id: &ton_block::BlockIdExt, - shard_hashes: &ton_block::ShardHashes, - cc_seqno: u32, - ) -> Result { - let possible_validators = - compute_possible_collator_ranges(shard_hashes, &block_id.shard_id, block_id.seq_no)?; - get_validator_descrs_by_collator_range(validator_set, cc_seqno, &possible_validators) - } - - // pub fn compute_validator_set(&self, cc_seqno: u32) -> Result { - // ton_block::ValidatorSet::with_cc_seqno(0, 0, 0, cc_seqno, self.validators.clone()) - // } -} - -#[cfg(feature = "venom")] -pub fn compute_possible_collator_ranges( - shards: &ton_block::ShardHashes, - shard_id: &ton_block::ShardIdent, - block_seqno: u32, -) -> Result> { - let mut possible_validators: Vec = Vec::new(); - - shards.iterate_shards_for_workchain(shard_id.workchain_id(), |ident, descr| { - let Some(collators) = descr.collators else { - anyhow::bail!("{} has no collator info", ident); - }; - - if let Some(rng) = compute_collator_range(&collators, &ident, shard_id, block_seqno)? { - if !possible_validators.contains(&rng) { - possible_validators.push(rng); - } - } - Ok(true) - })?; - - Ok(possible_validators) -} - -#[cfg(feature = "venom")] -fn get_validator_descrs_by_collator_range( - vset: &ton_block::ValidatorSet, - cc_seqno: u32, - possible_validators: &[ton_block::CollatorRange], -) -> Result { - let Some(range) = possible_validators.first() else { - anyhow::bail!("No possible validators found"); - }; - - anyhow::ensure!( - possible_validators.len() == 1, - "Too many validators for collating block", - ); - - let Some(validator) = vset.list().get(range.collator as usize) else { - anyhow::bail!( - "No validator no {} in validator set {vset:?}", - range.collator - ) - }; - - let mut subset = Vec::new(); - subset.push(validator.clone()); - - let short_hash = ton_block::ValidatorSet::calc_subset_hash_short(subset.as_slice(), cc_seqno)?; - Ok(ValidatorSubsetInfo { - validators: subset, - short_hash, - collator_range: Some(range.clone()), - }) -} - -#[cfg(feature = "venom")] -fn compute_collator_range( - collators: &ton_block::ShardCollators, - current_shard: &ton_block::ShardIdent, - block_shard: &ton_block::ShardIdent, - block_seqno: u32, -) -> Result> { - // Current shard - let mut shards_to_check = Vec::from([(*current_shard, collators.current.clone())]); - // The shard was same or will be same - if collators.prev2.is_none() { - shards_to_check.push((*current_shard, collators.prev.clone())); - } - if collators.next2.is_none() { - shards_to_check.push((*current_shard, collators.next.clone())); - } - // The shard was split or will be merged - if !current_shard.is_full() { - if collators.prev2.is_none() { - shards_to_check.push((current_shard.merge()?, collators.prev.clone())); - } - if collators.next2.is_none() { - shards_to_check.push((current_shard.merge()?, collators.next.clone())); - } - } - // The shard was merged or will be split - if current_shard.can_split() { - let (l, r) = current_shard.split()?; - if let Some(prev2) = &collators.prev2 { - shards_to_check.push((l, collators.prev.clone())); - shards_to_check.push((r, prev2.clone())); - } - if let Some(next2) = &collators.next2 { - shards_to_check.push((l, collators.next.clone())); - shards_to_check.push((r, next2.clone())); - } - } - - shards_to_check.retain(|(id, range)| { - id == block_shard && range.start <= block_seqno && block_seqno <= range.finish - }); - - if let Some((id, rng)) = shards_to_check.first() { - anyhow::ensure!( - shards_to_check.len() == 1, - "Impossilbe state: shard {}, block {} corresponds to two different ranges: ({},{:?}) and {:?}", - current_shard, block_seqno, id, rng, shards_to_check.get(1) - ); - - Ok(Some((*rng).clone())) - } else { - Ok(None) - } -} +} \ No newline at end of file diff --git a/block-util/src/conversions.rs b/block-util/src/conversions.rs deleted file mode 100644 index 5ac84226b..000000000 --- a/block-util/src/conversions.rs +++ /dev/null @@ -1,11 +0,0 @@ -use everscale_types::cell::HashBytes; -use sha2::Sha256; -use sha2::Digest; - -pub fn compute_node_id_short(public_key: HashBytes) -> HashBytes { - let mut hasher = Sha256::new(); - let magic = [0xc6u8, 0xb4, 0x13, 0x48]; // magic 0x4813b4c6 from original node's code - hasher.update(magic); - hasher.update(public_key.as_slice()); - HashBytes(hasher.finalize().into()) -} \ No newline at end of file diff --git a/block-util/src/extensions.rs b/block-util/src/extensions.rs deleted file mode 100644 index 06de678b3..000000000 --- a/block-util/src/extensions.rs +++ /dev/null @@ -1,49 +0,0 @@ -use anyhow::{anyhow, Result}; -use everscale_types::models::{Block, BlockId, CatchainConfig, ShardStateUnsplit, ValidatorSet}; - -pub trait BlockIdExtension { - fn is_masterchain(&self) -> bool; -} - -impl BlockIdExtension for BlockId { - fn is_masterchain(&self) -> bool { - self.shard.workchain() == -1 - } -} - - -pub trait ValidatorExt { - fn get_cur_validator_set_and_cc_conf(&self) -> Result<(ValidatorSet, CatchainConfig)>; -} - -impl ValidatorExt for Block { - fn get_cur_validator_set_and_cc_conf(&self) -> Result<(ValidatorSet, CatchainConfig)> { - let config = self.load_extra()?.load_custom()?.ok_or_else(|| { - anyhow!( - "Block doesn't contain `custom` field" - ) - })?.config.ok_or_else(|| { - anyhow!( - "Block doesn't contain `config` field" - ) - })?; - - let validators = config.get_current_validator_set()?; - let cc_config = config.get_catchain_config()?; - Ok((validators, cc_config)) - } -} - -impl ValidatorExt for ShardStateUnsplit { - fn get_cur_validator_set_and_cc_conf(&self) -> Result<(ValidatorSet, CatchainConfig)> { - let config = self.load_custom()?.ok_or_else(|| { - anyhow!( - "State doesn't contain `custom` field" - ) - })?.config; - - let validators = config.get_current_validator_set()?; - let cc_config = config.get_catchain_config()?; - Ok((validators, cc_config)) - } -} diff --git a/block-util/src/lib.rs b/block-util/src/lib.rs index 8ec993769..18a80ff17 100644 --- a/block-util/src/lib.rs +++ b/block-util/src/lib.rs @@ -1,10 +1,7 @@ -use std::collections::{HashMap, HashSet}; - pub use archive_package::*; pub use block::*; pub use block_proof::*; pub use mapped_file::*; -pub use operations_pool::*; pub use package_entry_id::*; pub use progress_bar::*; pub use shard_state::*; @@ -17,7 +14,6 @@ mod archive_package; mod block; mod block_proof; mod mapped_file; -mod operations_pool; mod package_entry_id; mod progress_bar; mod shard_state; @@ -26,12 +22,6 @@ mod stored_value; mod top_blocks; mod with_archive_data; -pub type FastHashSet = HashSet; -pub type FastHashMap = HashMap; -pub type FastDashSet = dashmap::DashSet; -pub type FastDashMap = dashmap::DashMap; -pub type FastHasherState = ahash::RandomState; - #[derive(Default, Debug, Clone, Copy, serde::Serialize, serde::Deserialize)] pub struct CacheStats { pub hits: u64, diff --git a/block-util/src/operations_pool.rs b/block-util/src/operations_pool.rs deleted file mode 100644 index e57bea62a..000000000 --- a/block-util/src/operations_pool.rs +++ /dev/null @@ -1,160 +0,0 @@ -use std::future::Future; -use std::hash::Hash; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::sync::Arc; -use std::time::Duration; - -use anyhow::Result; -use tokio::sync::watch; - -use crate::FastDashMap; - -pub struct OperationsPool { - name: &'static str, - operations: FastDashMap>>, -} - -impl OperationsPool -where - K: Eq + Hash + Clone + std::fmt::Display, - R: Clone, -{ - pub fn new(name: &'static str) -> Self { - Self { - name, - operations: FastDashMap::default(), - } - } - - pub fn is_empty(&self) -> bool { - self.operations.is_empty() - } - - pub fn len(&self) -> usize { - self.operations.len() - } - - pub async fn do_or_wait( - &self, - id: &K, - timeout_ms: Option, - operation: O, - ) -> Result> - where - O: Future>, - { - use dashmap::mapref::entry::Entry; - - let awaiter = match self.operations.entry(id.clone()) { - Entry::Occupied(entry) => { - let operation = entry.get().clone(); - let started = operation.stared.swap(true, Ordering::SeqCst); - drop(entry); - - if started { - return self - .wait_operation(id, timeout_ms, &operation, || Ok(false)) - .await; - } - - operation - } - Entry::Vacant(entry) => entry.insert(Operation::new(true)).clone(), - }; - - // tracing::trace!("{}: started operation {}", self.name, id); - let result = operation.await; - // tracing::trace!("{}: done operation {}", self.name, id); - - self.operations.remove(id); - - let _ = awaiter.result_tx.send(Some(match &result { - Ok(result) => Ok(result.clone()), - Err(e) => Err(e.to_string()), - })); - - Some(result).transpose() - } - - pub async fn wait( - &self, - id: &K, - timeout_ms: Option, - check_complete: F, - ) -> Result> - where - F: Fn() -> Result, - { - let operation = self - .operations - .entry(id.clone()) - .or_insert_with(|| Operation::new(false)) - .clone(); - - self.wait_operation(id, timeout_ms, &operation, check_complete) - .await - } - - async fn wait_operation( - &self, - id: &K, - timeout_ms: Option, - operation: &Operation, - check_complete: F, - ) -> Result> - where - F: Fn() -> Result, - { - let mut result_rx = operation.result_rx.clone(); - - loop { - // tracing::trace!("{}: waiting operation {}", self.name, id); - - let possible_result = - tokio::time::timeout(Duration::from_millis(1), result_rx.changed()).await; - - let result = match (possible_result, timeout_ms) { - (Ok(result), _) => result, - (Err(_), _) if check_complete()? => return Ok(None), - (Err(_), Some(timeout_ms)) => { - tokio::time::timeout(Duration::from_millis(timeout_ms), result_rx.changed()) - .await - .map_err(|_| { - anyhow::Error::msg(format!("{}: operation timeout {}", self.name, id)) - })? - } - _ => result_rx.changed().await, - }; - - if result.is_err() { - return Ok(None); - } - - let result = match result_rx.borrow().as_ref() { - Some(Ok(result)) => Ok(Some(result.clone())), - Some(Err(e)) => Err(anyhow::Error::msg(e.to_string())), - None => continue, - }; - - // tracing::trace!("{}: waited for operation {}", self.name, id); - break result; - } - } -} - -struct Operation { - stared: AtomicBool, - result_tx: watch::Sender>>, - result_rx: watch::Receiver>>, -} - -impl Operation { - fn new(stared: bool) -> Arc { - let (result_tx, result_rx) = watch::channel(None); - Arc::new(Self { - stared: AtomicBool::new(stared), - result_tx, - result_rx, - }) - } -} diff --git a/block-util/src/shard_state.rs b/block-util/src/shard_state.rs index 0c5841535..d091a973a 100644 --- a/block-util/src/shard_state.rs +++ b/block-util/src/shard_state.rs @@ -7,7 +7,7 @@ use everscale_types::models::*; use everscale_types::prelude::*; use sha2::Digest; -use super::FastHashMap; +use tycho_util::FastHashMap; /// Full persistent state block id (relative to the masterchain) pub struct FullStateId { diff --git a/block-util/src/shard_states_cache.rs b/block-util/src/shard_states_cache.rs index 7d2966d56..4d2b4952a 100644 --- a/block-util/src/shard_states_cache.rs +++ b/block-util/src/shard_states_cache.rs @@ -6,7 +6,7 @@ use everscale_types::models::*; use super::shard_state::ShardStateStuff; use super::top_blocks::*; -use super::FastDashMap; +use tycho_util::FastDashMap; /// LRU cache for shard states /// diff --git a/block-util/src/top_blocks.rs b/block-util/src/top_blocks.rs index 61534e2c5..fcc422487 100644 --- a/block-util/src/top_blocks.rs +++ b/block-util/src/top_blocks.rs @@ -2,7 +2,8 @@ use anyhow::Result; use bytes::Buf; use everscale_types::models::*; -use super::{BlockStuff, FastHashMap, FastHasherState, StoredValue, StoredValueBuffer}; +use super::{BlockStuff, StoredValue, StoredValueBuffer}; +use tycho_util::{FastHashMap, FastHasherState}; /// Stores last blocks for each workchain and shard #[derive(Debug, Clone)] diff --git a/constansts/Cargo.toml b/constansts/Cargo.toml deleted file mode 100644 index 221b1e130..000000000 --- a/constansts/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "tycho-constansts" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] - -[lints] -workspace = true diff --git a/constansts/src/archive.rs b/constansts/src/archive.rs deleted file mode 100644 index 5d6d18af6..000000000 --- a/constansts/src/archive.rs +++ /dev/null @@ -1 +0,0 @@ -pub const ARCHIVE_PREFIX: [u8; 4] = u32::to_le_bytes(0xae8fdd01); diff --git a/constansts/src/lib.rs b/constansts/src/lib.rs deleted file mode 100644 index 4193e3e11..000000000 --- a/constansts/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod archive; diff --git a/storage/Cargo.toml b/storage/Cargo.toml index f2437e0bb..cff61308b 100644 --- a/storage/Cargo.toml +++ b/storage/Cargo.toml @@ -19,7 +19,7 @@ smallvec = "1.13.1" sha2 = "0.10.8" tycho-block-util = { path = "../block-util" } -tycho-constansts = { path = "../constansts" } +tycho-util = { path = "../util" } dashmap = "5.5.3" bumpalo = "3.14.0" diff --git a/storage/src/block_handle_storage/mod.rs b/storage/src/block_handle_storage/mod.rs index cd6dd1eb8..2ea5d9928 100644 --- a/storage/src/block_handle_storage/mod.rs +++ b/storage/src/block_handle_storage/mod.rs @@ -1,8 +1,3 @@ -// This file is a modified copy of the file from https://github.com/tonlabs/ton-labs-node -// -// Changes: -// - replaced old `failure` crate with `anyhow` -// - simplified storing use std::sync::{Arc, Weak}; use anyhow::Result; @@ -10,7 +5,9 @@ use everscale_types::models::*; use super::models::*; use crate::db::*; + use tycho_block_util::*; +use tycho_util::FastDashMap; pub struct BlockHandleStorage { db: Arc, diff --git a/storage/src/db/tables.rs b/storage/src/db/tables.rs index 722924a4d..9d62f5878 100644 --- a/storage/src/db/tables.rs +++ b/storage/src/db/tables.rs @@ -7,6 +7,9 @@ use weedb::{rocksdb, Caches, ColumnFamily}; use super::refcount; +pub const ARCHIVE_PREFIX: [u8; 4] = u32::to_le_bytes(0xae8fdd01); + + /// Stores prepared archives /// - Key: `u32 (BE)` (archive id) /// - Value: `Vec` (archive data) @@ -226,7 +229,6 @@ fn archive_data_merge( current_value: Option<&[u8]>, operands: &MergeOperands, ) -> Option> { - use tycho_constansts::archive::ARCHIVE_PREFIX; let total_len: usize = operands.iter().map(|data| data.len()).sum(); let mut result = Vec::with_capacity(ARCHIVE_PREFIX.len() + total_len); diff --git a/storage/src/models/block_handle.rs b/storage/src/models/block_handle.rs index a4114b722..254584e40 100644 --- a/storage/src/models/block_handle.rs +++ b/storage/src/models/block_handle.rs @@ -1,8 +1,3 @@ -// This file is a modified copy of the file from https://github.com/tonlabs/ton-labs-node -// -// Changes: -// - replaced old `failure` crate with `anyhow` -// - moved all flags to meta use std::sync::{Arc, Weak}; use anyhow::Result; @@ -10,7 +5,7 @@ use everscale_types::models::*; use tokio::sync::RwLock; use super::BlockMeta; -use tycho_block_util::FastDashMap; +use tycho_util::FastDashMap; pub struct BlockHandle { id: BlockId, diff --git a/storage/src/models/block_meta.rs b/storage/src/models/block_meta.rs index 1e5e2804f..90a8ea33f 100644 --- a/storage/src/models/block_meta.rs +++ b/storage/src/models/block_meta.rs @@ -1,9 +1,3 @@ -// This file is a modified copy of the file from https://github.com/tonlabs/ton-labs-node -// -// Changes: -// - replaced old `failure` crate with `anyhow` -// - moved all flags here from block handle -// - removed temporary unused flags use std::sync::atomic::{AtomicU64, Ordering}; use anyhow::Result; diff --git a/storage/src/shard_state_storage/cell_storage.rs b/storage/src/shard_state_storage/cell_storage.rs index 45faa0782..8b024f5f6 100644 --- a/storage/src/shard_state_storage/cell_storage.rs +++ b/storage/src/shard_state_storage/cell_storage.rs @@ -11,7 +11,8 @@ use quick_cache::sync::{Cache, DefaultLifecycle}; use triomphe::ThinArc; use crate::db::*; -use tycho_block_util::{CacheStats, FastDashMap, FastHashMap, FastHasherState}; +use tycho_block_util::{CacheStats}; +use tycho_util::{FastDashMap, FastHashMap, FastHasherState}; pub struct CellStorage { db: Arc, diff --git a/storage/src/shard_state_storage/cell_writer.rs b/storage/src/shard_state_storage/cell_writer.rs index 261e09131..e04eeb60a 100644 --- a/storage/src/shard_state_storage/cell_writer.rs +++ b/storage/src/shard_state_storage/cell_writer.rs @@ -8,7 +8,7 @@ use anyhow::{Context, Result}; use smallvec::SmallVec; use crate::db::Db; -use tycho_block_util::FastHashMap; +use tycho_util::FastHashMap; pub struct CellWriter<'a> { db: &'a Db, diff --git a/storage/src/shard_state_storage/replace_transaction.rs b/storage/src/shard_state_storage/replace_transaction.rs index 54260369e..b2e0994ac 100644 --- a/storage/src/shard_state_storage/replace_transaction.rs +++ b/storage/src/shard_state_storage/replace_transaction.rs @@ -9,7 +9,9 @@ use super::entries_buffer::*; use super::files_context::*; use super::shard_state_reader::*; use crate::db::*; + use tycho_block_util::*; +use tycho_util::FastHashMap; pub struct ShardStateReplaceTransaction<'a> { db: &'a Db, @@ -231,7 +233,7 @@ impl<'a> ShardStateReplaceTransaction<'a> { fn finalize_cell( &self, - ctx: &mut FinalizationContext, + ctx: &mut FinalizationContext<'_>, cell_index: u32, mut cell: RawCell<'_>, ) -> Result<()> { diff --git a/util/src/lib.rs b/util/src/lib.rs index 7106dbf0d..093f30a21 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -9,6 +9,7 @@ pub type FastDashMap = dashmap::DashMap; pub type FastDashSet = dashmap::DashSet; pub type FastHashMap = HashMap; pub type FastHashSet = HashSet; +pub type FastHasherState = ahash::RandomState; /// # Example ///