-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swarm: re-introduce ConnectionHandler::{In,Out}boundOpenInfo #5858
Comments
I don't think bringing back EDIT: This is more of a problem from the consensus spec because the protocol is a part of the substream itself, which should be job-agnostic, or at least the job should only be assgined AFTER the substream is negotiated. This is what we expect after the deprecation(and thus future removal) but the spec relates them. However, considering the significance of Ethereum itself, the spec will very likey remain unchanged. |
how would that be possible? And why is it better than maintaining the
AFAIK there aren't any recommendations (nor data backing them) on how should protocols handle |
Sorry, let me be clear. I believe that the whole idea behind deprecating OpenInfo is that all substreams should be treated equally and seen as interchangable entities. This, in practice, means that their jobs should be assigned after creation, and other streams can also take on the same job without any issue. |
I challenge this, why should they be treated interchangeably? #3268 refers that:
this assumed that they were interchangeable, not that they should be interchangeable.
this seems way more complicated than just maintaining what exists, the |
Does that mean the consensus had been established? And what does "they were interchangeable" mean? Are they still interchangeable now?
So here's the conflict: there is no doubt that UpgradeInfo is a powerful feature, but is also against the spirit of interchangeable substreams. Are we moving away from the established consensus?
Yes it is. But that's what we should do(though not that we should implement it in such an inefficient way) if we want both interchangeable substreams in general and dedicated substream in I'm not strongly opposing the comeback of |
substreams were never interchangeable, because the moment one negotiates a protocol for the upgrade with the outbound connection those protocol and upgrade are tied together, and this isn't particular to
I haven't seen a consensus wrt this, what happened was: I have since spoke about this in the calls but I am happy to elaborate here for posterity, when Max and Thomas left and I inherited the maintenance of So, unless something is required for a particular active user for |
The ideal case after deprecating
I consider merging of the PR a sign of consensus, plus it only marked
Thanks for clarifying this! |
thanks for elaborating Dr Huang. I wouldn't use consensus as wording for this context, it was a decision taken by previous maintainers, and the current maintainers reverted that decision partially, due to its side effects. Submitted #5860 to address this |
Description
With #3268 was decided to deprecate
ConnectionHandler::{In,Out}boundOpenInfo
.#5242 made it official, but there's a bug with these deprecations:
storing the upgrade info in a
VecDeque
loses the order significance match they prevously had withStreamUpgrade
.Example with
request-response
after #3914 was merged:Behaviour
notifies handler with a requestHandler
puts the request onrequested_outbound
and asks theSwarm
for aOutboundSubstreamRequest
Handler
receives a newFullyNegotiatedOutbound
from theSwarm
and pops the request fromrequested_outbound
.Problem:
the popped request may not match inserted request in
requested_outbound
and therefore the negotiatedProtocol
with the outbound peer asSwarm
'snegotiating_out
is aFuturesUnordered
.This is specially problematic in the Ethereum consensus spec as the negotiated protocol matches the request type and the outbound peer ends up discarding the request as it doesn't match the protocol negotiated.
We should rollback the deprecation attributes of
ConnectionHandler::{In,Out}boundOpenInfo
at leastcc @elenaf9 @dariusc93
The text was updated successfully, but these errors were encountered: