| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since we're about to have a second kind of relay cell crypto,
it makes sense to move this module.
This change is pure code movement.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Log conventions
Closes #1906
See merge request tpo/core/arti!2966
|
| | |/ / |
|
| |/ / |
|
| |/
|
|
|
|
|
|
| |
This was missed in commits ccb65961 and eeda643f. While
`params.ccontrol.is_enabled()` should always be false because of those
earlier commits which ensure we don't enable congestion control, we were
missing the defense-in-depth conditions here that would alert us if we
accidentally did enable congestion control.
|
| |\
| |
| |
| |
| |
| |
| | |
Implement congestion control handshake negotiation
Closes #1817
See merge request tpo/core/arti!2932
|
| | |
| |
| |
| |
| | |
This means that even with the "flowctl-cc" feature enabled, we shouldn't
try to negotiate congestion control.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Congestion control is not completely working correctly, and is not fully
implemented (XON/XOFF). This commit adds a new experimental "flowctl-cc"
feature to enable the congestion control extension during the ntor-v3
handshake.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
We use this method to decide whether to allow receiving stream SENDMEs,
and also whether we should send stream SENDMEs.
|
| | |
| |
| |
| |
| |
| |
| | |
`OpenStreamEnt::put_for_incoming_sendme()` calls
`StreamSendFlowControl::put_for_incoming_sendme()`, which returns an
error if the `StreamSendFlowControl` is in XON/XOFF mode. So we don't
need this extra check.
|
| | |
| |
| |
| |
| | |
Congestion control tells us whether we should use stream or XON/XOFF
flow control.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Previously new stream entries required a `StreamSendWindow`, but to
support other flow control algorithms, we want new stream entries to
take a `StreamSendFlowControl` instead.
This also deduplicates the `StreamSendWindow` creation code.
|
| | |
| |
| |
| |
| |
| |
| | |
This doesn't do anything yet, so is effectively like not having stream
flow control.
This should be implemented as part of arti#534.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Also add one for the sendme_inc validity function.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Circuit handshake negotiation for congestion control has been added in
previous commit so stop pinning the algorithm.
This commit marks the start of congestion control usage by arti client.
Closes #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we ever receive a stream-level SENDME from the Exit while the circuit
is under congestion control (Vegas), it is a protocol violation so close
the circuit.
This is important in order to avoid yet another side channel with cells
that would be essentially ignored silently.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a new function to the CongestionControl object that returns
true or false on if stream level SENDMEs are allowed by the underlying
algorithm.
Congestion control Vegas doesn't allow them as in it retires them and so
we avoid sending them for that algorithm.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| | |
These pass through congestion control state to the reactor, and aren't
actually hooked up to the congestion control code yet.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This puts in, based on the circuit parameters, the CC extension request
in the CREATE and EXTEND requests.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Congestion control can change the circuit parameters if the relay we are
negotiating with doesn't support FlowCtrl=2.
This commit adds a function in the circuit builder that will apply any
changes to the circuit parameters of the hop based on the hop protocol
values. For now, only congestion control applies.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids cloning the object and instead allows us to have a
CircParameters per hop on the circuit path. This will come handy with
congestion control where each hop might have different congestion
control parameters.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CircParameters is built before path selection and thus once we start
building the hops, we can't access the consensus values that were used
to build it in the first place.
For congestion control, we require a fallback algorithm in case the hop
doesn't support FlowCtrl=2.
This commit adds a "fallback_alg" to the CC parameters which will be
used for this exact case.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When receiving the congestion control response extension, evaluate our
state and set the sendme_inc if valid in our circuit parameters.
For this, a series of helper functions is needed.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is required because circuit ntor v3 handshake can negotiate circuit
level parameters and thus able to change any values.
Needed for congestion control ntorv3 handshake extension for which the
sendme increment is negotiated.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| |\ \
| | |
| | |
| | |
| | | |
various crates: MSRV TODO standardization and cleanup of an old TODO
See merge request tpo/core/arti!2945
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- After spending quite a while trying to figure out why the tests kept failing
after making the change, I eventually stumbled upon the netdoc syntax
specification, which helpfully informs me that newlines MUST be ignored and
discarded. Switching to using [`str::split_inclusive`] would either require
extra lines to workaround and recreate the current expected behavior or changing
the spec and correcting the tests to align with the new expected behavior.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped. For
this one in particular, we actually do already meet the MSRV specified, but I
want to check on the implementation details to see if this is still desired,
since the TODO is 4 years old.
|
| | | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped.
|
| | | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped.
|
| | | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped.
|
| | | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped.
|
| | | |
| | |
| | |
| | |
| | | |
- Part of a series of commits aimed at replacing all MSRV-related TODOs with a
standardized format, which should be easier to find when the MSRV is bumped.
|
| | | |
| | |
| | |
| | |
| | | |
- https://github.com/rust-lang/rust-clippy/issues/11764 was fixed upstream, so
this is no longer needed.
|
| | |/
|/| |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Enforce recommended and required protocol versions in arti-client
Closes #1849 and #1923
See merge request tpo/core/arti!2929
|
| | | |
| | |
| | |
| | |
| | | |
This name reflects its purpose better than the original one,
since it includes required protocols as well as recommended ones.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Also move the comment outside the block it documents,
to prevent a too-long line.
|
| | | |
| | |
| | |
| | | |
Also wait a little so logs can flush.
|
| | | | |
|
| | | | |
|
| | | | |
|