{"record":{"id":"3ac15324bfa7dbcc","repo":"nautechsystems/nautilus_trader","slug":"context-verification-disagreed","errorCode":null,"errorMessage":"{context} verification disagreed","messagePattern":"(.+?) verification disagreed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1974,"sourceCode":"\nenum ReconciliationAuthorization {\n    Rebroadcast,\n    Retain,\n    ScanReplacement(VerifiedBlockHeader),\n}\n\nfn verified_value<T>(outcome: VerificationOutcome<T>, context: &str) -> anyhow::Result<T> {\n    required_verification(outcome, context).map(|verified| verified.value)\n}\n\nfn required_verification<T>(\n    outcome: VerificationOutcome<T>,\n    context: &str,\n) -> anyhow::Result<Verified<T>> {\n    match outcome {\n        VerificationOutcome::Verified(verified) => Ok(verified),\n        VerificationOutcome::Disagreement(_) => {\n            anyhow::bail!(\"{context} verification disagreed\")\n        }\n        VerificationOutcome::Unavailable(_) => {\n            anyhow::bail!(\"{context} verification is unavailable\")\n        }\n        VerificationOutcome::Retryable(_) => {\n            anyhow::bail!(\"{context} verification is retryable\")\n        }\n        VerificationOutcome::LocallyInvalid(_) => {\n            anyhow::bail!(\"{context} verification is locally invalid\")\n        }\n    }\n}\n\nfn validate_transaction_authorization(\n    authorization: Option<&TransactionAuthorization>,\n    to: Address,\n    value: U256,\n    input: &[u8],","sourceCodeStart":1956,"sourceCodeEnd":1992,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1956-L1992","documentation":"This error comes from a helper that converts a VerificationOutcome into a Result. When the post-transaction verification outcome is Disagreement, it means an independent on-chain check (e.g. balance change, receipt status) disagreed with what the local simulation predicted. The library refuses to accept the transaction result because the two sources of truth conflict.","triggerScenarios":"Calling the verify helper (used across pre-sign checks like swap simulation, balance, allowance) when the verification backend returns VerificationOutcome::Disagreement — i.e. the simulated/expected result conflicts with actual on-chain state.","commonSituations":"State changed between simulation and execution (another transaction consumed the same allowance or moved funds); RPC node returning stale or divergent data; MEV/sandwich altering the outcome vs simulation.","solutions":["Re-fetch on-chain state and re-run the transaction with a fresh simulation","Check the RPC provider for stale/behind nodes and use a consistent endpoint","Re-verify allowances, balances, and approvals before resubmitting","Inspect the disagreement payload (carried in the outcome) to identify which check diverged"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-check consistency before submitting\nlet sim = client.simulate_swap(&pool, amount).await?;\nlet onchain = client.fetch_pool_state(&pool).await?;\nassert_eq!(sim.block_state_root, onchain.state_root, \"state diverged before submit\");","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().ends_with(\"verification disagreed\") => {\n        // refresh state, re-simulate, and decide whether to resubmit\n    }\n    r => r?,\n}","preventionTips":["Use a single consistent RPC provider for simulation and verification","Re-verify allowances/balances right before submission","Keep submission-to-confirmation window short to limit state drift"],"tags":["verification","consistency","blockchain"],"backgroundTag":"internal-invariant-violation","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"}