Code Monkey home page Code Monkey logo

dp2p's Introduction

Install

$ go get github.com/etclabscore/dp2p/...

or

$ go get github.com/etclabscore/dp2p/...
$ cd $GOPATH/src/github.com/etclabscore/dp2p
$ go install

Help

$ dp2p

  Tools for simple interaction and queries on the devp2p protocol.

Usage:
  dp2p [command]

Available Commands:
  addpeer     Add an ethereum enode as a peer
  findnode    Send a devp2p FINDNODE request to an enode (with preliminary PING/PONG)
  help        Help about any command
  ping        Send a PING request to a given enode

Flags:
  -h, --help   help for dp2p

Use "dp2p [command] --help" for more information about a command.

Use

Returns exit code 0 if successful, 1 if failed.

Will print all logs available from the go-ethereum p2p and discover libraries in use. As with the go-ethereum client, these go to stderr. Relevant program output (eg. neighbors) will go to stdout.

addpeer

$ dp2p addpeer -a ':30301' -t $((60*60)) 'enode://66498ac935f3f54d873de4719bf2d6d61e0c74dd173b547531325bcef331480f9bedece91099810971c8567eeb1ae9f6954b013c47c6dc51355bbbbae65a8c16@54.148.165.1:30303'

ping

$ dp2p ping 'enode://66498ac935f3f54d873de4719bf2d6d61e0c74dd173b547531325bcef331480f9bedece91099810971c8567eeb1ae9f6954b013c47c6dc51355bbbbae65a8c16@54.148.165.1:30303'

findnode

$ dp2p findnode 'enode://66498ac935f3f54d873de4719bf2d6d61e0c74dd173b547531325bcef331480f9bedece91099810971c8567eeb1ae9f6954b013c47c6dc51355bbbbae65a8c16@54.148.165.1:30303'

Check default go-ethereum/multi-geth bootnodes

If you have a go-ethereum source (eg. ethoxy/multi-geth or ethereum/go-ethereum) available in your $GOPATH, you can run checks for default bootnodes with

$ ./examples/check-bootnodes.sh [|<chain> ...]

dp2p's People

Contributors

meowsbits avatar whilei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

yazzyyaz changqa

dp2p's Issues

'ping' command seems to fail with Parity clients

