Commit Graph

66 Commits

Author SHA1 Message Date
Brian Muller
65dc646e98 upgraded testing methods, dev dependencies, and travis config 2018-01-01 17:07:40 -05:00
Vicente Dragicevic
a6e50acd84 @python3.5 - Fix saving/loading state (#37)
* Fix await self.find() in crawler

* Fix state loading/saving

* Fix saveStateRegularly (it was using a Twisted function)

* Use loop.call_later for saveStateRegularly and cancel task on server.stop()

* Remove innecessary function

* Add missing initialization of save_state_loop, and changed the checks for Noneness
2017-10-16 23:17:35 +02:00
Vicente Dragicevic
67abd88ec2 Fix await self.find() in crawler (#34) 2017-10-07 12:55:14 -04:00
Justin Holmes
b0db225b98 Allowing swappable protocol_class for Server. (#32)
* Allowing swappable protocol_class for Server.

* Changed protocol_class to be an attribute on the Server class; added tests.
2017-08-31 17:36:22 -04:00
Brian Muller
6045e70ddb Fixes #31 - issue in example 2017-08-30 20:42:21 -04:00
Brian Muller
e8ab5f8335 fix issue in republishing keys with only digest available, fixing #25 2017-03-15 14:40:32 -04:00
faisal burhanudin
55594096d1 missing asyncio and change unittest (#24)
* missing asyincio

* - change unittest twisted using builtin unittest
- fix bytes parameter in hashlib
2016-11-30 14:45:46 -05:00
Brian Muller
125abe7415 fix issue with bit prefix finding in sharedPrefix 2016-08-06 11:16:57 -04:00
Eloahman
de78bd9b5d Async call should be scheduled in loop 2016-08-06 10:46:24 -04:00
Eloahman
080ed21627 Periodic refresh issue fixed for Python3 2016-08-02 09:55:49 -04:00
Brian Muller
464ae5bd1f library now uses asyncio instead of twisted 2016-07-12 08:32:02 -04:00
Brian Muller
6bbd1bfa42 Revert "Comment change"
This reverts commit b37b65cd10.
2016-04-07 10:22:11 +03:00
Prabodh Agarwal
b37b65cd10 Comment change
Added comments for interface as changed in listen() to reflect in kademlia.readthedocs,org page.
2016-04-07 10:16:45 +03:00
Brian Muller
32e4cb7ff6 make sure pyflakes / pep8 run on travis build 2016-04-07 09:47:08 +03:00
Brian Muller
9549bc6a5b make sure that linting is a part of automated tests 2016-04-07 09:42:40 +03:00
Brian Muller
87ea77d12d formating update, bumped version 2016-04-07 09:39:29 +03:00
Prabodh Agarwal
7b29c50c79 Provide ipv6 address support
Provide ipv6 address support
2016-04-07 09:35:37 +03:00
Brian Muller
b9b23e1131 Merge pull request #13 from SkyZH/patch-1
Clean up midpoint calculation in routing table.
2015-10-16 12:03:18 -04:00
呆萌的弛哥SkyZH在银光闪烁的沙滩上面对大海写代码
ac7b3c12ab Update routing.py 2015-10-16 23:49:54 +08:00
呆萌的弛哥SkyZH在银光闪烁的沙滩上面对大海写代码
a9e390126c Update routing.py 2015-10-16 23:43:11 +08:00
Brian Muller
00ecaf5e31 Merge pull request #3 from cpacia/transfer
Bug fixes when transferring key/values
2015-08-09 16:17:12 -04:00
Brian Muller
77186bbf6f added docs to indicate failure state if attempt to save w/o redundancy, closing #5 2015-08-04 17:31:58 -04:00
Chris
237d89b6b6 Created new method welcomeIfNewNode in protocol.
This commit consolidates the maybeTransferKeyValues and addContact calls into
the transferKeyValues method and renames it.
2015-07-17 21:34:25 -04:00
Chris
2f363cba84 Maybe transfer key, values on incoming request.
The existing code only checks if we should call transferKeyValues when we
receive a response to one of our RPCs. We also need to check when receive a
new request from a new node.

This commit adds a new method that is called each time we receive a new request.
2015-07-14 21:29:48 -04:00
Chris
f5b2c13d93 Bug fix in protocol.handleCallResponse
isNewNode was called after the contact was added to the routing table meaning
it would always return false and the key/values would never be transferred.
2015-07-14 21:18:57 -04:00
Brian Muller
ccf18622b4 fixed issue getting keys in networks of size 2 2015-07-07 13:20:13 -04:00
Brian Muller
89f04cf558 bumped version to 0.5 2015-06-27 15:11:55 -04:00
Brian Muller
30dd82082c Merge pull request #2 from muneeb-ali/patch-1
Update intro.rst
2015-06-04 18:12:31 -04:00
Muneeb Ali
e4e0fc6f03 Update intro.rst 2015-06-04 17:58:01 -04:00
Brian Muller
42b6c949ac Merge pull request #1 from cpacia/nodeheapfix
Bug fix in NodeHeap - no duplicates
2015-06-04 16:16:03 -04:00
cpacia
0338af9b83 added __contains__ method to NodeHeap 2015-06-04 16:06:25 -04:00
cpacia
088699bfbb Bug fix in NodeHeap
When running with a large number of nodes it fails to send the store request
to the k closest nodes and instead ends up sending multiple store requests to
the same 4 or 5 nodes.

It appears the cause is a bug in NodeHeap which allows the same node to be
pushed onto the heap multiple times bumping out other legimate nodes.

This pull request just adds some logic to make sure the node isn't already
in the heap before pushing.
2015-06-03 18:05:20 -04:00
Brian Muller
d222050025 added an example of a web interface being added to a node 2015-01-12 15:47:06 -05:00
Brian Muller
c0b05eb6d3 added a query script and test for utils 2015-01-06 21:52:01 -05:00
Brian Muller
d126479bce added link to docs 2015-01-05 13:51:33 -05:00
Brian Muller
9db51018cd updated docs 2015-01-05 13:44:39 -05:00
Brian Muller
7045a12e3c added requirements.txt for docs 2015-01-05 10:39:32 -05:00
Brian Muller
7f4d380761 added start to sphinx docs 2015-01-05 10:32:24 -05:00
Brian Muller
ae7a90926b fixed default storage culling bug, linted, bumped version to 0.4 2015-01-04 14:40:52 -05:00
Brian Muller
c6f1062082 fixed issue with server saving empty node list when caching to disk for first run 2014-12-26 20:57:43 +01:00
Brian Muller
4b8eaf7c5f added another link to twisted in readme 2014-12-26 13:12:50 +01:00
Brian Muller
4d4508540f bumped version to 0.2 2014-12-12 09:48:22 -05:00
Brian Muller
b4ce8133fa paired down storage interface 2014-12-09 17:02:48 -05:00
Brian Muller
a7c0a75b8d added interface for storage and the ability to pass an instance to the Server constructor 2014-12-09 16:55:44 -05:00
Brian Muller
33d0fc898b fixed bug, updated readme 2014-03-25 08:37:25 -04:00
Brian Muller
2823b30672 updated some docs 2014-01-19 23:22:40 -05:00
Brian Muller
8aab226598 fixed examples 2014-01-19 23:04:22 -05:00
Brian Muller
7418819f7a updated readme 2014-01-19 22:27:12 -05:00
Brian Muller
7f07662657 new nodes are now given keys to store based on section 2.5 of the paper 2014-01-19 22:26:17 -05:00
Brian Muller
21dc0cca39 now republishing keys once an hour 2014-01-19 21:30:36 -05:00