This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
network: Add Capabilities to Kademlia database #1713
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nolash
force-pushed
the
adaptive-kademlia-2
branch
4 times, most recently
from
September 13, 2019 11:00
0ca9e16
to
bbc310d
Compare
zelig
approved these changes
Sep 16, 2019
kortatu
reviewed
Sep 16, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for the LightNode field in BzzPeer, that I think we don't need anymore.
nolash
added
in progress
ready for another review
and removed
ready for review
in progress
labels
Sep 16, 2019
kortatu
approved these changes
Sep 17, 2019
nolash
force-pushed
the
adaptive-kademlia-2
branch
from
September 17, 2019 13:39
d7721d2
to
2057886
Compare
zelig
approved these changes
Sep 17, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get rid of custom serialisations?
@zelig I intend to make another pass later on the |
nolash
force-pushed
the
adaptive-kademlia-2
branch
from
September 18, 2019 20:57
2d1795b
to
f3cdb0d
Compare
chadsr
added a commit
to chadsr/swarm
that referenced
this pull request
Sep 23, 2019
* 'master' of github.com:ethersphere/swarm: (32 commits) network/stream: refactor cursors tests (ethersphere#1786) network: Add capabilities if peer from store does not have it (ethersphere#1791) Swap logger (ethersphere#1754) network: Add capability filtered depth calculation (ethersphere#1787) travis: remove go1.12 job (ethersphere#1784) cmd/swarm: correct bzznetworkid flag description (ethersphere#1761) network, pss: Capability in pss (ethersphere#1764) network/stream: handle nil peer in TestNodesExchangeCorrectBinIndexes (ethersphere#1779) protocols, retrieval: swap-enabled messages implement Price (ethersphere#1771) cmd/swarm-smoke: fix waitToPushSynced connection closing (ethersphere#1781) cmd/swarm: simplify testCluster.StartNewNodes (ethersphere#1777) build: increase golangci-lint deadline (ethersphere#1778) docker: ignore build/bin when copying files (ethersphere#1780) swap: fix and rename Peer.getLastSentCumulativePayout (ethersphere#1769) network/stream: more resilient TestNodesCorrectBinsDynamic (ethersphere#1776) network: Add Capabilities to Kademlia database (ethersphere#1713) network: add own address to KademliaInfo (ethersphere#1775) pss: Refactor. Step 2. Refactor forward cache (ethersphere#1742) all: configurable payment/disconnect thresholds (ethersphere#1729) network/stream/v2: more resilient TestNodesExchangeCorrectBinIndexes (ethersphere#1760) ...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the Capabilities bitvector of each peer record stored in kademlia available to client code. It introduces the possibility of adding separate indices as pots for the kademlia, which will be added to and removed with calls to
On
andOff
if the corresponding capability filter matches the entry being manipulated.The capabilities are embedded in the
BzzAddr
object, which makes it convenient to transmit them through the kademlia aswell as the handshake message.It also contains the following changes:
cmd/swarm/run_test.go
BzzAddr
to avoid null capabilities.BzzAddr
related methods to include "Bzz" in namepeerMsg
andBzzAddr
due to failure of default operation to handle the capabilities array.BzzAddr
andenode.ID
relation in test peer generation innetwork
.Kademlia
methods.Protocol versions are bumped to
bzz:13
(since nerds after all greet any superstitions with contempt) andhive:11