* Move NodeState back to node module
* Refactor peerWithServicesDataMap into NodeState
* More usage of state.peerDataMap in stream
* Fix log message
* Fix compile
* Move PeerFinder into NodeState
* WIP: Move PeerFinder init into NeutrinoNode.start()
* Get things mostly working again after rebase
* Fix bug in handling of headers message where we wouldn't transition to DoneSyncing if a peer sent us 0 headers
* Move SendToPeer into stream
* scalafmt
* Empty commit to run CI
* Re-add DataMessageHandlerTest
* Renable disconnecting portion of NeutrinoNodeTest
* Empty commit to run CI
* Remove disconnection part of test again
* Empty commit to re-run CI
* Empty commit to re-run CI
* Fix bug where number needed to be interpreted as a UInt32 rather than Int32 by the ScriptInterpreter in the case of OP_CSV
* Add static test vector, fix another occurrence of bug
* Add NodeShuttingDown
* Add NodeShutdown to NodeStreamMessage, use it in PeerManager.stop()
* Add guard to NeutrinoNode.stop() to see if stop() was called when the isStarted flag is set, if we aren't started don't attempt to destroy the akka stream
* Rework NodeTestUtil to use a specific bestBlockHash, this is useful in reorg situations
Use param in reorg test, modify scaladoc
WIP
* Cleanup
* Try to fix usage of stopHashBE
* Cleanup
* WIP: Fix getCompactFilterStartHeight()
* Revert logback-test.xml
* Fix bug with isFiltersSynced() in reorg situations
* scalafmt, fix compile
* Fix another bug with isFiltersSynced()
* Fix compile
* Add ChainApi.getBestChainTips()
* Implement BitcoindRpcClient.getBestChainTips()
* Revert NodeTestUtil
* Use ChainApi.getBestChainTips() throughout codebase rather than blockHeaderDAO.getBestChainTips()
* Rework randomPeerWithServices() to be inside of NodeState, try to move more state into NodeState
* Don't try to sync from peer waitingForDisconnection
* Add PeerWithServices, keep track of ServiceIdentifier in PeerManager and NodeState
* Try to make reorg test more reliable
* Empty commit to run CI
* 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
* Pull queue, PeerFinder into NeutrinoNode and out of PeerManager
* Remove ControlMessageHandler param from PeerData
* Make ControlMessageHandle.handleControlPayload() take PeerMessageSenderApi as a param instead of just a Peer
* move construction of akka stream from PeerManager to NeutrinoNode
* Move inactivity checks out of PeerManager and into NeutrinoNode
* Move queue initialization into NeutrinoNode
* cleanup
* Set NeutrinoNode.isStarted to true when NeutrinoNode.start() is called
* Empty commit to re-run CI
* Modify FilterSync.toString()
* scalafmt
* Fix bug where we weren't checking if connection is timed out on activity checks
* Empty commit to run CI
* reset log level
* WIP: Implement future chaining for recursive rescans
* Fix deadlock by segregating RescanStarted.doneF into two different methods, one tracking the single pass rescan and one tracking the entire rescan
* scalafmt, add comment
* Fix bug where we were completing Promise twice
* Fix unit test
* Cleanup logs
* Cleanup comment
* Bump timeout
* Empty commit to run CI
* Empty commit to re-run CI
* Empty commit to re-run CI
* Rename PeerMessageSender -> PeerConnection
* WIP: Move gossip methods into PeerManagerApi, keep single peer methods in PeerMessageSenderApi, but remove peer parameter
* PeerData.peerMessaageSender -> PeerData.peerConnection
* Remove DataMessageHandler.queue as it is redundant
* Get most test cases passing in nodeTest
* Fix ReConnectionTest
* Fix NeutrinoNodeWithUncachedBitcoindTest test case
* Rename PeerManager.{randomPeerMsgSender, getPeerMessageSender} -> PeerManager.{randomPeerConnection,getPeerConnection}
* Refactor PeerManager.getPeerMessageSender to return the new PeerMessageSender
* Rename param
* scalafmt
* Remove unused method
* Revert onInitialization
* 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 in DataMessageHandler.isFiltersSynced()
* Try alternative implementation to fix bug
* Fix valid states for CompactFilterMessage, revert PeerFinder delay
* WIP: Try to move byte streaming/parsing of p2p messages out of P2PClient
* WIP2: Work on killing the actor, replace it with a steram
* Get basic ability to send/receive version message working
* Transition PeerMessageReceiverState to Initializing inside of PeerMessagesender.connect()
* Refactor things out of PeerMessageSender.connect(), add some flow logs
* Get NeutrinoNodeTest be able to sync passing
* Fix some bugs, create ConnectionGraph helper class
* Use killswitch rather than Source.maybe to disconnect peer
* WIP: Debug
* Switch halfClose to false on Tcp.outgoingConnection() to not keep lingering connections
* Delete P2PClientActorTest
* Delete all P2PClient stuff
* Attempt implementing reconnection logic in PeerMessageSender
* remove supervisor
* Empty commit to re-run CI
* Small cleanups
* Implement sendResponseTimeout()
* Restore logback-test.xml
* Add callback to log error message on reconnect
* Increase queueSize/maxConcurrentOffers size
* Network notifications
* add more tests
* don't drop futures on the floor
* Improve logging, don't drop futures on floor
* scalafmt
* add error messages to the failure notifications
* update unit tests
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Get unit tests passing for unordered nonces/signatures
* Get v0 oracle announcements working again on listannouncements
* Add unit test to make sure we can still validate signatures for attestments with nonces out of order
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase
* Small cleanups
* Add SortedVecFactory
* Fix test case with out of order nonces
* 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
* Fix bug where no exception was thrown if the acceptor did not have enough money
* Revert ContractInfo.max definition, fix bug in acceptDLCOffer
* Fix incorrect usages of ContractInfo.max
* Refactor ContractInfo.max -> ContractInfo.maxOfferorPayout
* Fix dlc.md