* Get ChainApi.nextBlockHeaderBatchRange() tests passing
* Get all tests passing in chainTest/test
* Get all tests passing
* Add BlockHeaderDAO.getBlockchainFrom(header,startHeight), use it for filter marker computation
* Add carve out for IBD when syncing filter headers to avoid loading entire block header chain into memory
* Cleanup
* Fix inconsistencies between ChainApi.{nextBlockHeaderBatchRange, nextFilterHeaderBatchRange}
* Fix bug when requesting FilterSyncMarker for filter headers outside of our in memory blockchain's range
* Rework buildNHeaders to be faster, move it to ChainUnitTest
* Rework ChainApi.nextBlockHeaderBatchRange() to take stopHash parameter, get chainTest/test passing
* WIP: Refactor ChainApi.nextFilterHeaderBatchRange()
* Finish ChainApi.nextFilterHeaderBatchRange() refactor, get all tests passing except reorg related tests in nodeTest
* Get NeutrinoNodeTest reorg test case working
* Improve flaky test
* Cleanup
* Switch sync check to bitcoinds(1)
* Empty commit to run CI
* Implement batchSize tests in ChainHandlerTest
* Rework ChainHandlerTest to not assume we have the genesis filter header / filter inserted into the database already
* Cleanup println
* Fix bug with nextFilterHeaderBatchRange() wrt to startHeightOpt parameter
* Fix off by one bug with compact filter sync
* Add check for connectionCount
* Add longer timeout
* scalafmt
* Add test case for reorg on bitcoin network for NeutrinoNodeTest
* Get unit tests passing
* Refactor findNextHeader() to not take an Option[BlockHeaderDb], not it just takes BlockHeaderDb
* Explicity return None in the case where we don't need sync filter headers
* Fix off by one bug when starting filter header sync
* Fix bug where compact filters weren't being processed in order of block height during IBD
* Use sorted compact filter messages in chainApi.processFilters()
* WIP
* Modify DataMessageHandler to use Set for filter batch, fix test case
* revert log level
* Remove duplicate filters test
* Re-add test to make sure we don't throw an exception when processing a filter we've seen before
* Empty commit to re-run CI
* Empty commit to re-run CI
* Empty commit to re-run CI
* Fix NeutrinoNodeTest
* Empty commit to re-run CI
* Empty commit to re-run CI
* Break versioning on V19 of bitcoind rpc client in chain handler, use BitcoindRpcClient with V19BlockFilterRpc
* Make NodeTestWithCachedBitcoindNoP2pBlockFilters for test case with unsupported peers
* Fix docs
* Empty commit
* Empty commit
* Turn logging off again
* implement chain callbacks for compact filter headers / compact filters
* Wire it up through the websocket
* Fix type for compactfilterprocessed
* Fix bug to write json rather than write a string
* Implement isinitialblockdownload flag in databaes
* Change to IsInitialBlockDownload to be less confusing
* Fix missing refactors, add ChainApi.isIBD()
* Implement logic for ChainApi.isIBD(), add configuration flag to toggle whether to emit websocket events while IBD is ongoing or not, add isinitialblockdownload field to getinfo endpoint
* Remove confusing ChainApi.isIBD() that didn't accurately account for the case where IBD wasn't set in the database
* Fix bug around emitting the websocket events
* Add some documentation
* 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
* 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
* Try to add block generate to address in fixture setup to get around the case where block headers & filter headers are synced but compact filters are not
* Push to github to force re-run of CI 2
* Add ChainApi.getBestFilter(), use it in sync to determine if filter headers & filters are in sync
* Push to github to force re-run of CI 3
* Simplify getBestFilter, add unit test
* Add more comments, clean up some code
Turn off logging again
Try to move things around even more to make sure zmq is started
Turn logging level down to ERROR to hopefully get some meaningful output
Adjust both valdiation & ChainHandler to be ERROR level logging
switch zmqpubrawblock to be the port we know is free
Reduce logging to WARN
Bump bitcoind max retries to 120
Fix rebase
Revert logging
Remove some noisy logs
Restore logs to trace level
Add explicit tag
* 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 super.stop() to shutdown DbAppConfig db connection pool inside of all DbAppConfig subclasses that override stop()
* Fix import
* Remove implicit modifier to NodeUnitTest.getFreshConfig(), make sure we are shutting down chainAppConfig inside NodeUnitTest
* Remove chainTest subclasses implementing ActorSystem, make sure we do correct cleanup in ChainUnitTest
* Decouple CachedChainAppConfig & CachedAppConfig. When using only one sub module in the CachedAppConfig, teardown may fail as the other modules might not be started such as using chainAppConfig in chainTest, BitcoinSAppConfig.stop() requires us to call nodAppConfig.stop() first, which isn't started.
* Push to github to force re-run of CI 4
* 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
* Rename NodeUnitTest.confg -> NodeUnitTest.getFreshConfig()
* Rename CachedBitcoinSAppConfig.config -> CachedBitcoinSAppConfig.cachedConfig
* Make CachedChainAppConfig extend CachedBitcoinSAppConfig
* Make ChainApi.processHeaders() return a failed future in the case we have no valid headers
* Run scalafmt
* Fix test case to check if promise is completed yet
* WIP: Get something working that isn't network specific
Start putting things back in place
Add comment
Revert logback file
Remove BitcoinSLogger object
* Fix unused import
* Get rid of annoying diff
* Fix spacing nit
* 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
* Rework BlockHeaderDAO.chainTips into two methods: BlockHeaderDAO.{getBestChainTips,getForkedChainTips}. getForkedChainTips is needed for reorg situations in the case a block header is received that builds off a stale tip
* Deduplicate BlockHeaderDAO.getBlockchains() that are subchains for the best chains
* 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
* Introduce ChainHandlerCached which behaves like the old ChainHandler. Now Chainhandler.getBestBlockHeader() will read headers from the database
* Remove ChainHandler.blockchains field, now it's only available in ChainHandlerCached
* De-futurify ChainHandler.fromDatabase()
* Adjust logging
* Patch test case
* Use BlockHeaderDAO.chainTips when getting best header rather thean BlockHeaderDAO.getBlockchains(). Implement a helper method ChainHandler.toChainHandlerCached()
* Fix chain.md,wallet.md
* Make ChainHandler.getBestBlockHeader() consider time of header if chainwork is the same. Make test cases less strict on what header is the best header when both chainwork and time are the same on the eader
* Only execute callbacks on headers that are going to be created in the database, not all headers passed into ChainHandler.processHeadersWithChains()
* Turn up log level again
* Small optimizations, check if we have seen a header before before processing it in ChainHandler.processHeadersWithChains(). Fix FilterSyncMarker.toString(). Use ChainHandlerCached in Node
* Remove ChainHandlerCached in appServer, re-add it in Node.scala
* 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
* Introduce 'FilterSyncMarker' to ChainApi, make it clearier what exactly the (Int,DoubleSha256Digest) tuple is returned from ChainApi.nextBlockHeaderRange()
* Fix doc
* Add scaladoc to FilterSyncMarker
* Rebase onto master, fix conflicts to use FilterSyncMarker
* Pull over test cases, WIP
* Rework ChainHandler.nextBlockHeaderRange() to use hashes rather than heights to very integrity of header chain, add test case
* Modify test case to make sure we are generating the 'heaviest chain work' header as first in the tuple that is used in reorg test cases
* Refactor to helper method called 'findNextHeader()' to make things simpler
* Add scaladoc to ChainHandler.findNextHeader()
* WIP
* Fix bugs in ChainApi.nextBlockHeaderRange(), now return (startHeight,stopHash) rather than (stopHeight,stopHash)
* Get chain handler tests passing, remove genesis filter header/fitler from default chain project fixture, make it a specialized one to have genesis filter header/filter in the database. Use that specialized fixture in ChainHandlerTest for now
* FilterSync work without having the genesis filter and filter header inserted into the database
* fix bug in DataMessageHandler where we were using sendNextGetCompactFilterHeadersCommand rather than using peerMsgSender.sendGetCompactFilterHeadersMessage
* Refactor ChainHandler.findNextHeader() to centralize where chains are fetched
* Address ben's code review
* Fix maxBy() exception in the case of empty Blockchain in ChainHandler.bestFilterHeaderSearch()
* Add another unit test to CompactFilterHeaderDAO for coverage
* Implement getBestFilterHeader based on a number of block headers that can be passed in as a parameter. These headers can be used to indicate what your current best chain is
* Bring back compiler opts
* Fix compiler error for maxByOption as it isn't in the 2.12 std library
* Implement a context free best filter headers search. The basic strategy is to look at headers in the _future_ of our current best filter header
* Fix bug in sql query were we were doing max chainWork too early on block headers, we needed to filter out headers in our set and _then_ we get the max chain work
* Add more unit tests
* Clean up code for BroadcastDAO test
* Extend StartStopAsync with BitcoinSAppConfig, create 'CachedAppConfig' test trait, clean up P2PClientTest
* Make MerkleBuffersTest use CachedAppConfig
* Start cleaning up after ourselves in the chainTest test suite
* Cancel background runnable for generating blocks after test case, add nodeAppConfig.stop() to tests in NodeAppConfigTest
* Stop mainnet nodeAppConfig in test as per ben's code review
* Refactor ChainUnitTest.withChainFixture() to use makeDependentFixture()
* Call .stop() for appConfig's spun up in ChainAppConfigTest
* Less parallelization on destruction of chainAppConfig
* Revert parallelExecution/fork jvm in CommonSettings