pub struct HoprUnacknowledgedTicketProcessorConfig {
pub unack_ticket_timeout: Duration,
pub max_unack_tickets: usize,
pub max_tracked_ticket_indices: usize,
pub use_batch_verification: bool,
}Expand description
Configuration for the HoprUnacknowledgedTicketProcessor.
Fields§
§unack_ticket_timeout: DurationTime after which an unacknowledged ticket is considered stale and is removed from the cache.
If the counterparty does not send an acknowledgement within this period, the ticket is lost forever.
This also bounds replay protection: the record that a ticket index was already accepted expires
on the same timeout, so an index can be replayed once this period has passed. Raising it
strengthens that protection at the cost of memory, but unless
max_tracked_ticket_indices is raised accordingly, that capacity
becomes the binding limit sooner.
Default is 30 seconds.
max_unack_tickets: usizeMaximum number of unacknowledged tickets that can be stored per next hop at any given time.
When more tickets are received, the oldest ones are discarded and lost forever.
Default is 10 000 000.
max_tracked_ticket_indices: usizeMaximum number of accepted ticket indices remembered for replay protection, across all channels.
Once the limit is reached, the least-recently-used records are evicted and those indices become
replayable again; fresh indices are never refused. Size it for the number of tickets accepted per
unack_ticket_timeout window.
Default is 10 000 000.
use_batch_verification: boolIndicates whether to use batch verification algorithm for acknowledgements.
This has a positive performance impact on higher workloads.
Default is true.
Trait Implementations§
Source§impl Clone for HoprUnacknowledgedTicketProcessorConfig
impl Clone for HoprUnacknowledgedTicketProcessorConfig
Source§fn clone(&self) -> HoprUnacknowledgedTicketProcessorConfig
fn clone(&self) -> HoprUnacknowledgedTicketProcessorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HoprUnacknowledgedTicketProcessorConfig
impl StructuralPartialEq for HoprUnacknowledgedTicketProcessorConfig
Source§impl Validate for HoprUnacknowledgedTicketProcessorConfig
impl Validate for HoprUnacknowledgedTicketProcessorConfig
Auto Trait Implementations§
impl Freeze for HoprUnacknowledgedTicketProcessorConfig
impl RefUnwindSafe for HoprUnacknowledgedTicketProcessorConfig
impl Send for HoprUnacknowledgedTicketProcessorConfig
impl Sync for HoprUnacknowledgedTicketProcessorConfig
impl Unpin for HoprUnacknowledgedTicketProcessorConfig
impl UnsafeUnpin for HoprUnacknowledgedTicketProcessorConfig
impl UnwindSafe for HoprUnacknowledgedTicketProcessorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more