referrerpolicy=no-referrer-when-downgrade

Crate relay_utils

Source
Expand description

Utilities used by different relays.

Re-exports§

pub use error::Error;
pub use relay_loop::relay_loop;
pub use relay_loop::relay_metrics;

Modules§

error
initialize
Relayer initialization functions.
metrics
relay_loop

Macros§

bail_on_arg_error
Macro that returns (client, Err(error)) tuple from function if result is Err(error).
bail_on_error
Macro that returns (client, Err(error)) tuple from function if result is Err(error).

Structs§

HeaderId
Generic header Id.

Enums§

FailedClient
Which client has caused error.
ProcessFutureResult
Future process result.
StringifiedMaybeConnectionError
Stringified error that may be either connection-related or not.
TrackedTransactionStatus
Final status of the tracked transaction.

Constants§

CONNECTION_ERROR_DELAY
Delay after connection-related error happened before we’ll try reconnection again.
MAX_BACKOFF_INTERVAL
Max delay after connection-unrelated error happened before we’ll try the same request again.
STALL_TIMEOUT
Default relay loop stall timeout. If transactions generated by relay are immortal, then this timeout is used.

Traits§

BlockNumberBase
Block number traits shared by all chains that relay is able to serve.
MaybeConnectionError
Error type that can signal connection errors.
TransactionTracker
Transaction tracker.
UniqueSaturatedFrom
Just like From except that if the source value is too big to fit into the destination type then it’ll saturate the destination.
UniqueSaturatedInto
Just like Into except that if the source value is too big to fit into the destination type then it’ll saturate the destination.

Functions§

format_ids
Compact format of IDs vector.
interval
Stream that emits item every timeout_ms milliseconds.
process_future_result
Process result of the future from a client.
retry_backoff
Exponential backoff for connection-unrelated errors retries.

Type Aliases§

TrackedTransactionFuture
Future associated with TransactionTracker, monitoring the transaction status.