{"record":{"id":"366f74453bbf56fc","repo":"nautechsystems/nautilus_trader","slug":"profiler-watermark-log-has-an-unsupported-event-si","errorCode":null,"errorMessage":"Profiler watermark log has an unsupported event signature","messagePattern":"Profiler watermark log has an unsupported event signature","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":4244,"sourceCode":"    anyhow::ensure!(\n        !log.removed\n            && log_transaction_hash == transaction_hash\n            && rpc_log::extract_block_number(log)? == position.number\n            && rpc_log::extract_transaction_index(log)? == position.transaction_index\n            && B256::from_str(log_block_hash)? == expected_block_hash,\n        \"Profiler log position does not match its ingestion watermark\"\n    );\n    anyhow::ensure!(\n        rpc_log::extract_address(log)? == pool_address,\n        \"Profiler watermark log did not come from expected pool {pool_address}\"\n    );\n    let signature = log\n        .topics\n        .first()\n        .ok_or_else(|| anyhow::anyhow!(\"Profiler watermark log has no event signature\"))?;\n    let supported =\n        profiler_event_signatures(pool).any(|expected| expected.eq_ignore_ascii_case(signature));\n    anyhow::ensure!(\n        supported,\n        \"Profiler watermark log has an unsupported event signature\"\n    );\n    Ok(())\n}\n\nfn profiler_event_signatures(pool: &Pool) -> impl Iterator<Item = &str> {\n    [\n        Some(pool.dex.swap_created_event.as_ref()),\n        Some(pool.dex.mint_created_event.as_ref()),\n        Some(pool.dex.burn_created_event.as_ref()),\n        Some(pool.dex.collect_created_event.as_ref()),\n        pool.dex.flash_created_event.as_deref(),\n        pool.dex.fee_protocol_update_event.as_deref(),\n        pool.dex.fee_protocol_collect_event.as_deref(),\n    ]\n    .into_iter()\n    .flatten()","sourceCodeStart":4226,"sourceCodeEnd":4262,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L4226-L4262","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Decode the log's signature topic in a block explorer and confirm whether the profiler's supported event list needs extending.","Point the watermark at a log for a supported event (e.g., the pool's swap event) within the same transaction.","Update the pool/protocol adapter so profiler_event_signatures includes the new event variant.","Downgrade or pin the pool contract version to one whose events are fully supported."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let sig = &log.topics[0];\nif !profiler_event_signatures(pool).any(|s| s.eq_ignore_ascii_case(sig)) {\n    return Err(format!(\"unsupported event signature {sig}\").into());\n}","typeGuard":null,"tryCatchPattern":"match client.validate_watermark_signature(&log, pool) {\n    Ok(()) => Ok(()),\n    Err(e) if e.to_string().contains(\"unsupported event signature\") => reingest_at_supported_event(e),\n    Err(e) => Err(e),\n}","preventionTips":["Keep profiler_event_signatures in sync with pool contract versions","Decode unknown signature topics in an explorer before ingesting","Pin pool contract versions in test environments"],"tags":["blockchain","event-signature","unsupported","protocol"],"backgroundTag":"unsupported-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}