This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Network testing framework simulations fixes#119
Closed
zelig wants to merge 6 commits into
Closed
Conversation
* refactor simulations/network connection getters to support avoiding simultaneous dials between two peers If two peers dial simultaneously, the connection will be dropped to help avoid that, we essentially lock the connection object with a timestamp which serves as a ban on dialing for a period of time (dialBanTimeout). * The connection getter InitConn can be wrapped and passed to the nodes via adapters.NodeConfig#Reachable field and then used by the respective services when they initiate connections. This massively stablise the emerging connectivity when running with hundreds of nodes bootstrapping a network * introduce EnableMsgEvents boolean field in NodeConfig
rlpx tries to send discreason to disconnected peer if the connection is net.Pipe (in-memory simulation) it hangs forever, since net.Pipe does not implement a write deadline. This commit adds error checking on the SetWriteDeadline call and only tries to send the disconnect reason message if there is no error
to support debugging in-memory network simulations multiple peers are logging
the server refuses to redial static peers if using dialstate.addstatic call instead the dialtask is directly appended to the queue this fixes the no redial problem but is clearly a hack
* SetupConn now returns error * dial checks the error and calls resolve on failed dial only
ed2cc12 to
00e9d62
Compare
|
We are going to PR this to master, closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is fixing some of the issues that prevents network simulations from working properly
causing deadlocks or failing redials
the last commit is a hack!
overall the PR causes 3 tests to fail: