Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 21 2017 21:24
    @jpitts banned @Musk55
Felix Lange
@fjl
I'm cleaning up rlpx.md this week, I will remove the section about framing because nobody ever implemented it.
Mikhail Kalinin
@mkalinin
thx Felix. I know at least one client which uses it, it’s pyethapp. It also was imblemented in EthereumJ but this implementation have never be used
Felix Lange
@fjl
I shouldn't have said "nobody ever implemented it"
That's not true, we had it in Go too. It's just that it didn't ever get enabled for real because we didn't come to consensus about rlpx v5.
Mikhail Kalinin
@mkalinin
ok, got it. thanks for details!
rehs0y
@y0sher
Hi, is there a specific membership management protocol ethereum uses to spread gossip messages across the p2p network ? as in SWIM or SCAMP or w/e ? I know about Whisper but isn't it a different part from devp2p ?
I would be glad to some more info or maybe just ref to code that will help me figure that out. @fjl (mentioned you since probably you can help me ;)
Felix Lange
@fjl
@y0sher can you explain your question more? I don't fully understand it yet.
rehs0y
@y0sher
@fjl In what way does DEVP2P does message dissemination. I understand Kademlia is used for network topology and discovery. but that Kademlia doesn't include message dissemination protocol. To make sure a message is disseminated to all network participants we should hold some part of the network members (or all depends on the protocol). How is this implemented in go-ethereum and where. thanks :)
rehs0y
@y0sher
aka gossip protocol
Herman Alonso Junge
@hermanjunge
The subprotocol is implemented in the eth library of github.com/go-ethereum/ethereum.
You can also check as comparison to deepen your understanding what swarm and whisper are doing, in their respective libraries inside that repository
This tutorial, also, gives you a good starting point to understand about the protocols that run over devp2p: https://github.com/ethereum/go-ethereum/wiki/Peer-to-Peer
Felix Lange
@fjl
just pushed discovery v4 spec to ethereum/devp2p: https://github.com/ethereum/devp2p/blob/master/discv4.md
please check it out and see if it matches your understanding of the protocol
up next is removing all the confusing content from rlpx.md
Holger Drewes
@holgerd77
@fjl Cool, thanks! :+1:
Frank Szendzielarz
@FrankSzendzielarz

@fjl I think in the implementation advice it would be a good idea to draw attention to the Maykounkov/Mazieres implementation advice section "4.1 Optimized Contact Accounting". (https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf ) That version of the paper, with those implementation details, in my opinion dramatically changes the protocol.

Also I think Recursive Lookup is a misnomer (minor nitpick). A node instance's lookup process is iterative (1. Call 3 nodes with FindNode 2. Asynchronously collate results. 3. Wait on a semaphore for any of the 3 lookups to complete. 4. Check if there are new nodes in the k-sized nearest targets list 5. Launch a new FindNode asynchronous process) From the overall network perspective, the process is recursive in the sense that an incoming FindNode may trigger a FindNode in another node, which may trigger a FindNode etc etc... which will only continue meaningfully until the original FindNode's timeout expires, or until a downstream node actually finds the target.

Finally, I think what confused me when I first looked at that side of things was the relationship between the discovery protocol and the higher level protocols. Eg: if a ping timeout throws the node out of the k-bucket list, should that close any open TCP connection of encryption/protocol handshake relationships, that kind of thing.
Mikhail Kalinin
@mkalinin
Hello guys, wondering if there any research or ideas on improving ETH protocol to cope with huge amount of data we already have in the Mainnet?
timmmm
@fluffypomeranian
Mikhail Kalinin
@mkalinin
thx Tim
timmmm
@fluffypomeranian
np
Holger Drewes
@holgerd77

Hi, for information: just merged the light client protocol (LES/2) implementation of the ethereumjs-devp2p library and published as v2.5.0 on npm: https://www.npmjs.com/package/ethereumjs-devp2p

If you want to try it out, have a look at the peer-communication-les.js example in the examples folder.

Felix Lange
@fjl
@FrankSzendzielarz re. FindNode may trigger FindNode on another node: that's not true. All FindNode requests are sent by the node performing the lookup. How could it be phrased better?
I can add some more text explaining that the content of the node table is unrelated to the 'peer set' of the node. Would that help?
Frank Szendzielarz
@FrankSzendzielarz
@fjl "FindNode may trigger FindNode on another node: that's not true." Oh, yes you are right. Not sure now where I saw FindNode actually being "recursive". I will have a think about the text.
Abhishek Upperwal
@upperwal

Related to: Devp2p [Go]
Scope: Only using Devp2p module.
Discovery Protocol: Using a bootnode with DiscoveryV5 enabled

P2PServer Config Looks like this:

