Comments (8)
Don't think so - see here
from kademlia.
but the id is computed randomly, right? what I mean is that not only it should delete nodes with the same id, but also nodes with the same ip/port.
from kademlia.
from kademlia.
For example, if you start a server for bootstrapping and 2 nodes, if one of the nodes reconnects and then goes offline again, the remaining node will try to send two messages to the offline node:
Type a command(get/set):
set hello byebye
Did not received reply for msg id b'dyK00zT4pkYKRX3uZJ+pWIJ5TH0=' within 5 seconds
Did not received reply for msg id b'jQMY0ZiKXqz9UxC66BuYPOBVqWQ=' within 5 seconds
no response from 127.0.0.1:1235, removing from router
no response from 127.0.0.1:1235, removing from router
Value set.
BTW, I'm using the python3.5 branch
from kademlia.
from kademlia.
I think I didn't explain it well enough:
That happens when one of the nodes connects, disconnects, connects again and finally disconnects. I'm not talking about two nodes running at the same time on the same machine, what I mean is that a new node will be created and stored in the table even if it has already been stored before (which happens when the same node connects to the network multiple times, as a different id is created each time).
from kademlia.
I'm not sure why the node id would change on disconnect. If you mean in the case that someone destroys the existing Server
object and then instantiates another, then I suppose this would happen - but I'm not sure that this would be a common occurrence. If there's a risk that your python process may die - then use the saveState
and loadState
methods on Server
and your new instance will have the same node id and list of bootstrappable neighbors.
from kademlia.
Perfect, I will try that. Thanks!
from kademlia.
Related Issues (20)
- How can i use kademlia behind a NAT? HOT 1
- any example to find and download files in kademlia? HOT 1
- Periodic republishing of key-value pairs causes TTL expiration deletion to fail?
- bug report : Remove nodes with same ip/port HOT 1
- KBucket splitting is flawed. HOT 8
- Listen to a port if change happens (for example if one peer puts some data into the DHT) HOT 1
- Question about the routing table
- Unexpected type conversion in buckets HOT 1
- load_state does not await bootstrap HOT 1
- KBucket.replacement_nodes is never pruned HOT 7
- IPv4-only node communicating with dual stack node HOT 1
- Fails to bootstrap node in example HOT 6
- Can write permissions be set for keys on Kademlia? HOT 1
- Add interval for refresh_table HOT 1
- Consider using github actions as CI HOT 1
- Use package management tool like poetry HOT 1
- Consider add a second_node.py example HOT 3
- PyPI sdist doesnt contain requirements.txt HOT 1
- Network collapses when Node is closed HOT 11
- How can i read nodes? 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 kademlia.