{
  "title": "Synthetic Bitcoin timelock boundary fixtures",
  "evidence_date": "2026-11-28",
  "edition": 2027,
  "data_class": "fictional examples; not observed wallet or chain data",
  "core_release": {
    "tag": "v32.1",
    "commit": "f0de87f040621468b956f01f526a43a010310501",
    "release_date": "2026-10-28"
  },
  "bips_commit": "9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39",
  "sources": [
    {
      "id": "source-1",
      "title": "BIP65: CHECKLOCKTIMEVERIFY",
      "url": "https://github.com/bitcoin/bips/blob/9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39/bip-0065.mediawiki",
      "reviewed_at": "2026-11-28",
      "scope": "CLTV operand, same-type and non-final-sequence requirements"
    },
    {
      "id": "source-2",
      "title": "BIP113: Median time past for lock-time calculations",
      "url": "https://github.com/bitcoin/bips/blob/9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39/bip-0113.mediawiki",
      "reviewed_at": "2026-11-28",
      "scope": "Previous-block median time rather than candidate timestamp for absolute time finality"
    },
    {
      "id": "source-3",
      "title": "BIP68: Relative lock-time using consensus-enforced sequence numbers",
      "url": "https://github.com/bitcoin/bips/blob/9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39/bip-0068.mediawiki",
      "reviewed_at": "2026-11-28",
      "scope": "Sequence flags, relative confirmation-height and pre-confirmation MTP anchors"
    },
    {
      "id": "source-4",
      "title": "BIP112: CHECKSEQUENCEVERIFY",
      "url": "https://github.com/bitcoin/bips/blob/9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39/bip-0112.mediawiki",
      "reviewed_at": "2026-11-28",
      "scope": "Active CSV comparison; operand disable/no-op excluded from worksheet scope"
    },
    {
      "id": "source-5",
      "title": "Bitcoin Core v32.1 consensus transaction verification",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/consensus/tx_verify.cpp",
      "reviewed_at": "2026-11-28",
      "scope": "IsFinalTx; CalculateSequenceLocks; EvaluateSequenceLocks; strict last-invalid comparisons"
    },
    {
      "id": "source-6",
      "title": "Bitcoin Core v32.1 script interpreter",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/script/interpreter.cpp",
      "reviewed_at": "2026-11-28",
      "scope": "TransactionSignatureChecker::CheckLockTime and CheckSequence; current implementation"
    },
    {
      "id": "source-7",
      "title": "Bitcoin Core v32.1 transaction constants",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/primitives/transaction.h",
      "reviewed_at": "2026-11-28",
      "scope": "Final, disable, type, mask and 512-second granularity constants"
    },
    {
      "id": "source-8",
      "title": "Bitcoin Core v32.1 candidate-block validation",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/validation.cpp",
      "reviewed_at": "2026-11-28",
      "scope": "Next-block height is tip+1; cutoff is tip GetMedianTimePast"
    },
    {
      "id": "source-9",
      "title": "Bitcoin Core v32.1 median-time implementation",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/chain.h",
      "reviewed_at": "2026-11-28",
      "scope": "Median of up to the last 11 block timestamps"
    },
    {
      "id": "source-10",
      "title": "Bitcoin Core v32.1 blockchain RPC implementation",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/src/rpc/blockchain.cpp",
      "reviewed_at": "2026-11-28",
      "scope": "Readonly block height/hash/mediantime records; no RPC actually called"
    },
    {
      "id": "source-11",
      "title": "Bitcoin Core v32.1 descriptor documentation",
      "url": "https://github.com/bitcoin/bitcoin/blob/f0de87f040621468b956f01f526a43a010310501/doc/descriptors.md",
      "reviewed_at": "2026-11-28",
      "scope": "Descriptors express scripts and may describe branches; address alone not sufficient path evidence"
    },
    {
      "id": "source-12",
      "title": "Bitcoin Core v32.1 release",
      "url": "https://github.com/bitcoin/bitcoin/releases/tag/v32.1",
      "reviewed_at": "2026-11-28",
      "scope": "Official latest release as checked 28 Nov 2026; published 28 Oct 2026"
    }
  ],
  "cases": [
    {
      "id": "relative-height-before",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900144",
        "remainingBlocks": "1",
        "relativeLastInvalidHeight": "900143"
      }
    },
    {
      "id": "relative-height-exact",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "remainingBlocks": "0",
        "firstCandidateHeight": "900144"
      }
    },
    {
      "id": "relative-height-after",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900145",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "remainingBlocks": "0"
      }
    },
    {
      "id": "actual-sequence-exceeds-script",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "200",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900200",
        "remainingBlocks": "56"
      }
    },
    {
      "id": "relative-height-zero",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "0",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "0",
        "candidateHeight": "900001",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": "900000",
        "relativeLastInvalidHeight": "899999"
      }
    },
    {
      "id": "relative-zero-minimum-actual-one",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "0",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "1",
        "candidateHeight": "900001",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": "900001"
      }
    },
    {
      "id": "absolute-height-equality",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900143",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900144",
        "remainingBlocks": "1"
      }
    },
    {
      "id": "absolute-height-first",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900143",
        "sequence": "4294967294",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": "900144"
      }
    },
    {
      "id": "absolute-height-higher-actual",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900200",
        "sequence": "4294967294",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900201",
        "remainingBlocks": "57"
      }
    },
    {
      "id": "cltv-zero-locktime",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "0",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": null,
        "firstPriorBlockMtp": null
      }
    },
    {
      "id": "cltv-final-sequence",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900143",
        "sequence": "4294967295",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "cltv-locktime-too-low",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900142",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "cltv-type-mismatch",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "1700000000",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "absolute-time-equality",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_time",
        "required": "1700000000",
        "txVersion": "2",
        "txLockTime": "1700000000",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstPriorBlockMtp": "1700000001",
        "remainingMtpSeconds": "1"
      }
    },
    {
      "id": "absolute-time-first",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_time",
        "required": "1700000000",
        "txVersion": "2",
        "txLockTime": "1700000000",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "1700000001",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "remainingMtpSeconds": "0"
      }
    },
    {
      "id": "relative-time-before",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "1",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194305",
        "candidateHeight": "900143",
        "candidateMtp": "1700000511",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "relativeDelaySeconds": "512",
        "firstPriorBlockMtp": "1700000512",
        "remainingMtpSeconds": "1",
        "relativeLastInvalidMtp": "1700000511"
      }
    },
    {
      "id": "relative-time-exact",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "1",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194305",
        "candidateHeight": "900143",
        "candidateMtp": "1700000512",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "remainingMtpSeconds": "0"
      }
    },
    {
      "id": "relative-time-three-units",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "3",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194307",
        "candidateHeight": "900143",
        "candidateMtp": "1700001536",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "relativeDelaySeconds": "1536",
        "firstPriorBlockMtp": "1700001536"
      }
    },
    {
      "id": "relative-time-higher-actual",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "1",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194306",
        "candidateHeight": "900143",
        "candidateMtp": "1700000512",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstPriorBlockMtp": "1700001024",
        "remainingMtpSeconds": "512"
      }
    },
    {
      "id": "relative-time-zero",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "0",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194304",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstPriorBlockMtp": "1700000000",
        "relativeLastInvalidMtp": "1699999999",
        "relativeDelaySeconds": "0"
      }
    },
    {
      "id": "csv-version-one",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "1",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "csv-disable-bit",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "2147483792",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "csv-time-type-mismatch",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "1",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "1",
        "candidateHeight": "900143",
        "candidateMtp": "1700000511",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "csv-height-type-mismatch",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194448",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "csv-actual-below-minimum",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "143",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "script_requirement_failed"
      }
    },
    {
      "id": "csv-ignored-reserved-bits",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "65680",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": "900144"
      }
    },
    {
      "id": "csv-max-count-time",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "65535",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4259839",
        "candidateHeight": "900143",
        "candidateMtp": "1733553920",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "relativeDelaySeconds": "33553920",
        "firstPriorBlockMtp": "1733553920"
      }
    },
    {
      "id": "csv-extra-absolute-height",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "900200",
        "sequence": "144",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900201",
        "remainingBlocks": "57"
      }
    },
    {
      "id": "csv-extra-absolute-time",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "1700000000",
        "sequence": "144",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900144",
        "firstPriorBlockMtp": "1700000001",
        "remainingMtpSeconds": "1"
      }
    },
    {
      "id": "cltv-extra-relative-height",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900100",
        "txVersion": "2",
        "txLockTime": "900100",
        "sequence": "200",
        "candidateHeight": "900101",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900200",
        "remainingBlocks": "99"
      }
    },
    {
      "id": "cltv-extra-relative-time",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "2",
        "txLockTime": "900143",
        "sequence": "4194305",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstCandidateHeight": "900144",
        "firstPriorBlockMtp": "1700000512",
        "remainingMtpSeconds": "512"
      }
    },
    {
      "id": "cltv-version-one-relative-disabled",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_height",
        "required": "900143",
        "txVersion": "1",
        "txLockTime": "900143",
        "sequence": "200",
        "candidateHeight": "900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met"
      }
    },
    {
      "id": "same-block-input-outside-scope",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900000",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "context_mismatch"
      }
    },
    {
      "id": "future-coin-height",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "900200",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "context_mismatch"
      }
    },
    {
      "id": "genesis-input-outside-scope",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "144",
        "candidateHeight": "900143",
        "candidateMtp": "1700000000",
        "coinHeight": "0",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "context_mismatch"
      }
    },
    {
      "id": "inconsistent-mtp-anchors",
      "inputs": {
        "scope": "verified",
        "kind": "csv_time",
        "required": "1",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "4194305",
        "candidateHeight": "900143",
        "candidateMtp": "1699999999",
        "coinHeight": "900000",
        "coinPrevMtp": "1700000000"
      },
      "expected": {
        "decisionCode": "context_mismatch"
      }
    },
    {
      "id": "leading-zero-decimal",
      "inputs": {
        "scope": "verified",
        "kind": "csv_height",
        "required": "00144",
        "txVersion": "2",
        "txLockTime": "0",
        "sequence": "00144",
        "candidateHeight": "000900144",
        "candidateMtp": "1700000000",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "conditions_met",
        "firstCandidateHeight": "900144"
      }
    },
    {
      "id": "max-absolute-time-boundary",
      "inputs": {
        "scope": "verified",
        "kind": "cltv_time",
        "required": "4294967295",
        "txVersion": "2",
        "txLockTime": "4294967295",
        "sequence": "4294967294",
        "candidateHeight": "900143",
        "candidateMtp": "4294967295",
        "coinHeight": "900000",
        "coinPrevMtp": "1699999488"
      },
      "expected": {
        "decisionCode": "timelock_unmet",
        "firstPriorBlockMtp": "4294967296",
        "remainingMtpSeconds": "1"
      }
    }
  ]
}
