-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: send sbtc requests context to signers and store sighashs to db (#…
…954) * WIP * Add an outpoint type * WIP * WIP * Rename the enum * Change the validation output * More refactoring * fake docs * Add documentation * This is unnecessary * Fix up more comments * Add todos for more work for validation * add sighashes tables * fix enum name * add bitcoin_withdrawals_outputs table and new queries * fix tests. add new batch queries * Remove locking and just use an ID for keeping track of the signer in the new WanNetwork * Add some more comments * Fix up after changes * Add code to transform the TerminationHandle into a BroadcastStream. * Add a new function to the MessageTransfer trait, implement it for the types that implement the trait * Add a new function to the Context trait that has a default implementation that combines all streams that a signer may be interested in * Use the new streams in our event loops * Add in an enum variant * Fix up after using the new types * updates after using the new stream * Temporarily ignore some tests * Minor changes in the TxSigner * minor test update * Fix the WSTS bug * Ignore tests that are ignored in later updates * unnecessary * Ignore another test * fix the test * This one can be fixed now * No more aborting * this test is already fixed * Add a new request decider event loop * Add a new signer event type * Make sure to use the right events * Small refactor * Move the sleep to before the chain tip lookup * move it back * revert * cargo fmt * Add in the new event loop and remove unnecessary field from the tx-signer * add integration tests. fix prevout_type type in the query * add block_hash to bitcoin_withdrawals_outputs primary key * address review comments * Comment update * Remove unnecessary cruft * Add a will sign field in case we want to make the query super simple * add prevout_type back * Add some more comments, cargo fmt * Remove the withdrawal check in the prevalidation function * Make sure the people cannot have fees assessments that are greater than the deposit amount * wip * Allow the max-fee to be configurable * Simplify the block observer * fix typo * save txs sighashes on db * recreate wstscoordinato at each sign round * rename BitcoinBlockSbtcRequests, reuse signers_key * Remove the construction version * Add integration tests and test fixtures * add fees to the BitcoinBlockSbtcRequests * fix validation tests * update schemas to remove version * update function name * test the amount fee thingy * bump the timeout * fix test that was randomly failing * add wait timer after sending requests context * re-create coordinator state machine at each signing round * rename SbtcRequestsContextMessage * fix linter warning * fix function naming * Add another test * Another test * Finish adding tests * That was silly * add test * fix typo * get_bitcoin_tx_sighash -> will_sign_bitcoin_tx_sighas * update test * address review comments * change queries signature to accept slices * address review comments * Feat/add is unique implementation for request packages (#888) * add is_unique logic * fix lint warning * add missing import * fix test. address comments. make sighash the pk * fix test * move new tables into new migration file * wait for signers acks after sending bitcoin pre request * Revert "wait for signers acks after sending bitcoin pre request" This reverts commit 468153f. * Fix up the new tables * drop the database at the end * add todo for BitcoinPreSignRequest proto --------- Co-authored-by: djordon <[email protected]>
- Loading branch information
Showing
13 changed files
with
524 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//! Integration testing helper functions | ||
//! | ||
//! | ||
use bitcoin::absolute::LockTime; | ||
use bitcoin::key::TapTweak; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.