Skip to content
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

drop query proofs in casting and agoric-cli #11022

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

turadg
Copy link
Member

@turadg turadg commented Feb 20, 2025

incidental

Description

CosmJS dropped support for query proofs because the JS implementation was removed from ics23.

There is no supported implementation so this removes the feature.

It leaves the code structure intact in case we can find another implementation, so the earlier API can be restored.

It drops the option entirely from agoric-cli so users aren't shown it in help and autocomplete.

Security Considerations

Loss of client-side proofs.

Scaling Considerations

none

Documentation Considerations

Code comments

Testing Considerations

CI

Upgrade Considerations

I can't find anything that was using it.

@turadg turadg requested a review from a team as a code owner February 20, 2025 03:07
Copy link

cloudflare-workers-and-pages bot commented Feb 20, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7540e4e
Status: ✅  Deploy successful!
Preview URL: https://e82e30a4.agoric-sdk.pages.dev
Branch Preview URL: https://ta-drop-query-proofs.agoric-sdk.pages.dev

View logs

return E(queryClient).queryStoreVerified(storeName, storeSubkey, height);
});
console.error('getProvenDataAtHeight', height, 'is no longer supported');
throw makeError(X`Verified queries are no longer supported`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't break anything? I'd expect at least that the old default "optimistic" starts showing a lot of errors/warnings, but I'm not sure where, and tests won't exactly catch noisy logs. Maybe we could make a temporary change to fail earlier if the proof is "optimistic" so we can see if any tests fail? Then we'd know which code is impacted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's marked as a breaking change, but no CI tests were affected. I don't think anyone was opting into optimistic or strict, but if they were there's not really anything more we can do. There's no implementation anymore.

In this case I think it's best to fail loudly so any code expecting verification fails and can be updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I think it's best to fail loudly so any code expecting verification fails and can be updated.

Right, this will fail loudly for strict, but for optimistic which is the default, the follower will yield the data and then throw later when this proof verification fails. I don't think this would "break" anything, but result in some noisy logs saying the proofs failed. I was thinking it might be better to throw earlier, so that we can catch those cases, but if no one was using optimistic then that's moot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be a problem but I'm pretty sure this PR changes the default to 'none'.

@turadg turadg added the force:integration Force integration tests to run on PR label Feb 20, 2025
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave signposts so the user is not confused.

return value;
},
'optimistic',
)
.option(
Copy link
Member

@michaelfig michaelfig Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make an unnecessary breaking change here. --proof=none is still legitimate.

Suggested change
.option(
.option(
'--proof <none>',
`set proof mode (currently only 'none' is supported)`,
value => {
assert.equal(
value,
'none',
X`--proof can only be 'none'`,
TypeError,
);
return value;
},
'none',
)
.option(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair. I'll include something about the option being deprecated since it doesn't do anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I edited the above to suggest something better than before. Please take it into account.

Comment on lines +229 to +230
console.error('getProvenDataAtHeight', height, 'is no longer supported');
throw makeError(X`Verified queries are no longer supported`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.error('getProvenDataAtHeight', height, 'is no longer supported');
throw makeError(X`Verified queries are no longer supported`);
console.error('getProvenDataAtHeight', height, 'is no longer supported; use', { proof: 'none' });
throw makeError(X`Verified queries are no longer supported; use { proof: 'none' }`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants