upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/btfaddr.cpp
diff options
context:
space:
mode:
authorBitflash <btf01@proton.me>2026-07-28 15:27:57 -0300
committerGitHub <noreply@github.com>2026-07-28 15:27:57 -0300
commit389e9966758125f4e20d059a02396e1577b6367c (patch)
tree6a32feac1c5549eeab1e4b3557f50929e7244d6c /src/btfaddr.cpp
parent63764708903cf93476b0fa43580e23ff75ffceba (diff)
main: cap signature operations per block (#20)
MAX_SIZE bounds a block's bytes, not what it costs to check. Every OP_CHECKSIG is an elliptic-curve verification, and blocks may be 32 MB here, so one packed with signature operations takes every node minutes of CPU to reject -- while at this chain's difficulty it stays cheap to mine. There was no counter at all. CheckBlock now sums signature operations across the block and rejects past 20000, the figure Bitcoin settled on. OP_CHECKMULTISIG counts as 20 since it may verify that many. Consensus change. Real blocks here carry one or two operations each -- coinbase pay-to-pubkey and standard pay-to-pubkey-hash spends -- so the ceiling is four orders of magnitude above anything in the chain, but it still needs verifying against the full history before merge.
Diffstat (limited to 'src/btfaddr.cpp')
0 files changed, 0 insertions, 0 deletions