Skip to content

Commit a8c8f21

Browse files
committed
fix: address review comments
1 parent fa7af55 commit a8c8f21

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/bin/pd/src/migrate/reset_halt_bit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub async fn migrate(
1414
let mut delta = StateDelta::new(export_state);
1515
delta.ready_to_start();
1616
let _ = storage.commit_in_place(delta).await?;
17+
storage.release().await;
1718
tracing::info!("migration completed: halt bit is turned off, chain is ready to start");
1819
Ok(())
1920
}

crates/bin/pd/src/migrate/testnet77.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
//! The Testnet 77 release included several consensus-breaking changes,
33
//! but no state-breaking changes, so the migration is essentially a no-op,
44
//! other than resetting the halt bit.
5-
use anyhow;
5+
use anyhow::Context;
66
use cnidarium::Storage;
77
use jmt::RootHash;
88
use penumbra_app::app::StateReadExt as _;
99
use penumbra_sct::component::clock::EpochRead;
1010
use std::path::PathBuf;
1111
use tracing::instrument;
1212

13+
use crate::migrate::reset_halt_bit;
1314
use crate::testnet::generate::TestnetConfig;
1415

1516
/// Run the full migration, given an export path and a start time for genesis.
@@ -35,7 +36,9 @@ pub async fn migrate(
3536
.await
3637
.expect("chain state has a block height");
3738
let post_upgrade_height = pre_upgrade_height.wrapping_add(1);
38-
storage.release().await;
39+
reset_halt_bit::migrate(storage, pd_home.clone(), genesis_start.clone())
40+
.await
41+
.context("failed to reset halt bit")?;
3942

4043
// The migration is complete, now we need to generate a genesis file. To do this, we need
4144
// to lookup a validator view from the chain, and specify the post-upgrade app hash and

0 commit comments

Comments
 (0)