Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

standardize usage of BzzAddr and enode.IDs #1617

Open
acud opened this issue Jul 29, 2019 · 0 comments
Open

standardize usage of BzzAddr and enode.IDs #1617

acud opened this issue Jul 29, 2019 · 0 comments
Assignees
Milestone

Comments

@acud
Copy link
Member

acud commented Jul 29, 2019

The way we handle BzzAddr, BzzPeer and enode.IDs is very, very confusing.
For a mere mortal, it is mostly unclear when the usage of any of the above is needed, and in which case to use any of them.

To add confusion on top of confusion, the devp2p handlers signature does not have any notion of BzzPeer. Swarm related protocols MUST be wrapped in the bzz.RunProtocol abstraction (this is not documented anywhere) and every protocol must implement two entry points for the protocol handlers - one for production code and one for testing purposes (example being runProtocol methods).

Important note is that the network.NewAddr is creating BzzAddr objects which are only to be used in tests, this is also not documented anywhere!!!. One might assume that this function creates real usable BzzAddr structs but this cannot be farther away from the truth!

@nolash nolash added the rant label Jul 30, 2019
@acud acud added this to the 0.5.4 milestone Nov 25, 2019
@acud acud removed the rant label Nov 26, 2019
@acud acud modified the milestones: 0.5.4, 0.5.5, 0.5.6 Nov 28, 2019
@acud acud modified the milestones: 0.5.5, 0.5.6 Jan 29, 2020
@acud acud modified the milestones: 0.5.6, 0.5.7 Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants