{"record":{"id":"2a1dda6e31c1a4da","repo":"nautechsystems/nautilus_trader","slug":"profiler-watermark-log-has-no-event-signature","errorCode":null,"errorMessage":"Profiler watermark log has no event signature","messagePattern":"Profiler watermark log has no event signature","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":4241,"sourceCode":"        .block_hash\n        .as_deref()\n        .ok_or_else(|| anyhow::anyhow!(\"Profiler log has no block hash\"))?;\n    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(),","sourceCodeStart":4223,"sourceCodeEnd":4259,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L4223-L4259","documentation":"The profiler watermark log must have at least one topic, since topic[0] is the event signature used to identify the pool event type. This error is thrown when the matched log has an empty topics array, so no event signature can be extracted.","triggerScenarios":"Profiler validation on a log whose topics array is empty (topics.first() returns None) — e.g., an anonymous event or a data-only log emitted by the pool at the watermark index.","commonSituations":"The transaction at the watermark emitted an anonymous event (no indexed signature topic); the log_index points at a non-event log; a contract upgrade switched to anonymous events; provider returned a malformed/empty topics list.","solutions":["Check in a block explorer what event the log at position.log_index actually is; adjust the watermark to point at a standard event log.","Verify the pool contract version still emits non-anonymous events; update the profiler if the contract changed.","Confirm profiler_event_signatures configuration covers the event actually emitted by this pool.","Use a fuller RPC provider if the topics array appears wrongly truncated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if log.topics.is_empty() {\n    // not an identifiable event; skip or re-point the watermark\n    return Err(\"log has no topics\".into());\n}","typeGuard":"fn has_event_signature(log: &Log) -> bool {\n    !log.topics.is_empty()\n}","tryCatchPattern":"match validate_watermark_signature(&log, pool) {\n    Ok(()) => Ok(()),\n    Err(e) if e.to_string().contains(\"no event signature\") => skip_anonymous_log(e),\n    Err(e) => Err(e),\n}","preventionTips":["Point watermarks at standard (non-anonymous) pool events","Check log contents in an explorer when contracts are upgraded","Validate topics arrays before decoding"],"tags":["blockchain","logs","event-signature","missing-field"],"backgroundTag":"missing-required-argument","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"}