Commit Graph

584 Commits

Author SHA1 Message Date
Chris Stewart
f280f35431
Replace Future[Wallet] -> Wallet parameter in {BitcoinSWalletTest, BitcoindRpcBackendUtil} (#5796) 2024-11-30 09:04:14 -06:00
Chris Stewart
dbdad48413
wallet: Remove unused wallet configurations (#5789) 2024-11-26 15:20:13 -06:00
Chris Stewart
c6917b296b
config: Rename config option bitcoin-s.wallet.defaultAccountType -> bitcoin-s.wallet.purpose (#5783) 2024-11-24 08:16:18 -06:00
Chris Stewart
345ab017e5
testkit: Randomize defaultAccountType (purpose) in tests (#5775)
* testkit: Randomize defaultAccountType (purpose) in tests

* Remove redundant defaultAccountType settings

* scalafmt

* Fix ProcessBlockTest for nested-segwit purposes

* Fix dlcWalletTest
2024-11-22 11:07:13 -06:00
Chris Stewart
d8ad023254
wallet: Implement taproot keypath handling in the wallet (#5772) 2024-11-20 11:16:27 -06:00
Chris Stewart
80be2f5989
2024 11 15 partialsig typeparam (#5770)
* Add DigitalSignature type param to PartialSignature

* Remove isDummySignature
2024-11-18 09:15:33 -06:00
Chris Stewart
e69e1e5ad1
2024 10 31 digitalsignature (#5752)
* Add DigitalSignature, extend it with ECDigitaSignature,SchnorrDigitalSignature

* WIP: Remove EmptyDigitalSignature case object in favor of val

* Fix byte representation of ECDigitalSignature.emptyDigitalSignature

* Simplify names to ECDigitalSignature.{empty, dummy, dummyLowR}

* Fix docs
2024-11-01 11:46:26 -05:00
Chris Stewart
f75a52b521
Refactor TransactionProcessing.processTransaction() to use BlockHashWithConfs (#5744)
* Refactor TransactionProcessing.processTransaction() to use BlockHashWithConfs

Create WalletUtil.getBlockHashWithConfs(), use it in various places through the codebase

* Fix docs
2024-10-28 12:52:53 -05:00
Chris Stewart
29f10d046c
Turn on -Xlint (#5728)
Get entire codebase compiling

Fix DLCDAO

Revert .jvmopts

Finish rebase
2024-10-24 06:59:50 -05:00
Chris Stewart
65e67287f8
2024 10 21 Replace Future.sequence() usage with Future.traverse() (#5732)
* Use more Future.traverse()

* More Future.traverse()
2024-10-22 16:57:23 -05:00
Chris Stewart
84aba7e349
Remove test case specific fixture setup in chainTest, revert to just using test suite specific fixtures (#5712) 2024-10-15 14:07:30 -05:00
Chris Stewart
f85953e527
2024 10 13 rm bitcoind v25 support (#5707)
* Remove support for bitcoind v25

* Remove bitcoind-rpc.sbt support for v25
2024-10-13 11:07:46 -05:00
Chris Stewart
38f0f4d692
2024 10 07 v28 bitcoind (#5696)
* Update to bitcoind v28

* Add macOS arm64 hash

* Add 28.0 version for windows

* Fix windows hash

* Replace 'port' with 'bind' in bitcoin.conf

* Fix BitcoindConfig.bind, add -deprecatedrpc=warnings

* Add version specific warnings handling for V28

* Add pattern matching based on version to support new json format for warnings fields in Info RPCs

* Fix pattern match on V28

* Remove infinite loop w/ 'getnetworkinfo' when determing the version of a BitcoindRpcClient

* Pin lndRpcTest to bitcoind v27 until v28 is supported

* Add mempoolconflicts to 'gettransaction' RPC

* init 'gethdkeys' rpc

* WIP: createwalletdescriptor

* Get createwalletdescriptor test passing

* Revert files
2024-10-13 09:05:14 -05:00
Chris Stewart
4471f74ccf
Add error field toImportDescriptorResult, move BitcoindException to app-commons (#5705)
* Add error field to ImportDescriptorResult, move BitcoindException to app-commons

* Fix docs
2024-10-12 09:49:42 -05:00
Chris Stewart
2d87129978
Reduce BitcoindRpcTestUtil.awaitConnection() interval from 10.second -> 1.second (#5703) 2024-10-10 14:40:26 -05:00
Chris Stewart
52c0625ba9
2024 09 30 dlcwallet has a wallet (#5692)
* refactor: Rework codebase so that DLCWallet has-a instance of Wallet rather than is-a via inheritance

* Fix cast

* Fix RescanHandling in DLCWallet

* Remove default implementation of WalletApi.broadcastTransaction()

* fix broadcast callback for DLCWallet

* Add DLCWalletDAOs.fromDLCAppConfig()

* Fix scaladoc for AddressHandlingApi.getUnusedAddress
2024-10-01 13:29:58 -05:00
Chris Stewart
13a895efe9
2024 09 24 simplify wallet (#5685)
* WIP: Simplify wallet

# Conflicts:
#	fee-provider/src/main/scala/org/bitcoins/feeprovider/FeeProviderFactory.scala

# Conflicts:
#	wallet/src/main/scala/org/bitcoins/wallet/Wallet.scala

* Get walletTest/test passing

* Remove WalletApi.{start(),stop()}

 Conflicts:
	core/src/main/scala/org/bitcoins/core/api/wallet/WalletApi.scala
	wallet/src/main/scala/org/bitcoins/wallet/Wallet.scala
	wallet/src/main/scala/org/bitcoins/wallet/WalletHolder.scala

* Cleanup RescanDLCTest

* Move checkRootAccount into AccountHandling.scala

* Fix rebase

* Fix docs
2024-09-27 13:40:29 -05:00
Chris Stewart
e087b174c5
Move RandomFeeProvider to src (#5684)
* Move RandomFeeProvider to src

* Fix comment
2024-09-24 15:45:31 -05:00
Chris Stewart
d17934f17f
Add SendFundsHandlingApi, remove HDWalletApi (#5680)
* Begin moving methods out of HDWalletApi

* Add SendFundsHandlingApi, remove HDWalletApi

* Fix docs

* Move makeOpReturnCommitment() to SendFundsHandlingApi

* Remove MockWalletApi

* Cleanup

* Fix RoutesSpec

* Revert logback-test.xml
2024-09-22 09:32:01 -05:00
Chris Stewart
8cfd5e8d6b
2024 09 19 address handling refactor (#5679)
* wallet: Create has-a relationship for AddressHandling rather than is-a

* Fix infinite loop in AccountHandlingApi.getNewAddress(account)

* Fix appServerTest

* Revert Server.scala
2024-09-21 11:41:57 -05:00
Chris Stewart
8c5d685953
Refactor codebase to have has-a relationship with RescanHandling rather than is-a (#5675)
* Refactor codebase to have has-a relationship with RescanHandling rather than is-a

get everything compiling

Get all tests passing

* Revert and clean up files

* Fix docs
2024-09-19 09:46:56 -05:00
Chris Stewart
625e790477
Rework TransactionProcessing to be a has-a relationship rather than is-a relationship in the codebase (#5659)
Refactor TransactionProcessing into case class

Get walletTest/test passing

DLCWallet WIP

Get dlcWalletTest/test passing

Small cleanups

Fix RoutesSpec gettransaction unit test

revert logback-test.xml

cleanup
2024-09-18 12:51:21 -05:00
Chris Stewart
7d8dd2bc0a
refactor: Provide DLCWalletUtil.verifyProperlySetTxIds() with the contractId (#5657) 2024-09-07 16:21:16 -05:00
Chris Stewart
feeb2618d6
Move DLCDAOs to src (#5652) 2024-08-28 06:56:28 -05:00
Chris Stewart
2021f1f111
2024 08 13 walletholder appserver refactor (#5639)
* Implement creatnewaccount rpc

# Conflicts:
#	app-commons/src/main/scala/org/bitcoins/commons/serializers/Picklers.scala
#	app/cli/src/main/scala/org/bitcoins/cli/ConsoleCli.scala
#	app/server-test/src/test/scala/org/bitcoins/server/WalletRoutesSpec.scala

* Get WalletRoutesSpec createnewaccount unit test passing

* Rename HDPurposes -> HDPurpose

* Implement ConsoleCli arg, change HDPurpose json serialization to be a json string instead of a num

* Refactor BitcoinSServerMain to use return Unit rather than WalletHolder

* Generate block in sync flag unit test

* Empty commit to re-run CI
2024-08-15 10:25:14 -05:00
Chris Stewart
41fab3dfd2
2024 08 07 createnewaccount rpc (#5638)
* Implement creatnewaccount rpc

* Get WalletRoutesSpec createnewaccount unit test passing

* Rename HDPurposes -> HDPurpose

* Fix docs

* Implement ConsoleCli arg, change HDPurpose json serialization to be a json string instead of a num
2024-08-13 10:32:03 -05:00
Chris Stewart
0eb1788226
Refactor WalletApi.createNewAccount to not use KeyManagerParams (#5635) 2024-08-10 15:17:35 -07:00
Chris Stewart
38850d22e3
2024 07 31 bitcoind callbacks (#5631)
* Add NodeApiCallbacks

* Add BitcoindCallbacks

* Add BitcoindRpcAppConfig

* fix docs

* Add helper method for construction

* Add helper constructor method to avoid explicitly passing BitcoindRpcAppConfig parameter to BitcoindRpcClient when we have a BitcoindInstanceLocal

* Fix docs
2024-08-02 07:43:24 -07:00
Chris Stewart
f5adc331f1
Move WalletDAOs to src (#5626) 2024-07-23 14:48:15 -05:00
Chris Stewart
a6b7fada50
Get rest of codebase compiling with -Xsource:3 (#5592) 2024-05-11 14:13:36 -05:00
Chris Stewart
9fe67bbdbe
Remove remaining 2.13 specific code as 2.13.x is the only compiler version supported (#5576)
Fix compile

Remove compat
2024-05-09 09:05:07 -05:00
Chris Stewart
cb3fbe523a
Rework BitcoindRpcTestUtil.getBinary() to match major and minor versions of bitcoind binary when possible (#5569) 2024-05-06 13:00:07 -05:00
Chris Stewart
7ed2b8801a
2024 04 30 upgrade eclair v0.10.0 (#5557)
* Fix open, audit commands for v0.10.0

* Get all unit tests passing

* Add logger.error() to try to debug channel state

* Try adding delay to see if dual funding process can complete before we generate blocks

* scalafmt

* Try bumping number of blocks generated

* Try disabling dual funding

* Cleanup
2024-04-30 14:25:50 -05:00
Chris Stewart
7ee749adcb
2024 04 29 eclair upgrade v0.9.0 (#5556)
* Rework EclairRpcTestUtil.shutdown() to shutdown eclair/bitcoind separately

* Fix keysend test

* Add new eclair websocket events

* Empty commit to re-run CI

* First bug where we weren't shutting down a bitcoind in eclairRpcTest
2024-04-30 07:36:36 -05:00
Chris Stewart
819a047d1e
Add support for lnd 0.17.5-beta (#5554)
* Add support for lnd 0.17.5-beta

Switch Lnd fixture back to BitcoindVersion.newest

Fix linux build

Update lnd windows hash

Fix lnd mac intel hash

* Update proto files

* Revert changes that removed mapping for numeric UInt32, UInt64 types

* Fix version
2024-04-29 13:04:29 -05:00
Chris Stewart
6543b261c4
Implement bitcoind RPC 27.0 (#5552)
* Add bitcoind 27.0

* Fix linux, windows hashes

* Add BitcoindV27RpcClient

* Switch BitcoindVersion.newest = V27

* Try downgrading lndRpcTest to use V26 in tests

* Make pattern matching against 'bitcoind --version' more resilient for new versions of bitcoind

* Add awaitDisconnect() to BitcoindRpcTestUtil.disconnectNodes(), fix flaky v2 connection in unit test
2024-04-28 13:16:39 -05:00
Chris Stewart
7ef6086673
Implement bitcoind RPC 26.x (#5550)
* Get build started for 26.1

* Start introducing v26 data structures

* Switch BitcoindVersion.newest = V26

* Fix GetTxOutSetInfoResult to use hash_serialized_3

* Fix WalletRpcTest

* Refactor PeerInfoResponse to add transport_protocol_type and session_id fields in v25

* Add ServiceIdentifier.NODE_P2P_V2, add support for v2transport to addnode, add default config setting for bitcoind to have v2transport=1 in test framework, add unit test to make sure we can establish a v2 connection

* Remove V20AssortedRpc

* Add loadtxoutset

* Implement getchainstates

* Add getprioritisedtransactions

* Add getaddrmaninfo

* Add importmempool

* Cleanup println
2024-04-27 14:51:45 -05:00
Chris Stewart
5dc5cca9cf
2024 04 24 rm v24 (#5549)
* WIP

* Fix simulaterawtransaction test

* Remove unneeded AdressInfoResult data strutures for versions of bitcoind pre-v21

* Remove v24

* Remove support for v24 bitcoind from bitcoind-rpc.sbt

* Fix tests

* Fix UtilRpcTest

* Fix teardown of bitcoind

* scalafmt
2024-04-26 11:58:55 -05:00
Chris Stewart
1d42de0977
Make wallet.dat be the default wallet name for bitcoind in our codebase (#5543)
* Make 'wallet.dat' be the default wallet name in our codebase

* Fix MultiWalletRpcTest
2024-04-25 06:51:39 -05:00
Chris Stewart
23e32652f3
Implement bitcoind 25.2 (#5540)
* Implement downloading of bitcoind 25.2

* Add aarch64 hash

* Update x86 macos hash, windows hash

* WIP: scanblocks RPC

* Get in progress scanblocks state working

* Get scanblocks start request working

* Fix BitcoindRpcTestUtil.signRawTransaction

* Implement scanblocks abort

* Remove println

* Switch newest version of bitcoind to v25

* Fix BitcoindV25RpcClient.version

* move decodescript test to WalletRpcTest, rework decodescript test to use descriptors,  fix LoadWalletResult

* Empty commit to run CI

* sendrawtransaction maxburnamount param

* Modify testmempoolaccept RPC return type to have two new fields for fee information

* Add test for base too
2024-04-23 17:26:23 -05:00
Chris Stewart
68d267ab8c
2024 04 21 bitcoindrpc testfixtures (#5539)
* Get MiningRpcTest, MessageRpcTest using test fitures

* Remove MultisigRpcTest, move test case to WalletRpcTest

* WIP: P2PRpcTest with fixtures

* Get P2PRpcTest working, comment out test cases that require unconnected nodes for now

* upgrade UtilRpcTest, RawTransactionRpcTest to use test fixture

* Upgrade UTXORpcTest to use test fixtures

* Create DisconnectedPeersRpcTest, create disconnected test fixtures for it

* Remove PreciousBlockRpcTest suite, move test into DisconnectedPeersRpcTest

* Remove UtilRpcTest, move test cases into other files

* Fix unit tests

* Fix rebase
2024-04-22 07:47:00 -05:00
Chris Stewart
f7adb6264e
Remove support for 23.x of bitcoind (#5538)
* Remove support for 23.x of bitcoind

* Remove duplicate test

* Fix compile

* Move unit bech32m unit test earlier in WalletRpcTest

* Make wallet name unique in WalletRpcTest
2024-04-22 05:50:32 -05:00
Chris Stewart
7b3463229f
2024 04 21 Remove BitcoindV22RpcClient (#5537)
* WIP: Remove v22

* Remove TestMempoolAcceptRpc, move it into MempoolRpc

* Remove downloading of bitcoind v22 from bitcoind-rpc.sbt

* move test case above where other test cases create wallets

* Remove duplicate test

* Remove duplicate test
2024-04-21 12:24:09 -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
9442dba217
Remove support for v21 of bitcoind (#5496)
* Remove support for v21 of bitcoind

* WIP: Remove deprecated rpcs wit legacy wallets

* WIP: Work up to importdescriptor

* Get low-r test case passing

* Simplify test case

* Remove BitcoindV21RpcClientTest and move test cases to BitcoindV24RpcClientTest

* Remove RpcTransactionRpcTest that only works on legacy wallet

* Fix MempoolRpcTest

* Delete MultisigRpcTest that depends on legacy wallet

* Get WalletRpcTest passing, ignore keypoolrefill test case for now until https://github.com/bitcoin/bitcoin/issues/29924 is resolved
2024-04-20 16:57:30 -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
177542a13c
Remove grizzled.sl4fj was its no longer maintained (#5482) 2024-03-18 16:48:58 -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
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
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