Pieter Wuille [ARCHIVE] on Nostr: 📅 Original date posted:2018-06-06 📝 Original message:On Wed, Jun 6, 2018 at ...
📅 Original date posted:2018-06-06
📝 Original message:On Wed, Jun 6, 2018 at 5:48 AM, Tim Ruffing via bitcoin-dev
<bitcoin-dev at lists.linuxfoundation.org> wrote:
> On Thu, 2018-05-31 at 17:25 -0700, Pieter Wuille via bitcoin-dev wrote:
>> The best argument for why Graftroot does not need to be optional I
>> think was how Greg put it: "since the signer(s) could have signed an
>> arbitrary transaction instead, being able to delegate is strictly
>> less
>> powerful.".
...
> So
> I think Graftroot delegation is not "strictly less powerful" than just
> using a normal transaction: Graftroot enables to delegate in a way such
> that the delegation itself cannot be fixed in the chain. I think this
> is not possible currently. (Okay, you can just pass around the secret
> keys but has other problems obviously).
>
> Does this have practical implications?
> I don't see any but maybe this helps someone to identify an undesirable
> implication.
Interesting point; I don't see any relevant implications to this
either, but it's indeed good to point out this as a distinction.
> One way to be on the safe side and probably make Greg's argument go
> through is to just define the semantics such that (*) is allowed, i.e.,
> call g-sig a "Graftroot transaction" and give it transaction semantics.
> This provides a new perspective on Graftroot: Then Graftroot does not
> introduce new semantics but (*) is just an optimized version of (**)
> that uses fewer bytes and may be better for privacy.
So you're saying: the Graftroot signature data could be made identical
to the signature hash of an implicit 1-input-1-output transaction
spending the coin and creating a new output with the delegated script
as sPK, and the same amount.
I like that idea, but I don't think it can be *exactly* that. If it's
possible to take a Graftroot signature and instead construct a
transaction with it, you have inherently introduced a malleability.
The created outpoint will be different in both cases (different txid),
meaning that a chain of dependent unconfirmed transactions may be
broken by giving one participant the ability to choose between
Graftroot delegation or actual spending.
Two points here: (1) the implicit transaction would be 0 fee (unless
we somehow assign a portion of the fee to the delegation itself for
purposes of sighash computing), and (2) this sounds very similar to
the issue SIGHASH_NOINPUT is intended to solve. About that...
> Interestingly Andrew's blind-sig example and Johnson's fix (g-sig signs
> the outpoint) are just a special case. If g-sig has transaction
> semantics, it must sign the outpoint (and other stuff).
You're right when you're comparing with existing transaction sighash
semantics, but not when SIGHASH_NOINPUT would exist. If that were the
case, the only real difference is your point above of not being able
to commit the implicit transaction separately. In other words, we're
back to something Johnson pointed out earlier: some of the perceived
problems with Graftroot are also issues with SIGHASH_NOINPUT.
I wonder if we can make this explicit: Graftroot spending becomes a
special sighash flag (which possibly is only allowed at the top level)
- it builds an implicit transaction which moves all the coins to a
newly provided script, computes the sighash of that transaction
(taking all of the Graftroot signature's sighash flags into account -
including potentially SIGHASH_NOINPUT), and requires a signature with
that. The delegated script is then evaluated in the context of that
implicit transaction.
However, in order to avoid the malleability issue I think the actual
signature should still be different - possibly by simply passing
through the Graftroot sighash flag into the sighash being computed.
Cheers,
--
Pieter
Published at
2023-06-07 18:12:34Event JSON
{
"id": "1b8d617ae90b9bf382fa2d4dccf11c15094b4b6ad0c01fa7e406fb042fbe7584",
"pubkey": "5cb21bf5d7f25a9d46879713cbd32433bbc10e40ef813a3c28fe7355f49854d6",
"created_at": 1686161554,
"kind": 1,
"tags": [
[
"e",
"b8d21356ac8a10082114550dc3d2c1af06da210e5c5c2a26406117c66617fb3a",
"",
"root"
],
[
"e",
"e8baf7f12e60cdf728558fca0d47d3cbb81df72f5ead809f0ed78c59ac04213c",
"",
"reply"
],
[
"p",
"c6d7a400897460d9a2c07bbad58731b6d04267edd75af42af45f471b04581ec2"
]
],
"content": "📅 Original date posted:2018-06-06\n📝 Original message:On Wed, Jun 6, 2018 at 5:48 AM, Tim Ruffing via bitcoin-dev\n\u003cbitcoin-dev at lists.linuxfoundation.org\u003e wrote:\n\u003e On Thu, 2018-05-31 at 17:25 -0700, Pieter Wuille via bitcoin-dev wrote:\n\u003e\u003e The best argument for why Graftroot does not need to be optional I\n\u003e\u003e think was how Greg put it: \"since the signer(s) could have signed an\n\u003e\u003e arbitrary transaction instead, being able to delegate is strictly\n\u003e\u003e less\n\u003e\u003e powerful.\".\n\n...\n\n\u003e So\n\u003e I think Graftroot delegation is not \"strictly less powerful\" than just\n\u003e using a normal transaction: Graftroot enables to delegate in a way such\n\u003e that the delegation itself cannot be fixed in the chain. I think this\n\u003e is not possible currently. (Okay, you can just pass around the secret\n\u003e keys but has other problems obviously).\n\u003e\n\u003e Does this have practical implications?\n\u003e I don't see any but maybe this helps someone to identify an undesirable\n\u003e implication.\n\nInteresting point; I don't see any relevant implications to this\neither, but it's indeed good to point out this as a distinction.\n\n\u003e One way to be on the safe side and probably make Greg's argument go\n\u003e through is to just define the semantics such that (*) is allowed, i.e.,\n\u003e call g-sig a \"Graftroot transaction\" and give it transaction semantics.\n\u003e This provides a new perspective on Graftroot: Then Graftroot does not\n\u003e introduce new semantics but (*) is just an optimized version of (**)\n\u003e that uses fewer bytes and may be better for privacy.\n\nSo you're saying: the Graftroot signature data could be made identical\nto the signature hash of an implicit 1-input-1-output transaction\nspending the coin and creating a new output with the delegated script\nas sPK, and the same amount.\n\nI like that idea, but I don't think it can be *exactly* that. If it's\npossible to take a Graftroot signature and instead construct a\ntransaction with it, you have inherently introduced a malleability.\nThe created outpoint will be different in both cases (different txid),\nmeaning that a chain of dependent unconfirmed transactions may be\nbroken by giving one participant the ability to choose between\nGraftroot delegation or actual spending.\n\nTwo points here: (1) the implicit transaction would be 0 fee (unless\nwe somehow assign a portion of the fee to the delegation itself for\npurposes of sighash computing), and (2) this sounds very similar to\nthe issue SIGHASH_NOINPUT is intended to solve. About that...\n\n\u003e Interestingly Andrew's blind-sig example and Johnson's fix (g-sig signs\n\u003e the outpoint) are just a special case. If g-sig has transaction\n\u003e semantics, it must sign the outpoint (and other stuff).\n\nYou're right when you're comparing with existing transaction sighash\nsemantics, but not when SIGHASH_NOINPUT would exist. If that were the\ncase, the only real difference is your point above of not being able\nto commit the implicit transaction separately. In other words, we're\nback to something Johnson pointed out earlier: some of the perceived\nproblems with Graftroot are also issues with SIGHASH_NOINPUT.\n\nI wonder if we can make this explicit: Graftroot spending becomes a\nspecial sighash flag (which possibly is only allowed at the top level)\n- it builds an implicit transaction which moves all the coins to a\nnewly provided script, computes the sighash of that transaction\n(taking all of the Graftroot signature's sighash flags into account -\nincluding potentially SIGHASH_NOINPUT), and requires a signature with\nthat. The delegated script is then evaluated in the context of that\nimplicit transaction.\n\nHowever, in order to avoid the malleability issue I think the actual\nsignature should still be different - possibly by simply passing\nthrough the Graftroot sighash flag into the sighash being computed.\n\nCheers,\n\n-- \nPieter",
"sig": "ab5bd3e5eed2506d3a16d739d5d20d2f22548bf30430465941084d87ae286c0d6dd4e512030770a92c2b2480448f1bea85e5f8e26dca5572b13158ec2fdadb62"
}