-
Notifications
You must be signed in to change notification settings - Fork 112
network: Add adaptive capabilities message #1619
network: Add adaptive capabilities message #1619
Conversation
Yeah API is next PR.
probably we want a "FromBools" or/and "FromBytes" in the API?
By convention was the idea. |
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.
the complexity and indirection here is too much for my taste.
do we have use cases of anything beyond a fix set of boolean flags?
I would prefer introducing simple flags first as and when they are needed with a functionality and only then see what if any abstraction needs to emerge, no?
As I said before in the last PR, the whole adaptive concept with Status suggests that capabilities will change. This provides a way to change them. Incremental small changes. Also, the idea is that modules (pss, swap, ...) define and set their own capabilities. That would require an API. So if we assume that it's not only "setting static bit flags," is it still too complex? |
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.
@nolash LGTM.
A few minor comments/questions in the body of the PR but this is a major improvement over the previous PR. No blockers from my side.
I have a separate question though about the Capabilities``&|``Capability
types - there seems to be no methods to check whether a certain capability actually exists within the data structure.
Example: I am a full node and I want to know if the other node is not just a light node, but if it also possesses capabilities of stream protocol, or what not. I am not sure if this is intentional but I think we will need this pretty soon. For your consideration.
Peace
Plan is to add API in which this is possible. But that's for the next PR. Actually I was thinking probably we shouldn't even have |
Imported but not used package https://travis-ci.org/ethersphere/swarm/jobs/567808411. |
@janos fixed thanks |
@janos thanks changed |
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.
Thanks @nolash. LGTM.
* 'master' of github.com:ethersphere/swarm: chunk, storage: chunk.Store multiple chunk Put (ethersphere#1681) storage: fix pyramid chunker and hasherstore possible deadlocks (ethersphere#1679) pss: Use distance to determine single guaranteed recipient (ethersphere#1672) storage: fix possible hasherstore deadlock on waitC channel (ethersphere#1674) network: Add adaptive capabilities message (ethersphere#1619) p2p/protocols, p2p/testing; conditional propagation of context (ethersphere#1648) api/http: remove unnecessary conversion (ethersphere#1673) storage: fix LazyChunkReader.join potential deadlock (ethersphere#1670) HTTP API support for pinning contents (ethersphere#1658) pot: Add Distance methods with tests (ethersphere#1621) README.md: Update Vendored Dependencies section (ethersphere#1667) network, p2p, vendor: move vendored p2p/testing under swarm (ethersphere#1647) build, vendor: use go modules for vendoring (ethersphere#1532)
This PR is the implementation of part of https://github.com/nolash/SWIPs/blob/SWIP-ADAPTIVE-NODE-PROTOCOL/SWIPs/swip-adaptive-node-protocol.md
(API will be added in separate PR)
#obsoletes #1529