Matt Corallo [ARCHIVE] on Nostr: 📅 Original date posted:2016-02-09 📝 Original message:Oops, forgot to reply to ...
📅 Original date posted:2016-02-09
📝 Original message:Oops, forgot to reply to your last point.
Indeed, we could push for more place by just always having one 0-byte,
but I'm not sure the added complexity helps anything? ASICs can never be
designed which use more extra-nonce-space than what they can reasonably
assume will always be available, so we might as well just set the
maximum number of bytes and let ASIC designers know exactly what they
have available. Currently blocks start with at least 8 0-bytes. We could
just say minimum difficulty is now 6 0-bytes (2**16x harder) and reserve
those? Anyway, someone needs to take a closer look at the midstate
optimization stuff to see what is reasonable required.
Matt
>>> 4) Instead of requiring the first four bytes of the previous block hash
>>> field be 0s, we allow them to contain any value. This allows Bitcoin
>>> mining hardware to reduce the required logic, making it easier to
>>> produce competitive hardware [1].
>>> [1] Simpler here may not be entirely true. There is potential for
>>> optimization if you brute force the SHA256 midstate, but if nothing
>>> else, this will prevent there being a strong incentive to use the
>>> version field as nonce space. This may need more investigation, as we
>>> may wish to just set the minimum difficulty higher so that we can add
>>> more than 4 nonce-bytes.
>>
>> Could you just use leading non-zero bytes of the prevhash as additional
>> nonce?
>>
>> So to work out the actual prev hash, set leading bytes to zero until
>> you hit a zero. Conversely, to add nonce info to a hash, if there are
>> N leading zero bytes, fill up the first N-1 (or less) of them with
>> non-zero values.
>>
>> That would give a little more than 255**(N-1) possible values
>> ((255**N-1)/254) to be exact). That would actually scale automatically
>> with difficulty, and seems easy enough to make use of in an ASIC?
Published at
2023-06-07 17:48:57Event JSON
{
"id": "d48dc5f5fb95afc4251110f3cb1a8f269b7cdb45c8ee277c531a6bff2a950a37",
"pubkey": "cd753aa8fbc112e14ffe9fe09d3630f0eff76ca68e376e004b8e77b687adddba",
"created_at": 1686160137,
"kind": 1,
"tags": [
[
"e",
"8c25de74ae7131786de7d5ab012e48bad7eff95963972248b7442bdb60a9ffb5",
"",
"root"
],
[
"e",
"7e785a52e63e0f7d36fb241bb80afdde21c065400188347494160e445a85efbd",
"",
"reply"
],
[
"p",
"cd753aa8fbc112e14ffe9fe09d3630f0eff76ca68e376e004b8e77b687adddba"
]
],
"content": "📅 Original date posted:2016-02-09\n📝 Original message:Oops, forgot to reply to your last point.\n\nIndeed, we could push for more place by just always having one 0-byte,\nbut I'm not sure the added complexity helps anything? ASICs can never be\ndesigned which use more extra-nonce-space than what they can reasonably\nassume will always be available, so we might as well just set the\nmaximum number of bytes and let ASIC designers know exactly what they\nhave available. Currently blocks start with at least 8 0-bytes. We could\njust say minimum difficulty is now 6 0-bytes (2**16x harder) and reserve\nthose? Anyway, someone needs to take a closer look at the midstate\noptimization stuff to see what is reasonable required.\n\nMatt\n\n\n\u003e\u003e\u003e 4) Instead of requiring the first four bytes of the previous block hash\n\u003e\u003e\u003e field be 0s, we allow them to contain any value. This allows Bitcoin\n\u003e\u003e\u003e mining hardware to reduce the required logic, making it easier to\n\u003e\u003e\u003e produce competitive hardware [1].\n\u003e\u003e\u003e [1] Simpler here may not be entirely true. There is potential for\n\u003e\u003e\u003e optimization if you brute force the SHA256 midstate, but if nothing\n\u003e\u003e\u003e else, this will prevent there being a strong incentive to use the\n\u003e\u003e\u003e version field as nonce space. This may need more investigation, as we\n\u003e\u003e\u003e may wish to just set the minimum difficulty higher so that we can add\n\u003e\u003e\u003e more than 4 nonce-bytes.\n\u003e\u003e\n\u003e\u003e Could you just use leading non-zero bytes of the prevhash as additional\n\u003e\u003e nonce?\n\u003e\u003e\n\u003e\u003e So to work out the actual prev hash, set leading bytes to zero until\n\u003e\u003e you hit a zero. Conversely, to add nonce info to a hash, if there are\n\u003e\u003e N leading zero bytes, fill up the first N-1 (or less) of them with\n\u003e\u003e non-zero values.\n\u003e\u003e\n\u003e\u003e That would give a little more than 255**(N-1) possible values\n\u003e\u003e ((255**N-1)/254) to be exact). That would actually scale automatically\n\u003e\u003e with difficulty, and seems easy enough to make use of in an ASIC?",
"sig": "f57f1ecd5fd4aaf8b6d18c065aafa9e36c122d3366da99950fcb761cf289248f467afdbf3bfdfd73f574ba1933fd342fe362362d90f651e9d35aa7f60800b3ea"
}