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

Make progress serializable #438

Conversation

TheCharlatan
Copy link
Member

@TheCharlatan TheCharlatan commented May 15, 2022

Make the progress cli call serializable. Closes #285 . Based on #437 .

progress on current main:

swap1-cli progress 0x4102d9b10eb81644764e792e8f5fa3131121eb77fdf6ad3d2c18f1a6175ef9db                                                             ✔
Proposing to take swap 0x4102…f9db to Maker remote peer
State transition: AliceState(Start) -> AliceState(Commit)
Success: State transition: AliceState(Commit) -> AliceState(Reveal)

progress after this PR:

swap1-cli progress 0x2d1cc3c8c3a75c9a0e0192adb0975620685d7c510abc3c4e7a145a6ddeff3df3
---
state_transitions:
  - AliceState(Start) -> AliceState(Commit)
  - AliceState(Commit) -> AliceState(Reveal)
messages:
  - Proposing to take swap to Maker remote peer

@codecov-commenter
Copy link

codecov-commenter commented May 15, 2022

Codecov Report

Merging #438 (267f5d3) into main (358027e) will decrease coverage by 0.2%.
The diff coverage is 7.8%.

@@           Coverage Diff           @@
##            main    #438     +/-   ##
=======================================
- Coverage   13.1%   12.9%   -0.2%     
=======================================
  Files         27      27             
  Lines       7843    7893     +50     
=======================================
- Hits        1028    1019      -9     
- Misses      6815    6874     +59     
Impacted Files Coverage Δ
src/farcasterd/runtime.rs 0.0% <0.0%> (ø)
src/swapd/runtime.rs 0.0% <0.0%> (ø)
src/syncerd/runtime.rs 0.0% <ø> (ø)
src/cli/command.rs 29.8% <33.3%> (ø)
src/rpc/request.rs 15.7% <41.7%> (+0.5%) ⬆️
src/rpc/client.rs 55.7% <0.0%> (-13.9%) ⬇️
src/service.rs 11.4% <0.0%> (-2.6%) ⬇️
src/syncerd/types.rs 25.5% <0.0%> (-0.3%) ⬇️
src/error.rs 0.0% <0.0%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 358027e...267f5d3. Read the comment docs.

@TheCharlatan TheCharlatan force-pushed the makeProgressSerializable branch from c539ce1 to 9b72794 Compare May 30, 2022 16:35
@TheCharlatan TheCharlatan marked this pull request as ready for review June 6, 2022 17:19
@TheCharlatan TheCharlatan force-pushed the makeProgressSerializable branch from 9b72794 to 4b0b861 Compare June 6, 2022 17:24
@TheCharlatan TheCharlatan force-pushed the makeProgressSerializable branch from 4b0b861 to 88d318e Compare June 6, 2022 18:01
@TheCharlatan TheCharlatan marked this pull request as draft June 6, 2022 18:02
@TheCharlatan TheCharlatan marked this pull request as ready for review June 7, 2022 07:52
@h4sh3d
Copy link
Member

h4sh3d commented Jun 8, 2022

I want to propose an alternative approach that doesn't change the idea of progress being a stream of info. What I want to try should look like:

---
progress:
- message: Proposing to take swap to Maker remote peer
- state_transition: AliceState(Start) -> AliceState(Commit)
- state_transition: AliceState(Commit) -> AliceState(Reveal)

The idea is also to keep the correct order of events sent to progress

@TheCharlatan
Copy link
Member Author

Cosing in support of #479

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.

Make all cli messages serializable
3 participants