Comments (5)
Simple idea for pull-style sync: Add highest-known sequence number of destination node to the PING packet. Define that nodes should return their local record in PONG if seq is higher than the one in PING.
from devp2p.
Thinking about the 1st question, can we list some of the scenarios under consideration?:
- Node changes IP/port
- Node changes its identity?
- Node changes id scheme
- Other stuff in the ENR that does not affect the id/handshake eg: "Client Name: geth" or some such...
If the node is changing the IP/port, then push or pull it's an attack scenario [i.e. 1) I establish handshake, 2) my enr goes into peer dht 3) i tell peer 'hi I am now on a different ip' but my source IP is spoofed] So....maybe prefer to push (well, the peer can't pull from an old ip or port) but in this case the recipient verifies the incoming UpdateMe message with the WhoAreYou (and nonce) to verify ?
Problem: what if two nodes need to update themselves to each other at the same time? They wouldn't be able to without an intermediary. Unsolvable non-issue?
If the Node is changing identity...similar? But the node should be able to announce in advance? Over existing channel, send "UpdateMe" and again re-establish channel.
If nothing channel-related updated, take UpdateMe message , process and preserve existing channel?
from devp2p.
Been thinking about this in the context of EIP-868 last few days. We need a similar mechanism for v4 to implement record sync on top of the new enrRequest. I'll implement it as follows:
When a node pings us or we receive a pong reply, the sequence number in the message is compared
to the one in the local node table. If our local copy has lower sequence number, we enqueue a request to retrieve the latest version using enrRequest.
from devp2p.
Best solution so far: since FINDNODE takes distance, requesting distance zero is equivalent to enrRequest.
from devp2p.
Yes, for v4. And for v5 bucket zero could represent the same thing. However for the scenario that IP changes, the node may still need a Push message of some type, or otherwise the handshake would need to be reestablished I suppose.
from devp2p.
Related Issues (20)
- besu / snap sync questions
- RLPx: Incorrectly says capability message IDs start at 0x11, really they start at 0x10 HOT 1
- design rationale behind eth HOT 1
- discv5: support multi-packet talk. HOT 4
- Ethereum and JavaScript Integration HOT 3
- Error in DiscV4 documentation HOT 1
- best way to learn ethereum network HOT 4
- discv5 topic discovery: efficiency vs resilience tradeoff HOT 5
- eth67: removal of GetNodeData
- discv5: NAT traversal via Rendezvous protocol [WIP] HOT 7
- caps/eth.md: update spec to include Paris deprecation of `NewBlockHashes`/`NewBlock`
- sig missing from handshake's auth spec HOT 3
- Inconsistency among different clients on when to use a specific diconnect reason HOT 1
- [Question] [RLPX] auth / auth-ack padding HOT 4
- Receiving weird RLP message from GETH client HOT 4
- discv5: protocol version v5.2 HOT 6
- discv5: sub-protocol data transmission HOT 12
- Eth68 encoding of `txType` doesn't match client implementations for `NewPooledTransactionHashes` HOT 3
- Do I need my own bootnodes and will the static peers be used for discovery? HOT 1
- Not getting any inbound connections HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devp2p.