Replies: 1 comment 1 reply
-
There are (currently) hard limits in the clarity-bitcoin contract that make it hard to parse/confirm more than 8 inputs & 8 outputs for a single transaction. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Purpose
This discussion explores the possibility of having a single type of BTC transaction for sBTC which supports deposits, withdrawals and handoff.
Intro
Currently, the sBTC deposit and withdrawal flows both result in BTC transactions signed by the sBTC signers. The current formulation suggests that each "Deposit accept" or "Withdrawal accept" transaction is a separate Bitcoin transaction. This is great from a conceptual standpoint, but practically speaking it is unfeasible since this would severely limit the amount of sBTC operations Signers could perform per block due to Bitcoin's ancestor limit.
In addition to deposits and withdrawal, each set of signers will have to perform a handoff transaction every reward cycle to hand over custody of the sBTC UTXO to a new set of signers.
Proposal
This proposal defines the sBTC Signer Transaction. A single bitcoin transaction capable of accepting any number$N_d$ of deposits, any number $N_w$ of withdrawals and may hand over the sBTC UTXO to a new set of signers.
This transaction is accompanied by a new function call in the
.sbtc
contract calledsbtc-batch-processed
. This function is equivalent to separately callingdeposit-accept
,deposit-reject
,withdrawal-accept
andwithdrawal-reject
for all processed deposits and withdrawals separately. In addition, this function also acknowledges if this transaction hands over the sBTC UTXO to a new signer set.sBTC Signer Transaction format
The envisioned format for the sBTC Signer Transaction is outlined below.
Inputs
Outputs
op
: sBTC opcode. ProposalB
.N_d
: Number of deposits.signer_bitmap
: Bitmap of signer votes, or empty if the number of signers exceeds the available memory in which case this information must be submitted through a smart contract call to thesbtc-batch-processed
function in the.sbtc
contract.OP_RETURN data layout:
Discussion topics
Beta Was this translation helpful? Give feedback.
All reactions