Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): genesis.json not loaded on restart before genesis block is mined #892

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Aug 29, 2024

Issue being fixed or feature implemented

If Tenderdash crashes/restarts before mining first (genesis) block, it persists some initial state and reuses it after restart.
It means that any changes to the genesis.json file are not loaded on restart..

What was done?

Discard persisted state when persisted height is 0.

How Has This Been Tested?

e2e tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek lklimek added this to the v1.2 milestone Aug 29, 2024
@lklimek lklimek changed the base branch from v1.2-dev to master August 29, 2024 09:26
@lklimek lklimek changed the title fix: gensis.json not loaded on restart fix(node): gensis.json not loaded on restart Aug 29, 2024
@QuantumExplorer QuantumExplorer changed the title fix(node): gensis.json not loaded on restart fix(node): genesis.json not loaded on restart Aug 29, 2024
@lklimek lklimek changed the title fix(node): genesis.json not loaded on restart fix(node): genesis.json not loaded on restart before genesis block is mined Aug 29, 2024
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ship it with 1.2.1

@lklimek lklimek merged commit ad4f911 into master Aug 29, 2024
17 of 18 checks passed
@lklimek lklimek deleted the fix/genesis-state-reset branch August 29, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants