Datafast Runtime
  • 😁Introduction
  • 🚀Quickstart
  • 🏛️Architecture
  • 🎛️Components
    • Manifest
    • BlockSource
    • Valve
    • BlockInspector
    • DataFilter
    • Database
    • Subgraph
    • JSON-RPC Client
  • 📊Metrics
  • 📜License
  • 📬Contact
Powered by GitBook
On this page
  1. Components

DataFilter

https://github.com/datafast-network/datafast-runtime/blob/main/src/components/data_filter/mod.rs

PreviousBlockInspectorNextDatabase

Last updated 1 year ago

The job of DataFilter is to only select relevant information for indexing.

DataFilter takes BlockDataMessage and produces FilteredDataMessage

pub trait DataFilterTrait: Sized {
    fn handle_serialize_message(
        &self,
        data: BlockDataMessage,
    ) -> Result<FilteredDataMessage, FilterError>;
}

DataFilter's concrete implementation is very chain-specific. In case of Ethereum, it collects relevant logs and convert them to Ethereum Event data - based on the data format defined by TheGraph.

DataFilter does not need to be configured.

🎛️