* bitcoind rpc client v22
* addresses and reqSigs deprecation
* getNodeAddresses rpc now returns a network field
* fixed so that support for V23
* debuggging changed extends BitcoindRpcClient to extends BitcoindV21RpcClient
* added network input to getnodeaddresses which makes it so only outputs addresses with that specified network
* getnodeaddresses accepts a network input and outputs addresses with that network. Test did not run on previous commit now it passes.
* added (listdescriptors rpc testing in progress), added descriptors flag to getwallet info rpc (testing in progress), added include unsafe option for fundrawtransaction and walletcreatefundedpsbt rpcs (testing in progrss), adding test for createwallet with descriptors enabled (not complete)
* fix so that getwalletinfo works with descriptors flag, fix so now can create descriptor wallet, test for create descriptor wallet now runs and passes
* added tests, bug in listdescriptors implmentation
* listDescriptors rpc is implmented and passes all tests
* listDescriptors test was previously causing (be able to decode a redeem script) test in the suite to fail becasue of createwallet, the bug is now resolved
* bug fix in V17AssortedRpc
* bug fixes
* fixed listdescriptors test, create descriptor wallet test, wallet with priv keys enabled test, decode redeem script test, so that no longer use await return and await result
* fix for tests failing
* listDescriptors Rpc implmented and passes tests
* cleanup
* scala formating changes
* generate block to address test uncommented V22 changed to PostV22 in some of the names of the case classes
Co-authored-by: shruthii625 <shruthii1410@gmail.com>
* Create a helper case class called FundRawTxHelper to encapsulate the values returned by fundRawTransactionInternal
* Return FundRawTxHelper[ShufflingNonInteractiveFinalizer]
* make FundRawTxHelper.signedTx be a lazy val
* 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
* Implement rescan with akka streams
Get basic stream working with rescan
Fix bug where we weren't using rescan specific threadpool
Implement killswitch for rescan
* WIP: Expose promise to allow external completion of rescan stream
* Rework RescanStarted.RescanStarted to contain a promise to complete the stream early, and a future that represents the completed streams materialized value
* Comment cleanup
* Fix compile errors, remove killswitch
* Fix 2.12.x compile
* Introduce ActorSystem into wallet, refactor rescans to use that ActorSystem
* Fix import
* Fix bug where we were prepending instead appending to batched Vector
* Propogate RescanState upwards into WalletRoutes
* Refactor fetching of filters to be a Flow
* Add `sync` JSON field to the `getinfo` endpoint output
* improve test coverage
* update docs
* rename sync flag
* WebSocket notifications
* fix unit tests
* fix unit tests
* increase test timout
* WIP
Try and debug
WIP
Fix bug for incomingAmount
Clean up logs
more cleanups on logs
Remove another uncessary log
Don't process tx if we don't have a relevant received output for that specific tx
* Group hashes in batches of 1,000 before querying the db
* Contact list
* fix unit tests
* Add contact rpc tests
* Add documentation
* Refactor ConsoleCli into app-commons
* Add commands to bitcoin-s-cli
* Fix timeout for rescan
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Refactor WalletAppConfig test fixture destructions to stop the config when tearing down
* Fix test fixture where walletappconfig might not be started
* Rename existing getaddresslabels -> getaddresslabel
* Fix missing rename of GetAddressLabel
* Modify pk constraint on wallet_address_tags to be tag_name rather than tag_type
* Add dropaddresslabel for a specific address
* Fix migrations
* Add unit tests and fix existing tests
* Add docs
* 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
* Fix UTXOHandlingTest cases
* Reduce log level
* Add comments, fix bugs so that we can transition from TxoState.ConfirmedReceived -> TxoState.PendingConfirmationsReceived
* Fix BroadcastSpent/BroadcastReceive bugs
* Add scaladoc to updateUtxoStates()
* Break receive and spent tests into two test cases
* Remove unneeded database write
* Fix rebase
* Support for big SPKs
* Support for big SPKs
* Bump number of migrations
* Fix other test case
* cleanup
* cleanup
* fix psql migrations
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Fix bug where we didn't set spendingTxId when transitioning from Reserved -> PendingConfirmationsSpent
* Try to add unit test
* WIP
* WIP2
* Get reserved state working
* Fix assertion, cleanup logs
* Cleanup test case
* 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
* WIP
* Get appServerTest passing with chain notifications
* Reorder where SourceQueue gets initialized so that we can use it to construct the wallet's callbacks
* DRY
* Fix missing callback for neutrino chaincallbacks
* Bump timeout
* Bump timeout
* When wallet is empty call doSync() with the last blockheader bitcoind has seen
* Revert skipping compact filters on IBD for bitcoind
* Revert logging
* WIP
* Fix sql queries, fix up unit tests that were implicitly using wallet.processOurTransaction()
* Remove default parameter markAsReserved=false on FundTransactionHandling.fundRawTransactionInternal()
* Fix submodule
* Add test to make sure if we fail to reserve utxos, we roll the database transaction back
* Add some clarifying comments
* address ben's code review for failures in finishSend()
* Scalafmt
* Implement MasterXPubDAO
* Fix nits
* Add postgres migrations
* Make sure tables are getting cleaned on postgres
* Get dlcOracleTest test cases passing with validation of the master xpub in the database on startup
* Fix test case
* Fix more tests
* Move things around so keymanager does not need to depend on dbCommons
* Get all walletTest passing
* Add unit test for wallet startup
* Fix rebase
* Get all sqlite tests passing
* Get postgres test cases passing locally
* Remove early call to walletAppConfig.start() in node project
* Make KeyManagerAppConfig.externalEntropy private
* Fix MasterXpubDAO.existsOneXpub()
* Fix bug in migrating database for oralce project
* 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
* Write unit test for SpendingInfoDAO.upsert(), match on outpoint rather than id
* Add more explicit error message for failing to clear utxos and addresses
* Add unit test we can handle spending funds and receiving funds in the same transaction inside the wallet
* Use fundRawTranaction() to make sure the utxo is reserved
* Add mark as spent optimization to batch writes rather than write inside the method
* Scaladoc refactor
* Refactor received spendingInfoDbs to be cached outside of processTransactionImpl()
* Implement processBlockCachedUtxos() to improve performance
* Fix typo
* Make TransactionProcessing.processTransactionImpl() a bit more parallel, fetch all relevant received and spent txos in parallel
* More refactors, make sure return types are Vector rather than Seq to make sure we don't have any pathlogical surprises with scala collections
* Fix type annoation to be Vector
* Fix remaining usage of Seq in TransactionProcessing
* Fix pattern match on Vector on 2.12.x
* Change input to Vector rather than Seq in processSpentUtxos()
* 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
* Refactor MultiWalletTest to actually shutdown the walletAppConfigs
* Remove 'implicit' modifier from getFreshWalletConfig. This is a problem as it can be used implicitly to bind resources (threads, files etc) that need to be cleaned up. Since it is implicitly passed, it is very hard to remember to clean up these resources
* Cleanup TrezorAddressTest
* Remove unecessary BitcoinSWalletTest.afterAll()
* Fix docs
* Removal of datadir race condition
* Cleanup nodeTest to shutdown the transitive chainAppConfig required by NodeAppConfig
* remove experimental tag on NeutrinoNodeTest
* Remove extra line
* Cleanup after BitcoindChainhandlerViaZmqTest
* Push to github to force re-run of CI 2
* Fix bug introduced in PR 2597, we need to explicitly call WalletAppConfig.stop() now rather than transitively calling it via Wallet.stop()
* Fix calls to wallet.stop() -> wallet.walletAppConfig.stop() in BitcoindBlockPolling,BitcoindBackend. Also add some explicit type annotations
* Get FilterSync test working with cached bitcoind in chainTest project
* Small refactor to be DRY
* Fix docs
* Refactor ChainSyncTest to use 1 cached bitcoind, as a by product add ChainWithBitcoindNewestCachedUnitTest
* Remove unecessary mixin trait
* Fix missing ChainWithBitcoindNewestCachedUnitTest.afterAll()
* Reduce thread pool size for akka's internal dispatcher in unit tests from 2 -> 1. Same with the blocking dispatcher
* Add comment
* Fix missing database shutdown on WalletAppConfig.stop()
* Cleanup BitcoindBlockPollingTest
* Cleanup ProcessBlockTest and all tests that use CachedBitcoind
* Cleanup BitcoindBackendTest
* Cache rescan thread pool rather than creating a new one everytime
* Add invariant to spendingInfoDb to that requires if the spendinginfodb is in a TxoState.spentStates, the SpendingInfoDb.spendingTxIdOpt is defined
* Remove unused SpendingInfoDAO.updateTxoState()
* Remove comment
* Make TxoState and explicit parameter for test methods. Most test methods depend on a sample utxo state, so make the caller of the method specify what state they want the txo to be in
* Fix github actions config
* Fix RoutesSpec test
* Wallet Rebroadcast Logic
* Use wallet scheduler for address queue rather than it's own thread
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Bump default
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Create CachedBitcoind, implement it in FundTransactionHandlingTest
* Add BaseWalletTest, extend it with BitcoinSWalletTest & BitcoinSWalletTestCachedBitcoind, add CachedBitcoinV19 and use it RescanHandlingTest
* Make ProcessBlockTest work with cached bitcoind
* Make trait for CachedBitcoindNewest for the newest version of bitcoind
* Make UTXOLifeCycleTest use cached bitcoind
* Add WalletBloom, WalletSyncTest to use cached bitcoinds
* Add WalletIntegrationTest
* Rework beforeAll() and afterAll() into the super trait like BaseWalletTest
* Add standlone BitcoindFixtures, use it in BitcoindBackendTest
* Use new BitcoindFixtures in BitcoindBlockPollingTest
* Introduce BaseNodeTest, start implementing the usage of cached bitcoinds in the nodeTest project
* Use cached bitcoind's with SpvNodeTest & SpvNodeWithWalletTest
* Fix bug on postgres with reusing database, upsert the genesis header rather than create it
* Get NeutrinoNode tests workign with cached bitcoinds
* Fix NeutrinoNodeWithWallet by destroying wallet state for Postgres
* Add teardown helper method for bitcoind
* Teardown chain project when using node fixtures since node is dependent upon the chain project.
* Turn off parallelExecution again
* Switch the parallelExecution flag to only be set on CI, so we can get better performance when running locally
* Start implementing BitcoindFixtures, use BitcoindFixturesCachedTriple on TestUtilRpcTest
* Fix compiler errors, begin implementing NodePair
* Refactor TestRpcUtilTest to use 2 bitcoinds rather than 2
* Reduce the number of bitcoinds that MultiWalletRpcTest needs from 3 -> 1
* Reduce number of bitcoinds used in WalletRpcTest from 3 -> 2
* Add some documentation
* Try to re-add parallelExecution
* Reduce the number of bitcoinds used in PsbtRpcTest from 3 -> 2
* Disable parallelExecution in Test again
* Make BitcoindV21RpcClientTest & BitcoindV20RpcClientTest reduce bitcoind usage from 2 -> 1
* Make BitcoindV19RpcClienttest reduce bitcoind usage from 2 -> 1
* Rework MempoolRpcTest to use fixtures, add BitcoindVersion to CachedBitcoindCollection
* Make sure clientAccumm has to be specified as a paramter now rather than filling in by default
* Begin parameterizing NodePair/NodeTriple to retain type information for the specific version of bitcoind that was used
* Don't implement version in super trait
* Fix docs
* Fix async issue in V21 test suite
* Append to vectors in CachedBitcoinCollection rather than replace
* Fix rebase issues
* Add scaladocs
* Fix BitcoindV18RpcClient address info test
* Implement fixtures in BitcoindV17RpcClientTest fixtures
* Cleanup v17 PsbtRpcTest
* Reduce bitcoind usage from 3 -> 1 in BitcoindV18RpcClientTest
* Remove abandon transaction test, this allows us to reduce the number of bitcoind's used in MempoolRpcTest from 3 -> 2
* Remove the requirement to inject BitcoinSAsyncFixtureTest, add it in the test traits explicitly to make things easier. Also add explicit afterAll() method to tear down both the CachedBitcoind & BitcoinSAsyncFixtureTest
* Fix missing Await.result() in BitcoindRpcTest.afterAll()
* Rework MultiWalletRpcTest to use a NodePair
* Rework BlockchainRpcTest to use fixtures
* Rework Client start()/stop() methods. Now use an AtomicBoolean to indicate when a user has requested a client to start/stop rather than sending pings to bitcoind that can fail because the conneciton pool has been shutdown in test cases
* Try my luck with turning on parallelExecution in CI again
* Revert parallelExecution, now testes do not run in parallel on CI
* Only turn off parallelExecution for bitcoindRpcTest
* Adjust build to only have bitcoindRpcTest NOT in run parallel on mac, reduce number of blocks used in BitcoindRpcTestUtil.createNodeSequence
* Run less tests in the rpc test suite as that takes the longest, move them over to node/wallet/dlc test suite on mac osx CI
* Don't run eclair tests in parallel either
* Remove CachedBitcoind from BitcoinSWalletTest
* Fix async bug in test case
* Push to github to force re-run of CI
* Push to github to force re-run of CI
* Push to github to force re-run of CI
* Move blockhash to tx table from spending info table
* Add test, fix spending tx id col name
* Scaladocs, add test
* Add more unit test
* Make id not comparable in process tx test
* Fix tests
* attempt to fix
* Add mempool comment to scaladoc
* Deparallelize process inputs & outputs
* 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
* Refactor AsyncUtil to just use an execution context rather than an actor system
* Create async util project, use it in various projects that depend on it
* Reduce usage of .findAll() (doesn't scale for large dbs). Now pass in the specific things we are searching for
* Add timestamps for checking how long it takes to processBlock()
* Rename NodeUnitTest.confg -> NodeUnitTest.getFreshConfig()
* Rename CachedBitcoinSAppConfig.config -> CachedBitcoinSAppConfig.cachedConfig
* Make CachedChainAppConfig extend CachedBitcoinSAppConfig
* use cached configs in both wallet/chain project as well taking ben's suggestion to fix those
* WIP
* Get neutrino node with wallet 'receive information about received payments' working again
* Fix compile
* Remove initial sync logic from test case
* Remove sync logic in NeutrinoNodeWithWallet test cases
* Improve logging and rename a few things
* WIP2
* WIP3
* Get NeutrinoNodeWithWallet tests working
* Implement WalletSync, which allows you to sync a wallet from a arbitrary data source
* Get all tests passing again
* Use spv.appConfig in DataMessageHandlerTest rather than caching the config
* Modify cleanup to hopefully get CI passing
* Fix postgres tests by cleaning the table during the destroy phase of the test fixture. This is needed because the same postgres database is shared between tests in the same test suite
* Revert logback-test.xml
* Get sqlite/postgres tests passing pt 2
* syncHeight -> syncDescriptorOpt()
* Add case for genesis block hash in WalletSync
* Fix SpvNodeWithWallet test case to actually test spv functionality
* Remove nodeCallbacks parameters, callbacks should be registered on nodeAppConfig
* Fix bug where test compiler opts were not enabled
* Fix all exsting compiler warnings in test project
* Add scalaCollectionCompat dependency to bitcoindRpcTest so we can use @nowarn annotation on scala 2.12
* Multi Wallet support
* Fix Oracle tests
* Fix some CI errors
* Increase KeyManagerAppConfig code coverage
* Add test for multiple seeds in seed folder
* Move things in reference.conf files
* Lower key manager coverage requirement
* Fix postgres test issues
* Create DbAppConfig
* Add some docs, fix hardcoded postgres db name
* Clarify db vs schema
* Add character types
* Fix chaindb in conf
* Always copy default seed
* Remove need for driverName config
* Make aesPassword option for wallet config
* Add to docs
* Make AesPassword optional
* Small touchups
* Fix for oracle server
* Fix docs
* Increase code coverage
* Cleanup a bunch of imports in test
* Use @nowarn annotation for testing things that are deprecated
* Fix base58 test
* Cleanup crypto-test
* Use scala collection compat dependency to get access to the @nowarn annotation on scala 2.12.x
* Rework more scala 2.13.x compile failures in chain-test and key-manager-test
* Optimize imports for entire project
* Fix nits
* Add Wallet State Descriptors
* Sync blocks while offline w/ bitcoind backend
* Add to WalletDbManagement
* Update db management test
* Respond to review
* Rename function