From ec2a0171607c3e849861bb83cf76218334d6de3b Mon Sep 17 00:00:00 2001 From: Hoang Do Date: Mon, 17 Mar 2025 21:01:36 +0700 Subject: [PATCH] docs: enhance OfferSnapshot documentation (#24017) --- baseapp/abci.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/baseapp/abci.go b/baseapp/abci.go index 43fff657c7..67ddc5ded2 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -283,6 +283,10 @@ func (app *BaseApp) OfferSnapshot(req *abci.RequestOfferSnapshot) (*abci.Respons return &abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_REJECT}, nil default: + // CometBFT errors are defined here: https://github.com/cometbft/cometbft/blob/main/statesync/syncer.go + // It may happen that in case of a CometBFT error, such as a timeout (which occurs after two minutes), + // the process is aborted. This is done intentionally because deleting the database programmatically + // can lead to more complicated situations. app.logger.Error( "failed to restore snapshot", "height", req.Snapshot.Height,