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
Published at
2023-06-07 02:29:19Event JSON
{
"id": "3f446015d9c2ad99645dd68478e558e26980d14f5d75569ea725b1a16f994da3",
"pubkey": "857f2f78dc1639e711f5ea703a9fc978e22ebd279abdea1861b7daa833512ee4",
"created_at": 1686104959,
"kind": 1,
"tags": [
[
"e",
"d6d0027f983f7cf39b7bceeaefc2da4fd33248e5b23365297769f7aaa959dad8",
"",
"root"
],
[
"e",
"5c3b3eac1b5d0adb502a9b63c94891a4b90e3753bcd07774131e1e12a2201a9a",
"",
"reply"
],
[
"p",
"6ac6a519b554d8ff726a301e3daec0b489f443793778feccc6ea7a536f7354f1"
]
],
"content": "š
Original date posted:2011-09-26\nšļø 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.\nš Original message:\u003e The first one I was referring to is a *transaction* with \"non-standard\" sig op\n\u003e count, which is AFAIK allowed in blocks, just not accepted by the mainline\n\u003e rules.\n\nI sit corrected. The context is:\n // Checking ECDSA signatures is a CPU bottleneck, so to avoid\ndenial-of-service\n // attacks disallow transactions with more than one SigOp per 34\nbytes.\n // 34 bytes because a TxOut is:\n // 20-byte address + 8 byte bitcoin amount + 5 bytes of ops + 1\nbyte script length\n if (GetSigOpCount() \u003e nSize / 34 || nSize \u003c 100)\n\treturn DoS(10, error(\"AcceptToMemoryPool() : transaction with\nout-of-bounds SigOpCount\"));\n\nI'm having trouble imagining some future world where valid,\nnew-versions-agree-to-relay-transactions have more than one SigOp per\n34 bytes; can you give an example?\n\n\u003e Maybe the person spending it sees it matured beyond 100 confirmations, and you\n\u003e only see 99. An attacker could use these things to get nodes to ban each\n\u003e other.\n\nThat would imply you're on a blockchain fork of more than 99 blocks\nwith respect to the person spending the transaction, in which case I'd\nargue you have much bigger problems and it is a good idea for the DoS\ncode to kick in and kick either you or them off the network...\n\n-- \n--\nGavin Andresen",
"sig": "09c9145974bb599c296227d7dfa3951146a3c1fea1379d49bb12cafee66fe267af0ebe1f848e24fbd2efa056b4c23be2ebfd18529d5507410c3a7475febe3872"
}