Commit graph

4479 commits

Author SHA1 Message Date
Scala Steward
b7d7baaa20
Update sqlite-jdbc to 3.45.2.0 (#5474) 2024-03-16 07:12:19 -05:00
Chris Stewart
9a71a96fb8
2024 03 11 Remove filtersync job (#5471)
* Rework DataMessageHandler to consider syncing filterheaders if we receive a headers message with 0 block headers

* scalafmt

* Remove syncfilter job

* Cleanup

* Reduce received headers log to DEBUG

* Rework SyncNodeState.toString()

* Call PeerManager.startFilterSync() in DataMessageHandler

* Don't test MTP in unrelated test
2024-03-12 15:05:54 -05:00
Chris Stewart
23337b7137
2024 03 11 PeerFinder.getPeersFromDnsSeeds async (#5472)
* WIP: Make getPeersFromDns async

* Get things compiling

* Comment out slow seeds
2024-03-12 12:14:01 -05:00
Chris Stewart
708ce41f24
Re-implement bitcoin-s.node.query-wait-time (#5470)
* Add sentQuery Instant to SyncNodeState subclasses, add logic in DataMessageHandler.handlePayload() to detect if a query has timed out

* Refactor to use NodeTestUtil.disconnectNode()

* Cleanup comments
2024-03-11 09:54:44 -05:00
Chris Stewart
54a356b300
Don't unnecessarily create new NodeState objects, use helper methods to state transition (#5469) 2024-03-10 15:41:06 -05:00
Chris Stewart
fa6cb1ba3a
Send p2p messages to syncPeer when we are in and a specific peer is not set in SendToPeer (#5468) 2024-03-09 22:19:56 -06:00
Chris Stewart
9e50c5fd12
Fix bug where we weren't checking if isFiltersSynced is true before sending our next getcfilters to our peer (#5466) 2024-03-09 16:24:28 -06:00
Chris Stewart
16aeb56df5
Remove implicit NodeAppConfig from PeerMessageSender (#5465) 2024-03-09 15:00:58 -06:00
Chris Stewart
567c2400ca
Small refactors to use RunningNodeState methods, improve logs (#5463) 2024-03-09 09:25:34 -06:00
Scala Steward
dcb177b4a7
Update slick, slick-hikaricp to 3.5.0 (#5461)
* Update slick, slick-hikaricp to 3.5.0

* Fix compile

---------

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2024-03-08 10:14:20 -06:00
Scala Steward
c2fb5d2657
Update client3:core, ... to 3.9.4 (#5460) 2024-03-08 10:14:11 -06:00
Chris Stewart
5967caeca7
2024 03 07 Add NodeState.FilterOrFilterHeaderSync, refactor PeerManager to use it (#5459)
* Refactor syncHelper() to return SyncNodeState rather than Unit

* Add FilterOrFilterHeaderSync, rework various methods in PeerManager to return Option[FilterOrFilterHeaderSyncState] to indicate if we are syncing rather than Future[Unit]

* Don't use getPeerMessageSender() if we can use syncPeerMessageSender()

* Fix case where syncpeer and new peer are different when creating a filter sync job

* Adjust createFilterSyncJob() return type, throw exception when we try to sync but PeerManager is not started

* Refactor to use SyncNodeState.{toFilterHeaderSync,toFilterSync}

* Cleanup comments
2024-03-08 10:13:58 -06:00
Chris Stewart
e793c53dd7
Add guards on sending blockfilter messages to non-blockfilter peers (#5457)
* Add guards on sending blockfilter messages to non-blockfilter peers

* Simplify logic

* add scaladoc

* Remove misleading log
2024-03-06 08:26:32 -06:00
Chris Stewart
55e4dab86e
Rework NodeApi.downloadBlocks() to use DoubleSha256DigestBE (#5456)
* Rework NodeApi.downloadBlocks() to use DoubleSha256DigestBE rather than DoubleSha256Digest

* Fix test cases

* Fix docs

* Fix compile
2024-03-05 15:19:32 -06:00
Chris Stewart
898d2b44ee
Fix bug where we were executing block callbacks when we hadn't seen a block header (#5455)
* Fix bug where we were executing block callbacks when we hadn't seen a block header

* reduce log to DEBUG
2024-03-05 13:47:03 -06:00
Chris Stewart
238948e185
Remove PeerMessageSenderApi param from DataMessageHandler (#5453) 2024-03-05 11:12:17 -06:00
Chris Stewart
ddb6f01d65
Simplify / reduce log level for compact filter logs (#5452) 2024-03-05 09:20:32 -06:00
Chris Stewart
367285d9b9
Reduce reliance of PeerManager._peerDataMap in favor of NodeState.peerDataMap (#5451)
* Reduce reliance of PeerManager._peerDataMap in favor of NodeState.peerDataMap

* Fix bug where we weren't removing peers from NodeState

* Remove invariants

* Empty commit to run CI

* Empty commit to re-run CI
2024-03-05 08:16:29 -06:00
Chris Stewart
0d2e0a98f0
fix bug where we weren't properly transferring state to FilterHeaderSync, reduce log level of peer we fail to connect to (#5450) 2024-03-04 13:19:22 -06:00
Scala Steward
f77b4efe11
Update logback-classic to 1.5.3 (#5448) 2024-03-04 10:46:49 -06:00
Chris Stewart
9aa730dd0a
Revert yml files (#5449) 2024-03-04 09:47:52 -06:00
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