* Refactor receive flow to use the same utxo state transitions as the rest of the wallet
Get tests passing again with refactored utxos
Remove unecessary wallet methods
Fix test cases
* Remove fixture on UTXOHandlingTest
* Fix bug where funding happens in parallel in fixture and can lead to blockchain reorgs
* Fix bug where we prune unused addreses on rescan. This doesn't let us discover funds for addresses sent that were not paid to until after the rescan was completed
* Add test case
* Fix neutrino node test case
* Some cleanup
* 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
* Refactor testkit tests to use same nodeCallbacks that BitcoinSServerMain uses for neutrino
* Add test case
* Add logs for callbacks
* Cleanup
* Add test case for when funds are spent when we are offline
* Turn off logging again
* Cleanup more logs and comments
* 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
* 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
* 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
* 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
* Encapsulate initialization of DLCOracle.start() method
* Use internal WalletAppConfig.kmConf rather than passing in custom key manager parameters
* Add KeyManagerAppConfig.defaultAccountType
* Get all tests passing besides TrezorAddressTest
* Get TrezorAddressTest passing with provided entropy
* Add unit test to make sure we can always derive the seed
* Get docs compiling
* Fix dlcWalletTest test cases
* Add more test cases to keymanager
* Add the new configuration to the example configuration
* Add more test cases
* Remove coverage on 2.12 as it isn't accurate
* Rework DLCOracleAppConfig.start() to call kmConf.start() so the oracle can use entropy provided via bitcoin-s.conf
* DLC P2P WIP
* P2PClient refactor (#10)
* Add to CI
* Remove unused
* Attempt to create DLCNode and Tests
* Full Tor support
* Get DLCNegotiationTest passing
* Config options, connect & send func
* Test for DLCNode
* Add createDLCNode to config
* Fix formatting
* Update DLC state after all other data is set
* Remove unneeded line
* Respond to some review
* 2021 07 26 dlc node code review (#13)
* WIP
* WIP2
* Rewrite tests not use Await.result()
* Skip Tor test on CI
* Cleanup threadpool leaks in tests
* Handle actor pattern matching better
* Respond to review
* Implement DLCNode.stop
* sock5 -> socks5
* Use Tcp.Unbind
* Respond to review
* Implement postStop
* Switch to unbind
Co-authored-by: rorp <rorp@users.noreply.github.com>
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Implement createCETsAndCETSigsAsync(), use this inside of TestDLCClient.setupDLCAccept()
* Switch to lazy val to cache sig point computation
* Add FutureUtil.batchAndParallelExecute() that does not take batchSize parameter, just compute it inside as a sane deafult
* Fix 2.12.x compiler error
* Pulled down dlc and dlcTest projects into core and dlcTest
Added dlcTest to CI runs and fixed compilation issues
* Fixed docs
* loosened fee rate bound assertions to only sanity test
* Removed ExecutionContext from ECKey
* Refactored ECPublicKey to remove compression state and introduced ECPublicKeyBytes to handle cases where serialization of input is important
* Fixed the rest of bitcoin-s so that it passes all tests
* Made all ECKeys into case classes
* Successfully added isFullyValid invariant to ECPublicKey!
* Fixed docs
* Added scaladocs and fixed a RpcPsbtResult bug
* Reject private keys of length < 32 and fix WIF parsing bug
* Replaced secp256k1 with secp256k1-zkp as submodule pointing to my java-bindings branch
* Built new binaries for schnorr signing and adaptor signing and integrated into LibSecp256k1CryptoRuntime
* Added public key compression function with tests, removed old adaptor signature point serializers
* Implemented ECDSA adaptor signatures in scala according to the most recent spec
* Added static test vectors for adaptor signing from spec
* Moved bouncy castle adaptor signing tests to .jvm
* Added scaladocs and responded to nits
* Added scaladocs with legends to spec naming
* Responded to Ben's review
* Fixed scala 2.12 compile issue
* Fixed BouncyCastle secKeyVerify
* Updated add-to-jni build instructions
* Updated secp256k1-zkp to target bitcoin-s-master
* Add windows binary (#14)
* Added Mac OS binaries
Co-authored-by: benthecarman <benthecarman@live.com>
* Schnorr sigs for Scala.js
* fix build
* put BIP340 test vectors in a shared space
* remove teskit dependency, fix point edge cases
* fix build
* add unit tests for point addition
* scaladoc
* cleanup
* respond to the comments
* Fix usage of BitcoinSLogger
Co-authored-by: christewart <stewart.chris1234@gmail.com>
* Update all deps that failed because of bad build
* Revert jvmopts
* Try bumping jvmopts max heap size to get mac builds to work
* Double up timeout in ScriptGenerators
* Use Future.successful() in signFunction to try and reduce overload on executionContext
* Push to github to force re-run of CI
* Upgrade sbt to 1.4.9
* Get cryptoTest,coreTest projects working with scala-js
Get build working, now moving onto compile
Move jvm specific cryptoTest's into the .jvm sub project
Rework build definition names to be more concise
Fix missing cryptoTest refactor
Move logback-test.xml into jvm specific resource folder so it doesn't get ignored
Make coreTest a crossProject
Rework ci matrix to work with new project structure
Try to fix CI matrix
CI fix part 2
* Apply commonSettings to all cross projects
* Address part of roman's code review, make coreJS, make cryptoTest.dependOn(crypto)
* WIP to share with scala-js community
* Fix scalac compiler settings to be additive in CommonSettings.settings
* Remove BCryptoTest
* Refactor AsyncUtil to just use an execution context rather than an actor system
* Create testkit-core, start moving data structures over to testkit-core
* WIP, getting rid of the hard dependency on BitcoinSAsyncTest and akka
* Rework test traits to not be dependnent on akka, move BaseAsyncTest into testkitCore, add a test trait that just uses the default scala executionContext
* Get everything compiling
* Move logback-test.xml to testkit-core so it applies to coreTest,cryptoTest as well
* Cleanup rebase issues
* Fix Deps.scala
* Address ben's code review
* Segregate jvm settings and compiler settings
* Filter out -Xfatal-warning for scalajs for now since there is a ton of errors
* Move maintainer settings into CommonSettings.settings