Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2015-05-15 📝 Original message:Tier Nolan <tier.nolan at ...
📅 Original date posted:2015-05-15
📝 Original message:Tier Nolan <tier.nolan at gmail.com> writes:
> On Sat, May 9, 2015 at 4:36 AM, Gregory Maxwell <gmaxwell at gmail.com> wrote:
>
>> An example would
>> be tx_size = MAX( real_size >> 1, real_size + 4*utxo_created_size -
>> 3*utxo_consumed_size).
>
>
> This could be implemented as a soft fork too.
>
> * 1MB hard size limit
> * 900kB soft limit
I like this too.
Some tweaks:
1) Nomenclature: call tx_size "tx_cost" and real_size "tx_bytes"?
2) If we have a reasonable hard *byte* limit, I don't think that we need
the MAX(). In fact, it's probably OK to go negative.
3) ... or maybe not, if any consumed UTXO was generated before the soft
fork (reducing Tier's perverse incentive).
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?
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.
Cheers,
Rusty.
Published at
2023-06-07 15:34:02Event JSON
{
"id": "ffb72343d80f07dbf7954e6b6b7a3e1762b84d9e00d51ba77deceb559deccbf3",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686152042,
"kind": 1,
"tags": [
[
"e",
"aec396df7693e37c124fbd2891fe6c4a3b28f46e7fbc3f304a7b1d78d2f5ffbe",
"",
"root"
],
[
"e",
"e3bd9398550ee36330dafec4d8198c2c37b8e6f89914b0e4e4d36648a844093f",
"",
"reply"
],
[
"p",
"46986f86b97cc97829a031b03209644d134b939d0163375467f0b1363e0d875e"
]
],
"content": "📅 Original date posted:2015-05-15\n📝 Original message:Tier Nolan \u003ctier.nolan at gmail.com\u003e writes:\n\u003e On Sat, May 9, 2015 at 4:36 AM, Gregory Maxwell \u003cgmaxwell at gmail.com\u003e wrote:\n\u003e\n\u003e\u003e An example would\n\u003e\u003e be tx_size = MAX( real_size \u003e\u003e 1, real_size + 4*utxo_created_size -\n\u003e\u003e 3*utxo_consumed_size).\n\u003e\n\u003e\n\u003e This could be implemented as a soft fork too.\n\u003e\n\u003e * 1MB hard size limit\n\u003e * 900kB soft limit\n\nI like this too.\n\nSome tweaks:\n\n1) Nomenclature: call tx_size \"tx_cost\" and real_size \"tx_bytes\"?\n\n2) If we have a reasonable hard *byte* limit, I don't think that we need\n the MAX(). In fact, it's probably OK to go negative.\n\n3) ... or maybe not, if any consumed UTXO was generated before the soft\n fork (reducing Tier's perverse incentive).\n\n4) How do we measure UTXO size? There are some constant-ish things in\n there (eg. txid as key, height, outnum, amount). Maybe just add 32\n to scriptlen?\n\n5) Add a CHECKSIG cost. Naively, since we allow 20,000 CHECKSIGs and\n 1MB blocks, that implies a cost of 50 bytes per CHECKSIG (but counted\n correctly, unlike now). \n\nThis last one implies that the initial cost limit would be 2M, but in\npractice probably somewhere in the middle.\n\n tx_cost = 50*num-CHECKSIG\n + tx_bytes\n + 4*utxo_created_size\n - 3*utxo_consumed_size\n\n\u003e A 250 byte transaction with 2 inputs and 2 outputs would have an adjusted\n\u003e size of 252 bytes.\n\nNow cost == 352.\n\nCheers,\nRusty.",
"sig": "f442ebaf1735c33b432484cdce330ea18c560ae723c0f8a6e17a63dfee115198c9d2e732ca4ea16f10159b706b6f4f2c031a98c552816d1d5b1edd2ea36774d2"
}