{"record":{"id":"d8adbe05495d88a1","repo":"nautechsystems/nautilus_trader","slug":"verified-action-requires-the-configured-provider-i","errorCode":null,"errorMessage":"Verified action requires the configured provider identities","messagePattern":"Verified action requires the configured provider identities","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/cache/database.rs","lineNumber":6052,"sourceCode":"            assignment.nonce\n        );\n        transaction\n            .commit()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to commit verified nonce assignment: {e}\"))?;\n        Ok(())\n    }\n\n    /// Appends one verified decision batch before an action on an existing active intent.\n    pub(crate) async fn record_execution_verification_batch(\n        &self,\n        batch: &ExecutionVerificationBatch<'_>,\n    ) -> anyhow::Result<()> {\n        anyhow::ensure!(\n            !batch.decision_class.trim().is_empty() && !batch.decisions.is_empty(),\n            \"Verified action requires a decision class and evidence\"\n        );\n        anyhow::ensure!(\n            batch.provider_ids.len() == 3\n                && batch.operator_ids.len() == 3\n                && batch.failure_domain_ids.len() >= 3,\n            \"Verified action requires the configured provider identities\"\n        );\n        let chain_id = i32::try_from(batch.chain_id)\n            .context(\"Verification chain ID exceeds PostgreSQL INTEGER\")?;\n        let nonce =\n            i64::try_from(batch.nonce).context(\"Execution nonce exceeds PostgreSQL BIGINT\")?;\n        let mut transaction = self\n            .pool\n            .begin()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to start verified action evidence: {e}\"))?;\n        let (manifest_version, manifest_digest, revision) =\n            sqlx::query_as::<_, (String, String, i64)>(\n                \"\n                SELECT manifest_version, manifest_digest, revision","sourceCodeStart":6034,"sourceCodeEnd":6070,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/cache/database.rs#L6034-L6070","documentation":"A validation guard requiring the batch to carry the configured redundancy topology: exactly 3 provider_ids, exactly 3 operator_ids, and at least 3 failure_domain_ids. The library enforces this shape so recorded verified-action evidence proves quorum across the expected provider/operator/failure-domain sets.","triggerScenarios":"Calling record_execution_verification_batch where provider_ids.len() != 3, operator_ids.len() != 3, or failure_domain_ids.len() < 3.","commonSituations":"Configuration changed the expected number of providers/operators but the batch assembler still collects the old count; a provider was offline so only 2 responses were gathered; failure-domain metadata not attached to some decisions.","solutions":["Collect responses from exactly 3 configured providers and 3 operators before building the batch.","Attach failure-domain ids to every response so at least 3 distinct domains are present.","If the topology intentionally changed, update the batch construction to match the new configured counts."],"exampleFix":"// before: submit with whatever came back\nlet batch = build_batch(responses);\nrecord_execution_verification_batch(&db, &batch).await?;\n// after: gate on the required counts\nanyhow::ensure!(responses.providers.len() == 3 && responses.operators.len() == 3 && distinct_failure_domains(&responses) >= 3, \"insufficient quorum responses\");\nlet batch = build_batch(responses);\nrecord_execution_verification_batch(&db, &batch).await?;","handlingStrategy":"validation","validationCode":"// Rust\nfn has_quorum_ids(batch: &ExecutionVerificationBatch) -> bool {\n    batch.provider_ids.len() == 3\n        && batch.operator_ids.len() == 3\n        && batch.failure_domain_ids.len() >= 3\n}","typeGuard":"fn identities_complete(batch: &ExecutionVerificationBatch) -> bool { has_quorum_ids(batch) }","tryCatchPattern":null,"preventionTips":["Derive expected provider/operator counts from configuration, not hardcoding.","Fail collection early when a provider/operator response is missing.","Attach failure-domain metadata to every response at source."],"tags":["validation","quorum","configuration","rust"],"backgroundTag":"invalid-argument-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}