* Refactor TransactionProcessing.processTransaction() to use BlockHashWithConfs
Create WalletUtil.getBlockHashWithConfs(), use it in various places through the codebase
* Fix docs
* refactor: Rework codebase so that DLCWallet has-a instance of Wallet rather than is-a via inheritance
* Fix cast
* Fix RescanHandling in DLCWallet
* Remove default implementation of WalletApi.broadcastTransaction()
* fix broadcast callback for DLCWallet
* Add DLCWalletDAOs.fromDLCAppConfig()
* Fix scaladoc for AddressHandlingApi.getUnusedAddress
* Refactor codebase to have has-a relationship with RescanHandling rather than is-a
get everything compiling
Get all tests passing
* Revert and clean up files
* Fix docs
* Update scalafmt-core to 3.8.1
* Update .scalafmt.conf settings to be factory default settings
* Fix typo
* scalafmt
* Empty commit to re-run CI
* Revert some scalafmt back to original scalafmt.conf
---------
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* WIP: Implement WalletCallbackStreamManager
* Implement stopping of WalletCallbackStreamManager in WalletAppConfig
* WIP: DLCWalletCallbackStreamManager
* Refactor DLCWalletCallbacks to be a trait
* Integrate DLCWalletCallbackStreamManager into WebsocketUtil
* Use java.util.concurrent.atomic.AtomicBoolean rather than monix
* Remove logger param from dlc callbacks
* fix docs
* Call super.stop() in DLCappConfig
* Empty commit to run CI
* Try to debug
* Empty commit to run CI
* Revert things
* Get unit tests passing for unordered nonces/signatures
* Get v0 oracle announcements working again on listannouncements
* Add unit test to make sure we can still validate signatures for attestments with nonces out of order
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase
* Small cleanups
* Add SortedVecFactory
* Fix test case with out of order nonces
* Fix bug where no exception was thrown if the acceptor did not have enough money
* Revert ContractInfo.max definition, fix bug in acceptDLCOffer
* Fix incorrect usages of ContractInfo.max
* Refactor ContractInfo.max -> ContractInfo.maxOfferorPayout
* Fix dlc.md
* Move MockChainQueryApi/NodeApi out of BaseWalletTest
* fix docs
* Move wallet configurations out of BaseWalletTest
* Move helper methods out of BitcoinSFixture trait into companion object to simplify the hierarchy
* Refactor usage of WalletWithBitcoind to allow parameterization of the BitcoindRpcClient type
* DLC <-> contact mapping
* updated docs
* populate dlc/contact mapping automatically
* typo
* respond to the PR comments
* rename `contact` to `peer`
* fix unit tests
* create a contact when an incoming offers gets created
* drop dlc_contact_mapping table
* fix build
* update the docs
* Revert "update the docs"
This reverts commit 2386adadcd.
* revert dlc-contact-* endpoints
t Please enter the commit message for your changes. Lines starting
* HashType now uses Int instead of Int32
* Moved HashType from core to crypto
* Added HashType helper functions to ECDigitalSignature
* Added tests
* Fixed compile
* Add SignDbState to fix rescan exception
* Cleanup
* Add test, doesn't pass
* Add unit tests, add invariants
* Add unit test to appServerTest
* Fix handling so an exception is not thrown internally when a contractId does not exist
* DLCMessage.totalCollateral -> DLCMessage.collateral
* Fix bad names of {DLCOfferTLV,DLCAcceptTLV}.totalCollateralSatoshis, its not the total collateral, rather the collateral being contributed by the offerer and acceptor
* Fix rebase
* Fix appServerTest
* Fix docs
* Small refactors to make things more readable
* Add invariants to make sure things are defined when doing the RemoteClaimed flow
* Move where we update DLCDb state to RemoteClaimed so its atomic with the rest of the db updates
* Consoldiate uses of updatedDlcDb
* Add logs
* scalafmt
* get all dlcWalletTest/test passing
* Get dlcTest/test working with ignored test cases
* WIP
* Rework match oracleSignatures
* Refactor checkSingleContractInfoOracleSigs to use matchOracleSignatures
* Clean up checkOracleSignaturesAgainstContract for disjoint, still doesn't pass test cases
* Some DRY in numeric test cases
* Add test case for enum contracts
* Fix disjoint union contract bug
* Refactor matching of oracle announcements and oracle signatures into DLCUtil
* Fix compile on on 2.12.x
* Address parts of code review
* Get refactor working where we decouple CETSignatures and the partial refund signature
* WIP
* Implement migration to specify serialization_version on global_dlc_data table
* Fix migrations test
* WIP
* implement contractid computation
* Get migration working for wallet on testnet
* Add check to make sure we only try to migrate old wallets
* Refactor DLCDataManagement.getOfferAndAcceptWithoutSigs to not use DLCTxBuilder
* WIP
* Bubble up Option[] into DLCWallet, trivially assert on it and then use .get. We will have to do the refactor of DLCWallet sometime in the future
* Change global_dlc_data serializationVersion at database level to not have an Option
* Add DLCDbState, propogate it through the codebase
* Remove log
* Remove invariant for making sure all DLCs are defined on migraiton, add log for the case of issue 4001
* Add filter on ALPHA serialization DLCs. We dont need to migrate DLCs that are using the beta serialization
* Rebase onto 4004
* Refactor to use the refund signature in the accept/sign message
* Add output index to the return of DLCTxBuilder.buildFundingTransaction()
* Fix compile
* Remove log
* Remove download binary scripts from CI, try to make binary downloads contingent on tests being run in a project
* Cleanup docs to remove unecessary downloadBitcoind
* Get refactor working where we decouple CETSignatures and the partial refund signature
* Add DLCAcceptWithCetSigs() for the case where we have a refund sig, but no cet signatures
* Fix bugs
* Fix sighash parsing bugs
* Implement DLC wallet callbacks
Add callbacks and tests for Claimed/RemoteClaimed
Add unit test for confirmed state
* Add some docs
* Address ben's code review
* Fix scalafmt
* Implemented Disjoint Union DLC related data structures with dlcTest passing
Broke DLCClientTest up into multiple test files
Optimized DLC execution unit tests by checking all outcomes on a single setup DLC
Refactored DLCTest to allow for Disjoint Union DLC construction and validation, added tests
Responded to review
Fixed after cherry-pick
Fixed docs
* Fixed things after rebase
* Rebase
* Fix json serializer
* Finish fixing compile
* Start trying to make APIs better for multi oracle contract infos
* Clean things up in the GUI, try to make failures on disjoint union contracts as explicit as possible
* Use less numDigits as optimization for non secp CI test cases
* Fix compile
* Refactor BroadcastDLCDialog
* Fix test case optimization
* Clean up comment
Co-authored-by: nkohen <nadavk25@gmail.com>