# Bitcoin timelock boundary reproduction

2027 edition. Primary evidence checked 28 November 2026.

All inputs are fictional. This is an offline arithmetic reference, not a Bitcoin node, script interpreter, transaction validator, wallet, fee estimate or promised eligibility date. It does not construct, sign, spend or broadcast anything.

Run with Python 3 and its standard library:

```sh
python3 reproduce_timelocks.py > reproduced_results.json
```

Keep `timelock_boundary_cases.json` beside the script, or pass its path as the first argument. The recorded `timelock_reproduction_results.json` contains the same deterministic output. A failing expected comparison raises an error and stops.

## Why this reference exists

The browser worksheet uses first-eligible height and MTP thresholds. This original Python reference instead calculates last-invalid thresholds and applies strict greater-than comparisons. Both representations must agree on the included synthetic boundaries. Expected values are fixed in the fixture, not generated by the Python reference during its test.

Absolute nonzero nLockTime is a last-invalid boundary. Relative sequence locks use confirmation height plus count minus one, or pre-confirmation-block MTP plus count times 512 minus one. Height and time constraints are combined separately. The actual transaction fields can impose stricter delays than a script minimum.

## Scope and limits

Fixtures use one declared active CLTV or CSV requirement and a regular input confirmed before the candidate block. The reference includes exact equality boundaries, actual sequence values exceeding the script minimum, simultaneous absolute/relative constraints, sequence flags and deliberately inconsistent context. Unknown and malformed-input UI behavior is separately tested by the browser definition's authoring specification; this small public reference uses complete integer fixtures only.

No private key, seed phrase, signed transaction, funded output, wallet address or current chain-state observation is present. Block heights and Unix-second MTP figures are synthetic. No script path is inferred from an address. Other inputs, signatures, alternative branches, coinbase maturity, mempool policy, reorganizations and eventual inclusion are not validated. Future wall-clock ETA is unknown.

## Exact primary pins

- Bitcoin Core v32.1, commit `f0de87f040621468b956f01f526a43a010310501`; official release published 28 October 2026.
- Bitcoin BIPs repository commit `9f3d3bc6a60db16efbdc71ac8f7ea30217fc0c39`; BIPs 65, 68, 112 and 113.
- Source URLs are included in the fixture. The original implementation source is linked rather than copied into this public package.
