2 ms·
> Verifying signatures was O(n*m) where n is the number of checksig ops and m the transaction size. This makes it possible to generate transaction that are absu
by Boulth 8y ago
> Verifying signatures was O(n*m) where n is the number of checksig ops and m the transaction size. This makes it possible to generate transaction that are absurdly expensive to validate.
That's what sigops limits are for: https://curiosity-driven.org/low-level-bitcoin#signatures https://curiosity-driven.org/low-level-bitcoin#signatures
- tomtomtom777 8y agoNot really. The problem is that with twice as many sigops, you would also have to hash ~twice as much for each sigop. Hence O(n*m). A problem known "quadratic hashing". This is solved by using a different way to hash the signatures that doesn't require full recalculation on each input. In Bitcoin Cash it is fixed for all transactions; in Bitcoin it is only fixed for SegWit transactions so an attacker could still do this, by not using segwits.