* Remove duplicate disconnect() call
* Remove log for case where we haven't set PeerConnection.connectionGraphOpt but call PeerConnection.stop()
* Remove bitcoin-s.node.initialization-timeout
* Get dependencies resolving, get tor module compiling
* Get everything compiling with pekko
* Rework configs/logging to use pekko namespace
* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
* Move away from suredbits provided peers by default
* Remove setting bitcoin-s.node.use-default-peers
* Don't allow peer to stay connected if it doesn't support compact filters
* Move disconnection logic into managePeerAfterInitialization()
* Remove reconnect() when we have no other peers, send getaddr message after we know we are keeping the peer connection
* Remove hasCf flag check, revert log
* Reduce inactivity-timeout to 5 minutes by default, shuffle peers in PeerFinder beforing pushing onto stack
* Add logic to disconnect AttemptToConnect peers after addr mesage is received
* Create PeerFinder.queryForPeerConnections(), call it directly from PeerManager on health checks rather than restarting PeerFinder
* scalafmt
* Move more logic into managePeerAfterInitalization()
* Don't set isPersistent for db peers by default
* Add call to queryForPeerConnections() inside of PeerManager.onDisconnect() to try to attempt to more peers when we have no more connections, fix MisBehavingPeer logic to not start sync, starting sync should happen in onDisconnect()
* Revert logback-test.xml
* Sort peers we are attempting to connect to by lastSeen parameter
* Refactor DoneSyncing.toHeaderSync() to return Option[HeaderSync] to represent the case where we don't have a peer to sync with
* scalafmt
* Remove duplicate PeerFinder.buildPeerData()
* Conslidate PeerFinder.start() logic into peerConnectionScheduler, add bitcoins-s.node.try-peers-start-delay config settig to indicate how long until we start attempting to connect to peers in PeerFinder
* Cleanup
* Revert logback-test.xml
* Add documentation
* Empty commit to run CI
* Rework NodeAppConfig.peers to return Vector[Peer] rather than Vector[String]
* Add higher priority to paramPeers
* First attempt at implementing inactivityChecks()
* Move lastParsedMessage logic into PeerMessageSender
* Add bitcoin-s.node.inactivity-timeout config option
* implement unit test
* Fix CommonSettings
* scalafmt
* scalafmt
* Rename lastSuccessfulParsedMsg -> lastSuccessfulParsedMsgOpt
* make sure we disconnect in the case the stream terminates with an error
* Reduce log level
* Fix Tor hidden service config
* default the target list to an empty list
* Scala 2.12 compatibility
* update docs
* Fix typo
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* 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
* 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 support to find and switch peers
* fix compile on 2.12
* allow empty config peers in regtest
* fix test
* minor fixes
changes timeouts, fix issue with ipv6 dns seeds, initDisconnect when disconnected bug, dbPeers order fix
* fix: not removing peers on initialization timeout
* fix: query again when previous failed
* fix: wrong condition for deferred peers
* restore log levels
* clean up
* add PeerStack to allow trying peers based on priority values
* fix migrations
* changes from comments
* use StartStopAsync
* changes from comments
* fix switch if peer down test
* changes from comments
* Make example configuration better so that the node starts up if you just copy and paste the example configuration into your bitcoin-s.conf file
* More clarificatoin
* RPC password authentication
* fix compiler error
* add more unit tests
* change default behavior
* Cleanup and add unit test for sad path for rpc authentication
Co-authored-by: Chris Stewart <stewart.chris1234@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
* 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>
* relay flag in version message made configurable
* modified test classes as well
* Update configuration.md
* reverted few files and cleaned up format
* fixed mistake
* 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>
* Give oracle server its own port
* Don't have default cli command port
* Default port in config
* Remove unused server conf
* Oracle own config option
* Give connection pool example config
* Get hikari logging working on postgres
* fix 2.12.x
* Bump metrics core to a supported version
* Add hikari-logging and hikari-logging-interval configuration options to turn off/on hikari and schedule how often logs appear
* Turn off hikari logging in the db-commons/reference.conf and add it to appserver/reference.conf
* default the logging to off in scala code
* Make sure connection pool is enabled in db-commons, add default database configuration to website
* Address code review, fix things that didn't need to be changed
* 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