-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Nakamoto] stack-stx burn op requires a signing key and signature #4285
Comments
Can the signer-key be omitted since it can be recovered from the signer sig? Although I suppose that still wouldn't fit in OP_RETURN (85 bytes total?) |
What about if we stack it into new outputs:
I'm not sure how viable it is to take advantage of the witness program version as recovery byte. Seems like only 0 and 1 are used but it's reserved for 0-16. Edit: Or the simpler approach is to append the signature's recovery byte to OP_RETURN:
And then the last two outputs being:
|
Following Jude's idea of spending a UTXO to prove ownership of the signing key, if we want to follow that approach, should the spend of the "signing key UTXO" be a signature that doesn't just prove ownership of the signing key (ie p2pkh), but a signature over the hash of the reward cycle and the stacker (via p2sh)? I suppose that's not necessary, because the signature couldn't be re-used if it's signing the UTXO. It's also interesting because it supports hardware wallets. You could construct this transaction in a PSBT and add partial signatures before broadcasting it. However, if we didn't take the approach of my first paragraph (signing over the SIP18 message hash), then we have the challenge of not being able to re-construct the |
@hstove I'm personally fine with either approach. However, if you add this to the SIP, you should expect some pushback because creating unspendable witness UTXOs constitutes "UTXO pollution" (which I think is BS because (1) UTXO pollution being a problem is ipso facto a consequence of a bad UTXO index design on Bitcoin's part, and (2) Bitcoin miners who actually care about this can simply run a Stacks node and prune these UTXOs from their nodes, but these aren't universally held opinions). |
Yeah that's a very fair point. IMO the approach you described of One recommended tweak to your approach would be to make a new Signing Key UTXO back as change in the A different tweak would be to not require a fixed UTXO->output signing flow, as you have in your diagram. Unless I'm mistaken, that just adds some complexity around managing balances of your two "addresses" (stx-sender and signer-key). If it was more of an |
Note: once the PR for signer key authorizations is merged, we can simply add the 33-byte signer key to the OP_RETURN |
The Stacks-on-Bitcoin
stack-stx
transaction needs to encode a signing key and a signature as well as the existing arguments. Right now, the OP_RETURN is as follows:We can expand this to include the signing key, but not the signature:
What I was thinking is that in order to stack STX, you'd have to create a third output in its
PreStxOp
that is the hash160 of the signing key, and then spend it in theStackStxOp
. We already do this in order to prove ownership of the STX -- theStackStxOp
spends the second output of thePreStxOp
and thereby proves that the second output of thePreStxOp
istx-sender
. So, thePreStxOp
forStacksStxOp
would manifest as follows:The text was updated successfully, but these errors were encountered: