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

Fix stcpr transport establishment issues #813

Merged
merged 10 commits into from
Jun 21, 2021

Conversation

i-hate-nicknames
Copy link
Contributor

@i-hate-nicknames i-hate-nicknames commented Jun 17, 2021

Did you run make format && make check?

Fixes #806

Changes:

  • stcp and stcpr single redial try now has a timeout of 3 seconds
  • changed transport entry structure: first key is original connection initiator
  • connection initiator is now responsible for redialing
  • added error responses to transport handshake
  • prevent visors that do not have public IP to perform stcpr bind operation

How to test this PR:
Run two visors v1 and v2. v1 should have public IP, v2 shouldn't. Public Key of v1 should be less than Public Key of v2.
Set up an stcpr transport from v2 to v1 manually, then stop v2. Restart v2, remove transport and establish it again. Transport should be added in UP state.
Stop v2 again. Start it again, transport should automatically switch to UP state on both ends.

@i-hate-nicknames i-hate-nicknames marked this pull request as draft June 17, 2021 09:12
@i-hate-nicknames i-hate-nicknames changed the title Add timeout to redial operation Fix stcpr transport establishment issues Jun 17, 2021
@i-hate-nicknames i-hate-nicknames marked this pull request as ready for review June 18, 2021 07:15
pkg/transport/entry.go Outdated Show resolved Hide resolved
pkg/transport/entry.go Show resolved Hide resolved
pkg/transport/handshake.go Show resolved Hide resolved
pkg/transport/managed_transport.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ersonp ersonp left a comment

Choose a reason for hiding this comment

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

Everything looks good.

@jdknives jdknives merged commit e23328e into skycoin:develop Jun 21, 2021
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.

3 participants