Commit Graph

4408 Commits

Author SHA1 Message Date
Chris Stewart
ae3a634703
2024 03 01 Fix syncPeer exceptions (#5446)
* Add NodeRunningState.removePeer(), add helper method onDisconnectNodeStateUpdate() to consolidate disconnect logic

* Remove duplicate logic

* Add bitcoin-s.node.maxConnectedPeers test

* Clean up resources in test case

* Remove unecessary replacePeers()

* Add NodeState.addPeer()

* Add NodeRunningState.connectedPeerCount, separate handling of connection slots and filter slots
2024-03-04 09:22:16 -06:00
Chris Stewart
8b23b1f4f6
Add delay to wait for zmq to get setup in chainTest (#5427)
* Add delay to wait for zmq to get setup in chainTest

* Add println

* only run zmq tests on CI

* Bump Thread.sleep from 1ms -> 10ms

* Empty commit to re-run CI

* Revert things

* try making thread names more unique

* try no sleep

* Remove println

* Put logging back

* Try removing ZMQ.NOBLOCK

* turn off parallelExecution to see if it matters

* Add more logging

* Re-enable parallelExecution

* Try catching all NonFatal exns

* Bump timeout

* Bump maxTries

* Try downgrading jeromq back to 0.5.4

* Revert things

* scalafmt
2024-03-03 11:54:50 -06:00
Chris Stewart
1f0af696f6
Reduce DataMessageHandler log levels (#5447) 2024-03-02 17:06:14 -06:00
Chris Stewart
dd7131306c
Consolidate disabled secp256k1 workflow into Compile workflow (#5445)
* Consolidate disabled secp256k1 workflow into Compile workflow

* Re-add -J-Xmx4g
2024-03-01 11:51:17 -06:00
Chris Stewart
951bdc5b34
Always try to attempt to connect to our param peers in PeerFinder (#5444) 2024-03-01 11:28:17 -06:00
Chris Stewart
1317adfdad
Add zmq/test and chainTest/test to OS's we weren't previously running on (#5443) 2024-03-01 10:02:34 -06:00
Chris Stewart
00c84a9c25
Set max-open-requests = 64 for appServerTest (#5442) 2024-03-01 06:33:54 -06:00
Chris Stewart
c407c2e874
2024 02 29 cleanup logback files (#5441)
* Remove logback settings for things that don't exist anymore

* Consolidate slick logging

* Clean up chain logs

* Conslidate wallet logging

* Consolidate node logging

* Remove comments in logback files
2024-02-29 16:55:43 -06:00
Chris Stewart
8f812c644f
Fix Promise already completed errors in chainTest (#5440) 2024-02-29 14:53:55 -06:00
Chris Stewart
8fb62ad21c
Use NodeCallbackStreamManager when calling NodeCallbacks constructors (#5439)
* Use NodeCallbackStreamManager when calling NodeCallbacks constructors to avoid dropping messages

* Fix handling of CallBackHandler.empty and names

* Empty commit to re-run CI

* Empty commit to re-run CI
2024-02-29 12:01:11 -06:00
Scala Steward
5ab8da9adc
Update logback-classic to 1.5.1 (#5438) 2024-02-29 11:50:40 -06:00
Chris Stewart
320773a99c
Add OverflowStrategy.backpressure on Source.queue in bitcoind polling job (#5437)
* Add backpressure on Source.queue in polling job

* Empty commit to run CI
2024-02-29 09:42:15 -06:00
Scala Steward
87003eb703
Update sbt-scalafmt to 2.5.2 (#5218) 2024-02-28 14:15:00 -06:00
Chris Stewart
70f983213c
Ignore invs while in IBD rather than when syncing (#5433)
* Ignore invs while in IBD rather than when syncing

* Ignore bitcoiner.live test case for now
2024-02-28 13:30:08 -06:00
Chris Stewart
d1ecd35e63
Fix PeerDb.lastSeen race condition in unit tests (#5435)
* Disconnect from bitcoind side rather than bitcoin-s side to make sure we don't run into a race condition for updating lastSeen

* Remove usage of CachedAppConfig, switch implicit param args for PeerDAO to be consistent with rest of code base

* Fix bug in getNodeURIFromBitcoind(), disconnect from bitcoind side in PeerManagerTest

* Add println to see why still fialing

* Add PeerConnection.getLocalAddress, add parameter localAddressBitcoinS  to NodeTestUtil.getNodeURIFromBitcoind() to make sure we are getting the correct URI

* Empty commit to run CI
2024-02-28 10:33:01 -06:00
Chris Stewart
42e5e87350
Reduce various logs in org.bitcoins.wallet to DEBUG (#5434) 2024-02-27 15:55:14 -06:00
Chris Stewart
ab0b0e2209
Fix bug where we weren't removing peer from NodeRunningState.waitingForDisconnection (#5425)
* Fix bug where we weren't removing peer from NodeRunningState.waitingForDisconnection

* Empty commit to re-run CI

* Remove _peerDataMap.remove(i.peer)

* Empty commit to re-run CI

* Replace state even if client.stop() results in a failed Future
2024-02-27 15:38:16 -06:00
Chris Stewart
0053ccd853
Rework NodeState.toString() (#5432) 2024-02-27 13:59:51 -06:00
Chris Stewart
3ed78b5270
Upgrade to scala 2.13.13, fix compiler errors (#5428) 2024-02-27 10:21:39 -06:00
Chris Stewart
8a0c00637c
Remove duplicate PeerConnection.disconnect() call (#5426)
* 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
2024-02-27 08:03:37 -06:00
Chris Stewart
cb26f6de07
Add WalletZmqSubscribers (#5423)
Move connection logic into ZMQSubscriber.start() rather than SubscriberRunnable
2024-02-26 11:28:39 -06:00
Scala Steward
dae6ebf9aa
Update sbt-scoverage to 2.0.11 (#5424) 2024-02-25 09:36:34 -06:00
Chris Stewart
6934b33474
Fix bug in health checks were we wouldn't attempt to connect NodeAppConfig.maxConnectedPeers if we didn't have any non compact filter peers connected (#5422) 2024-02-23 16:45:01 -06:00
Chris Stewart
b27cebca1c
2024 02 23 TaprootKeyPath.isValid() bug (#5421)
* Add reproducible test case for serialization symmetry failure

* Add check for TaprootKeyPath.isValid() for checking the SchnorrPublicKey is a valid x-cord in the SchnorrDigitalSignature()

* Reset ScalaTest settings
2024-02-23 14:33:36 -06:00
Scala Steward
3c2184156b
Update sbt to 1.9.9 (#5419) 2024-02-23 14:24:59 -06:00
Chris Stewart
90b9e76e56
Keeping finding peers until all peers are blockfilter peers (#5417)
* Keep attempting to connect to block filter peers until all connection slots are block filter peers

* Empty commit to run CI
2024-02-23 08:33:22 -06:00
Chris Stewart
783ed1903d
Rename bitcoin-s.node.inactivity-timeout -> bitcoin-s.node.health-check-interval (#5418) 2024-02-23 08:31:22 -06:00
Scala Steward
0a96f72c5e
Update postgresql to 42.7.2 (#5414) 2024-02-22 10:27:09 -06:00
Chris Stewart
1dff918848
2023 02 21 pekko (#5413)
* Get dependencies resolving, get tor module compiling

* Get everything compiling with pekko

* Rework configs/logging to use pekko namespace

* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
2024-02-22 10:26:21 -06:00
Chris Stewart
1b25994fc2
Re-add java.sql module to cli jlink image to fix #5411 (#5412) 2024-02-20 14:02:15 -06:00
Chris Stewart
3177ee405f
Move away from suredbits provided peers by default (#5390)
* 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()
2024-02-20 12:12:57 -06:00
Scala Steward
caeb8d559c
Update sbt-scoverage to 2.0.10 (#5409) 2024-02-20 08:53:05 -06:00
Scala Steward
1efede0401
Update junixsocket-core to 2.9.0 (#5407) 2024-02-20 08:52:53 -06:00
Scala Steward
b059c2f57e
Update jeromq to 0.6.0 (#5410) 2024-02-20 08:52:43 -06:00
Scala Steward
7c8acc4484
Update client3:core, ... to 3.9.3 (#5408) 2024-02-19 15:36:53 -06:00
Scala Steward
7ea72f279f
Update logback-classic to 1.5.0 (#5406) 2024-02-19 15:35:00 -06:00
benthecarman
195cfbd273
Fix handling invoice with minimal encoding of feature bits (#5405) 2024-02-19 08:37:18 -06:00
Chris Stewart
b89b31fe09
2024 02 18 peerfinder duplicate connect (#5403)
* Pull PeerFinder changes over from #5390

* Filter out peers we are already connected when attempting to discover peers inside of PeerFinder

* Try to work around mutable.Map.isEmpty bug by converting to immutable Map
2024-02-18 11:47:32 -06:00
Chris Stewart
155b4fbc76
Fix case were we weren't cancelling the syncFilter job onDisconnect() (#5402) 2024-02-17 17:41:34 -06:00
Chris Stewart
f5087c5e3f
Remove PeerManager.{getPeerMessageSender(), getPeerConnection()}, use NodeState.{getPeerMessageSender(), getPeerConnection()} (#5400) 2024-02-17 07:37:50 -06:00
Chris Stewart
e4fbfe73e6
2024 02 16 fix get filter sync marker from stop block header bug (#5401)
* Fix bug in getFilterSyncMarkerFromStopBlockHeader where we were previously querying for children rather than the block hashes at the given height for building the FilterSyncMarker for getcfilter request. Also introduce delay in sending getcfheader because of https://github.com/bitcoin/bitcoin/issues/27085

* Only fallback to reorg scenario if we find no headers at height + 1

* Remove the best filter's block header from the candidate headers in reorg scenarios
2024-02-17 06:26:55 -06:00
Chris Stewart
bc94a8b01f
2024 02 15 Fix duplicate sync bug when we have a misbehaving peer (#5399)
* Fix bug where we were attempting to sync twice when we had a MisBehavingPeer, also simplify some logic inside of onDisconnect()

* Pull over more small changes from #5390
2024-02-15 14:56:12 -06:00
Chris Stewart
fe33c2919c
Fix inconsistency of PeerDAO primary key usage (#5398)
* Fix inconsistency of PeerDAO primary key usage

* Add Peer.port helper method
2024-02-14 13:31:56 -06:00
Chris Stewart
536cc26ba5
Update last seen value in PeerDb on disconnect (#5397) 2024-02-13 16:38:18 -06:00
Chris Stewart
05d03e7da6
Remove skipPeers, better PeerFinder.toString() (#5396) 2024-02-13 09:01:50 -06:00
Chris Stewart
3f22e42ad4
Update scalatest to 3.2.18 (#5395) 2024-02-12 18:41:35 -06:00
Chris Stewart
2d3e481ce0
Use Future.successful() when removing peer as there is no underlying async computation (#5394) 2024-02-11 11:28:25 -06:00
Chris Stewart
9d58c9eb89
Implement health checks for peers, first check is if we have any blockfilter peers (#5393)
* Implement health checks for peers, first check is if we have any blockfilter peers

* Actually send HealthCheck message to stream
2024-02-11 10:37:57 -06:00
Chris Stewart
d4ae659887
Log instead of throwing exception when sending message to peer without an active connection (#5392) 2024-02-11 09:08:05 -06:00
Chris Stewart
cac546bb57
Fix bug where we were only setting bitcoin-s.node.inactivity-timeout on regtest (#5389)
* Fix bug where we were only setting bitcoin-s.node.inactivity-timeout on regtest

* Remove log, scalafmt
2024-02-08 21:36:15 -06:00