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

Remove msg-sending IO from Connection protocol #937

Merged
merged 10 commits into from
Aug 31, 2023
Merged

Conversation

Patrik-Stas
Copy link
Contributor

@Patrik-Stas Patrik-Stas commented Aug 14, 2023

Remove message sending IO from Connection protocol state machines

Changes

Inviter

  • remove Responded state
  • in state InviterConnection<Requested>:
    • remove method send_response
    • add method get_connection_response_msg

Invitee

  • in state InviteeConnection<Responded>

    • remove method send_ack
    • add method get_ack
  • in state InviteeConnection<Invited>

    • remove method send_request
    • add method prepare_request
  • in state InviteeConnection<Requested>

    • change return type of handle_response from InviteeConnection<Responded> to InviteeConnection<Completed>
  • remove state Responded

    • previously the state sequence was like this:
    Requested ----(handle_response)----> Responded ----(send_ack)----> Completed
    
    • now tracking whether ack has been sent or not became responsibility of the state machine consumer. The sequence is now following:
    Requested ----(handle_response)----> Completed
    

Breaking Changes

  • Removal of Invitee's state Responded. Existing state machines in such state won't be deserializable anymore.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2023

Codecov Report

Merging #937 (11cbec1) into main (f8aaadc) will increase coverage by 0.11%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #937      +/-   ##
==========================================
+ Coverage   39.35%   39.46%   +0.11%     
==========================================
  Files         417      415       -2     
  Lines       28986    28906      -80     
  Branches     6185     6174      -11     
==========================================
+ Hits        11407    11408       +1     
+ Misses      14236    14155      -81     
  Partials     3343     3343              
Flag Coverage Δ
unittests-aries-vcx 39.46% <0.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...cx/src/protocols/connection/generic/conversions.rs 0.00% <ø> (ø)
aries_vcx/src/protocols/connection/generic/mod.rs 0.00% <0.00%> (ø)
...vcx/src/protocols/connection/generic/thin_state.rs 0.00% <ø> (ø)
aries_vcx/src/protocols/connection/invitee/mod.rs 0.00% <0.00%> (ø)
...c/protocols/connection/invitee/states/requested.rs 0.00% <0.00%> (ø)
aries_vcx/src/protocols/connection/inviter/mod.rs 0.00% <0.00%> (ø)
aries_vcx/src/protocols/connection/serializable.rs 0.00% <ø> (ø)

... and 3 files with indirect coverage changes

Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
…files

Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
@Patrik-Stas Patrik-Stas changed the title Modify connection inviter to extract msg sending out Remove msg-sending IO from Connection protocol Aug 31, 2023
@Patrik-Stas Patrik-Stas merged commit 1990fbc into main Aug 31, 2023
30 checks passed
@Patrik-Stas Patrik-Stas deleted the connection/ioless branch August 31, 2023 15:35
Patrik-Stas pushed a commit that referenced this pull request Sep 1, 2023
* Sync up aries-vcx demo with Connection protocol changes

---------

Signed-off-by: nain-F49FF806 <126972030+nain-F49FF806@users.noreply.github.com>
bobozaur pushed a commit that referenced this pull request Sep 14, 2023
* Remove msg-sending IO from Connection protocol (#937)

Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Patrik-Stas pushed a commit that referenced this pull request Sep 15, 2023
* Sync up aries-vcx demo with Connection protocol changes

---------

Signed-off-by: nain-F49FF806 <126972030+nain-F49FF806@users.noreply.github.com>
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.

4 participants