Commit Graph

637 Commits

Author SHA1 Message Date
Chris Stewart
4f791d71d7
Upgrade clightning to 24.02.2 (#5558)
* Upgrade clightning to 24.02.2

* Fix download hash

* Fix version

* Change CLightningInfo.fees_collected_msat from String -> Long

* Fix channels parsing, add support for p2tr address type and remove nested-segwit for clightning

* Revert version

* amount_msats -> amount_msat

* Fix more json parsing

* Try commenting out asserts for midChannelsA being completed in CLightningChannelOpenerTest

* scalafmt

* msatoshi -> amount_msat

* Change assertion to check assert the channel is not active in CLightningChannelOpenerTest

* Fix CLightningPayResult

* Ignore test case that uses sendtoaddress until we upgrade to psbt v2
2024-05-01 13:28:12 -05:00
Scala Steward
afddf73c48
Update scalafmt-core to 3.8.1 (#5501)
* Update scalafmt-core to 3.8.1

* Update .scalafmt.conf settings to be factory default settings

* Fix typo

* scalafmt

* Empty commit to re-run CI

* Revert some scalafmt back to original scalafmt.conf

---------

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2024-04-20 19:55:49 -05:00
Chris Stewart
d162242a39
2024 03 24 v21 rpc refactor (#5494)
* WIP: Consolidate V19FilterRpc into BlockchainRpc

* Implement ChainApi.getFilterHeader() with bitcoind

* Make {BitcoindV22RpcClient,BitcoindV23RpcClient,BitcoindV24RpcClient} extend BitcoindRpcClient directly

* Fix MiningRpcTest

* Remove cast in BitcoindBackendTest
2024-03-26 13:04:26 -05:00
Chris Stewart
4501e138a4
Stop BitcoinSAppConfig last in BitcoinSServerMain.stop() (#5493) 2024-03-24 14:59:32 -05:00
Chris Stewart
b25cc8a8a5
Fix start rescan race condition, previously we would attempt to fetch blocks before our NodeApi had any peers (#5491) 2024-03-24 07:10:56 -05:00
Chris Stewart
177542a13c
Remove grizzled.sl4fj was its no longer maintained (#5482) 2024-03-18 16:48:58 -05: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
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
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
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
Chris Stewart
cb26f6de07
Add WalletZmqSubscribers (#5423)
Move connection logic into ZMQSubscriber.start() rather than SubscriberRunnable
2024-02-26 11:28:39 -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
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
Chris Stewart
62012b1ee6
Upgrade microPickle to 3.1.4 (#5368) 2024-01-22 18:05:35 -06:00
Chris Stewart
db21b8873e
Set flag nativeImageInstalled =: true so we don't overwrite system's nativeimage (#5358) 2024-01-19 05:39:34 -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
5c2c8ee30b
2023 10 19 recursive rescan state (#5269)
* 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
2023-10-24 08:13:45 -05:00
Chris Stewart
b252c2d6a2
2023 10 16 Implement WalletCallbackStreamManager, DLCWalletCallbackStreamManager (#5263)
* WIP: Implement WalletCallbackStreamManager

* Implement stopping of WalletCallbackStreamManager in WalletAppConfig

* WIP: DLCWalletCallbackStreamManager

* Refactor DLCWalletCallbacks to be a trait

* Integrate DLCWalletCallbackStreamManager into WebsocketUtil

* Use  java.util.concurrent.atomic.AtomicBoolean rather than monix

* Remove logger param from dlc callbacks

* fix docs

* Call super.stop() in DLCappConfig

* Empty commit to run CI

* Try to debug

* Empty commit to run CI

* Revert things
2023-10-19 11:52:07 -05:00
Chris Stewart
cff757cb55
2023 10 03 node refactors (#5256)
* 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
2023-10-09 10:32:05 -05:00
Scala Steward
d7037ede28
Update scala-library to 2.13.12 (#5235)
* Update scala-library to 2.13.12

* Fix compiler errors on scala 2.13.12

---------

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2023-09-12 10:45:17 -05:00
Chris Stewart
c038d2fa3b
2023 08 30 refactor ConsoleCli (#5217)
* refactor ConsoleCli to use logging framework

* move things out of ConsoleCli.exec()

* Dont use deprecated method to send req

* move backend out of ConsoleCli.exec()

* Add type annotation

* Remove wrapping Try { } inside of ConsoleCli.exec()

* Remove old debug config flag, use logback to log now

* Add slf4j backend for sttp logging

* Send getversion request server side

* Use V.sttpV

* WIP

* Fix bitcoin-s-cli build

* Restore commonCompilerOpts
2023-09-01 08:23:45 -05:00
Chris Stewart
08e780a884
2023 08 01 issue 5174 (#5176)
* Move methods out of PeerManager.onInitialization()

* Add PersistentPeerData, QueriedPeerData

* Segregate PeerData -> {AttemptToConnectPeerData, PersistentPeerData}, handle the cases differently in managePeerAfterInitialization()

* Remove call to sync() in BitcoinSServerMain

* Fix bug where we were attempting to stop peers that had already had their connections fail

* reduce log level for peer discovery failures
2023-08-04 11:18:27 -05:00
Chris Stewart
5e6caa866f
Implement call to Node.stop() when shutting down BitcoinSServerMain (#5124) 2023-06-29 15:57:46 -05:00
Chris Stewart
b0cf3d8146
Fix race condition between NodeAppConfig.migrate() calls when bitcoin-s.tor.enabled=false (#5120)
* Fix race condition between NodeAppConfig.migrate() calls

* Use Future.traverse()
2023-06-28 14:13:26 -05:00
Chris Stewart
ebe98959ed
Upgrade to scalac 2.13.11 (#5097)
* Upgrade to scalac 2.13.11

* Fix compile issues with scalac 2.13.11
2023-06-08 10:27:39 -05:00
Chris Stewart
4fd7af04ca
Remove check to see if seed exists when loading a wallet, the key manager can initiate the seed if it dne (#5094) 2023-06-06 11:55:57 -05:00
Chris Stewart
d1c9228361
Fix getpeers -> getconnectioncount in cli (#5052) 2023-04-21 05:47:47 -05:00
Chris Stewart
447c6d03de
Implement getconnectioncount rpc (#5048)
* Implement getconnectioncount rpc

* Reduce waits in test, add documentation

* Fix docs

* Empty commit to re-run CI
2023-04-19 16:47:54 -05:00
Chris Stewart
6b03133a34
Fix empty.tail exception occurring on chain block filter / filter headers callbacks (#5021)
* Fix empty.tail exception occurring on chain block filter / filter headers callbacks

* scalafmt
2023-03-23 06:38:42 -05:00
Chris Stewart
e3e1c7f949
Try bumping timeout to 1 second to avoid false positives test failures (#5018)
* Try bumping timeout to 1 second to avoid false positives test failures on DLCWalletBitcoindBackendLoaderTest

* Empty commit to re-run CI

* Empty commit to re-run CI

* Empty commit to re-run CI
2023-03-21 12:29:42 -05:00
Chris Stewart
e993335f03
Improve error logging on server (#4896) 2022-11-22 14:46:24 -06:00
Chris Stewart
7d809bf5df
Remove legacy GUI, this fixes CI merges to master as we no longer use the deprecated notary tool from apple (#4870) 2022-11-01 15:35:18 -05:00
Chris Stewart
24e7bcfd97
Fix race condition in websocket tests for dlc node updates (#4866)
* Fix race condition in websocket tests for dlc node updates

* Empty commit to run CI
2022-10-31 15:53:21 -05:00
benthecarman
1d1af1d52e
Add generate helper function for bitcoind (#4852) 2022-10-19 14:22:30 -05:00
Chris Stewart
2482eb939a
remove v17 bitcoind rpc (#4822)
* remove v17

* fix one error in sign a raw transaction

* try to get BlockchainRpcTest working

* fix MiningRpcTest

* WIP

* Get RawTransactionRpcTest working with v21 of bitcoind

* Fix MiningRpcTest

* Remove println

* Remove prune unit test as i cannot get it to pass on regtest
2022-10-16 12:47:43 -05:00
rorp
de43dadf52
Network notifications (#4774)
* 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>
2022-10-09 07:46:13 -05:00
Chris Stewart
73200b64bf
re-order RPC command order to have commands first that do not depend on tor (#4811) 2022-09-30 17:06:17 -05:00
Chris Stewart
34e023e93f
2022 09 29 handle unordered sigs (#4807)
* 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
2022-09-29 11:43:50 -05:00
Chris Stewart
9c506b639f
Add OrderedSchnorrSignatures, use it in OracleAttestment (#4803)
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase

* Small cleanups

* Add SortedVecFactory

* Fix test case with out of order nonces
2022-09-26 19:35:04 -05:00
Chris Stewart
bcddb015ae
2022 09 12 Filter header and filter websocket events (#4777)
* 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
2022-09-15 20:05:54 -05:00
Chris Stewart
7b7847885e
Attempt to reduce redundant work on startup to speed up start up time (#4764)
* Attempt to reduce redundant work on startup to speed up start up time

* Move dlcConf out of dependentTorConfigs
2022-09-11 13:15:53 -05:00
Chris Stewart
7460dcd255
Parallelize running of individual migrations (#4761) 2022-09-10 15:10:14 -05:00
Chris Stewart
7d9d0c577f
Run scalafmt (#4757) 2022-09-09 14:58:29 -05:00
rorp
16893f999e
DLC connection checks and notifications (#4720)
* DLC connection checks and notifications

* asynchronous connection checks
2022-09-09 14:09:38 -05:00
Chris Stewart
7fe9bdbe35
re-add Compile / fork in server.sbt so we can run appServer from sbt console (#4730) 2022-09-08 10:13:09 -05:00
Chris Stewart
6b432ea509
Emit 2000th header received during IBD (#4719) 2022-09-06 14:24:03 -05:00
Chris Stewart
a36e55c892
Fix patterns I missed when updating logback (#4713) 2022-09-06 10:41:32 -05:00
benthecarman
2cfd6f3591
Allow for custom config file name (#4709) 2022-09-05 16:04:25 -05:00
Chris Stewart
2bf1c9d1a5
Try to debug what is happening on CI with zmq test (#4708)
* Try to debug what is happening on CI

* Turn off logging

* Fix compile errors

* try to add sleep to get zmq started

* Cleanup

* Empty commit
2022-09-05 13:23:10 -05:00