forked from celestiaorg/celestia-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: remove genesis time from genesis state (celestiaorg#1851)
Closes celestiaorg#1757 ## Description Prior to this PR, the mint module contained a placeholder `genesis_time` in genesis state. It ignored the placeholder and used the block time for the block height `1` as the "genesis time". This PR removes the placeholder and that mechanism. ```diff "minter": { "inflation_rate": "0.080000000000000000", "annual_provisions": "0.000000000000000000", - "genesis_time": "2023-06-22T18:46:11.873883Z", "previous_block_time": null, "bond_denom": "utia" } ``` After this PR, `genesis_time` in the mint module is set to the chain's genesis time which is the root level `genesis_time` specified in genesis.json. Genesis.json is created on chain initialization (i.e. `celestia-appd init chain-id`). This is breaking b/c it modifies a state transition for the mint module state and removes a field from the `Minter` state. ## Testing Now there is only one `genesis_time` in genesis.json: ```shell $ ./scripts/build-run-single-node.sh $ cat /var/folders/y0/dd92_x8x4tlf397xstgwfz_c0000gn/T/celestia_app_XXXXXXXXXXXXX.wYBu5mwm/config/genesis.json | grep genesis_time -A 3 -B 3 { "genesis_time": "2023-06-23T16:13:24.719488Z", "chain_id": "private", "initial_height": "1", "consensus_params": { ``` Additionally it gets set correctly in mint module state ```shell $ ./build/celestia-appd query mint genesis-time 2023-06-23 16:13:24.719488 +0000 UTC ``` --------- Co-authored-by: Evan Forbes <[email protected]>
- Loading branch information
1 parent
4248170
commit 7b52005
Showing
18 changed files
with
367 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.