Gavin Andresen [ARCHIVE] on Nostr: š Original date posted:2011-09-26 šļø Summary of this message: A transaction ...
š
Original date posted:2011-09-26
šļø Summary of this message: A transaction with "non-standard" sig op count is allowed in blocks but not accepted by mainline rules, causing potential DoS attacks.
š Original message:> The first one I was referring to is a *transaction* with "non-standard" sig op
> count, which is AFAIK allowed in blocks, just not accepted by the mainline
> rules.
I sit corrected. The context is:
// Checking ECDSA signatures is a CPU bottleneck, so to avoid
denial-of-service
// attacks disallow transactions with more than one SigOp per 34
bytes.
// 34 bytes because a TxOut is:
// 20-byte address + 8 byte bitcoin amount + 5 bytes of ops + 1
byte script length
if (GetSigOpCount() > nSize / 34 || nSize < 100)
return DoS(10, error("AcceptToMemoryPool() : transaction with
out-of-bounds SigOpCount"));
I'm having trouble imagining some future world where valid,
new-versions-agree-to-relay-transactions have more than one SigOp per
34 bytes; can you give an example?
> Maybe the person spending it sees it matured beyond 100 confirmations, and you
> only see 99. An attacker could use these things to get nodes to ban each
> other.
That would imply you're on a blockchain fork of more than 99 blocks
with respect to the person spending the transaction, in which case I'd
argue you have much bigger problems and it is a good idea for the DoS
code to kick in and kick either you or them off the network...
--
--
Gavin Andresen
šļø Summary of this message: A transaction with "non-standard" sig op count is allowed in blocks but not accepted by mainline rules, causing potential DoS attacks.
š Original message:> The first one I was referring to is a *transaction* with "non-standard" sig op
> count, which is AFAIK allowed in blocks, just not accepted by the mainline
> rules.
I sit corrected. The context is:
// Checking ECDSA signatures is a CPU bottleneck, so to avoid
denial-of-service
// attacks disallow transactions with more than one SigOp per 34
bytes.
// 34 bytes because a TxOut is:
// 20-byte address + 8 byte bitcoin amount + 5 bytes of ops + 1
byte script length
if (GetSigOpCount() > nSize / 34 || nSize < 100)
return DoS(10, error("AcceptToMemoryPool() : transaction with
out-of-bounds SigOpCount"));
I'm having trouble imagining some future world where valid,
new-versions-agree-to-relay-transactions have more than one SigOp per
34 bytes; can you give an example?
> Maybe the person spending it sees it matured beyond 100 confirmations, and you
> only see 99. An attacker could use these things to get nodes to ban each
> other.
That would imply you're on a blockchain fork of more than 99 blocks
with respect to the person spending the transaction, in which case I'd
argue you have much bigger problems and it is a good idea for the DoS
code to kick in and kick either you or them off the network...
--
--
Gavin Andresen