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

Handshake synchronyzation #343

Open
ivcosla opened this issue May 9, 2019 · 2 comments
Open

Handshake synchronyzation #343

ivcosla opened this issue May 9, 2019 · 2 comments

Comments

@ivcosla
Copy link

ivcosla commented May 9, 2019

Concern raised by @nkryuchkov

https://github.com/skycoin/skywire/blob/mainnet/pkg/transport/handshake.go#L48 until 56 those operations might need to be guarded by mutexes to prevent a wrong order between write and read operations, leading to chacha bug appearing when creating a transport.

@ivcosla ivcosla self-assigned this May 9, 2019
@ivcosla ivcosla added this to To do in Skywire Mainnet via automation May 9, 2019
@ivcosla
Copy link
Author

ivcosla commented May 9, 2019

The following log is the result of an intermediary node restart cycle of more than 100 times in which it reconnects with nodes A and B, while at the same time messages are sent over chat app from node A to node C and back.

Data races regarding to handshakes seem to disappear (#346 ) with this PR. There are however chacha errors, note that all of them are the same:

[2019-05-09T21:05:06+02:00] WARN [trmanager]: Failed to re-establish transport: read: chacha20poly1305: message authentication failed

logB.txt

@ivcosla
Copy link
Author

ivcosla commented May 9, 2019

If node B is not restarted, thus making route between nodes A and C stable chacha encryption error doesn't seems to appear while sending messages.

@jdknives jdknives changed the title research handshake need for synchronization. Handshake synchronyzation May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants