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

add assertion for correct resolution of delegatee oobi #252

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

lenkan
Copy link
Collaborator

@lenkan lenkan commented Apr 14, 2024

I did this as a step to try and resolve what was failing the multisig vlei test in #241. I found that there is a problem when an agent that contains a delegator tries to resolve an oobi for its delegatee. See the added steps in delegation.test.ts for a reproduction.

The effects of this is that you cannot create a "contact" for the delegate, which means you cannot send an IPEX message to the delegate. This is needed for doing IPEX grant from GLEIF External to the QVI.

To reproduce this behaviour:

  1. Pull this branch
  2. npm run build
  3. docker compose pull
  4. docker compose up deps
  5. npx jest examples/integration-scripts/delegation.test.ts

To explain what happens

  1. X create delegator
  2. Y create delegatee
  3. X approve delegation
  4. Y queries new state and sees approval
  5. Y adds agent end role
  6. Y generates OOBI url
  7. X resolves OOBI url for delegator

After step 7, X nevers gets the AID of the delegator in its contact list. The oobi longrunning operation resolves with

  console.dir
    {
      name: 'oobi.AD-rrl0gMPRIhAl-42mMOaNL4PwCXfLPaX6-MhNt_aKw',
      metadata: {
        oobi: 'http://keria:3902/oobi/EJSmJgIGjJ5RcRd9WBz0tevFtauyT5FhoLdwIGVa19qh'
      },
      done: true,
      error: null,
      response: {
        oobi: 'http://keria:3902/oobi/EJSmJgIGjJ5RcRd9WBz0tevFtauyT5FhoLdwIGVa19qh'
      }
    }

Which only happens here: https://github.com/WebOfTrust/keria/blob/7ee5ba84c9aed5d2d21fa48d8241d39b06aadb93/src/keria/core/longrunning.py#L235-L239, when the AID is not in kevers.

Update: I have tried running the same tests using keria:latest and it works there.

@lenkan
Copy link
Collaborator Author

lenkan commented Jul 16, 2024

Update: I pulled some changes in #267, specifically, aiding.ts and delegating.ts and got the delegation.test.ts to run. I believe the best course of action is to try and get #267 merged, then rebase all other PRs that needs the upgrade on top of main after that.

@2byrds
Copy link
Contributor

2byrds commented Jul 17, 2024

Update: I pulled some changes in #267, specifically, aiding.ts and delegating.ts and got the delegation.test.ts to run. I believe the best course of action is to try and get #267 merged, then rebase all other PRs that needs the upgrade on top of main after that.

@lenkan that sounds good

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.82%. Comparing base (850af59) to head (6ef053b).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   83.82%   83.82%           
=======================================
  Files          48       48           
  Lines        4229     4229           
  Branches     1034     1021   -13     
=======================================
  Hits         3545     3545           
- Misses        656      680   +24     
+ Partials       28        4   -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lenkan lenkan changed the title Draft: use development version of keria add assertion for correct resolution of delegatee oobi Aug 12, 2024
@lenkan
Copy link
Collaborator Author

lenkan commented Aug 12, 2024

I've updated this PR now to only include the assertion for the issue WebOfTrust/keria#230

@lenkan lenkan marked this pull request as ready for review August 12, 2024 10:56
Copy link
Contributor

@2byrds 2byrds left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@rodolfomiranda rodolfomiranda left a comment

Choose a reason for hiding this comment

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

LGTM

@lenkan lenkan merged commit 1bc8a01 into WebOfTrust:main Aug 27, 2024
8 checks passed
@lenkan lenkan deleted the upgrade-keria branch August 27, 2024 11:35
This pull request was closed.
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