Commit Graph

212 Commits

Author SHA1 Message Date
Chris Stewart
bf4afd63d1 Begin re-introducing parallelism in the wallet to make everything faster (#2705) 2021-02-24 07:10:46 -06:00
Chris Stewart
1a2ddf6a0d Reduce usage of .findAll() (doesn't scale for large dbs). Now pass in… (#2706)
* Reduce usage of .findAll() (doesn't scale for large dbs). Now pass in the specific things we are searching for

* Add timestamps for checking how long it takes to processBlock()
2021-02-21 16:15:50 -06:00
Chris Stewart
b63333327f Allow implicit execution context to be passed in to RescanHandling.findMatches() & RescanHandling.fetchFiltersInRange() (#2704) 2021-02-21 07:14:29 -06:00
Aris
85087b0f70 Refactoring chain (#2662) 2021-02-13 14:10:40 -06:00
Aris
f8694eb097 Fix/typos (#2633)
* Fix typos

* Collection minor fixes

Removes redundant .headOption on options
Replaces .exists(_ == ???) with .contains(???)
Replaces option == None with option.isEmpty
2021-02-07 15:00:25 -06:00
Chris Stewart
8f958bf5d9 Update scalafmt (#2619) 2021-02-03 16:37:12 -06:00
benthecarman
03ca6f617e Optimize filter sync and fetching filter heights (#2568) 2021-01-30 14:56:47 -06:00
Chris Stewart
756bfc4427 2021 01 27 conectionpool (#2578)
* Give connection pool example config

* Get hikari logging working on postgres

* fix 2.12.x

* Bump metrics core to a supported version

* Add hikari-logging and hikari-logging-interval configuration options to turn off/on hikari and schedule how often logs appear

* Turn off hikari logging in the db-commons/reference.conf and add it to appserver/reference.conf

* default the logging to off in scala code

* Make sure connection pool is enabled in db-commons, add default database configuration to website

* Address code review, fix things that didn't need to be changed
2021-01-28 09:44:03 -06:00
benthecarman
fa27fb3fb1 Create BlockSyncState type (#2567) 2021-01-27 14:15:07 -06:00
benthecarman
29bde74cb8 Fix all DAOs to use safeDatabase (#2556) 2021-01-22 16:13:45 -06:00
benthecarman
e10e278aa4 Add walletinfo rpc (#2546)
* Add walletinfo rpc

* Move rootXpub to key manager obj

* Make configuration keys for getinfo the same as the ones in our configuration files

* Cleanup

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-01-22 13:55:21 -06:00
benthecarman
e2ace38a1f Fix rescan to fetch blocks during scan (#2540) 2021-01-22 10:28:53 -06:00
benthecarman
2291bf0eae Create isChange function for wallet (#2535)
* Create isChange function for wallet

* Scaladocs
2021-01-20 12:11:24 -06:00
Chris Stewart
6193af7709 Remove WalletSync.sync() -> WalletSync.syncFullBlocks() (#2522) 2021-01-15 17:05:11 -06:00
Chris Stewart
98ace6f14e 2021 01 02 issue 2457 (#2461)
* WIP

* Get neutrino node with wallet 'receive information about received payments' working again

* Fix compile

* Remove initial sync logic from test case

* Remove sync logic in NeutrinoNodeWithWallet test cases

* Improve logging and rename a few things

* WIP2

* WIP3

* Get NeutrinoNodeWithWallet tests working

* Implement WalletSync, which allows you to sync a wallet from a arbitrary data source

* Get all tests passing again

* Use spv.appConfig in DataMessageHandlerTest rather than caching the config

* Modify cleanup to hopefully get CI passing

* Fix postgres tests by cleaning the table during the destroy phase of the test fixture. This is needed because the same postgres database is shared between tests in the same test suite

* Revert logback-test.xml

* Get sqlite/postgres tests passing pt 2

* syncHeight -> syncDescriptorOpt()

* Add case for genesis block hash in WalletSync

* Fix SpvNodeWithWallet test case to actually test spv functionality

* Remove nodeCallbacks parameters, callbacks should be registered on nodeAppConfig
2021-01-09 09:33:37 -06:00
Chris Stewart
dc73cb26ff Rename wallet.getSyncHeight() -> wallet.getSyncDescriptorOpt(). We don't just use height in the descriptor, the hash is just as valuable for connecting to chains (#2479) 2021-01-07 07:40:30 -06:00
Chris Stewart
4e1a6c69f0 2020 12 18 enable lint options (#2454)
* Enable -Xlint:adapted-args,nullary-unit on our for compile scope

* Add Xlint:infer-any compiler option

* Fix build so test compiler options are actually enabled

* Enable more scalac linting options

* Add '-Xlint:eta-sam'

* Add 'Xlint:inaccessible,Xlint:missing-interpolator'
2021-01-03 08:01:26 -06:00
benthecarman
4a41bacaa0 Use written txDbs in TransactionProcessing (#2449) 2020-12-31 07:39:24 -06:00
Nadav Kohen
493673c68b Outstanding DLC branch diff (#2432) 2020-12-23 18:13:57 -06:00
Ben Carman
8996be43ec Add extra checks for RBF transactions (#2416)
* Add extra checks for RBF transactions

* Move to util function, don't allow CPFP of confirmed txs
2020-12-22 14:12:15 -06:00
Ben Carman
f7671a4f99 Add wallet function to bump fee with CPFP (#2399)
* Add wallet function to bump fee with CPFP

* Add bump fee integration tests
2020-12-21 07:04:01 -06:00
Ben Carman
fcfc3d076f Add wallet function to bump fee with RBF (#2392)
* Add wallet function to bump fee

* Bump sequence number

* Respond to review

* Fix test
2020-12-20 07:43:18 -06:00
Chris Stewart
97d4ec8490 Remove CompatEither, it was needed for historical purposes to support… (#2394)
* Remove CompatEither, it was needed for historical purposes to support Scala 2.11.x

* Revert files from another change
2020-12-18 09:51:28 -06:00
Ben Carman
2c25057fd6 Add get transaction cli command (#2370)
* Add get transaction cli command

* Fix return, add to docs
2020-12-18 07:18:13 -06:00
Ben Carman
cd13bdb77a Rescan Improvements (#2379)
* Rescan Improvements

* Make test use fetchFilters instead
2020-12-18 07:05:59 -06:00
Ben Carman
1225584526 Multi Wallet support (#2345)
* Multi Wallet support

* Fix Oracle tests

* Fix some CI errors

* Increase KeyManagerAppConfig code coverage

* Add test for multiple seeds in seed folder

* Move things in reference.conf files

* Lower key manager coverage requirement

* Fix postgres test issues

* Create DbAppConfig

* Add some docs, fix hardcoded postgres db name

* Clarify db vs schema

* Add character types

* Fix chaindb in conf

* Always copy default seed

* Remove need for driverName config
2020-12-16 17:27:56 -06:00
Nadav Kohen
b7ffea2525 Pulled down work from adaptor-dlc onto master (#2339)
* Pulled down work from adaptor-dlc onto master

* Reverted some accidental deletions

* Removed unused import

* Added scaladocs

* Responded to Ben's review

* Added some scaladocs and invariants

* Responded to chris' review

* Responded to more review

* Added some comments
2020-12-11 17:32:35 -06:00
Ben Carman
e8b4eff734 Have makeOpReturnCommitment use random UTXO selection (#2320) 2020-12-07 13:17:24 -06:00
Ben Carman
fdb2b675e9 Create KeyManagerAppConfig (#2268)
* Create KeyManagerAppConfig

* Fix name

* Use module name
2020-11-19 06:23:26 -06:00
Ben Carman
ec6afbb271 Use same config option for key manager projects (#2252)
* Use same config option for key manager projects

* Use BIP39KeyManager.initialize
2020-11-11 12:18:02 -06:00
Ben Carman
685d5b0273 Let wallet sign PSBTs (#2236)
* Let wallet sign PSBTs

* Add example to docs

* Add logs and test case
2020-11-07 09:25:59 -06:00
Ben Carman
47a38f88db Make aesPassword option for wallet config (#2217)
* Make aesPassword option for wallet config

* Add to docs

* Make AesPassword optional

* Small touchups

* Fix for oracle server

* Fix docs

* Increase code coverage
2020-11-06 07:00:18 -06:00
Ben Carman
606041649d Make BIP 39 password a config option (#2234) 2020-11-05 07:36:02 -06:00
Ben Carman
ca606474cc Fee Provider from config (#2219)
* Fee Provider from config

* Use block targets, add docs

* Add FeeProviderFactory
2020-11-03 09:06:18 -06:00
Ben Carman
9787e89403 Add Wallet State Descriptors (#2157)
* Add Wallet State Descriptors

* Sync blocks while offline w/ bitcoind backend

* Add to WalletDbManagement

* Update db management test

* Respond to review

* Rename function
2020-10-14 14:17:51 -05:00
Ben Carman
fc1557cbe9 Small improvements on FundTransactionHandling (#2143) 2020-10-07 15:39:32 -05:00
Chris Stewart
ade2503702 2020 10 05 redo config (#2121)
* Use absolute paths for resolving configurations

Make log level OFF again

WIP: Move resolution of config into AppConfig.start(), things are totally broken

WIP: Make AppConfig.config private

Get all tests passing again but using absolute path in configuration

* Cherry-pick onto master

* Fix BitcoinSAppConfig configuration keys to use the full path

* Apply code review

* Fix log, move invariant for requiredConfirmations back into the lazy val

* Fix DlcOracleAppConfig to use absolute path
2020-10-05 18:00:30 -05:00
Chris Stewart
9b09b04230 Upgrade to scalac 2.13.3 (#2115) 2020-10-04 07:42:44 -05:00
Ben Carman
09dfd5eb73 Add BIP45 Multisig Purpose (#2103)
* Add BIP45 Multisig Purpose

* Fix multisig purpose, add tests
2020-10-02 10:43:25 -05:00
Ben Carman
ed5228310b Use SubtractFeeFromOutputsFinalizer when sending full utxos (#2072) 2020-10-01 17:32:24 -05:00
Ben Carman
a694ef16b7 Add ability to fully spend utxos (#2063)
* Let RawTxSigner dummy sign transactions

* Add ability to fully spend utxos

* Fix NeutrinoNodeWithWalletTest

* Fix test, simplify call
2020-09-27 08:16:26 -05:00
Ben Carman
11e6b7d9eb Initial SigNet support (#2057) 2020-09-25 12:29:13 -05:00
Ben Carman
bdb80ba639 Only update txo confirmed state if there is a change (#2041) 2020-09-21 17:35:25 -05:00
Ben Carman
3ec3b5d699 Merge pull request #2029
* Add more processing blocks tests

* Add immature coinbase txo state

* Test balance, add doc
2020-09-20 10:39:31 -05:00
Ben Carman
1e3aee55c3 Merge pull request #2019
* Refactor logging to only use grizzled slf4j

* Fix docs

* test travis config change
2020-09-19 14:09:12 -05:00
rorp
c62be8b5f6 Update callbacks for LN support (#1938)
Update callbacks for LN support
2020-09-09 11:02:31 -07:00
Ben Carman
5f7356c526 Fix Two KeyManagers in scope for fundRawTransactionInternal (#1986)
* Fix Two KeyManagers in scope for fundRawTransactionInternal

* Only fetch txs once
2020-09-09 09:40:38 -05:00
Ben Carman
edc80bf13e Don't spend immature coinbases, fix tests (#1981) 2020-09-07 15:08:41 -05:00
Ben Carman
babab55eac Validate key manager matches account db on wallet startup (#1948) 2020-09-02 07:33:40 -05:00
Ben Carman
cc2a118ff0 Only mark utxos as reserved on successful coin selection (#1944)
* Only mark utxos as reserved on successful coin selection

* Add recoverWith

* Fix compile for 2.12.12
2020-09-01 06:34:46 -05:00