-
Notifications
You must be signed in to change notification settings - Fork 83
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
Refactor/typestate connections #739
Conversation
@Patrik-Stas That's a very good observation and yes, that's the disadvantage described by me as well. An oversimplified example is:
The idea is that the An implementor of NOTE: An idea might be to return errors from the trait methods, but this was merely written as an example. This is indeed more advanced but definitely not extreme. |
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…ansitions between states for the typestate Connection Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
dffbf28
to
8fff813
Compare
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.
I like the further separation of old/new code! As you know, in the next step I'd mostly like to see usage of this in libvcx. I'd suggest there to keep similar separation between the old/new approach so we don't break libvcx wrappers.
…to a different module Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #739 +/- ##
===========================================
- Coverage 54.73% 29.96% -24.77%
===========================================
Files 363 379 +16
Lines 37122 30910 -6212
Branches 8089 6283 -1806
===========================================
- Hits 20317 9262 -11055
- Misses 10832 18939 +8107
+ Partials 5973 2709 -3264
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Hi @gmulhearn have a look at this, I am interested to hear your thought on this. Consider waiting until today's video recording is uploaded on https://wiki.hyperledger.org/display/ARIES/2023-01-26+Aries-vcx+community+call where @bobozaur goes through the approach taken here. |
…ods to their appropriate types Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…ation only Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…nection and implemented Serialize Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…mpl of VagueConnection Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Necessary changes from #741 to get the wrapper working are done. I'd say this PR is in it's final state, so please feel free to review it. |
Just finished a pass thru and couldn't really find anything other than a few small things. Looks really good. I'm not too versed with the |
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…ccepting function Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
…string Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
One oddity I've noticed is that the invitee's request message it makes the message's thid equal to the invitation message ID, rather than a new unique ID. Is this ok? IMO it would be cleaner and potentially less confusing if the invitee sets the thid of this protocol to a new unique ID. Or have I misunderstood something? Also another thing; |
@gmulhearn I replicated the old behavior, so I'm not 100% certain of the implementation details, but from my limited understanding a pairwise invitation is for a pair of agents. You wouldn't expect a second invitee to accept it. So the thread ID can remain the invitation ID, as it leads to contiguous context tracking. For the Request ID, it's out of scope for this PR. It's the old behavior and while I agree it should change, probably many things could/should 😅 . |
The current failure on nodejs serialization in CI is fixed in this PR |
@gmulhearn is |
Let's wait for @mirgee @gmulhearn approvals and then we can merge |
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.
Lgtm!
Kk no worries, I might open an issue where further discussion can happen. But ye agreed, not in scope here |
Very basic draft implementation for a typestate Connection type.
Note that the inner methods modifications are minimal for now, as the first step was to transpose the nested enums to typestate.