yanmaani at cock.li [ARCHIVE] on Nostr: ð
Original date posted:2021-10-17 ð Original message:What, no. The `k` value is ...
ð
Original date posted:2021-10-17
ð Original message:What, no. The `k` value is calculated implicitly, because there's only
one value of it that could ever be valid - if `k` is 1 too small, we're
70 years too far back, and then the block will violate median of last
11. If `k` is 1 too large, we're 70 years too far in the future, then
the block will violate 2 hour rule. Nothing is added to coinbase or
anywhere else.
It's possible that you'd need some extra logic for locktime, yes, but it
would only be a problem in very special cases. Worst-case, you'll have
to use block time locking in the years around the switch, or softfork in
64-bit locking.
But unless I'm missing something, 32-bit would be enough, you just
wouldn't be able to locktime something past the timestamp for the
switch. After the switchover, everything would be back to normal.
This is a hardfork, yes, but it's a hardfork that kicks in way into the
future. And because it's a hardfork, you might as well do anything, as
long as it doesn't change anything now.
On 2021-10-15 22:22, vjudeu at gazeta.pl wrote:
> Your solution seems to solve the problem of chain halting, but there
> are more issues. For example: if you have some time modulo 2^32, then
> you no longer know if timestamp zero is related to 1970 or 2106 or
> some higher year. Your "k" value representing in fact the most
> significant 32 bits of 64-bit timestamp has to be stored in all cases
> where time is used. If there is no "k", then zero should be used for
> backward compatibility. Skipping "k" could cause problems related to
> OP_CHECKLOCKTIMEVERIFY or nLockTime, because if some transaction was
> timestamped to 0xbadc0ded, then that transaction will be valid in
> 0x00000000badc0ded, invalid in 0x0000000100000000, and valid again in
> 0x00000001badc0ded, the same for timelocked outputs.
>
> So, I think your "k" value should be added to the coinbase
> transaction, then you can combine two 32-bit values, the lower bits
> from the block header and the higher bits from the coinbase
> transaction. Also, adding your "k" value transaction nLockTime field
> is needed (maybe in a similar way as transaction witness was added in
> Segwit), because in other case after reaching 0x0000000100000000 all
> off-chain transactions with timelocks around 0x00000000ffffffff will
> be additionally timelocked for the next N years. The same is needed
> for each OP_CHECKLOCKTIMEVERIFY, maybe pushing high 32 bits before the
> currently used value will solve that (and assuming zero if there is
> only some 32-bit value).
Published at
2023-06-07 23:00:09Event JSON
{
"id": "7439ffc353af2d87d9ebcb7990ffd8ae3cba4b167773e66afe0c3988082657fb",
"pubkey": "8f5bcf9ba2de88dd877a672f629a5c6a7bebbeda3fa51324521e03863d8fe094",
"created_at": 1686178809,
"kind": 1,
"tags": [
[
"e",
"c0e13d397dc71c2d737cbe4277ed0c11fb0c8d97302650a28ed4170c1d01b58d",
"",
"root"
],
[
"e",
"811aa77ba972231c04f65988e16eb4b1c0e648bc703f856989d0c615422362d0",
"",
"reply"
],
[
"p",
"8d3cf7eba921036409f1fec074cf8cfd8925bc7cb18e35d358b1ccc89752ee32"
]
],
"content": "ð
Original date posted:2021-10-17\nð Original message:What, no. The `k` value is calculated implicitly, because there's only \none value of it that could ever be valid - if `k` is 1 too small, we're \n70 years too far back, and then the block will violate median of last \n11. If `k` is 1 too large, we're 70 years too far in the future, then \nthe block will violate 2 hour rule. Nothing is added to coinbase or \nanywhere else.\n\nIt's possible that you'd need some extra logic for locktime, yes, but it \nwould only be a problem in very special cases. Worst-case, you'll have \nto use block time locking in the years around the switch, or softfork in \n64-bit locking.\n\nBut unless I'm missing something, 32-bit would be enough, you just \nwouldn't be able to locktime something past the timestamp for the \nswitch. After the switchover, everything would be back to normal.\n\nThis is a hardfork, yes, but it's a hardfork that kicks in way into the \nfuture. And because it's a hardfork, you might as well do anything, as \nlong as it doesn't change anything now.\n\nOn 2021-10-15 22:22, vjudeu at gazeta.pl wrote:\n\u003e Your solution seems to solve the problem of chain halting, but there\n\u003e are more issues. For example: if you have some time modulo 2^32, then\n\u003e you no longer know if timestamp zero is related to 1970 or 2106 or\n\u003e some higher year. Your \"k\" value representing in fact the most\n\u003e significant 32 bits of 64-bit timestamp has to be stored in all cases\n\u003e where time is used. If there is no \"k\", then zero should be used for\n\u003e backward compatibility. Skipping \"k\" could cause problems related to\n\u003e OP_CHECKLOCKTIMEVERIFY or nLockTime, because if some transaction was\n\u003e timestamped to 0xbadc0ded, then that transaction will be valid in\n\u003e 0x00000000badc0ded, invalid in 0x0000000100000000, and valid again in\n\u003e 0x00000001badc0ded, the same for timelocked outputs.\n\u003e \n\u003e So, I think your \"k\" value should be added to the coinbase\n\u003e transaction, then you can combine two 32-bit values, the lower bits\n\u003e from the block header and the higher bits from the coinbase\n\u003e transaction. Also, adding your \"k\" value transaction nLockTime field\n\u003e is needed (maybe in a similar way as transaction witness was added in\n\u003e Segwit), because in other case after reaching 0x0000000100000000 all\n\u003e off-chain transactions with timelocks around 0x00000000ffffffff will\n\u003e be additionally timelocked for the next N years. The same is needed\n\u003e for each OP_CHECKLOCKTIMEVERIFY, maybe pushing high 32 bits before the\n\u003e currently used value will solve that (and assuming zero if there is\n\u003e only some 32-bit value).",
"sig": "7ba5bd6895c39e708803b07f4b108e6e3eb3620c50fe4a01f9721fed7516fbbfcc8433dea941dce6d4b65e231bf7ac3ffe0ad05c3afbe0fed7fffe92ee89fa39"
}