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

p2p: Add network simulation framework #14982

Merged
merged 10 commits into from
Sep 25, 2017
Merged

Conversation

lmars
Copy link
Contributor

@lmars lmars commented Aug 16, 2017

This PR introduces a network simulation framework which can be used to run simulated networks of devp2p nodes.

The intention is to use this for testing protocols, performing benchmarks and visualising emergent network behaviour.

See p2p/simulations/README.md for a detailed description.

This replaces #3102.

@zelig
Copy link
Contributor

zelig commented Aug 16, 2017

This PR is a work of the last 8 months and went through several phases of evolution. The version can be considered pretty extensively tested and carefully reviewed. But I dont want to put me as a reviewer.

// $ p2psim node connect node01 node02
// Connected node01 to node02
//
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move this to the top level cmd directory.

p2p/message.go Outdated

// MsgEventer wraps a MsgReadWriter and sends events whenever a message is sent
// or received
type MsgEventer struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please unexport this.

@lmars
Copy link
Contributor Author

lmars commented Sep 15, 2017

@fjl comments addressed in cd12a9e and 30810aa (I have also rebased on master)

@fjl
Copy link
Contributor

fjl commented Sep 18, 2017

@lmars please fix tests

@lmars
Copy link
Contributor Author

lmars commented Sep 22, 2017

@fjl I fixed the message filter tests in 6127cfe, one of the Travis builds timed out but I'm not sure if that is an intermittent failure on master as it seems unrelated to the changes in this PR.

@fjl fjl merged commit 9feec51 into ethereum:master Sep 25, 2017
@karalabe karalabe removed this from the 1.7.0 milestone Sep 25, 2017
@karalabe karalabe added this to the 1.7.1 milestone Sep 25, 2017
vincentserpoul pushed a commit to vincentserpoul/go-ethereum that referenced this pull request Nov 22, 2017
This commit introduces a network simulation framework which
can be used to run simulated networks of devp2p nodes. The
intention is to use this for testing protocols, performing
benchmarks and visualising emergent network behaviour.
@gbalint gbalint deleted the p2p-simulations branch December 12, 2017 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants