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

Add whitelisting of users before transport starts #2889

Closed
wants to merge 1 commit into from
Closed

Add whitelisting of users before transport starts #2889

wants to merge 1 commit into from

Conversation

andrevmatos
Copy link
Contributor

UDP is noop for now, but for matrix, ensure invites sent while offline are properly handled
Fix #2779 , as per 2. of #2779 (comment)

@LefterisJP
Copy link
Contributor

@andrevmatos Don't say that this fixes #2779 since we can't confirm this without a reproducible test case. The way it's worded now it will close #2779 if merged.

@ulope
Copy link
Collaborator

ulope commented Oct 26, 2018

I tested this with one of the hanging scenarios from before (with an existing token and node state) and it immediately still hung on the first transfer.

Edit: I haven’t checked the node logs though. It’s still possible that this fixes the communication issue but we could for example run into the nonce mismatch problem.

Will check when I’m home.

UDP is noop for now, but for matrix, ensure invites sent while offline
are properly handled
Copy link
Contributor

@hackaugusto hackaugusto left a comment

Choose a reason for hiding this comment

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

AFAICR this is not fixing the problems we discussed.

We must call _initialize_message_queues before the transport handles incoming messages. This is necessary to ensure the messages stay in the correct order, otherwise there is race condition where incoming messages can trigger new Send events which end up scheduled in before the ones in the queue.

With that said, this really needs proper documentation. If I recall correctly we are doing the whitelisting prior to starting the transport because otherwise valid invites would be lost, there is not mention in the code or in the commits about the race and how it's being fixed.

raiden/network/transport/matrix.py Outdated Show resolved Hide resolved
@andrevmatos
Copy link
Contributor Author

Included and superseded by #2948 . @hackaugusto 's comments will be addressed there.

@andrevmatos andrevmatos closed this Nov 7, 2018
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.

5 participants