Commit Graph

4495 Commits

Author SHA1 Message Date
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
Scala Steward
5544a2efc4
Update janino to 3.1.12 (#5387) 2024-02-06 16:09:57 -06:00
Scala Steward
e30d1b1cad
Update slf4j-api to 2.0.12 (#5388) 2024-02-06 15:56:44 -06:00
Scala Steward
b45b8b7eb0
Update sbt-bloop to 1.5.15 (#5386) 2024-02-06 15:56:34 -06:00
Scala Steward
843e9ee23a
Update sqlite-jdbc to 3.45.1.0 (#5384) 2024-02-02 13:23:20 -06:00
Chris Stewart
1685c84eea
2024 01 31 Refactor BitcoindRpcTestUtil.{startSevers(),stopSevers()} to use Future.traverse() (#5382)
* Refactor BitcoindRpcTestUtil.startServers() to use Future.traverse()

* Refactor BitcoindRpcTestUtil.stopServers() to use Future.traverse()
2024-01-31 15:20:36 -06:00
Chris Stewart
451e019225
2024 01 31 Fix PeerManager.connect() bug where PeerFinder was unaware of peer (#5381)
* Fix bug in PeerManager.connect() where we would throw ane xception when our PeerFinder had not seen the peer before

* Remove ReConnectionTest case where we constantly try to reconenct o a peer we disconnected, revert logback-test.xml
2024-01-31 11:10:48 -06:00
Chris Stewart
af74450c62
Cancel polling job after walletTest is executed (#5379) 2024-01-31 10:24:44 -06:00
Chris Stewart
75881191d1
Guard NeutrinoNode.start() with isStarted flag (#5380) 2024-01-31 09:48:44 -06:00
Chris Stewart
018631dad4
Create NodeTestUtil.awaitConnectionCount() (#5378)
Refactor ReConnectionTest to use NodeTestUtil.awaitConnectionCount()

Refactor more of codebase to use NodeTestUtil.awaitConnectionCount()

Refactor PeerManagerTest to use NodeTestUtil.awaitConnectionCount()

Refactor more nodeTest to use NodeTestUtil.awaitConnectionCount()

use bitcoinds.size for expectedConnectionCount
2024-01-31 07:39:20 -06:00
Chris Stewart
75f6a3b4ec
Refactor PeerFinder.peerConnectionScheduler() into method (#5377) 2024-01-30 14:35:17 -06:00
Chris Stewart
76e468c5c4
2024 01 28 Refactor PeerFinder.start() to avoid initializing connections (#5376)
* 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
2024-01-29 09:46:31 -06:00
benthecarman
f01987160d
Lnd v0.17.3 (#5375) 2024-01-27 11:28:25 -06:00
Chris Stewart
d641c3da55
2024 01 25 Cache txid (#5374)
* Add LargeTransactionTest

* Remove unused ByteArrayOutputStream

* Add block test case for 00000000ce4a4666cce2205d760d37b5579cdedf3ac9e4295557e8ac962cde55

* Cache txId to avoid re-computing txids which can take alot of resources

* Cache WitnessTransaction.toBaseTx, remove println

* remove BlockTest as it didn't capture the bug
2024-01-27 10:57:33 -06:00