This repository was archived by the owner on Aug 2, 2021. It is now read-only.
network: Add Capabilities to Kademlia database#1713
Merged
nolash merged 36 commits intoethersphere:masterfrom Sep 19, 2019
Merged
network: Add Capabilities to Kademlia database#1713nolash merged 36 commits intoethersphere:masterfrom
nolash merged 36 commits intoethersphere:masterfrom
Conversation
0ca9e16 to
bbc310d
Compare
zelig
approved these changes
Sep 16, 2019
kortatu
reviewed
Sep 16, 2019
Contributor
kortatu
left a comment
There was a problem hiding this comment.
LGTM, except for the LightNode field in BzzPeer, that I think we don't need anymore.
kortatu
approved these changes
Sep 17, 2019
d7721d2 to
2057886
Compare
zelig
approved these changes
Sep 17, 2019
Member
zelig
left a comment
There was a problem hiding this comment.
can we get rid of custom serialisations?
Contributor
Author
|
@zelig I intend to make another pass later on the |
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) ...
This file contains hidden or 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
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
OnandOffif the corresponding capability filter matches the entry being manipulated.The capabilities are embedded in the
BzzAddrobject, 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.goBzzAddrto avoid null capabilities.BzzAddrrelated methods to include "Bzz" in namepeerMsgandBzzAddrdue to failure of default operation to handle the capabilities array.BzzAddrandenode.IDrelation in test peer generation innetwork.Kademliamethods.Protocol versions are bumped to
bzz:13(since nerds after all greet any superstitions with contempt) andhive:11