Expand description
timeboost-rs implements the time boost protocol for ordering blockchain transactions as specified in the paper titled “Buying Time: Latency Racing vs. Bidding for Transaction Ordering” published at https://arxiv.org/pdf/2306.02179.pdf. Instead of individually boosting transactions, this implementation of the protocol operates in fixed rounds of length G milliseconds, where G is the parameter defined in the paper.
Structs§
- Boostable
Tx - A BoostableTx represents three important values: a unique id, a bid, and a timestamp.
Bid and timestamp values are used when performing the time boost protocol by the
TimeBoostService
at intervals of G milliseconds. - TIME_
BOOST_ ROUNDS_ TOTAL - The number of elapsed time boost rounds, which occur in intervals of G milliseconds, exposed as prometheus int counter.
- Time
Boost Service - The TimeBoostService struct is a long-running service that will receive transactions from an input channel, push them to a priority queue where they are sorted by max bid, and then releases them at discrete time intervals defined by a parameter G (in milliseconds).
Constants§
- DEFAULT_
INPUT_ FEED_ BUFFER_ CAP - The default capacity for the transaction input channel used by
TimeBoostService
to receive txs from outside sources. Can be adjusted using theinput_feed_buffer_capacity
method when building a TimeBoostService struct. - DEFAULT_
MAX_ BOOST_ FACTOR - A default max boost factor, set to 500ms after empirical evaluations for Ethereum Layer 2s from
the time boost paper. Can be adjusted using the
g_factor
method when building a TimeBoostService struct.