Bitcoin full node and query server

Jan 3, 2025

View in context in the libbitcoin Slack #general mirror.

evoskuil21:19
I just realized that when we populate prevouts from the block itself, which according to recent testing reported here as about 9% of spends, there is no need to perform confirmation checks on those prevouts, with the exception of relative locktime (bip68). That is typically a contextual check performed at confirmation because it requires prevout context (height/mtp). However relative locktime is relative. All height/mtp checks subtract prevout from spender height/mtp values, so for internal spends age is always zero. So if the relevant relative locktime specified is nonzero, the input is locked (making the tx unconfirmable in any block that activates bip68). So basically we can add this check to void block.populate() and have it return bool if any input is locked.