Module brontes_inspect::composer
source · Expand description
The composer
module in brontes-inspect
specializes in analyzing and
processing MEV data. Its primary functions include composing complex MEV
types from simpler ones and deduplicating overlapping MEV occurrences.
Leveraging the concepts of MEV composability and precedence, this module aims to provide a structured and insightful representation of MEV activities within a block.
§Key Components
Composer
: A struct that orchestrates specialized inspectors. It waits for all results and then proceeds to compose and deduplicate MEV data.MEV_COMPOSABILITY_FILTER
andMEV_DEDUPLICATION_FILTER
: These filters, defined using themev_composability
anddefine_mev_precedence
macros, respectively, establish rules for composing multiple MEV types and setting precedence among them for deduplication.- Utility Functions: A collection of functions designed to assist in the composition and deduplication processes of MEV data.
§Usage
The Composer
struct is central to this module. It processes a list of
Inspector
futures to extract MEV data, which is then composed and
deduplicated based on the rules defined in the MEV_COMPOSABILITY_FILTER
and MEV_DEDUPLICATION_FILTER
.
§Example
ⓘ
let composer = Composer::new(&orchestra, tree, metadata);
// Future execution of the composer to process MEV data