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

CCQ: Testing #3424

Merged
merged 4 commits into from
Oct 12, 2023
Merged

CCQ: Testing #3424

merged 4 commits into from
Oct 12, 2023

Conversation

bruce-riley
Copy link
Contributor

@bruce-riley bruce-riley commented Oct 4, 2023

This PR adds tests for the CCQ feature. This PR is dependent on PR #3423.

For background on this feature see the whitepaper (PR #3418).

@bruce-riley bruce-riley force-pushed the CCQ/node/Guardian_Changes branch from ae39d94 to 24dbcdb Compare October 4, 2023 18:53
@bruce-riley bruce-riley requested a review from SEJeff October 4, 2023 19:55
@bruce-riley bruce-riley changed the base branch from CCQ/node/Guardian_Changes to CCQ/Query_Server October 4, 2023 20:18
@bruce-riley bruce-riley marked this pull request as ready for review October 4, 2023 21:54
@bruce-riley bruce-riley force-pushed the CCQ/Query_Server branch 2 times, most recently from 6e07adc to 5071a05 Compare October 10, 2023 23:14
Copy link
Collaborator

@SEJeff SEJeff left a comment

Choose a reason for hiding this comment

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

Questions

  1. Do you forsee a user having multiple api keys? If not, is the username for anything other than a description?
  2. Public facing code really needs better test coverage. Public facing == threat surface.
  3. Assuming its identity key is permissioned, does the query server need to run on a guardian?

Notes

  1. The all or nothing approach makes me uneasy for some reason. What if the user is ok with some of the queries failing? They just make 1 ccq for each query instead of batching them? This should be made obvious to integrators I think if it isn't blatantly obvious in the whitepaper and godoc comments.
  2. Try to avoid logging secrets as logs have a habit of being shared with the world sometimes on purpose and often by accident.
  3. Littering the key files all over the codebase is messy, it would be so awesome to just use interfaces so this code can be tested without requiring these. This is guaranteed 100% to result in extra immunefi bugs and nonsense from github code scanners that will waste our time.
  4. The guardianset is fetched on startup, but doesn't seem to be polled intermittently though there is a crasher error for the error when the gst might be wrong.
  5. This PR supercedes CCQ/Node: Guardian Changes #3423 because it includes the same commit.

node/cmd/ccq/ccq.p2p.key Outdated Show resolved Hide resolved
node/cmd/ccq/http.go Outdated Show resolved Hide resolved
node/cmd/ccq/http.go Outdated Show resolved Hide resolved
node/cmd/ccq/http.go Outdated Show resolved Hide resolved
node/cmd/ccq/http.go Outdated Show resolved Hide resolved
node/pkg/query/request.go Outdated Show resolved Hide resolved
node/pkg/query/request.go Outdated Show resolved Hide resolved
node/pkg/query/request.go Outdated Show resolved Hide resolved
node/pkg/query/response.go Outdated Show resolved Hide resolved
node/pkg/query/response.go Outdated Show resolved Hide resolved
Base automatically changed from CCQ/Query_Server to main October 12, 2023 19:29
@bruce-riley bruce-riley requested a review from SEJeff October 12, 2023 19:48
@bruce-riley bruce-riley merged commit ea70610 into main Oct 12, 2023
@bruce-riley bruce-riley deleted the CCQ/Testing branch October 12, 2023 21:23
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