From 89cccfc397b1e03810ef261f36fc47b0f3f28e56 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Mon, 6 Feb 2023 10:24:21 +0100 Subject: [PATCH] Fix rebase conflicts --- beacon_node/beacon_chain/src/beacon_chain.rs | 13 +------------ .../beacon_chain/src/validator_pubkey_cache.rs | 2 +- beacon_node/store/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index c1b4dc6b56..980a313905 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -3044,7 +3044,7 @@ impl BeaconChain { } let txn_lock = self.store.hot_db.begin_rw_transaction(); - if let Err(e) = self.store.do_atomically(ops) { + if let Err(e) = self.store.do_atomically_with_block_and_blobs_cache(ops) { error!( self.log, "Database write failed!"; @@ -3080,17 +3080,6 @@ impl BeaconChain { return Err(e.into()); } - - if let Some(blobs) = blobs? { - if blobs.blobs.len() > 0 { - //FIXME(sean) using this for debugging for now - info!(self.log, "Writing blobs to store"; "block_root" => ?block_root); - // WARNING! Deadlocks if the alternative to a separate blobs db is - // changed from the cold db to the hot db. - self.store.put_blobs(&block_root, (&*blobs).clone())?; - } - }; - drop(txn_lock); // The fork choice write-lock is dropped *after* the on-disk database has been updated. diff --git a/beacon_node/beacon_chain/src/validator_pubkey_cache.rs b/beacon_node/beacon_chain/src/validator_pubkey_cache.rs index 79910df292..85fd106eef 100644 --- a/beacon_node/beacon_chain/src/validator_pubkey_cache.rs +++ b/beacon_node/beacon_chain/src/validator_pubkey_cache.rs @@ -38,7 +38,7 @@ impl ValidatorPubkeyCache { }; let store_ops = cache.import_new_pubkeys(state)?; - store.do_atomically(store_ops)?; + store.do_atomically_with_block_and_blobs_cache(store_ops)?; Ok(cache) } diff --git a/beacon_node/store/src/lib.rs b/beacon_node/store/src/lib.rs index 9305b3da0b..3056c29292 100644 --- a/beacon_node/store/src/lib.rs +++ b/beacon_node/store/src/lib.rs @@ -101,6 +101,7 @@ pub fn get_key_for_col(column: &str, key: &[u8]) -> Vec { } #[must_use] +#[derive(Clone)] pub enum KeyValueStoreOp { PutKeyValue(Vec, Vec), DeleteKey(Vec),