Problem: Bigchaindb crashes when restarted after init chain#2519
Problem: Bigchaindb crashes when restarted after init chain#2519muawiakh merged 1 commit intobigchaindb:masterfrom
Conversation
Solution: Return appropirate height so that Tendermint doesn't execute init_chain more than once
Codecov Report
@@ Coverage Diff @@
## master #2519 +/- ##
=======================================
Coverage 91.87% 91.87%
=======================================
Files 42 42
Lines 2511 2511
=======================================
Hits 2307 2307
Misses 204 204 |
| # NOTE: storing the block should be the last operation during commit | ||
| # this effects crash recovery. Refer BEP#8 for details | ||
| self.bigchaindb.store_block(block._asdict()) | ||
|
|
There was a problem hiding this comment.
nit: There is not change here. pep8?
I don't understand the fix, maybe Work in progress?
There was a problem hiding this comment.
Ah now I see, we are storing empty blocks, completely overlooked the indentation.
muawiakh
left a comment
There was a problem hiding this comment.
Since we are storing empty blocks, are we also addressing when during upgrade/fork? Like we discussed yesterday. If election happens at height H the we will also store block H+1 because, Tendermint and the upgrade logic operations on H+1 block which should be then H+2
muawiakh
left a comment
There was a problem hiding this comment.
The upgrade issue can be taken care of in another PR. This fixes the issue. Just tested it. +1.
Solution: Return appropriate height so that Tendermint doesn't execute
init_chainmore than onceFixes #2518