p2pServerConfig := p2p.Config {
    PrivateKey: privKey,
    Name: name,
    MaxPeers: 3,
    Protocols: []p2p.Protocol{protocol},
    ListenAddr: fmt.Sprintf(":%d", port),
    DiscoveryV5: true,
    BootstrapNodesV5: bootstrapNodesV5,
    NAT: nat.Any(),
}

After stating the p2p server I am assuming my node will connect to the bootnode and query for adjacent nodes. Upon receiving the information about the adjacent nodes Devp2p will automatically (Devp2p will take care of this) connect to these nodes and I can check it with the following code:

var connected bool
for !connected {
    time.Sleep(time.Millisecond * 50)
    connected = server.PeerCount() > 0
}
fmt.Println("Connected to peer.")

Is this assumption correct or do I have to listen for some events and connect to the nodes using AddPeer() method?

Currently my node is busy waiting in the "connected" loop forever with 0 peer count and bootnode displays:

TRACE[03-26|00:49:54] <-net.queryReq
TRACE[03-26|00:49:54] <-net.queryReq
TRACE[03-26|00:49:54] >>> findnodeHashPacket to b3ba260d465ba8a0@127.0.0.1:3000
TRACE[03-26|00:49:54] <-net.queryReq
TRACE[03-26|00:49:54] >>> findnodeHashPacket to 8a4aa4f80a51c393@127.0.0.1:3001
TRACE[03-26|00:50:19] <-net.read
TRACE[03-26|00:50:19] >>> neighborsPacket to b3ba260d465ba8a0@127.0.0.1:3000
TRACE[03-26|00:50:32] <-net.read
TRACE[03-26|00:50:32] >>> neighborsPacket to 8a4aa4f80a51c393@127.0.0.1:3001
Abhishek Upperwal
@upperwal
@fjl Could you please help me with the above query?
Felix Lange
@fjl
Package p2p doesn't use discovery v5 by default
You can query it yourself and call AddPeer if you want
Abhishek Upperwal
@upperwal
@fjl Thanks! Got it now.
Zbigniew Kossowski
@zkossowski
who knows how to resolve failed communication

[2018-04-04T13:51:37.091] [INFO] EthereumNode - WARN [04-04|13:51:37] Rolled back headers count=96 header=5098559->5098559 fast=0->0 block=0->0

[2018-04-04T13:51:37.094] [INFO] EthereumNode - WARN [04-04|13:51:37] Synchronisation failed, dropping peer peer=138ec659b5ec0202 err="retrieved hash chain is invalid"

samngms
@samngms
For Devp2p Hello message, where can I find more info about the p2pVersion? The wiki said it must be "1", but ethereumj is actually "3", ethereum-go is "5", ethereumjs is "4". What's the difference?
jwasinger
@jwasinger

@all has there been any research into how the networking side of things will look with sharding? I read https://ethresear.ch/t/a-minimal-sharding-protocol-that-may-be-worthwhile-as-a-development-target-now/1650 and the following piqued my interest:

The capability of having 100 separate shard p2p networks, and building and sending collations across those networks

Hsiao-Wei Wang
@hwwhww
@jwasinger also see https://gitter.im/ethereum/sharding :)
jwasinger
@jwasinger
thanks @hwwhww . i posted here because im curious about what the DHT for a sharded network might look like, and this room has a high concentration of p2p networking devs. looks like there has been a similar question in that room
Hsiao-Wei Wang
@hwwhww
True! I’m also hope we can get some thoughts from the p2p experts! 🙏
Nick Savers
@nicksavers
Not just that. Since Whisper is considering moving to libp2p and I think @fjl is also considering it. That might also be the moment to switch....
Felix Lange
@fjl
@samngms p2pVersion is not used for anything right now
samngms
@samngms
Thanks @fjl
agahEbrahimi
@agahEbrahimi
Hello,
I was wondering if there are any stand alone protocols/libraries/modules for devp2p. I've seen one for python but not for other languages.
Thank you
samngms
@samngms
jannikluhn
@jannikluhn
Hello @fjl and everyone else interested! I've written down an idea for a sharding network here: https://ethresear.ch/t/torus-shaped-sharding-network
Would love to get some feedback on this in case you have some spare time :)
Felix Lange
@fjl
Nice idea!
agahEbrahimi
@agahEbrahimi
@samngms
Thank you
rehs0y
@y0sher
Hi, Is bonding in ethereum is like creating a session between nodes ?
Felix Lange
@fjl
'bonding' is the go-ethereum name for the 'endpoint proof' procedure in discovery. See https://github.com/ethereum/devp2p/blob/master/discv4.md#endpoint-proof.
rehs0y
@y0sher
@fjl thanks, so FindNode packets are encrypted in any way ?