-
Notifications
You must be signed in to change notification settings - Fork 32
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: a way to prevent duplicated anchor events for multisig issuance #286
base: main
Are you sure you want to change the base?
Conversation
25215bf
to
793f9b9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
==========================================
+ Coverage 83.55% 83.58% +0.02%
==========================================
Files 48 48
Lines 4215 4221 +6
Branches 1055 1047 -8
==========================================
+ Hits 3522 3528 +6
+ Misses 689 663 -26
- Partials 4 30 +26 ☔ View full report in Codecov by Sentry. |
const sn = new CesrNumber({}, parseInt(hab.state.s, 16) + 1); | ||
const anc = new Serder( | ||
args.anc ?? | ||
Saider.saidify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the reason I inlined this is because I think it makes it much more obvious what we are actually posting down to KERIA. I do not think the indirection of calling interact
provides any readability improvements. But I am OK with either. Just provide your feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good with me
155b1b6
to
d2278e5
Compare
In the code, I have found several patterns for API operations that are posting Key Events. IPEX Approach (e.g. apply and submitApply)
That approach would work here as well. End role approachHere we separate the creation of events into a private method to create the events named "makeXXXEvent". For example:
Create from events approachFor the registry creation, we have a pattern of
NotesI still think I prefer the method that I did in this PR. But I think we can discuss and decide on one pattern and implement that for all calls that involve posting key events. You can always create external helper methods to create the |
@lenkan For IPEX the advantage of how it is set up is that you can also send I kind of like that approach as it's a bit more flexible in general and quite clear from the business logic level: a clean function to create a message or event, and the API submission. This would be my preference in general. But your change in this PR also makes sense to me if that's preferred by people. I don't like jumping too many levels deep in function calls as it's easy to get lost. |
@lenkan what do you think about advantages that @iFergal lists here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lenkan I updated my signify-ts to this branch. And then tried to modify vlei-sandbox to use the new IssueCredentialArgs interface. But perhaps you already did this and can share? if i can prove that your catchup test works, i can include it in my rollback to prove that member3 is operational in the group again
I discussed this offline with @lenkan a while ago. It is a bit curious that there's "2 ways" to do multi-sig IPEX which is probably unnecessary complexity. The benefit is less network calls though. Though based on the eventual outcome of WebOfTrust/keripy#884 it might need to have the calls split anyway. |
Hm, when I tried that, I only used npm link locally, so I never had that branch of vlei-sandbox pushed. Let me know if it is still an issue, then I could probably push a branch to vlei-sandbox that uses this for joining the credential. |
This PR solves an issue that occurs when a multisig member is trying to join an issuance event after it has been fully signed. They need to do this to be able to import the credential in their database.
This is an alternative approach to the PR by @rodolfomiranda #271.
I will do the same for
credentials().revoke()
andregistries().create()
if you agree with this approach.With these changes, I am able to complete this test case: https://github.com/nordlei/vlei-sandbox/blob/main/src/issues/multisig-catchup-problem.test.ts, so we should be able to resolve this issue: WebOfTrust/keria#283. The catch up mechanism would be to simply join all notifications for the multisig group.