You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the signers can construct a bitcoin transaction, they need to locate the sole UTXO under their control. This UTXO is used as an input into all transactions that sweep in or out BTC for deposit or withdrawal requests. The goal is to implement functionality for the signers to retrieve the relevant information for this UTXO.
1.1 Context & Purpose
We need to implement the BitcoinInteract::get_signer_utxo function to get the signers' UTXO. There will always be exactly one such UTXO in our database. This function returns a UTXO where the following holds:
The transaction is in a block on the canonical bitcoin blockchain.
The output is the first output in the transaction.
The output's scriptPubKey matches one in the stored values in the dkg_shares.script_pubkey column.
The output is unspent. It is possible for more than one transaction within the same block to satisfy points 1-3, but if the signers have one or more transactions within a block, exactly one output satisfying points 1-3 will be unspent.
The block that includes the transaction that satisfies points 1-4 has the greatest height of all such blocks.
2. Technical Details:
The transactions in the transactions table with tx_type set to 'sbtc_transaction' are all bitcoin transactions where one of the outputs are spendable by the signers. This makes it possible to find a set of transactions that will satisfy the above criteria.
2.1 Acceptance Criteria:
The BitcoinInteract::get_signer_utxo returns the signers’ UTXO.
3. Related Issues and Pull Requests (optional):
The text was updated successfully, but these errors were encountered:
Feature - Get signers' UTXO
1. Description
Before the signers can construct a bitcoin transaction, they need to locate the sole UTXO under their control. This UTXO is used as an input into all transactions that sweep in or out BTC for deposit or withdrawal requests. The goal is to implement functionality for the signers to retrieve the relevant information for this UTXO.
1.1 Context & Purpose
We need to implement the
BitcoinInteract::get_signer_utxo
function to get the signers' UTXO. There will always be exactly one such UTXO in our database. This function returns a UTXO where the following holds:scriptPubKey
matches one in the stored values in thedkg_shares.script_pubkey
column.2. Technical Details:
The transactions in the
transactions
table withtx_type
set to'sbtc_transaction'
are all bitcoin transactions where one of the outputs are spendable by the signers. This makes it possible to find a set of transactions that will satisfy the above criteria.2.1 Acceptance Criteria:
BitcoinInteract::get_signer_utxo
returns the signers’ UTXO.3. Related Issues and Pull Requests (optional):
The text was updated successfully, but these errors were encountered: