-
Notifications
You must be signed in to change notification settings - Fork 12
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
added latest snapshot height querying #970
Conversation
@charithabandi for background: cometbft/cometbft#742 |
internal/abci/abci.go
Outdated
@@ -1595,7 +1595,9 @@ func (a *AbciApp) ProcessProposal(ctx context.Context, req *abciTypes.RequestPro | |||
func (a *AbciApp) Query(ctx context.Context, req *abciTypes.RequestQuery) (*abciTypes.ResponseQuery, error) { | |||
a.log.Debug("ABCI Query", zap.String("path", req.Path), zap.String("data", string(req.Data))) | |||
|
|||
if req.Path == statesync.ABCISnapshotQueryPath { // "/snapshot/height" | |||
switch { | |||
// TODO: why do we not return errors in case of the snapshotter not being configured? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, I don't see a major issue with erroring out here. Let's add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I will add in errors |
Ok I added errors to abci query @charithabandi. I tested them out and it works as expected (it just returns the error to the client) |
* added latest snapshot height querying * added errors to abci query
As discussed earlier, we hit a sync issue with TSN testnet due to Comet trying to verify too many block headers. Since our snapshot providers are trusted anyways, this isn't necessary. I added the ability to query ABCI for the latest snapshot from a node, so that we can avoid this.
This is untested, but I just wanted to get something for it because I need to get going and I didn't want to lose my train of thought on it. There is a TODO in there asking about why we don't return errors in a certain part of ABCI (CC @charithabandi you might be able to answer this for me)