nautechsystems/nautilus_trader · error · anyhow::Error

Profiler watermark log has an unsupported event signature

Error message

Profiler watermark log has an unsupported event signature

What it means

After extracting topic[0], the library checks it against the set of event signatures supported by profiler_event_signatures(pool) (case-insensitive). This error means the watermark log carries a recognized event signature topic, but not one of the pool event types the profiler understands, so it cannot decode the event.

Source

Thrown at crates/adapters/blockchain/src/execution/client.rs:4244

    anyhow::ensure!(
        !log.removed
            && log_transaction_hash == transaction_hash
            && rpc_log::extract_block_number(log)? == position.number
            && rpc_log::extract_transaction_index(log)? == position.transaction_index
            && B256::from_str(log_block_hash)? == expected_block_hash,
        "Profiler log position does not match its ingestion watermark"
    );
    anyhow::ensure!(
        rpc_log::extract_address(log)? == pool_address,
        "Profiler watermark log did not come from expected pool {pool_address}"
    );
    let signature = log
        .topics
        .first()
        .ok_or_else(|| anyhow::anyhow!("Profiler watermark log has no event signature"))?;
    let supported =
        profiler_event_signatures(pool).any(|expected| expected.eq_ignore_ascii_case(signature));
    anyhow::ensure!(
        supported,
        "Profiler watermark log has an unsupported event signature"
    );
    Ok(())
}

fn profiler_event_signatures(pool: &Pool) -> impl Iterator<Item = &str> {
    [
        Some(pool.dex.swap_created_event.as_ref()),
        Some(pool.dex.mint_created_event.as_ref()),
        Some(pool.dex.burn_created_event.as_ref()),
        Some(pool.dex.collect_created_event.as_ref()),
        pool.dex.flash_created_event.as_deref(),
        pool.dex.fee_protocol_update_event.as_deref(),
        pool.dex.fee_protocol_collect_event.as_deref(),
    ]
    .into_iter()
    .flatten()

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Decode the log's signature topic in a block explorer and confirm whether the profiler's supported event list needs extending.
  2. Point the watermark at a log for a supported event (e.g., the pool's swap event) within the same transaction.
  3. Update the pool/protocol adapter so profiler_event_signatures includes the new event variant.
  4. Downgrade or pin the pool contract version to one whose events are fully supported.
Defensive patterns

Strategy: validation

Validate before calling

let sig = &log.topics[0];
if !profiler_event_signatures(pool).any(|s| s.eq_ignore_ascii_case(sig)) {
    return Err(format!("unsupported event signature {sig}").into());
}

Try / catch

match client.validate_watermark_signature(&log, pool) {
    Ok(()) => Ok(()),
    Err(e) if e.to_string().contains("unsupported event signature") => reingest_at_supported_event(e),
    Err(e) => Err(e),
}

Prevention

When it happens

Trigger: Profiler validation where the log's signature topic does not case-insensitively match any signature returned by profiler_event_signatures(pool) — e.g., the pool emitted a different event type (fee change, approval) than the swap/mint/burn events the profiler supports.

Common situations: DEX pool contract upgrade introducing new event variants; profiling a pool protocol whose event set differs from the supported list; the watermark index pointing at a non-swap event (e.g., FeesChanged) in the same transaction.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/366f74453bbf56fc. Report an issue: GitHub.