* 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
* 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 recovery for when we cannot receive a fee rate from a FeeRateApi. Now we return -1 sats/vbyte if we cannot get the fee rate from a fee provider rather than throwing an internal server error
* Fix compile
* Add invariant to CETSignaturesTLV so we don't have empty adaptor sigs
* Add invariant to make sure FundingSignaturesTLV witnesses are not empty
* Add invariant that contractOraclePairs aren't empty
* Add fundingInputs and ordered announcement invariants
* fix docs
* Move invaraints from TLVs to in memory data structures
* WIP
* WIP2
* Modify return type of DLCDataManagement.executorAndSetupFromDb() to return an Option. The None case represents when we have pruned CET signatures from the database
* Add some comments, clean up a bit
* more cleanup
* Implemented general payout curves including hyperbola curve piece support
WIP
Get GUI compiling
* WIP
* Get backward compatible serialization working, everything is equivalent except for in memory Scala data structures
* Get numeric contracts backward compatible
* Get rest of codebase compiling
* Add test case for old contract info
* Add sanity test vector for old enum contract descriptors
* Fix docs
* Remove comment
* Scalafmt
* Add DLCSerializationVersion, replace isOldSerialization
* Remove ValueIterator.takeNoSkip()
* Fix docs
Co-authored-by: nkohen <nadavk25@gmail.com>
* WIP
* Get basic websocket working (sort of)
* Push websocket fixes
* WIP: Implementing SpendingInfoDb json serializer
* Implement onreserved callbacks, add json serializers for SpendingInfoDb
* Get first unit test working for websockets when a address is generated
* Rework WalletNotification to have case classes, get unit test working for receiving addresses over the websocket
* WIP
* Add websocket callback for when a wallet processes a block
* Cleanup
* basic updates to unit test
* Fix compile
* Fix submodule
* Fix compile
* Get both unit tests passing when run by themselves
* Fix so both test cases can be run
* Implement unit tests for blockpressed and reservedutxos websockets
* Fix RoutesSpec get a block header test
* Implement configuration for wsbind and wsport via bitcoin-s.conf
* Add some nonblocking sleeps on all WebsocketTests
* Add documentation
* Properly close the server with .terminate() rather than .unbind()
* Add BitcoinSServerMainBitcoindFixture.afterAll()
* Add println
* Add more println
* Try to downgrade bitcoind version
* Fix datadir bug
* Cleanup callbacks so they don't have nested futures
* Fix SpendingInfoDb.apply() pattern match
* Add spendingInfoDb json serializer test, does not pass
* Fix SpendingInfoDb json serializer
* Make small refactors
* Fix compile
* Add maxBufferSize, change overflow strategy to OverflowStrategy.dropHead
* Address Nadav's code review
* Address ben's code review
* Add block 0000000000000000000593310d3b0cdc082af49f38b8a1611239072aef8433a8 test vector
* Add test cases
* wip
* Fix bug where we were classifying taproot txs as P2WPKHWitnessV0
* revert logging level
* Some cleanup
* Add logback.xml for scripts, remove scheduler in scan bitcoind
* Fix imports
* Take ben's suggestion and add check to CryptoUtil.isValidPubKey
* Start pulling over accept serializers from dlc message spec PR
* Get sign tlv json serialization working
* Implement decodeaccept,decodesign in CoreRoutes
* Move messages to DLCTestUtil, add documentation
* WIP
* Finish implementing {CRUD,CRUDAction}.createAllAction()
* Try to make database inserts more atomic
* Consolidate more database calls in DLCWallet.initDLCForAccept()
* WIP2
* More refactor and using actions
* Add DLCIdDaoUtilNoPK for querying when dlcId is not a primary key
* Add DLCDataManagement.deleteDLC()
* make DLCWalletApi.createDLCOffer() use actions
* Rework DLCWallet.createNewDLCAccept() to use DBIOAction
* Use actions in DLCWallet.registerDLCAccept() a bit
* Create DLCActionBuilder, move actions to there
* Move more actions into ActionBuilder
* Implement transactionally on database writes for actions
* 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>
* Added WitnessScriptPubKeyV1 for sending to taproot addresses
* Add basic serialization test case
* Add basic unit tests around constructing a WitnessScriptPubKeyV1
* Add a generator for witSPKV1
* Add override
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* WIP createcontractinfo
* Fix ordering issue
* Use existing contract descriptor serializer, begin fixing test case
* Get DLCRoutesSpec createcontrafctinfo passing again
* Finish implementing createcontractinfo
* Add doc
* Fix native image build by adding hard coded static private key for OracleAnnouncementV0TLV.dummy
* Update ConsoleCli endpoints, update docs
* Rename methods in DLCOracleApi from signAnnouncement -> createAttestation
* Fix dates on deprecation
* WIP, createattestation rpc not working for some reason
* Fix misspelling
* Rename endpoint from createattestation -> signenum
* Fix docs
* Fix use of deprecated method after rebase
* Implement delete attestations
* Add DLCOracleApi.deleteAnnouncements()
* Make sure we don't have attestations before deleting announcements
* Add endpoint in OracleRoutes for delete announcement
* Add ConsoleCli implementation
* deleteattestations -> deleteattestation
* Document endpoints and add warnings
* Wire up ConsoleCli with deleteannouncement/deleteattestation
* Fix use of deprecated methods