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.
Uh oh!
There was an error while loading. Please reload this page.
-
Links:
stack-stxburn opIssues with requiring a
signer-keysignatureThe 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-addrreward-cycletopic: 12 bytesperiodBy adding a new function to
pox-4to 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-allowancefunctionWe can add the ability for signers to add an allowance by adding a new
add-signer-key-allowancefunction, which would take the same arguments listed above (pox-addr,reward-cycle,topic,period) along with asigner-keyparameter.The general idea for this function is to:
tx-senderis equal to the hash ofsigner-key{ pox-addr, reward-cycle, topic, signer-key }with the valuetrue.Burn op for
add-signer-key-allowancefunctionTo make this work in a burn op, we can use a
p2pkhinput with the signer key's pubkey hash.The specific OP_RETURN format for the signer key allowance op would be:
Modifications to other
pox-4functionsBecause adding an allowance removes the requirement for including
signer-sigas a function argument, we'll need to change thesigner-sigparameter instack-stx,stack-extend, andstack-aggregation-commitfrom(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-sigisnone, check the allowances mapIf we wanted to preserve the existing function signatures, we could instead check to see if the length of
signer-sigis zero and treat that asnoneif it is.Beta Was this translation helpful? Give feedback.
All reactions