feat: suppress redundant IPEX initiator notifications#445
Conversation
b471cf2 to
66a0e2c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #445 +/- ##
=======================================
Coverage 87.75% 87.76%
=======================================
Files 26 26
Lines 5825 5834 +9
=======================================
+ Hits 5112 5120 +8
- Misses 713 714 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
66a0e2c to
cd1ce65
Compare
The initiator of an IPEX operation does not need to have a notification of an event it created. This test proves that notification is suppressed. Depends on WebOfTrust/keria#445"
| # notification. This prevents a redundant notification appearing for an IPEX operation | ||
| # initiator. | ||
| if serder.pre in self.hby.habs: | ||
| return |
There was a problem hiding this comment.
If we want to do this, we should probably just avoid calling handle so it will apply to all exns?
There is a nice advantage of keeping the extra notification that we are using in Veridian Wallet which I think is worth considering though.
In a threshold multi-sig, any members who don't sign get a notification that the exn was fully signed automatically, which is useful for UX.
There was a problem hiding this comment.
If we want to do this, we should probably just avoid calling handle so it will apply to all exns?
This would require subclassing KERIpy's Exchanger since that is what calls .handle() on all registered message handlers. I have not yet fully thought through whether this makes sense for all exns, yet in abstract it seems okay. It doesn't seem the initiator of a challenge response, OOBI exn resolution request, IPEX, or multisig operation needs to be notified of their own operation. Maybe we could just avoid calling handle like you say.
There is a nice advantage of keeping the extra notification that we are using in Veridian Wallet which I think is worth considering though.
In a threshold multi-sig, any members who don't sign get a notification that the exn was fully signed automatically, which is useful for UX.
Does this imply that you are having a non-signer multisig member initiate an event?
There was a problem hiding this comment.
Does this imply that you are having a non-signer multisig member initiate an event?
No. For example, for a 2 of 3 multi-sig that receives a presentation request: if Alice responds with a presentation, and Bob also signs, Carol will get a notification of the presentation which indicates that enough signatures were collected and that she doesn't need to sign.
IPEX operation initiators do not need notifications of events they create as it is redundant. Suppressing notifications for IPEX operations like this, for initiators, is similar to how Multiplexor in KERIpy suppresses notifications for multisig operation initiators.
cd1ce65 to
63798f2
Compare
IPEX operation initiators do not need notifications of events they create as it is redundant. Suppressing notifications for IPEX operations like this, for initiators, is similar to how Multiplexor in KERIpy suppresses notifications for multisig operation initiators.
https://github.com/WebOfTrust/signify-ts/pull/399/changes can be moved from draft to PR once this is merged.