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

state: don't save genesis state in database when loaded #5231

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

erikgrinaker
Copy link
Contributor

Fixes #5138. I don't have a strong opinion on this, but find it sort of odd that Load functions actually save as well.

@auto-comment
Copy link

auto-comment bot commented Aug 11, 2020

👋 Thanks for creating a PR!

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

Thank you for your contribution to Tendermint! 🚀

@erikgrinaker erikgrinaker added the S:automerge Automatically merge PR when requirements pass label Aug 11, 2020
@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #5231 into master will increase coverage by 1.10%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5231      +/-   ##
==========================================
+ Coverage   61.45%   62.55%   +1.10%     
==========================================
  Files         198      259      +61     
  Lines       23086    27190    +4104     
==========================================
+ Hits        14187    17010    +2823     
- Misses       7652     8703    +1051     
- Partials     1247     1477     +230     
Impacted Files Coverage Δ
node/node.go 58.51% <ø> (ø)
state/store.go 56.53% <ø> (-0.34%) ⬇️
statesync/snapshots.go 92.59% <0.00%> (-1.49%) ⬇️
consensus/reactor.go 75.37% <0.00%> (ø)
libs/rand/random.go 66.25% <0.00%> (ø)
libs/protoio/io.go 45.00% <0.00%> (ø)
libs/service/service.go 52.63% <0.00%> (ø)
evidence/reactor.go 61.20% <0.00%> (ø)
libs/log/tmfmt_logger.go 85.18% <0.00%> (ø)
crypto/merkle/proof_value.go 0.00% <0.00%> (ø)
... and 60 more

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I have a little twitch when I see two functions look extremely similar but I will ignore that

@mergify mergify bot merged commit feaa1ed into master Aug 12, 2020
@mergify mergify bot deleted the erik/state-no-save-on-load branch August 12, 2020 08:24
@melekes
Copy link
Contributor

melekes commented Aug 24, 2020

find it sort of odd that Load functions actually save as well.

Yeah, this smells fishy 🐟

mergify bot pushed a commit that referenced this pull request Aug 28, 2020
State sync broke in #5231 since the genesis state is not propagated explicitly from `NewNode()` to `Node.OnStart()` and further into the state sync initialization. This is a hack until we can clean up the node startup process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:automerge Automatically merge PR when requirements pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

state: genesis state is saved multiple times
3 participants