ubp52 ~/go/src/github.com/etclabscore/dp2p dev-scripts2 %
$ while read -r c en; do echo "$c $en" && ./dp ping -t 1000 "$en"; done <test_parity_nodes.txt
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://50808461dd73b3d70537e4c1e5fafd1132b3a90f998399af9205f8889987d62096d4e853813562dd43e7270a71c9d9d4e4dd73a534fdb22fbac98c389c1a7362@178.128.55.119:30303
INFO [03-28|19:28:48.785] New local node record                    seq=1 id=74a4f03d6f9e7f3c ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:48.785] >> PING/v4                               id=04a037eabb45f18c addr=178.128.55.119:30303 err=nil
RPC timeout
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://0daae2a30f2c73b0b257746587136efb8e3479496f7ea1e943eeb9a663b72dd04582f699f7010ee02c57fc45d1f09568c20a9050ff937f9139e2973ddd98b87b@159.89.169.103:30303
INFO [03-28|19:28:49.809] New local node record                    seq=1 id=9f72f82b8cc1add8 ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:49.809] >> PING/v4                               id=22ec854117125934 addr=159.89.169.103:30303 err=nil
RPC timeout
Geth/v5.5.1-8a3bc2d/linux/go1.9.7 enode://7e2995638c8a3c7eb721e1005edc0ff046060561fc5903733b62e1b22a224dc28134331111f5c89661edc7e217dd528953c17071ecb6a46f4196ec027a877ea3@35.192.216.216:30306
INFO [03-28|19:28:50.836] New local node record                    seq=1 id=48239749a6eb0925 ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:50.836] >> PING/v4                               id=45c950527320975b addr=35.192.216.216:30306 err=nil
RPC timeout
Parity-Ethereum/EthereumClassicSOLO/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://e212927fecf112d705b56bc1dd3f951b7416a5be56748d22b609771bde849452a134f59222cc9d1c2908461b4722bb4a904e582250796474bb9477a56baa47d3@104.248.230.186:40304
INFO [03-28|19:28:51.857] New local node record                    seq=1 id=c6e0d490a85db476 ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:51.858] >> PING/v4                               id=6e25686e9bd026a4 addr=104.248.230.186:40304 err=nil
RPC timeout
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://3fe9705a02487baea45c1ffebfa4d84819f5f1e68a0dbc18031553242a6a08e39499b61e361a52c2a92f9553efd63763f6fdd34692be0d4ba6823bb2fc346009@178.62.238.75:30303
INFO [03-28|19:28:52.897] New local node record                    seq=1 id=a76458a3486b4392 ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:52.897] >> PING/v4                               id=9359cec51ae10cdb addr=178.62.238.75:30303 err=nil
RPC timeout
Geth/v5.5.1/linux/go1.9.7 enode://0b307df337d46b45147756780e69cda35b1be6d28996a9f95b650b314156f9072360463468e914c5ce2028cd38ca156bf094fdbdabb2e42418a373f81f7f1396@212.32.247.132:30313
INFO [03-28|19:28:53.919] New local node record                    seq=1 id=f601bc5831ef2419 ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:53.919] >> PING/v4                               id=c2ff322927d1de85 addr=212.32.247.132:30313 err=nil
pong 354.32073ms
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@206.189.68.191:30303
INFO [03-28|19:28:54.296] New local node record                    seq=1 id=45319b62a6b557ec ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:54.296] >> PING/v4                               id=d4731bcf672459cc addr=206.189.68.191:30303 err=nil
RPC timeout
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://c071d96b0c0f13006feae3977fb1b3c2f62caedf643df9a3655bc1b60f777f05e69a4e58bf3547bb299210092764c56df1e08380e91265baa845dca8bc0a71da@68.183.99.5:30303
INFO [03-28|19:28:55.317] New local node record                    seq=1 id=ce2e3a8fce0ccdff ip=<nil> udp=0 tcp=0
TRACE[03-28|19:28:55.317] >> PING/v4                               id=f5fb164a5c76dbb5 addr=68.183.99.5:30303 err=nil
RPC timeout
ubp52 ~/go/src/github.com/etclabscore/dp2p dev-scripts2 %
$ cat test_parity_nodes.txt
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://50808461dd73b3d70537e4c1e5fafd1132b3a90f998399af9205f8889987d62096d4e853813562dd43e7270a71c9d9d4e4dd73a534fdb22fbac98c389c1a7362@178.128.55.119:30303
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://0daae2a30f2c73b0b257746587136efb8e3479496f7ea1e943eeb9a663b72dd04582f699f7010ee02c57fc45d1f09568c20a9050ff937f9139e2973ddd98b87b@159.89.169.103:30303
Geth/v5.5.1-8a3bc2d/linux/go1.9.7 enode://7e2995638c8a3c7eb721e1005edc0ff046060561fc5903733b62e1b22a224dc28134331111f5c89661edc7e217dd528953c17071ecb6a46f4196ec027a877ea3@35.192.216.216:30306
Parity-Ethereum/EthereumClassicSOLO/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://e212927fecf112d705b56bc1dd3f951b7416a5be56748d22b609771bde849452a134f59222cc9d1c2908461b4722bb4a904e582250796474bb9477a56baa47d3@104.248.230.186:40304
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://3fe9705a02487baea45c1ffebfa4d84819f5f1e68a0dbc18031553242a6a08e39499b61e361a52c2a92f9553efd63763f6fdd34692be0d4ba6823bb2fc346009@178.62.238.75:30303
Geth/v5.5.1/linux/go1.9.7 enode://0b307df337d46b45147756780e69cda35b1be6d28996a9f95b650b314156f9072360463468e914c5ce2028cd38ca156bf094fdbdabb2e42418a373f81f7f1396@212.32.247.132:30313
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@206.189.68.191:30303
Parity-Ethereum/v2.2.10-stable-7b1d3e1-20190213/x86_64-linux-gnu/rustc1.32.0 enode://c071d96b0c0f13006feae3977fb1b3c2f62caedf643df9a3655bc1b60f777f05e69a4e58bf3547bb299210092764c56df1e08380e91265baa845dca8bc0a71da@68.183.99.5:30303

and during analysis of https://github.com/etclabscore/enodes i'm finding that "trimming" enodes list based on successful dp2p ping commands gives lists of about 7000 enodes, but with no reported Parity clients. despite expectations for Parity to have about 50% market share.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.