Skip to content

Conversation

@sedited
Copy link
Member

@sedited sedited commented Nov 28, 2022

This includes:

  • Tracking the swapd connection status
  • Unique peerd Id's
  • Taker reconnects on checkpoint restore
  • Reporting back on initial connect failure

sedited and others added 30 commits November 14, 2022 23:15
This allows us to consistently inform the user on the connection status
of the swap.

Peerd now emits Disconnected and Reconnected requests to farcasterd,
which in turn can route them on to swapd.
The connect command now allows a user to manually trigger a connect for
a restored swap that was previously unable to connect.
was calling colorize func, not swap_id itself
Handle Connect msg properly for running and restoring swapd

Peerd: Add a Pong to our own hacky handshake

Peerd: Only insert protocol messages to unchecked_msg_cache
Farcaster: Correct handling of restoring tsm connection
Ensure ConnectSuccess message is only expected for Taker swaps

Handle new and failed connections in a coherent manner

Trigger peerd termination externally, not internally
log swapids if awaiting connection
Peerd: Emit Reconnected only after checking cached messages

Do not reconnect as a listener-spawned peerd
@sedited sedited added refactor farcaster.dev testing Currently apply (or to be applied) on farcaster.dev backend reliability Feature increasing the reliability of the service labels Nov 28, 2022
@sedited sedited changed the title Peerd connect treatment rebase Refactor: Improve reliability of peerd connections Nov 28, 2022
Copy link
Member

@h4sh3d h4sh3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently testing swaps against fc.dev. This is my first round of review.

I can see this in my logs, not sure what triggers it and if it is related to this work or not:

[2022-11-29T10:18:23Z WARN  farcaster_node::swapd::swap_state] Not on RefundSig state

This is happening as Bob.

@sedited
Copy link
Member Author

sedited commented Nov 29, 2022

I can see this in my logs, not sure what triggers it and if it is related to this work or not:

[2022-11-29T10:18:23Z WARN  farcaster_node::swapd::swap_state] Not on RefundSig state

This is happening as Bob.

This is unrelated, it's also logged on main.

Copy link
Member

@h4sh3d h4sh3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last round, mostly minor comments, feel free to discard the ones that you consider not important.

@h4sh3d h4sh3d merged commit 5d8a61f into farcaster-project:main Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

farcaster.dev testing Currently apply (or to be applied) on farcaster.dev backend refactor reliability Feature increasing the reliability of the service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants