Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2015-05-17 📝 Original message:Tier Nolan <tier.nolan at ...
📅 Original date posted:2015-05-17
📝 Original message:Tier Nolan <tier.nolan at gmail.com> writes:
> On Sat, May 16, 2015 at 1:22 AM, Rusty Russell <rusty at rustcorp.com.au>
> wrote:
>> 3) ... or maybe not, if any consumed UTXO was generated before the soft
>> fork (reducing Tier's perverse incentive).
>
> The incentive problem can be fixed by excluding UTXOs from blocks before a
> certain count.
>
> UTXOs in blocks before 375000 don't count.
OK. Be nice if these were cleaned up, but I guess it's a sunk cost.
>> 4) How do we measure UTXO size? There are some constant-ish things in
>> there (eg. txid as key, height, outnum, amount). Maybe just add 32
>> to scriptlen?
>>
>
> They can be stored as a fixed digest. That can be any size, depending on
> security requirements.
>
> Gmaxwell's cost proposal is 3-4 bytes per UTXO change. It isn't
> 4*UXTO.size - 3*UTXO.size
He said "utxo_created_size" not "utxo_created" so I assumed scriptlen?
> It is only a small nudge. With only 10% of the block space to play with it
> can't be massive.
But you made that number up? The soft cap and hard byte limit are
different beasts, so there's no need for soft cost cap < hard byte
limit.
> This requires that transactions include scriptPubKey information when
> broadcasting them.
Brilliant! I completely missed that possibility...
>> 5) Add a CHECKSIG cost. Naively, since we allow 20,000 CHECKSIGs and
>> 1MB blocks, that implies a cost of 50 bytes per CHECKSIG (but counted
>> correctly, unlike now).
>>
>> This last one implies that the initial cost limit would be 2M, but in
>> practice probably somewhere in the middle.
>>
>> tx_cost = 50*num-CHECKSIG
>> + tx_bytes
>> + 4*utxo_created_size
>> - 3*utxo_consumed_size
>>
>> > A 250 byte transaction with 2 inputs and 2 outputs would have an adjusted
>> > size of 252 bytes.
>>
>> Now cost == 352.
>
> That is to large a cost for a 10% block change. It could be included in
> the block size hard fork though.
I don't think so. Again, you're mixing units.
> I think have one combined "cost" for
> transactions is good. It means much fewer spread out transaction checks.
> The code for the cost formula would be in one place.
Agreed! Unfortunately there'll always be 2, because we really do want a
hard byte limit: it's total tx bytes which brings most concerns about
centralization. But ideally it'll be so rarely hit that it can be ~
ignored (and certainly not optimized for).
Cheers,
Rusty.
Published at
2023-06-07 15:34:02Event JSON
{
"id": "7cfad3d2a9401c114299cc91c75a2637434f44ac7abb798539575a43aebc8b02",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686152042,
"kind": 1,
"tags": [
[
"e",
"aec396df7693e37c124fbd2891fe6c4a3b28f46e7fbc3f304a7b1d78d2f5ffbe",
"",
"root"
],
[
"e",
"3d19731c13b4a1b83bb871b6bd929517768442d4574b255702b18f872b146f81",
"",
"reply"
],
[
"p",
"46986f86b97cc97829a031b03209644d134b939d0163375467f0b1363e0d875e"
]
],
"content": "📅 Original date posted:2015-05-17\n📝 Original message:Tier Nolan \u003ctier.nolan at gmail.com\u003e writes:\n\u003e On Sat, May 16, 2015 at 1:22 AM, Rusty Russell \u003crusty at rustcorp.com.au\u003e\n\u003e wrote:\n\u003e\u003e 3) ... or maybe not, if any consumed UTXO was generated before the soft\n\u003e\u003e fork (reducing Tier's perverse incentive).\n\u003e\n\u003e The incentive problem can be fixed by excluding UTXOs from blocks before a\n\u003e certain count.\n\u003e\n\u003e UTXOs in blocks before 375000 don't count.\n\nOK. Be nice if these were cleaned up, but I guess it's a sunk cost.\n\n\u003e\u003e 4) How do we measure UTXO size? There are some constant-ish things in\n\u003e\u003e there (eg. txid as key, height, outnum, amount). Maybe just add 32\n\u003e\u003e to scriptlen?\n\u003e\u003e\n\u003e\n\u003e They can be stored as a fixed digest. That can be any size, depending on\n\u003e security requirements.\n\u003e\n\u003e Gmaxwell's cost proposal is 3-4 bytes per UTXO change. It isn't\n\u003e 4*UXTO.size - 3*UTXO.size\n\nHe said \"utxo_created_size\" not \"utxo_created\" so I assumed scriptlen?\n\n\u003e It is only a small nudge. With only 10% of the block space to play with it\n\u003e can't be massive.\n\nBut you made that number up? The soft cap and hard byte limit are\ndifferent beasts, so there's no need for soft cost cap \u003c hard byte\nlimit.\n\n\u003e This requires that transactions include scriptPubKey information when\n\u003e broadcasting them.\n\nBrilliant! I completely missed that possibility...\n\n\u003e\u003e 5) Add a CHECKSIG cost. Naively, since we allow 20,000 CHECKSIGs and\n\u003e\u003e 1MB blocks, that implies a cost of 50 bytes per CHECKSIG (but counted\n\u003e\u003e correctly, unlike now).\n\u003e\u003e\n\u003e\u003e This last one implies that the initial cost limit would be 2M, but in\n\u003e\u003e practice probably somewhere in the middle.\n\u003e\u003e\n\u003e\u003e tx_cost = 50*num-CHECKSIG\n\u003e\u003e + tx_bytes\n\u003e\u003e + 4*utxo_created_size\n\u003e\u003e - 3*utxo_consumed_size\n\u003e\u003e\n\u003e\u003e \u003e A 250 byte transaction with 2 inputs and 2 outputs would have an adjusted\n\u003e\u003e \u003e size of 252 bytes.\n\u003e\u003e\n\u003e\u003e Now cost == 352.\n\u003e\n\u003e That is to large a cost for a 10% block change. It could be included in\n\u003e the block size hard fork though.\n\nI don't think so. Again, you're mixing units.\n\n\u003e I think have one combined \"cost\" for\n\u003e transactions is good. It means much fewer spread out transaction checks.\n\u003e The code for the cost formula would be in one place.\n\nAgreed! Unfortunately there'll always be 2, because we really do want a\nhard byte limit: it's total tx bytes which brings most concerns about\ncentralization. But ideally it'll be so rarely hit that it can be ~\nignored (and certainly not optimized for).\n\nCheers,\nRusty.",
"sig": "d3677418bb1fc30e6d070a089f277a728aa7343cf454eb0a27b16c84f906a252dc3340444bc4de3dec6e718e59cfe91aa2367901dd07d85d1ea3a879fbfda8d7"
}