swarm icon indicating copy to clipboard operation
swarm copied to clipboard

swarm handshake: detect tracing automagically

Open acud opened this issue 5 years ago • 3 comments

since recent changes to our bzz protocol handshake, tracing nodes (running with the --tracing flag) cannot complete a handshake with non tracing nodes. this infers a configuration imperative that is restrictive to our deployment configuration (bootnode must be configured with --tracing if the other nodes in the cluster are tracing and vice versa). this also means we can't run tracing on our open cluster. the handshake should autodetect if the other peer we are handshaking with is tracing or not and act accordingly

acud avatar Sep 02 '19 11:09 acud

This is actually not possible with the current design of RLP. Since the RLP Payload is an io.Reader, if we first try to decode the message as a message with a context, we cannot fallback to a normal message since we cannot seek the reader to the beginning of the data stream. The alternative (and very ugly solution) while maintaining the current context implementation would be to read the payload data, reconstruct the devp2p message using the original message, try to decode it, then fall back to the previously read data. The other would be to reimplement context propagation in a way which is compatible with devp2p messages.

acud avatar Oct 14 '19 12:10 acud

cc @zelig @nonsense

acud avatar Oct 14 '19 12:10 acud

We ran into this bug when launching the RIF Storage testnet

Eknir avatar Dec 27 '19 12:12 Eknir