Commit Graph

4317 Commits

Author SHA1 Message Date
Scala Steward
7a3834dc80
Update sbt to 1.9.8 (#5349) 2024-01-14 09:04:50 -06:00
Scala Steward
ecbd024465
Update janino to 3.1.11 (#5313) 2024-01-14 09:04:39 -06:00
Chris Stewart
9cd60d5366
2024 01 02 encapsulate state p2psink (#5342)
* 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
2024-01-13 17:22:01 -06:00
Chris Stewart
56b1a557a8
Add carve out to ignore ConnectPeer request if state is NodeShuttingDown (#5352) 2024-01-13 14:40:12 -06:00
Chris Stewart
421970dcf5
2024 01 11 bip68 bip112 txversion bug (#5346)
* 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
2024-01-12 06:44:18 -06:00
Chris Stewart
748121fe8a
2023 01 06 small chainhandler bug fixes (#5345)
* Get ChainApi.nextBlockHeaderBatchRange() tests passing

* Get all tests passing in chainTest/test

* Get all tests passing

* Add BlockHeaderDAO.getBlockchainFrom(header,startHeight), use it for filter marker computation

* Add carve out for IBD when syncing filter headers to avoid loading entire block header chain into memory

* Cleanup

* Fix inconsistencies between ChainApi.{nextBlockHeaderBatchRange, nextFilterHeaderBatchRange}
2024-01-07 12:16:36 -06:00
Chris Stewart
3a927edee1
Fix bug when requesting FilterSyncMarker for filter headers (#5344)
* Fix bug when requesting FilterSyncMarker for filter headers outside of our in memory blockchain's range

* Rework buildNHeaders to be faster, move it to ChainUnitTest
2024-01-06 09:59:26 -06:00
Chris Stewart
3c5bace825
Dont initiate disconnect logic from bitcoind, its flakey for some reason (#5343)
* Dont initiate disconnect logic from bitcoind, its falky for some reason

* Fix bug where we weren't switching sync to another peer on disconnect for the case where we were waiting for disconnection

* Empty commit to run CI

* Empty commit to run CI
2024-01-05 11:52:39 -06:00
Chris Stewart
d6c1491ba8
2024 01 03 shuttingdown nodestate (#5341)
* 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
2024-01-04 14:05:31 -06:00
Chris Stewart
30876c2cde
Move PeerManager.connectPeer() logic into stream (#5340)
* Move PeerManager.connectPeer() logic into stream

* Fix comment
2024-01-03 10:27:35 -06:00
Chris Stewart
d27dcb38f4
Add logging to PeerConnection.handleStreamComplete so exceptions aren't dropping on the floor (#5339) 2024-01-02 13:14:21 -06:00
Chris Stewart
b39736fb8d
Rework NodeTestUtil to use a specific bestBlockHash (#5332)
* 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
2023-12-31 17:38:12 -06:00
Chris Stewart
5e81ec5ed2
Add ChainApi.getBestChainTips() (#5338)
* Add ChainApi.getBestChainTips()

* Implement BitcoindRpcClient.getBestChainTips()

* Revert NodeTestUtil

* Use ChainApi.getBestChainTips() throughout codebase rather than blockHeaderDAO.getBestChainTips()
2023-12-31 16:54:40 -06:00
Chris Stewart
a3e1267484
2023 12 30 isfiltersync bug (#5337)
* Fix another bug with isFiltersSynced()

* Fix compile

* Cleanup uncessary checks

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to re-run CI
2023-12-31 14:06:21 -06:00
Chris Stewart
06dfd9cea4
Rework randomPeerWithServices() to be inside of NodeState (#5331)
* 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
2023-12-29 14:47:29 -06:00
Chris Stewart
f1775c46d3
Simplify ChainHandler.nextFilterHeaderBatchRange() (#5336)
Get implementation working for walking backwards to find best filter associated with our stopBlockHeaderDb
2023-12-29 10:20:24 -06:00
Chris Stewart
af361167a4
Refactor ChainHandler.findNextHeader() to only take 1 blockchain (#5335)
* Refactor ChainHandler.findNextHeader() to only take 1 blockchain as a parameter

* Empty commit to re-run CI
2023-12-28 17:32:28 -06:00
Chris Stewart
d983a1bac4
2023 12 24 Make filter headers / filters sync work with block header reorgs (#5333)
* 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
2023-12-28 10:43:01 -06:00
Chris Stewart
0ace6dfd2e
Make PeerManager.gossipMessage() queue to avoid gossiping messages to peers being disconnected (#5334)
* Make GossipMessage use PeerManager queue to avoid gossiping messages to peers that are being disconnected

* Remove isIBD check for gossiping getheaders after filter sync is complete

* Add log warning when NodeState has a peer, but peerDataMap doesn't when gossiping messages
2023-12-28 10:07:45 -06:00
Chris Stewart
16fb5d2dad
2023 12 19 compiler opts (#5330)
* Enable more compiler options

* enable -Xlint:valpattern, fix bug with out Test / scalacOptions were set with incorrect source code compiler flags

* Enable -Xlint:eta-sam

* Fix cryptoTestJVM

* Fix cryptoTestJS/test

* Fix asyncUtilTest

* Fix asyncUtilTest
2023-12-20 05:42:01 -06:00
Chris Stewart
54f303efb0
Rework various private methods in DataMessagehandler to return NodeState (#5329)
* Rework various private methods in DataMessagehandler to return NodeState rather than DataMessageHandler

* Refactor compact filter header handling into private helper method

* Refactor handling of headersmsg in case where the headermsg came from a different peer than our current syncPeer

* Add DEBUG log
2023-12-19 09:24:09 -06:00
Chris Stewart
ce154fc5fd
Remove unecessary helper method in PeerFinder (#5327)
* Remove unecessary helper method in PeerFinder

* scalafmt

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to run CI

* Empty commit to re-run CI
2023-12-17 12:36:37 -06:00
Chris Stewart
1084be80ad
Upgrade cache action to v3 (#5326)
* Upgrade cache action to v3

* Make unique cache names

* Empty commit to run CI

* Empty commit to re-run CI
2023-12-16 12:24:25 -06:00
Chris Stewart
747389e77d
Rework ConnectionGraph.stop() to return Future[Done] (#5325)
* Rework ConnectionGraph.stop() to return Future[Done] that represents the stream being completed

* Empty commit to re-run CI

* Fix bug in handleStreamComplete()

* Revert log levels

* Empty commit to run CI
2023-12-16 11:18:53 -06:00
Chris Stewart
01537185bd
2023 12 13 mv connectioncount check fixtures (#5324)
* Move peer connection count checks into test fixtures

* Add connection count check in another test fixture

* scalafmt
2023-12-14 06:19:47 -06:00
Chris Stewart
7f337073c9
Improve ReConnectionTest (#5323)
* Improve ReconnectionTest

* Await sync before starting our inactivity check
2023-12-13 06:25:24 -06:00
Chris Stewart
f4db40897b
Fix bug where PeerConnection.connectionGraphOpt does not get reset on disconnect (#5307)
* Remove calls to PeerData.stop() inside of PeerManager.onDisconnect(), now call PeerConnection.disconnect() when stream is complete

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to re-run CI

* Make PeerFinder.removePeer() return Option[PeerData]
2023-12-11 16:57:06 -06:00
Chris Stewart
bd3ad1df21
2023 12 07 mat socks5handler (#5322)
* Move socks5 greeting into Socks5Connection.socks5Handler() so each individual uage doesn't have to roll its own greeting

* Implement socks5Handler() to return a materialized stream

Get something working

Cleanup

* Remove connection parameter

* Add scaladoc
2023-12-08 12:36:02 -06:00
Thomas Profelt
16c41c3b2e
Added LnURLClient accept header to request (#5318) 2023-12-06 09:52:56 -06:00
Chris Stewart
ef20d5ec83
Rework Socks5Connection.socks5Handler() to emit Socks5ConnectionState downstream (#5315) 2023-12-02 13:02:48 -06:00
Scala Steward
39b127be8c
Update sbt-bloop to 1.5.12 (#5309) 2023-12-02 11:35:28 -06:00
Scala Steward
bb549b46d4
Update logback-classic to 1.4.14 (#5314) 2023-12-02 11:35:19 -06:00
Chris Stewart
47c433f365
Replace inactivity logic with Flow.idleTimeout (#5311)
* Replace inactivity logic with Flow.idleTimeout

* Fix bug where we were calling PeerConnection.connect() rather than PeerConnection.reconnect()
2023-11-29 15:13:13 -06:00
Chris Stewart
c0e8d376eb
Remove oracle explorer client (#5308)
* Remove oracle explorer client

* Remove doc, remove ci flow
2023-11-22 10:27:29 -06:00
Chris Stewart
4913b12431
2023 11 10 peermanager refactor (#5303)
* 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
2023-11-17 13:16:26 -06:00
Scala Steward
23cc9c9acc
Update junixsocket-core to 2.8.3 (#5300) 2023-11-16 09:33:17 -06:00
Scala Steward
36d27704b4
Update bcprov-jdk18on to 1.77 (#5302) 2023-11-16 09:33:05 -06:00
Scala Steward
a21b0a1741
Update client3:core, ... to 3.9.1 (#5296) 2023-11-11 11:09:59 -06:00
Scala Steward
222ad3b60d
Update sbt-mdoc to 2.5.1 (#5298) 2023-11-11 10:36:39 -06:00
Scala Steward
7861bce71a
Update native-lib-loader to 2.5.0 (#5297) 2023-11-09 10:08:45 -06:00
Chris Stewart
7f5ed15521
Reduce inactivity level to DEBUG (#5286)
* Reduce inactivity level to DEBUG

* Empty commit to re-run CI

* Empty commit to run CI

* Empty commit to run CI

* Empty commit to re-run CI
2023-11-08 15:45:55 -06:00
Chris Stewart
7b8df425fb
Reset PeerConnection.connectionGraphOpt = None when connection is disconnected (#5290)
* Reset PeerConnection.connectionGraphOpt = None when connection is disconnected

* Move resetting connectionGraphOpt into PeerConnection.disconnect()

* Call PeerData.stop() inside of PeerManager.onDisconnect()

* Empty commit to run CI

* Empty commit to re-run CI
2023-11-08 08:00:51 -06:00
Scala Steward
c1baad9f06
Update sbt-mdoc to 2.5.0 (#5289) 2023-11-07 16:50:00 -06:00
Chris Stewart
556c5e0c39
Fix NullPointerException inside of DLCServer (#5287) 2023-11-07 09:11:49 -06:00
Chris Stewart
579318cad0
Make Gen[ECPrivateKey] in scalacheck to use randomness from scalacheck to preserve reproducibility of test cases (#5285)
* Make Gen[ECPrivateKey] in scalacheck to use randomness from scalacheck to preserve reproducibility of test cases

* Revert build.sbt
2023-11-06 17:03:09 -06:00
Scala Steward
665727f165
Update play-json to 2.10.3 (#5282) 2023-11-06 15:06:09 -06:00
Scala Steward
33087f6ec1
Update metrics-core, metrics-healthchecks, ... to 4.2.22 (#5283) 2023-11-06 14:03:47 -06:00
Chris Stewart
a18bd70369
Upgrade to bitcoind 24.2 (#5284)
* Upgrade to bitcoind 24.2

* update m1 24.2 bitcoind hash

* update windows, mac x86 bitcoind v24.1 hashes
2023-11-06 14:03:10 -06:00
Chris Stewart
5273af05d8
Upgrade website dependencies (#5279) 2023-11-03 11:15:26 -05:00
Scala Steward
336cb60c51
Update sbt-assembly to 2.1.4 (#5275) 2023-10-31 06:55:40 -05:00