File tree 2 files changed +6
-2
lines changed
crates/bin/pd/src/migrate
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ pub async fn migrate(
14
14
let mut delta = StateDelta :: new ( export_state) ;
15
15
delta. ready_to_start ( ) ;
16
16
let _ = storage. commit_in_place ( delta) . await ?;
17
+ storage. release ( ) . await ;
17
18
tracing:: info!( "migration completed: halt bit is turned off, chain is ready to start" ) ;
18
19
Ok ( ( ) )
19
20
}
Original file line number Diff line number Diff line change 2
2
//! The Testnet 77 release included several consensus-breaking changes,
3
3
//! but no state-breaking changes, so the migration is essentially a no-op,
4
4
//! other than resetting the halt bit.
5
- use anyhow;
5
+ use anyhow:: Context ;
6
6
use cnidarium:: Storage ;
7
7
use jmt:: RootHash ;
8
8
use penumbra_app:: app:: StateReadExt as _;
9
9
use penumbra_sct:: component:: clock:: EpochRead ;
10
10
use std:: path:: PathBuf ;
11
11
use tracing:: instrument;
12
12
13
+ use crate :: migrate:: reset_halt_bit;
13
14
use crate :: testnet:: generate:: TestnetConfig ;
14
15
15
16
/// Run the full migration, given an export path and a start time for genesis.
@@ -35,7 +36,9 @@ pub async fn migrate(
35
36
. await
36
37
. expect ( "chain state has a block height" ) ;
37
38
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" ) ?;
39
42
40
43
// The migration is complete, now we need to generate a genesis file. To do this, we need
41
44
// to lookup a validator view from the chain, and specify the post-upgrade app hash and
You can’t perform that action at this time.
0 commit comments