Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Concepts

This part opens up the model underneath the pipeline: what a resource is, how a predicate turns a decoded occurrence into a yes-or-no answer, what blockwatcher guarantees about delivery, and where the boundary sits that keeps the engine from ever needing to know which chain it is watching. It is for a reader who has already run blockwatcher and now wants to understand why it behaves the way it does.

flowchart LR
    rpc["RPC endpoints<br/>(external chains)"]
    sources["Sources<br/>evm-rpc · evm-mempool"]
    sinks["Sinks<br/>webhook · script · log"]
    storage["Storage<br/>checkpoints · dead letters · resources"]
    api["REST API"]
    metrics["Metrics"]
    engine["engine<br/>bounded channels · checkpoints"]

    subgraph pipeline["Engine pipeline"]
        direction LR
        decoder["Decoder"]
        matcher["Matcher<br/>predicates"]
        gate["Gate<br/>threshold · max_once"]
        decoder --> matcher
        matcher --> gate
    end

    rpc --> sources
    sources -->|"decode and match"| decoder
    gate --> sinks
    api -->|"manages resources"| storage
    storage <--> engine
    engine -->|"drives"| pipeline
    engine -.->|"reports"| metrics

    classDef module fill:none,stroke:#a9a3e3
    classDef core fill:none,stroke:#8a8d86,stroke-dasharray: 5 5

    class rpc,sources,sinks,decoder,matcher,gate module
    class engine,api,storage,metrics core
classDef dim fill:none,stroke:#999999,color:#999999,opacity:0.35
classDef focus fill:#ffd43b,stroke:#d9480f,stroke-width:3px,color:#1a1a1a
class rpc,sources,sinks,storage,api,metrics dim
class engine,decoder,matcher,gate focus
click sources "selectors.html"
click decoder "chain-agnosticism.html"
click matcher "predicates.html"
click gate "gates.html"
click sinks "delivery.html"
click storage "resources.html"
click api "../reference/http-api.html"
click metrics "../reference/observability.html"
click engine "pipeline.html"

Key takeaways

  • Concepts pages explain the model behind the pipeline, not how to run it: resources, predicates, gates, delivery, and the chain-agnostic boundary.

  • The pipeline page covers which task does what and where the bounded queues sit; the resources page covers the resource kinds blockwatcher watches and delivers to.

  • Predicates, gates, selectors, and delivery guarantees together describe how a decoded event becomes a match and reaches a sink.

  • Chain-agnosticism and modules describe the boundaries that keep the engine chain-unaware and every axis of behavior swappable.

  • The pipeline: which task does what, and where the bounded queues sit.

  • Resources: the resource kinds blockwatcher watches and delivers to.

  • Predicates and the expression language: how one decoded occurrence becomes a match.

  • Gates: when a predicate-true hit becomes a delivery, across other hits of the same monitor.

  • Selectors: how a monitor points at a contract spec.

  • Delivery guarantees: what “done” means, and what happens when delivery fails.

  • Chain-agnosticism: the boundary that keeps the engine chain-unaware.

  • Modules and trade-offs: the swappable pieces behind each port, and what each choice costs.