Crate timeboost_rs
source ·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
- 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
TimeBoostServiceat intervals of G milliseconds. - 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
- The default capacity for the transaction input channel used by
TimeBoostServiceto receive txs from outside sources. Can be adjusted using theinput_feed_buffer_capacitymethod when building a TimeBoostService struct. - 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_factormethod when building a TimeBoostService struct.