"""Offline Litecoin timing and maturity examples, 22 October 2026. Python standard library only; no node, wallet, network or file writes. Probability models are synthetic. Maturity examples encode pinned Core 0.21.5.8 conditions; they do not query a live chain or validate a spend. """ import math,json def calculate(): height=3000000 boundaries=[] for offset in [0,5,6,98,99,100,101]: tip=height+offset depth=tip-height+1 boundaries.append(dict(kind="SYNTHETIC_HEIGHT_BOUNDARY",creation_height=height,tip_height=tip,confirmations=depth,next_block_height=tip+1,coinbase_consensus_age_next=tip+1-height,coinbase_consensus_mature_next=tip+1-height>=100,core_coinbase_blocks_to_maturity=max(0,101-depth),pegout_consensus_mature_next=tip+1-height>=6,core_hogex_blocks_to_maturity=max(0,6-depth))) rows=[ dict(kind="STATIONARY_MODEL_NOT_OBSERVED",metric="next_block_median_seconds",value=150*math.log(2)), dict(kind="STATIONARY_MODEL_NOT_OBSERVED",metric="next_block_p90_seconds",value=-150*math.log(.1)), dict(kind="STATIONARY_MODEL_NOT_OBSERVED",metric="next_block_p99_seconds",value=-150*math.log(.01)), dict(kind="STATIONARY_MODEL_NOT_OBSERVED",metric="probability_no_block_300seconds",value=math.exp(-2)), dict(kind="STATIONARY_MODEL_NOT_OBSERVED",metric="probability_six_future_blocks_by_900seconds",value=1-math.exp(-6)*sum(6**k/math.factorial(k) for k in range(6))) ] rows += [dict(kind="SYNTHETIC_OVERLAP_NOT_STALE_RATE",metric="overlap_probability_d_"+str(d)+"seconds",value=1-math.exp(-d/150)) for d in [1,5,10]] return dict(maturity=boundaries,interval=rows,mean_100_future_blocks_minutes=100*150/60,mean_six_future_blocks_minutes=6*150/60,mean_five_future_blocks_minutes=5*150/60) def check(r): b={x["tip_height"]-x["creation_height"]:x for x in r["maturity"]} assert not b[98]["coinbase_consensus_mature_next"] assert b[99]["coinbase_consensus_mature_next"] assert b[99]["core_coinbase_blocks_to_maturity"]==1 assert b[100]["core_coinbase_blocks_to_maturity"]==0 assert b[5]["pegout_consensus_mature_next"] assert b[5]["core_hogex_blocks_to_maturity"]==0 v={x["metric"]:x["value"] for x in r["interval"]} assert round(v["next_block_median_seconds"],2)==103.97 assert round(v["next_block_p90_seconds"],2)==345.39 assert round(v["next_block_p99_seconds"],2)==690.78 assert round(v["probability_no_block_300seconds"]*100,2)==13.53 assert round(v["probability_six_future_blocks_by_900seconds"]*100,2)==55.43 assert r["mean_100_future_blocks_minutes"]==250 assert r["mean_six_future_blocks_minutes"]==15 assert r["mean_five_future_blocks_minutes"]==12.5 return 14 if __name__=="__main__": r=calculate();print(json.dumps(dict(assertions=check(r),results=r),indent=2))