From f77eeaaabf79faae4ece981fa4af34d2b94d953d Mon Sep 17 00:00:00 2001 From: phoenix <51927076+phoenix-o@users.noreply.github.com> Date: Mon, 23 Dec 2024 12:19:53 -0500 Subject: [PATCH] [kv store] json rpc: remove leftover call sites to old events API --- crates/sui-core/src/authority.rs | 28 ++--- crates/sui-json-rpc/src/authority_state.rs | 5 +- crates/sui-json-rpc/src/coin_api.rs | 5 +- crates/sui-storage/src/bin/http_kv_tool.rs | 17 +-- .../sui-storage/src/http_key_value_store.rs | 35 +----- crates/sui-storage/src/key_value_store.rs | 90 ++------------- crates/sui-storage/tests/key_value_tests.rs | 104 ++---------------- 7 files changed, 37 insertions(+), 247 deletions(-) diff --git a/crates/sui-core/src/authority.rs b/crates/sui-core/src/authority.rs index 0beef2d71c4e0..dddfce8382f74 100644 --- a/crates/sui-core/src/authority.rs +++ b/crates/sui-core/src/authority.rs @@ -4114,16 +4114,19 @@ impl AuthorityState { } // get the unique set of digests from the event_keys - let event_digests = event_keys + let transaction_digests = event_keys .iter() - .map(|(digest, _, _, _)| *digest) + .map(|(_, digest, _, _)| *digest) .collect::>() .into_iter() .collect::>(); - let events = kv_store.multi_get_events(&event_digests).await?; + let events = kv_store + .multi_get_events_by_tx_digests(&transaction_digests) + .await?; - let events_map: HashMap<_, _> = event_digests.iter().zip(events.into_iter()).collect(); + let events_map: HashMap<_, _> = + transaction_digests.iter().zip(events.into_iter()).collect(); let stored_events = event_keys .into_iter() @@ -4131,7 +4134,7 @@ impl AuthorityState { ( k, events_map - .get(&k.0) + .get(&k.1) .expect("fetched digest is missing") .clone() .and_then(|e| e.data.get(k.2).cloned()), @@ -5308,12 +5311,7 @@ impl TransactionKeyValueStoreTrait for AuthorityState { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], - ) -> SuiResult<( - Vec>, - Vec>, - Vec>, - )> { + ) -> SuiResult<(Vec>, Vec>)> { let txns = if !transactions.is_empty() { self.get_transaction_cache_reader() .multi_get_transaction_blocks(transactions) @@ -5331,13 +5329,7 @@ impl TransactionKeyValueStoreTrait for AuthorityState { vec![] }; - let evts = if !events.is_empty() { - self.get_transaction_cache_reader().multi_get_events(events) - } else { - vec![] - }; - - Ok((txns, fx, evts)) + Ok((txns, fx)) } #[instrument(skip(self))] diff --git a/crates/sui-json-rpc/src/authority_state.rs b/crates/sui-json-rpc/src/authority_state.rs index ce6e65e7b7650..b00710116389b 100644 --- a/crates/sui-json-rpc/src/authority_state.rs +++ b/crates/sui-json-rpc/src/authority_state.rs @@ -24,7 +24,7 @@ use sui_types::base_types::{ }; use sui_types::bridge::Bridge; use sui_types::committee::{Committee, EpochId}; -use sui_types::digests::{ChainIdentifier, TransactionDigest, TransactionEventsDigest}; +use sui_types::digests::{ChainIdentifier, TransactionDigest}; use sui_types::dynamic_field::DynamicFieldInfo; use sui_types::effects::TransactionEffects; use sui_types::error::{SuiError, UserInputError}; @@ -57,7 +57,6 @@ pub trait StateRead: Send + Sync { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], ) -> StateReadResult; fn get_object_read(&self, object_id: &ObjectID) -> StateReadResult; @@ -235,14 +234,12 @@ impl StateRead for AuthorityState { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], ) -> StateReadResult { Ok( ::multi_get( self, transactions, effects, - events, ) .await?, ) diff --git a/crates/sui-json-rpc/src/coin_api.rs b/crates/sui-json-rpc/src/coin_api.rs index f0e2104746b63..3ca4cda4f5124 100644 --- a/crates/sui-json-rpc/src/coin_api.rs +++ b/crates/sui-json-rpc/src/coin_api.rs @@ -435,7 +435,7 @@ mod tests { use sui_types::balance::Supply; use sui_types::base_types::{ObjectID, SequenceNumber, SuiAddress}; use sui_types::coin::TreasuryCap; - use sui_types::digests::{ObjectDigest, TransactionDigest, TransactionEventsDigest}; + use sui_types::digests::{ObjectDigest, TransactionDigest}; use sui_types::effects::{TransactionEffects, TransactionEvents}; use sui_types::error::{SuiError, SuiResult}; use sui_types::gas_coin::GAS; @@ -455,7 +455,6 @@ mod tests { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], ) -> SuiResult; async fn multi_get_checkpoints( @@ -1399,7 +1398,7 @@ mod tests { .return_once(move |_| Ok(transaction_digest)); mock_state .expect_multi_get() - .return_once(move |_, _, _| Ok((vec![], vec![Some(transaction_effects)], vec![]))); + .return_once(move |_, _| Ok((vec![], vec![Some(transaction_effects)]))); let coin_read_api = CoinReadApi::new_for_tests(Arc::new(mock_state), None); let response = coin_read_api.get_total_supply(coin_name.clone()).await; diff --git a/crates/sui-storage/src/bin/http_kv_tool.rs b/crates/sui-storage/src/bin/http_kv_tool.rs index ae72454421ea2..a25802533f95d 100644 --- a/crates/sui-storage/src/bin/http_kv_tool.rs +++ b/crates/sui-storage/src/bin/http_kv_tool.rs @@ -8,7 +8,7 @@ use sui_storage::http_key_value_store::*; use sui_storage::key_value_store::TransactionKeyValueStore; use sui_storage::key_value_store_metrics::KeyValueStoreMetrics; use sui_types::base_types::ObjectID; -use sui_types::digests::{CheckpointDigest, TransactionDigest, TransactionEventsDigest}; +use sui_types::digests::{CheckpointDigest, TransactionDigest}; use sui_types::messages_checkpoint::CheckpointSequenceNumber; #[derive(Parser)] @@ -86,21 +86,6 @@ impl Command { } } - "events" => { - let digests: Vec<_> = digest - .into_iter() - .map(|digest| { - TransactionEventsDigest::from_str(&digest) - .expect("invalid events digest") - }) - .collect(); - - let tx = kv.multi_get_events(&digests).await.unwrap(); - for (digest, ev) in digests.iter().zip(tx.iter()) { - println!("fetched events: {:?} {:?}", digest, ev); - } - } - "ckpt_contents" => { let ckpts = kv.multi_get_checkpoints(&[], &seqs, &[]).await.unwrap(); diff --git a/crates/sui-storage/src/http_key_value_store.rs b/crates/sui-storage/src/http_key_value_store.rs index d36423f7a3217..38ff35c8a8ff2 100644 --- a/crates/sui-storage/src/http_key_value_store.rs +++ b/crates/sui-storage/src/http_key_value_store.rs @@ -16,9 +16,7 @@ use sui_types::base_types::{ObjectID, SequenceNumber, VersionNumber}; use sui_types::object::Object; use sui_types::storage::ObjectKey; use sui_types::{ - digests::{ - CheckpointContentsDigest, CheckpointDigest, TransactionDigest, TransactionEventsDigest, - }, + digests::{CheckpointContentsDigest, CheckpointDigest, TransactionDigest}, effects::{TransactionEffects, TransactionEffectsAPI, TransactionEvents}, error::{SuiError, SuiResult}, messages_checkpoint::{ @@ -77,7 +75,6 @@ where pub enum Key { Tx(TransactionDigest), Fx(TransactionDigest), - Events(TransactionEventsDigest), CheckpointContents(CheckpointSequenceNumber), CheckpointSummary(CheckpointSequenceNumber), CheckpointContentsByDigest(CheckpointContentsDigest), @@ -93,7 +90,6 @@ impl Key { match self { Key::Tx(_) => "tx", Key::Fx(_) => "fx", - Key::Events(_) => "ev", Key::CheckpointContents(_) => "cc", Key::CheckpointSummary(_) => "cs", Key::CheckpointContentsByDigest(_) => "cc", @@ -108,7 +104,6 @@ impl Key { match self { Key::Tx(digest) => encode_digest(digest), Key::Fx(digest) => encode_digest(digest), - Key::Events(digest) => encode_digest(digest), Key::CheckpointContents(seq) => { encoded_tagged_key(&TaggedKey::CheckpointSequenceNumber(*seq)) } @@ -144,9 +139,6 @@ pub fn path_elements_to_key(digest: &str, type_: &str) -> anyhow::Result { match type_ { "tx" => Ok(Key::Tx(TransactionDigest::try_from(decoded_digest)?)), "fx" => Ok(Key::Fx(TransactionDigest::try_from(decoded_digest)?)), - "ev" => Ok(Key::Events(TransactionEventsDigest::try_from( - decoded_digest, - )?)), "cc" => { // first try to decode as digest, otherwise try to decode as tagged key match CheckpointContentsDigest::try_from(decoded_digest.clone()) { @@ -351,27 +343,19 @@ impl TransactionKeyValueStoreTrait for HttpKVStore { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], - ) -> SuiResult<( - Vec>, - Vec>, - Vec>, - )> { + ) -> SuiResult<(Vec>, Vec>)> { let num_txns = transactions.len(); let num_effects = effects.len(); - let num_events = events.len(); let keys = transactions .iter() .map(|tx| Key::Tx(*tx)) .chain(effects.iter().map(|fx| Key::Fx(*fx))) - .chain(events.iter().map(|events| Key::Events(*events))) .collect::>(); let fetches = self.multi_fetch(keys).await; let txn_slice = fetches[..num_txns].to_vec(); let fx_slice = fetches[num_txns..num_txns + num_effects].to_vec(); - let events_slice = fetches[num_txns + num_effects..].to_vec(); let txn_results = txn_slice .iter() @@ -398,20 +382,7 @@ impl TransactionKeyValueStoreTrait for HttpKVStore { }) }) .collect::>(); - - let events_results = events_slice - .iter() - .take(num_events) - .zip(events.iter()) - .map(map_fetch) - .map(|maybe_bytes| { - maybe_bytes.and_then(|(bytes, digest)| { - deser_check_digest(digest, bytes, |events: &TransactionEvents| events.digest()) - }) - }) - .collect::>(); - - Ok((txn_results, fx_results, events_results)) + Ok((txn_results, fx_results)) } #[instrument(level = "trace", skip_all)] diff --git a/crates/sui-storage/src/key_value_store.rs b/crates/sui-storage/src/key_value_store.rs index e4fbf1fdb7b36..b08427dcc449a 100644 --- a/crates/sui-storage/src/key_value_store.rs +++ b/crates/sui-storage/src/key_value_store.rs @@ -9,7 +9,7 @@ use async_trait::async_trait; use std::sync::Arc; use std::time::Instant; use sui_types::base_types::{ObjectID, SequenceNumber, VersionNumber}; -use sui_types::digests::{CheckpointDigest, TransactionDigest, TransactionEventsDigest}; +use sui_types::digests::{CheckpointDigest, TransactionDigest}; use sui_types::effects::{TransactionEffects, TransactionEvents}; use sui_types::error::{SuiError, SuiResult, UserInputError}; use sui_types::messages_checkpoint::{ @@ -19,11 +19,7 @@ use sui_types::object::Object; use sui_types::transaction::Transaction; use tracing::instrument; -pub type KVStoreTransactionData = ( - Vec>, - Vec>, - Vec>, -); +pub type KVStoreTransactionData = (Vec>, Vec>); pub type KVStoreCheckpointData = ( Vec>, @@ -55,20 +51,14 @@ impl TransactionKeyValueStore { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], - ) -> SuiResult<( - Vec>, - Vec>, - Vec>, - )> { + ) -> SuiResult<(Vec>, Vec>)> { let start = Instant::now(); - let res = self.inner.multi_get(transactions, effects, events).await; + let res = self.inner.multi_get(transactions, effects).await; let elapsed = start.elapsed(); let num_txns = transactions.len() as u64; let num_effects = effects.len() as u64; - let num_events = events.len() as u64; - let total_keys = num_txns + num_effects + num_events; + let total_keys = num_txns + num_effects; self.metrics .key_value_store_num_fetches_latency_ms @@ -82,7 +72,6 @@ impl TransactionKeyValueStore { if let Ok(res) = &res { let txns_not_found = res.0.iter().filter(|v| v.is_none()).count() as u64; let effects_not_found = res.1.iter().filter(|v| v.is_none()).count() as u64; - let events_not_found = res.2.iter().filter(|v| v.is_none()).count() as u64; if num_txns > 0 { self.metrics @@ -96,12 +85,6 @@ impl TransactionKeyValueStore { .with_label_values(&[self.store_name, "fx"]) .inc_by(num_effects); } - if num_events > 0 { - self.metrics - .key_value_store_num_fetches_success - .with_label_values(&[self.store_name, "events"]) - .inc_by(num_events); - } if txns_not_found > 0 { self.metrics @@ -115,12 +98,6 @@ impl TransactionKeyValueStore { .with_label_values(&[self.store_name, "fx"]) .inc_by(effects_not_found); } - if events_not_found > 0 { - self.metrics - .key_value_store_num_fetches_not_found - .with_label_values(&[self.store_name, "events"]) - .inc_by(events_not_found); - } } else { self.metrics .key_value_store_num_fetches_error @@ -130,10 +107,6 @@ impl TransactionKeyValueStore { .key_value_store_num_fetches_error .with_label_values(&[self.store_name, "fx"]) .inc_by(num_effects); - self.metrics - .key_value_store_num_fetches_error - .with_label_values(&[self.store_name, "events"]) - .inc_by(num_events); } res @@ -252,25 +225,14 @@ impl TransactionKeyValueStore { &self, keys: &[TransactionDigest], ) -> SuiResult>> { - self.multi_get(keys, &[], &[]) - .await - .map(|(txns, _, _)| txns) + self.multi_get(keys, &[]).await.map(|(txns, _)| txns) } pub async fn multi_get_fx_by_tx_digest( &self, keys: &[TransactionDigest], ) -> SuiResult>> { - self.multi_get(&[], keys, &[]).await.map(|(_, fx, _)| fx) - } - - pub async fn multi_get_events( - &self, - keys: &[TransactionEventsDigest], - ) -> SuiResult>> { - self.multi_get(&[], &[], keys) - .await - .map(|(_, _, events)| events) + self.multi_get(&[], keys).await.map(|(_, fx)| fx) } /// Convenience method for fetching single digest, and returning an error if it's not found. @@ -298,20 +260,6 @@ impl TransactionKeyValueStore { .ok_or(SuiError::TransactionNotFound { digest }) } - /// Convenience method for fetching single digest, and returning an error if it's not found. - /// Prefer using multi_get_events whenever possible. - pub async fn get_events( - &self, - digest: TransactionEventsDigest, - ) -> SuiResult { - self.multi_get_events(&[digest]) - .await? - .into_iter() - .next() - .flatten() - .ok_or(SuiError::TransactionEventsNotFound { digest }) - } - /// Convenience method for fetching single checkpoint, and returning an error if it's not found. /// Prefer using multi_get_checkpoints_summaries whenever possible. pub async fn get_checkpoint_summary( @@ -401,7 +349,6 @@ pub trait TransactionKeyValueStoreTrait { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], ) -> SuiResult; /// Generic multi_get to allow implementors to get heterogenous values with a single round trip. @@ -462,38 +409,25 @@ impl TransactionKeyValueStoreTrait for FallbackTransactionKVStore { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], - ) -> SuiResult<( - Vec>, - Vec>, - Vec>, - )> { - let mut res = self - .primary - .multi_get(transactions, effects, events) - .await?; + ) -> SuiResult<(Vec>, Vec>)> { + let mut res = self.primary.multi_get(transactions, effects).await?; let (fallback_transactions, indices_transactions) = find_fallback(&res.0, transactions); let (fallback_effects, indices_effects) = find_fallback(&res.1, effects); - let (fallback_events, indices_events) = find_fallback(&res.2, events); - if fallback_transactions.is_empty() - && fallback_effects.is_empty() - && fallback_events.is_empty() - { + if fallback_transactions.is_empty() && fallback_effects.is_empty() { return Ok(res); } let secondary_res = self .fallback - .multi_get(&fallback_transactions, &fallback_effects, &fallback_events) + .multi_get(&fallback_transactions, &fallback_effects) .await?; merge_res(&mut res.0, secondary_res.0, &indices_transactions); merge_res(&mut res.1, secondary_res.1, &indices_effects); - merge_res(&mut res.2, secondary_res.2, &indices_events); - Ok((res.0, res.1, res.2)) + Ok((res.0, res.1)) } #[instrument(level = "trace", skip_all)] diff --git a/crates/sui-storage/tests/key_value_tests.rs b/crates/sui-storage/tests/key_value_tests.rs index 9a29803ecb693..e90ca247748c5 100644 --- a/crates/sui-storage/tests/key_value_tests.rs +++ b/crates/sui-storage/tests/key_value_tests.rs @@ -13,14 +13,11 @@ use sui_types::base_types::{ use sui_types::committee::Committee; use sui_types::crypto::KeypairTraits; use sui_types::crypto::{get_key_pair, AccountKeyPair}; -use sui_types::digests::{ - CheckpointContentsDigest, CheckpointDigest, TransactionDigest, TransactionEventsDigest, -}; +use sui_types::digests::{CheckpointContentsDigest, CheckpointDigest, TransactionDigest}; use sui_types::effects::{ TestEffectsBuilder, TransactionEffects, TransactionEffectsAPI, TransactionEvents, }; use sui_types::error::SuiResult; -use sui_types::event::Event; use sui_types::messages_checkpoint::{ CertifiedCheckpointSummary, CheckpointContents, CheckpointSequenceNumber, CheckpointSummary, SignedCheckpointSummary, @@ -46,16 +43,10 @@ fn random_fx() -> TransactionEffects { TestEffectsBuilder::new(tx.data()).build() } -fn random_events() -> TransactionEvents { - let event = Event::random_for_testing(); - TransactionEvents { data: vec![event] } -} - #[derive(Default)] struct MockTxStore { txs: HashMap, fxs: HashMap, - events: HashMap, checkpoint_summaries: HashMap, checkpoint_contents: HashMap, checkpoint_summaries_by_digest: HashMap, @@ -79,10 +70,6 @@ impl MockTxStore { self.fxs.insert(*fx.transaction_digest(), fx); } - fn add_events(&mut self, events: TransactionEvents) { - self.events.insert(events.digest(), events); - } - fn add_random_tx(&mut self) -> Transaction { let tx = random_tx(); self.add_tx(tx.clone()); @@ -95,12 +82,6 @@ impl MockTxStore { fx } - fn add_random_events(&mut self) -> TransactionEvents { - let events = random_events(); - self.add_events(events.clone()); - events - } - fn add_random_checkpoint(&mut self) -> (CertifiedCheckpointSummary, CheckpointContents) { let contents = CheckpointContents::new_with_digests_only_for_tests([ExecutionDigests::random()]); @@ -161,12 +142,7 @@ impl TransactionKeyValueStoreTrait for MockTxStore { &self, transactions: &[TransactionDigest], effects: &[TransactionDigest], - events: &[TransactionEventsDigest], - ) -> SuiResult<( - Vec>, - Vec>, - Vec>, - )> { + ) -> SuiResult<(Vec>, Vec>)> { let mut txs = Vec::new(); for digest in transactions { txs.push(self.txs.get(digest).cloned()); @@ -177,12 +153,7 @@ impl TransactionKeyValueStoreTrait for MockTxStore { fxs.push(self.fxs.get(digest).cloned()); } - let mut evts = Vec::new(); - for digest in events { - evts.push(self.events.get(digest).cloned()); - } - - Ok((txs, fxs, evts)) + Ok((txs, fxs)) } async fn multi_get_checkpoints( @@ -284,26 +255,6 @@ async fn test_get_fx() { assert_eq!(result.unwrap(), vec![None]); } -#[tokio::test] -async fn test_get_events() { - let mut store = MockTxStore::new(); - let events = random_events(); - store.add_events(events.clone()); - let store = TransactionKeyValueStore::from(store); - - let result = store - .multi_get_events(&[events.digest()]) - .now_or_never() - .unwrap(); - assert_eq!(result.unwrap(), vec![Some(events)]); - - let result = store - .multi_get_events(&[TransactionEventsDigest::random()]) - .now_or_never() - .unwrap(); - assert_eq!(result.unwrap(), vec![None]); -} - #[tokio::test] async fn test_multi_get() { let mut store = MockTxStore::new(); @@ -313,8 +264,6 @@ async fn test_multi_get() { store.add_random_fx(), store.add_random_fx(), ]; - let events = vec![store.add_random_events(), store.add_random_events()]; - let store = TransactionKeyValueStore::from(store); let result = store @@ -323,25 +272,13 @@ async fn test_multi_get() { &fxs.iter() .map(|fx| *fx.transaction_digest()) .collect::>(), - &events - .iter() - .map(|events| events.digest()) - .collect::>(), ) .now_or_never() .unwrap(); let txns = txns.into_iter().map(Some).collect::>(); let fxs = fxs.into_iter().map(Some).collect::>(); - let events = events.into_iter().map(Some).collect::>(); - - assert_eq!(result.unwrap(), (txns, fxs, events)); - - let result = store - .multi_get_events(&[TransactionEventsDigest::random()]) - .now_or_never() - .unwrap(); - assert_eq!(result.unwrap(), vec![None]); + assert_eq!(result.unwrap(), (txns, fxs)); } #[tokio::test] @@ -412,7 +349,6 @@ async fn test_get_tx_from_fallback() { .multi_get( &[*fallback_tx.digest(), *tx.digest()], &[*fx.transaction_digest(), *fallback_fx.transaction_digest()], - &[], ) .now_or_never() .unwrap(); @@ -421,7 +357,6 @@ async fn test_get_tx_from_fallback() { ( vec![Some(fallback_tx), Some(tx)], vec![Some(fx), Some(fallback_fx)], - vec![] ) ); } @@ -490,7 +425,6 @@ mod simtests { let tx = random_tx(); let random_digest = TransactionDigest::random(); let fx = random_fx(); - let events = random_events(); { let bytes = bcs::to_bytes(&tx).unwrap(); @@ -498,12 +432,6 @@ mod simtests { let bytes = bcs::to_bytes(&fx).unwrap(); assert_eq!(fx, bcs::from_bytes::(&bytes).unwrap()); - - let bytes = bcs::to_bytes(&events).unwrap(); - assert_eq!( - events, - bcs::from_bytes::(&bytes).unwrap() - ); } data.insert( @@ -514,10 +442,6 @@ mod simtests { format!("{}/fx", encode_digest(fx.transaction_digest())), bcs::to_bytes(&fx).unwrap(), ); - data.insert( - format!("{}/ev", encode_digest(&events.digest())), - bcs::to_bytes(&events).unwrap(), - ); // a bogus entry with the wrong digest data.insert( @@ -532,14 +456,13 @@ mod simtests { let store = HttpKVStore::new("http://10.10.10.10:8080", 1000, metrics.clone()).unwrap(); // send one request to warm up the client (and open a connection) - store.multi_get(&[*tx.digest()], &[], &[]).await.unwrap(); + store.multi_get(&[*tx.digest()], &[]).await.unwrap(); let start_time = Instant::now(); let result = store .multi_get( &[*tx.digest(), *random_tx().digest()], &[*fx.transaction_digest()], - &[events.digest()], ) .await .unwrap(); @@ -548,10 +471,7 @@ mod simtests { // i.e. test that pipelining or multiplexing is working. assert!(start_time.elapsed() < Duration::from_millis(600)); - assert_eq!( - result, - (vec![Some(tx), None], vec![Some(fx)], vec![Some(events)]) - ); + assert_eq!(result, (vec![Some(tx), None], vec![Some(fx)])); // the tx was fetched twice, so there should be one cache hit assert_eq!( @@ -563,8 +483,8 @@ mod simtests { 1 ); - let result = store.multi_get(&[random_digest], &[], &[]).await.unwrap(); - assert_eq!(result, (vec![None], vec![], vec![])); + let result = store.multi_get(&[random_digest], &[]).await.unwrap(); + assert_eq!(result, (vec![None], vec![])); } } @@ -585,14 +505,6 @@ fn test_key_to_path_and_back() { key ); - let events = TransactionEventsDigest::random(); - let key = Key::Events(events); - let path_elts = key.to_path_elements(); - assert_eq!( - path_elements_to_key(path_elts.0.as_str(), path_elts.1).unwrap(), - key - ); - let key = Key::CheckpointSummary(42); let path_elts = key.to_path_elements(); assert_eq!(