Closed frolosofsky closed 5 years ago
Some explanations:
Why there are only 71 states available?
Because during initial block download, node for any mysterious reason, decided to not flush data to the disk. It is not a big issue actually unless node crashes during IBD. And node does flush states in the regtest environment.
Why this data is not enough to restore finalization states.
Block 834dba65340114ed1ca1bca216607a6a8281057fc27b034dd018fb763b46fcf0. Why state is not restored from its CBlockIndex commits? Why we cannot load it from disk?
The data was enough to restore finalization states of active and parallel chains, but it also tried to restore states for block indexes which has no data (we got them via headers).
Try to reproduce in functional test.
Reproduced in unit tests.
Describe the bug After finishing initial sync node cannot restart properly.
To Reproduce
src/unit-e -printtoconsole -debug=all -datadir=./somewhere
.Expected behavior Node is expected to start successfully.
Environment unit-e 7230215b25da7e61371dfa1cde571fac91d56033
Thoughts
I forced node to download all finalization states, the result is pretty the same (take a look on overall loaded states, the actual chain height was about ~2k):
There're several direction in investigation which could be extracted in individual issues/PRs if needed.
834dba65340114ed1ca1bca216607a6a8281057fc27b034dd018fb763b46fcf0
. Why state is not restored from its CBlockIndex commits? Why we cannot load it from disk?