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

feat: retry query signature verification in case cache is stale #801

Merged
merged 6 commits into from
Nov 17, 2023

Conversation

krpeacock
Copy link
Contributor

@krpeacock krpeacock commented Nov 16, 2023

Description

Because a node can be upgraded while the cache is stale, we should retry a failed query signature verification once, after refreshing the cache

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@krpeacock krpeacock requested a review from a team as a code owner November 16, 2023 21:40
Copy link
Contributor

github-actions bot commented Nov 16, 2023

size-limit report 📦

Path Size
@dfinity/agent 98.62 KB (+0.08% 🔺)
@dfinity/candid 13.41 KB (0%)
@dfinity/principal 5.01 KB (0%)
@dfinity/auth-client 90.58 KB (0%)
@dfinity/assets 91.11 KB (0%)
@dfinity/identity 88.06 KB (0%)
@dfinity/identity-secp256k1 254.43 KB (+0.03% 🔺)

@krpeacock
Copy link
Contributor Author

It's throwing an error, but not in a way that the mitm test is detecting as a "rejection" I need to investigate a bit further

@krpeacock krpeacock enabled auto-merge (squash) November 17, 2023 00:56
'Invalid signature from replica signed query: no matching node key found.',
);
}
return this.#verifyQueryResponse(query, updatedSubnetStatus);

Choose a reason for hiding this comment

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

Is it okay that there is no resolve(subnetStatus); call here, in between get and verifyQueryResponse, as in the above code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we are not within a Promise at this stage in the code (apart from the async query function itself). It's a little semantically incongruous if you're comparing this section to the above sections, however

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants