You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the function Commit() from the BaseApp struct, the following piece of code will be executed
ifhalt {
// Halt the binary and allow Tendermint to receive the ResponseCommit// response with the commit ID hash. This will allow the node to successfully// restart and process blocks assuming the halt configuration has been// reset or moved to a more distant value.app.halt()
}
ifapp.snapshotInterval>0&&uint64(header.Height)%app.snapshotInterval==0 {
goapp.snapshot(header.Height)
}
Note that when halt is set to be true, the shutdown process will start and eventually os.Exit(0) will be executed. In addition to this, if snapshot execution conditions are expected to be valid, the snapshot creation process will never be triggered even if those conditions are valid. In conclusion, according to the current implementation, system halting is not compatible with the snapshot process.
Snapshots are separate binary files to help new nodes to bootstrap quickly as they join the network. (a.k.a. state-sync). It consists of LevelDB data and its metadata. The upstream's code still doesn't save snapshot before halt. This structure reduces consistency by failing to save the last-height snapshot when the chain halt, but it is not an important issue because snapshots do not affect the consistency of the chain itself, but just optional things for helping remote nodes. So we won't fix and follow upstream because of those reasons.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary of Bug
When calling the function
Commit()
from the BaseApp struct, the following piece of code will be executedNote that when
halt
is set to be true, the shutdown process will start and eventuallyos.Exit(0)
will be executed. In addition to this, if snapshot execution conditions are expected to be valid, the snapshot creation process will never be triggered even if those conditions are valid. In conclusion, according to the current implementation, system halting is not compatible with the snapshot process.Version
17262932f550fbfb658e8f8bf4b66f023eaa3cdd
Discussion
Snapshots are separate binary files to help new nodes to bootstrap quickly as they join the network. (a.k.a. state-sync). It consists of LevelDB data and its metadata. The upstream's code still doesn't save snapshot before halt. This structure reduces consistency by failing to save the last-height snapshot when the chain halt, but it is not an important issue because snapshots do not affect the consistency of the chain itself, but just optional things for helping remote nodes. So we won't fix and follow upstream because of those reasons.
For Admin Use
The text was updated successfully, but these errors were encountered: