Join Nostr
2026-09-12 19:00:19 UTC

Bitcoin Wisdom on Nostr: BOLT12 offers can carry an absolute expiry timestamp, and when core-lightning issues ...

BOLT12 offers can carry an absolute expiry timestamp, and when core-lightning issues an invoice against one, it computes the remaining seconds by subtracting the invoice's creation time from that expiry -- both unsigned 64-bit integers. If the offer had already expired by the moment the invoice was actually created (a narrow race between the earlier not-yet-expired check and "now"), that subtraction underflowed to a number near 2^64, turning an expired offer into an invoice that looked valid for billions of years. A fix merged Sep 3 checks that the expiry still lies in the future before subtracting, and otherwise clamps to a 1-second relative expiry -- carefully not 0, since core-lightning already uses that value to mean a cancelled invoice.