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

message wrapping in protocols package is not devp2p compatible #1575

Closed
zelig opened this issue Jul 16, 2019 · 4 comments · Fixed by #1648
Closed

message wrapping in protocols package is not devp2p compatible #1575

zelig opened this issue Jul 16, 2019 · 4 comments · Fixed by #1648

Comments

@zelig
Copy link
Member

zelig commented Jul 16, 2019

protocols package uses message wrapping to pass context between nodes in order to facilitate tracing of requests across nodes.

This wrapping however is not compatible with devp2p so cannot be used in protocols supporting cross-client communication.

Such context passing needs to be thought through and we should have a clear roadmap of making this feature debug only.

@nonsense
Copy link
Contributor

nonsense commented Jul 16, 2019

this was a design decision at the time we introduced tracing. it has always been the case that the protocols package is used only for swarm protocols (which is also why it lives in the ethersphere repo, and not in the ethereum/go-ethereum repo. we also agreed at the time that all protocols we write should be traceable (which is not really the case - think pss).

see #764 which explicitly says that we want nodes to be compatible even if tracing is enabled or disabled.


now that we need to include existing protocols outside of swarm (for example eth/63 or others), one solution i can think of is to not use the protocols package (similar to pss), or move the context propagation to another level.

@zelig
Copy link
Member Author

zelig commented Jul 17, 2019

Context propagation is a debug feature, it should be used if the peers excplicitly allow it.
It should be also independent of using protocols package.
I think it is best to just make it conditional on a flag set in the protocol spec or in the handshake or ENR

@nonsense
Copy link
Contributor

nonsense commented Jul 17, 2019 via email

@acud
Copy link
Member

acud commented Jul 22, 2019

@zelig why do we block on this? why can't we just build this protocol initially using p2p.Peer? is this such a big issue we need to block on? I'd really rather have an initial clean phase 0 merged rather than a PR that's gonna be left open for a month or two. Still integration work can be done in this topic. modularising debug functionalities is orthogonal IMHO.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants