Nakamoto Stacking Burn Ops and Signer Key Allowances #4371
Replies: 1 comment 1 reply
-
Hey, sorry this is coming a bit late; been busy with the network state machine work. I think this approach looks good to me. I'd prefer I appreciate that you're open to keeping the signature option available, since it reduces the number of transactions that a stacker must send in order to begin stacking. It's particularly useful for users who are both stacking and signing, since they can skip setting up an "allowance." The need for an allowance table mainly helps pooled stackers who stack with a pool that isn't also a signer, since then only the pool operator needs the allowance for the pool's PoX address (and it can be submitted directly by the signer ahead of the pool's stacking transactions). The only feedback I have would be to use the word "authorization" instead of "allowance," because we don't want to suggest that the signer has any spending authority. Open to pushback. |
Beta Was this translation helpful? Give feedback.
-
Links:
stack-stx
burn opIssues with requiring a
signer-key
signatureThe big issue with adding the signature to the burn op is that it makes the BTC transaction pretty complicated because we can't simply fit the signature in the
OP_RETURN
. Some options are discussed in #4285.We can, however, fit the signer key in the op return (33 bytes). So if we want to omit the signer signature, we need some sort of "allowance" to verify that a signer key can be used in certain stacking situations.
Signer Key Allowance
The signer key signature message hash includes these components:
pox-addr
reward-cycle
topic
: 12 bytesperiod
By adding a new function to
pox-4
to allow using a signer key ahead of time, we can omit the requirement of needing a signer key signature in burn ops.Clarity
add-signer-key-allowance
functionWe can add the ability for signers to add an allowance by adding a new
add-signer-key-allowance
function, which would take the same arguments listed above (pox-addr
,reward-cycle
,topic
,period
) along with asigner-key
parameter.The general idea for this function is to:
tx-sender
is equal to the hash ofsigner-key
{ pox-addr, reward-cycle, topic, signer-key }
with the valuetrue
.Burn op for
add-signer-key-allowance
functionTo make this work in a burn op, we can use a
p2pkh
input with the signer key's pubkey hash.The specific OP_RETURN format for the signer key allowance op would be:
Modifications to other
pox-4
functionsBecause adding an allowance removes the requirement for including
signer-sig
as a function argument, we'll need to change thesigner-sig
parameter instack-stx
,stack-extend
, andstack-aggregation-commit
from(buff 65)
to(optional (buff 65))
.In the
(verify-signer-key-sig)
function, we would need to change the function to have two validation branches:signer-sig
isnone
, check the allowances mapIf we wanted to preserve the existing function signatures, we could instead check to see if the length of
signer-sig
is zero and treat that asnone
if it is.Beta Was this translation helpful? Give feedback.
All reactions