Skip to content

Commit

Permalink
Debug db opening issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Dec 25, 2024
1 parent f460b59 commit 007727e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions account_manager/src/validator/slashing_protection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn cli_run<E: EthSpec>(
let slashing_protection_database =
SlashingDatabase::open_or_create(&slashing_protection_db_path).map_err(|e| {
format!(
"Unable to open database at {}: {:?}",
"Unable to open slashing protection database at {}: {:?}",
slashing_protection_db_path.display(),
e
)
Expand Down Expand Up @@ -198,7 +198,7 @@ pub fn cli_run<E: EthSpec>(
let slashing_protection_database = SlashingDatabase::open(&slashing_protection_db_path)
.map_err(|e| {
format!(
"Unable to open database at {}: {:?}",
"Unable to open slashing protection database at {}: {:?}",
slashing_protection_db_path.display(),
e
)
Expand Down
5 changes: 5 additions & 0 deletions beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,18 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
spec: Arc<ChainSpec>,
log: Logger,
) -> Result<Arc<Self>, Error> {
debug!(log, "Opening HotColdDB");
config.verify::<E>()?;

let hierarchy = config.hierarchy_config.to_moduli()?;

// TODO(hdiff): Use different exponents
let hierarchy_hot = config.hierarchy_config.to_moduli()?;

debug!(log, "Opening LevelDB"; "hot_path" => ?hot_path);
let hot_db = LevelDB::open(hot_path)?;
let anchor_info = RwLock::new(Self::load_anchor_info(&hot_db)?);
debug!(log, "Loaded anchor info"; "anchor_info" => ?anchor_info);

let db = HotColdDB {
split: RwLock::new(Split::default()),
Expand Down Expand Up @@ -307,6 +310,7 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
// Open separate blobs directory if configured and same configuration was used on previous
// run.
let blob_info = db.load_blob_info()?;
debug!(db.log, "Loaded blob info"; "blob_info" => ?blob_info);
let deneb_fork_slot = db
.spec
.deneb_fork_epoch
Expand Down Expand Up @@ -337,6 +341,7 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
db.compare_and_set_blob_info_with_write(<_>::default(), new_blob_info.clone())?;

let data_column_info = db.load_data_column_info()?;
debug!(db.log, "Loaded data column info"; "data_column_info" => ?data_column_info);
let eip7594_fork_slot = db
.spec
.eip7594_fork_epoch
Expand Down

0 comments on commit 007727e

Please sign in to comment.