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

fix(drive): internal error on querying proofs #1747

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

markin-io
Copy link
Contributor

@markin-io markin-io commented Mar 7, 2024

Issue being fixed or feature implemented

Fixed bug with querying of proofs for identities, contracts and documents simultaneously

Query payload sample:

{
  "v0": {
    "identities": [
      {
        "requestType": "FULL_IDENTITY",
        "identityId": "MBLBm5jsADOt2zbNZLf1EGcPKjUaQwS19plBRChu/aw="
      }
    ],
    "contracts": [
      {
        "contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU="
      }
    ],
    "documents": [
      {
        "contractId": "5mjGWa9mruHnLBht3ntbfgodcSoJxA1XIfYiv1PFMVU=",
        "documentId": "A0cIIsjbckAzrI9wnCLIBpWi5Thu2/WRfFowXSZ9dMM=",
        "documentType": "domain"
      }
    ]
  }
}

What was done?

  • JS DAPI Client: added GetProofs request
  • Drive: Set limit to none in Documents proof grovedb path query because it's not allowed to merge path queries restricted by a limit.

How Has This Been Tested?

  • Locally with querying proofs

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@markin-io markin-io force-pushed the fix/drive/get-proofs branch 2 times, most recently from 34b00a0 to dbf406a Compare March 11, 2024 11:43
@markin-io markin-io force-pushed the fix/drive/get-proofs branch from e773039 to 98f71c3 Compare March 11, 2024 13:25
@@ -89,7 +89,11 @@ impl Drive {
path_queries.extend(
document_queries
.iter()
.map(|drive_query| drive_query.construct_path_query()),
.map(|drive_query| {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a test here to make sure we fixed the problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@QuantumExplorer QuantumExplorer merged commit d2d389e into v1.0-dev Mar 15, 2024
34 of 35 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/drive/get-proofs branch March 15, 2024 12:21
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