Commit Graph

289 Commits

Author SHA1 Message Date
Ben Carman
7ac9cd1525 Use New Oracle TLVs in DLCOracle (#2162)
* Update Oracle to use new TLVs

* Rename things to use new names, scaladoc, small clean ups

* Add descomposition tests, docs, sign numbers outside of range
2020-11-10 06:08:43 -06:00
Ben Carman
c167bc04a0 Analyze PSBT function (#2240)
* Analyze PSBT function

* Add to tests

* Add docs

* Add more functions

* Fix compile issues

* Fix compile issue
2020-11-09 15:15:32 -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
b02eb07cf0 Add listreservedutxos cli command (#2247) 2020-11-07 09:08:33 -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
c8a0a0931a Decode PSBT function (#2237)
* Decode PSBT function

* Add test
2020-11-06 06:56:46 -06:00
Ben Carman
606041649d Make BIP 39 password a config option (#2234) 2020-11-05 07:36:02 -06:00
Chris Stewart
581d46c2c8 2020 11 02 cleanup (#2233)
* Cleanup a bunch of imports in test

* Use @nowarn annotation for testing things that are deprecated

* Fix base58 test

* Cleanup crypto-test

* Use scala collection compat dependency to get access to the @nowarn annotation on scala 2.12.x

* Rework more scala 2.13.x compile failures in chain-test and key-manager-test

* Optimize imports for entire project

* Fix nits
2020-11-03 11:07:04 -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
d7fe2c2ee6 Make GUI auto-update balance (#2197) 2020-10-19 09:49:07 -05: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
d267f66a93 Have api endpoints return json (#2178) 2020-10-13 10:13:57 -05:00
Ben Carman
8d58df8d42 BitcoindRpcConfig Test (#2181) 2020-10-13 06:10:36 -05:00
Ben Carman
128ff7de54 Create fromConfig functions for AppConfigs (#2170)
* Create fromConfig functions for AppConfigs

* Add fromClassPathConfig function
2020-10-12 14:07:45 -05:00
Ben Carman
3bd8764fa8 Add test for server startup (#2171)
* Add test for server startup

* Clear log location property after test
2020-10-12 12:15:27 -05:00
Ben Carman
d54c15d4cb Remove requirement for ZMQ with bitcoind backend (#2137)
* Remove requirement for ZMQ with bitcoind backend

* Add test, move poller to BitcoindRpcBackendUtil

* Add docs & logs, fix niche case

* Use AtomicReference, reset prevCount on failure
2020-10-12 07:59:57 -05:00
Ben Carman
3f066d47e7 Fix NPE and log location on server start up (#2163) 2020-10-10 00:14:04 -05:00
Ben Carman
de99dfe984 Make tx an argument for decoderawtransaction (#2155)
* trivial: Make tx an argument for decoderawtransaction

* docs: Fix help command, add to docs
2020-10-10 00:13:20 -05:00
Chris Stewart
2cad89c1a0 Fix npe exception on oracleServer/run (#2160) 2020-10-08 20:16:00 -05:00
Ben Carman
47388efcc0 Refactor Mains to use common BitcoinSRunner (#2141)
* Refactor Mains to use common BitcoinSRunner

* Give better name
2020-10-08 07:17:48 -05:00
Ben Carman
7b53b02cfa Make ZMQ Listeners typed (#2144) 2020-10-08 01:21:50 -05:00
Ben Carman
c06c323c39 Use Llyod's Oracle recommendations on commitment Signature (#2117) 2020-10-06 18:33:28 -05:00
Ben Carman
ef996adccf Make cli pretty print json (#2130) 2020-10-06 06:36:03 -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
Ben Carman
81a5719450 docs: DLC Oracle Server (#2125)
* docs: DLC Oracle Server

* docs: Add sign event example
2020-10-05 17:05:06 -05:00
Chris Stewart
9b09b04230 Upgrade to scalac 2.13.3 (#2115) 2020-10-04 07:42:44 -05:00
Ben Carman
93852aa438 Add DLC Oracle Server Endpoints (#2105) 2020-10-03 15:24:02 -05:00
Ben Carman
6bd12f1f19 Bitcoind backend on server start up (#2088) 2020-10-02 10:33:24 -05:00
Ben Carman
ad6c2563bd Create Util functions for wallets with a bitcoind backend (#2076)
* Create Util functions for wallets with a bitcoind backend

* Move function, delete reduant function

* Fix imports
2020-09-30 08:50:49 -05:00
Ben Carman
108ffa0716 Create BitcoindRpcAppConfig (#2077)
* Create BitcoindRpcAppConfig

* Fix to lazy val

* Override stop function to not use db

* Add new config options to docs
2020-09-30 07:36:23 -05:00
Ben Carman
805a84a34e Add network specific icons for bitcoin-s (#2067) 2020-09-28 14:51:03 -05:00
Ben Carman
11e6b7d9eb Initial SigNet support (#2057) 2020-09-25 12:29:13 -05:00
Ben Carman
a35b50a9f9 Add missing settings for native packager (#2053) 2020-09-23 17:02:40 -05:00
Ben Carman
1b57cac8ae trivial: Set timezone and print it in logs (#2046) 2020-09-22 14:03:42 -05:00
Ben Carman
2458b36232 trivial: Change default logging level to info (#2043) 2020-09-22 07:31:18 -05:00
Ben Carman
c59b3baf01 Create Cli function for reserving and unreserving utxos (#2035) 2020-09-21 12:37:15 -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
Chris Stewart
76b9577181 Introduce 'FilterSyncMarker' to ChainApi, make it clearier what exact… (#2003)
* Introduce 'FilterSyncMarker' to ChainApi, make it clearier what exactly the (Int,DoubleSha256Digest) tuple is returned from ChainApi.nextBlockHeaderRange()

* Fix doc

* Add scaladoc to FilterSyncMarker

* Rebase onto master, fix conflicts to use FilterSyncMarker
2020-09-11 13:48:40 -05:00
Ben Carman
2806ac8a95 Throw errors that occurr in startup (#1950)
* Throw errors that occurr in startup

* Add testing ability to runMain
2020-09-10 08:11:46 -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
ee85f463f5 Fix RoutesSpec to assert results (#1979) 2020-09-07 15:52:23 -05:00
Chris Stewart
06a06c500e Clean up imports (#1942) 2020-08-31 14:24:09 -05:00
Ben Carman
a5818fd766 Give gui command line arguments (#1931) 2020-08-31 12:25:56 -05:00
Chris Stewart
3ab280a12b Remove AppConfig.initialize() in favor of AppConfig.start() (#1907)
* Remove AppConfig.initialize() in favor of AppConfig.start()

* Fix docs
2020-08-26 16:24:38 -05:00
Ben Carman
34ef07ef5a Create ADT for NodeType instead of booleans (#1901) 2020-08-26 07:28:35 -05:00
Chris Stewart
955978f635 Apply string factory to a bunch of easy things (#1891)
* Apply string factory to a bunch of easy things

* Refactor HDPath, ExtKey, and LnTagPrefix to use StringFactory

* Implemen StringFactory on LnHumanReadablePart, ScriptType, ServiceIdentifier

* Implement StringFactory on AesCrypt, NodeUri, AddressTag, PSBT, TxoState

* Fix failing tests, fix website compile

* Apply StringFactory to all ScriptOperations, ChannelState, Script Parsing
2020-08-25 10:48:37 -05:00
Ben Carman
f468fff7ea Move ChainApi to core (#1888)
* Move Chain Db Reps to core

* Move ChainApi to Core
2020-08-25 07:08:42 -05:00
Ben Carman
304896e171 Move WalletApi to Core (#1890) 2020-08-25 07:05:20 -05:00
Ben Carman
98164bc5e3 Move WalletApi necessities to core (#1886) 2020-08-24 17:26:58 -05:00
Scala Steward
bef9c2648e Update scalafmt-core to 2.6.4 (#1686)
* Update scalafmt-core to 2.6.4

* Format everything

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-08-24 14:24:16 -05:00
Ben Carman
cfde581d0c Move all remaining wallet db representations (#1885) 2020-08-24 13:13:52 -05:00
Chris Stewart
32f03bdf0b 2020 08 21 clean broadcast dao (#1875)
* Clean up code for BroadcastDAO test

* Extend StartStopAsync with BitcoinSAppConfig, create 'CachedAppConfig' test trait, clean up P2PClientTest

* Make MerkleBuffersTest use CachedAppConfig

* Start cleaning up after ourselves in the chainTest test suite

* Cancel background runnable for generating blocks after test case, add nodeAppConfig.stop() to tests in NodeAppConfigTest

* Stop mainnet nodeAppConfig in test as per ben's code review
2020-08-24 11:19:41 -05:00
Ben Carman
2f512364eb Correcly use reference.conf file (#1869)
* Correcly use reference.conf file

* Fix for network specific filter header batch size config option

* Add to other conf files
2020-08-24 06:30:16 -05:00
Ben Carman
9e06b826e1 Move AddressTagDb to Core (#1850)
* Move AddressTagDb to Core

* Move to wallet api package
2020-08-21 16:31:30 -05:00
Ben Carman
d187834e1a Create KeyManager Api & move SpendingInfoDb to core (#1848)
* Create KeyManager Api & move SpendingInfoDb to core

* Fix docs, remove sealed form KeyManagerApi

* Move SpendingInfoDb to core wallet api
2020-08-21 14:37:12 -05:00
Ben Carman
29e380856b Rolling log file location (#1846)
* Rolling log file location

* Fix file name
2020-08-18 14:37:22 -05:00
Ben Carman
cfd6f4fa79 Fix server parsing for send to address (#1819) 2020-08-17 09:49:50 -05:00
Ben Carman
4d46094d72 Add missing route for getaddressinfo (#1834) 2020-08-17 06:27:16 -05:00
Ben Carman
9e8e57505c Fix case of cli command sendwithalgo (#1835) 2020-08-16 16:16:27 -05:00
Ben Carman
6131f29f15 Don't wait for rescan completion to send message (#1836) 2020-08-16 08:46:36 -05:00
Ben Carman
48a7f6f86e Remove default false for useLogbackConf (#1816)
* Remove default false for useLogbackConf

* Fix docs

* Set logging level to WARN for tests
2020-08-14 08:53:07 -05:00
Ben Carman
701afe348a Config CLI option, datadir correctly read from config (#1807)
* Config CLI option, datadir correctly read from config

* Change --config to --conf, add docs
2020-08-13 10:53:25 -05:00
Ben Carman
62e9e08cf6 Address Tagging/Labeling Support from CLI (#1790)
* Address Tagging/Labeling Support from CLI

* Scaladoc
2020-08-12 10:55:15 -05:00
Ben Carman
b3a8f1d76b Make Akka log to file correctly (#1801) 2020-08-12 07:52:51 -05:00
Chris Stewart
ae81dd3bb3 Create more of a project structure in org.bitcoins.core.api, move DbR… (#1799)
* Create more of a project structure in org.bitcoins.core.api, move DbRowAutoInc into the core project

* Get website compiling again
2020-08-12 06:13:23 -05:00
Ben Carman
8c9c95bca8 Bump stop timeout (#1797) 2020-08-11 09:10:06 -05:00
Ben Carman
4ab65abec4 Fix for Wallet confirmed states (#1782)
* Fix for Wallet confirmed states

* Only process if we do not have the header
2020-08-08 08:12:30 -05:00
Ben Carman
0bf0655335 Better return message for bitcoin-s-cli stop (#1777) 2020-08-07 12:31:58 -05:00
Ben Carman
e542a00d19 Callbacks to appconfig (#1740)
* Node Callbacks to appconfig

* Move WalletCallbacks to WalletAppConfig

* Update Docs
2020-08-04 12:27:21 -05:00
Ben Carman
e7b4ec5a1b CLI: Handle non-json responses (#1749) 2020-08-04 07:24:11 -05:00
Chris Stewart
d39613e9b0 2020 07 25 optimize recalc chainwork (#1697)
* Optimize recalc Chainwork

* Typo and warning fixes

* Rename force recalc cli option

* Always update gensis header

* Add config option

* Fix config option

* Add to example config

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-07-31 10:43:04 -05:00
Ben Carman
51d35e24e9 Fix Node Startup Issue (#1683)
* Fix Node Startup Issue

* Small fixes

* Add option to force chain work recalc
2020-07-29 09:37:20 -05:00
Ben Carman
26d5a09532 Move Node type of out Wallet API (#1708)
* Move Node type of out wallet api

* Remove extensions, add scaladocs
2020-07-29 05:57:48 -05:00
Ben Carman
82ba6fc09f Wallet API remove app config (#1706) 2020-07-28 15:19:10 -05:00
Nadav Kohen
faf2e0148a Fix All Loggers! (#1695)
* Fixed logging so that appenders are always started when logging is happening

* Started rolling policy so that file appenders could start in getLoggerImpl
2020-07-28 07:13:38 -05:00
Ben Carman
ece26c08e6 Wallet API move execution context (#1707) 2020-07-28 07:00:59 -05:00
Ben Carman
4abcf3f321 Create HDWalletApi (#1693)
* Create HDWalletApi

* Rename createWallet to createHDWallet, add listDefaultAccountUtxos function

* Change return types to HDWalletApi

* Fix warning
2020-07-27 14:06:48 -05:00
Chris Stewart
87e9a279c6 Move where we call wallet.start() and node.start() to the same place to avoid initializaiton issue 1687 (#1689) 2020-07-21 12:04:29 -05:00
Ben Carman
9a35f16913 Start server before sync (#1682)
* Start server before sync

* Move promise call
2020-07-19 10:40:36 -05:00
Chris Stewart
feb279be9e Remove the akka boiler plate needed to get around issue 1508 (#1657) 2020-07-10 12:39:43 -05:00
Ben Carman
120cca072b Give more descriptive error when there are no peers set (#1652) 2020-07-09 15:28:47 -05:00
Ben Carman
194370622d Move BIP 143 invariant for PSBTs to allow signed transactions (#1631)
* Move BIP143 invariant for PSBTs to allow signed transactions

* Fix RoutesSpec test

* Fix test
2020-07-07 14:36:03 -05:00
Ben Carman
365d98da10 Add extra logs, fix best filter bug (#1624)
* Add extra logs, fix best filter bug

* Fix to work for when filter count != header count

* Put blockheader items baack in place
2020-07-06 11:38:53 -05:00
Ben Carman
fdd5bc9ccc Fix gui theme to correctly color the button bar (#1626) 2020-07-06 11:11:25 -05:00
Ben Carman
9016f0bbca Rescan when UTXOs don't have associated transactions (#1562)
* Rescan for missing utxos

* Move to Wallet.start

* Start and stop wallet threads with wallet

* Fix warning
2020-06-25 07:58:10 -05:00
Scala Steward
ea39f38443 Update scalatest to 3.2.0 (#1592)
* Update scalatest to 3.2.0

* Fix tests to be compatible

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-20 08:46:32 -05:00
Scala Steward
97a4886c6e Update scalafmt-core to 2.6.0 (#1579)
* Update scalafmt-core to 2.6.0

* Upgrade scalafmt, fix all formatting errors

* Scalafmt on 2.12

* fix test

* More fixes

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-19 10:38:12 -05:00
Nadav Kohen
a1d17ab662 Added DLC GUI stuff to a new package in the existing GUI and made a new tab for DLCs (#1590)
Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-18 15:23:53 -05:00
Nadav Kohen
9237074510 Pulled down dlc CLI code (#1589)
* Pulled down dlc CLI code (returns 400 Bad Request when called)

* Added decodeRawTransaction to server

* Moved decoderawtransaction to CoreRoutes

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-18 13:55:17 -05:00
Ben Carman
5319b4c927 Wallet callbacks (#1543)
* Wallet Callbacks

* Move noop to Callback

* Add docs

* Add tests for wallet callbacks

* Use BitcoinAddress instead of AddressDb, improve tests
2020-06-17 17:21:19 -05:00
Chris Stewart
dec503f561 2020 06 12 mv to appconfig (#1553)
* Move hasWallet() to WalletAppConfig

* Move helper methods to create data dstructures in a project to their respective AppConfig file
2020-06-16 12:49:32 -05:00
Nadav Kohen
3912a02f53 Added BlockTimeStamp abstraction for BlockStamps that aren't hashes (#1573)
* Added BlockTimeStamp abstraction for BlockStamps that aren't hashes

* Made BlockStamp and BlockTimeStamp extend StringFactory
2020-06-16 10:54:37 -05:00
Ben Carman
1731bd3163 Callback rework (#1542) 2020-06-15 17:30:08 -05:00
Nadav Kohen
027bd39474 Fixed all walletTest threads not being closed (#1552) 2020-06-15 10:50:53 -05:00
Chris Stewart
c54d6dcbdc 2020 06 09 addr invoice string factory (#1538)
* Implement StringFactory with Address and LnInvoice

* Address code review

* Run scalafmt
2020-06-11 10:44:12 -05:00
Chris Stewart
f9f1e89a07 Break things up in server/Main.scala, allow things to be done asynchr… (#1522)
* Break things up in server/Main.scala, allow things to be done asynchronously where they can be

* Rework Main.scala to have small methods that are used to initialize parts of our infra. Now it doesn't depend on global variables in Main either, they are implictly passed to these helper methods
2020-06-09 07:44:37 -05:00
Chris Stewart
b52ec8b041 Introduced bundle project and created main class that runs server and then gui (#1531)
Co-authored-by: nkohen <nadavk25@gmail.com>
2020-06-08 08:32:38 -05:00
Chris Stewart
32c06cbe81 2020 06 05 mv chainwork calc (#1519)
* Fix Chaindb chainwork Migration

* Move chain work calculation out of node, use the ChainApi returnd by runChainWorkCalc()

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-05 11:04:09 -05:00
Ben Carman
2f53379f16 Add docs for server endpoints (#1505) 2020-06-04 06:41:07 -05:00
Chris Stewart
5aeb8ebdd1 Bump akka to 2.6.4, fix deprecated things (#1374)
* Bump akka to 2.6.4, fix deprecated things

* Bump to 2.6.5 akka

* Clean up imports

* Remove materializer from FeeProviders
2020-05-30 08:49:28 -05:00
Ben Carman
c10d5bc89b Fee Rate Api Support (#1470)
* Fee Rate Api Support

* FeeRateProvider Tests

* Rename folder

* Fix docs
2020-05-29 13:01:20 -05:00
Ben Carman
99db9062ac Add option to correctly use logback config (#1398)
* Logger now uses correct parent logger for all, names appenders correctly

* Set logback to true for tests, rename file

* Fix docs
2020-05-20 15:46:24 -05:00
Ben Carman
b240130c76 Remove GUI unused imports (#1440) 2020-05-18 14:36:45 -05:00
Ben Carman
51fcb793be Add ability to make OP_RETURN commitments (#1417) 2020-05-18 14:27:05 -05:00
Ben Carman
e44a08bd39 Wallet Send with coin selection algorithim (#1409) 2020-05-18 11:26:39 -05:00
Ben Carman
6067991e02 Add bitcoin-s icon, add dark theme to dialogs (#1425) 2020-05-18 11:16:41 -05:00
Nadav Kohen
4eb9980d6b InputInfo Refactor (#1400)
Added OutputReference and introduced public key computation on SPKs

Made InputInfo into an ADT

Made UTXOSpendingInfo use InputInfo

Replaced UTXOSpendingInfo with NewSpendingInfo and got non-test things compiling

Made aliases for (NewSpendingInfo/NewSpendingInfoFull/NewSpendingInfoSingle)[InputInfo]

Got rid of source code mention of UTXOSpendingInfo

sbt compile passes

tests compile

Fixed all coreTest tests

Renamed to UTXOInfo

Some cleanup

Moved redeem script and script witness accessors to companion object

Responded to code review

Added OutputReference and scaladocs

Moved p2pkhPreImageOpt downstream and generalized to hashPreImages

Fixed adding-spks.md

Fixed psbts.md and txbuilder.md

Renamed UTXOInfo

Apply renaming to docs
2020-05-15 11:14:15 -05:00
Ben Carman
867e2a9755 Add list unused addresses call (#1408) 2020-05-12 09:29:02 -05:00
Ben Carman
711f5cb99c Add listFundedAddresses call (#1407) 2020-05-12 07:33:22 -05:00
Ben Carman
721b28aefd Add listSpentAddresses call (#1406) 2020-05-12 07:24:52 -05:00
Ben Carman
c571585b3b Wallet send from outpoints (#1405) 2020-05-12 07:24:36 -05:00
Chris Stewart
40c4af93a7 Modify gui background color to be same as our website (#1404) 2020-05-09 08:03:29 -05:00
Chris Stewart
83b6a74b18 Add rpcport configuration options in both bitcoin-s.conf and as a command line parameter (#1387)
Implement ability to specify rpcport with bitcoin-s-cli
2020-05-04 19:09:32 -05:00
Nadav Kohen
a503441619 Crypto Project Refactor (#1380)
* Added crypto project and decoupled BitcoinSLogger from NetworkElement

Decoupled BitcoinSLogger from Factory

Moved NetworkElement into crypto project

Moved Factory and BitcoinSUtil (renamed to BytesUtil) to crypto project

Moved MaskedToString to crypto project

Added BytesUtil to imports and cleaned up CryptoUtil.recoverPoint

Moved the rest of crypto stuff to the crypto project

Moved crypto tests to crypto-test project

* Added documentation for crypto project
2020-04-30 12:34:53 -05:00
Ben Carman
90030719e5 Log correct type of node sync (#1384)
* Log correct type of node sync

* Fix stopped node logs
2020-04-30 12:10:48 -05:00
Ben Carman
6d7685b76e Add wallet creation time for rescans (#1353)
* Add wallet creation time for rescans

* Fix docs

* Clean up and add test

* Remove account bday

* Fix compile issue and docs

* Add more chain handler tests

* Use Instant over Long, add docs

* Fix docs
2020-04-29 09:49:41 -05:00
Ben Carman
4234561db9 Remove Unlocked vs Locked Wallet distinction (#1379)
* Remove Unlocked vs Locked Wallet distinction

* Add back TODO comment
2020-04-28 13:58:14 -05:00
Ben Carman
37c62369eb Batch processing compact filters (#1363)
* Batch processing compact filters

* Use one vector, rename param

* Fix compile issue on older versions

* Process sequentially
2020-04-26 09:34:41 -05:00
Chris Stewart
4c3f6f8e67 2020 04 08 multi db dao (#1355)
* Implement Slick's multi database support via our DAOs

WIP2 work on chain project

WIP make JdbcProfieComponent so we have a common JdbcProfile

WIP2

Clean up a few things

WIP got CRUDAutoInc compiling

Get closer to everything compiling in the chain project

Begin moving database code into JdbcProfileComponent

WIP source compiling

Get dbCommonsTest/ test cases passing

Get rest of tests compiling and passing

* Rebase onto master, fix conflicts

* Run scalafmt

* Run scalafmt again

* Cleanup a few compiler warnings by adding type annotations to thigns

* Explicitly cast tables where they are needed in the wallet project where we need TableQuery for foreignkey / joins in slick

* Redo definition of 'table' to use the profile.api.TableQuery in scope

* Rename all *Table.scala files to *Db.scala

* First crack at address ben's code review

* Fix docs compile issue

* Fixed casting (#30)

* Fixed AppConfig casting

* Fixed TableQuery casting in DbManagement subtypes

* Fixed casts in DAOs relating to internal types

* Address nadav's code review, move JdbcProfileComponent into it's own file

* Remove unused listTables() method

Co-authored-by: Nadav Kohen <nadavk25@gmail.com>
2020-04-25 11:28:58 -05:00
Ben Carman
3d26ad8f34 Rescan from account (#1348) 2020-04-24 09:37:12 -05:00
Ben Carman
b83d447e67 Fix sendrawtransaction output again woops 2020-04-22 11:45:56 -05:00
Ben Carman
5ff9bf7839 Change sendrawtransaction return to be just txId (#1354) 2020-04-22 08:01:56 -05:00
Ben Carman
56babfd083 Fix test 2020-04-21 14:38:57 -05:00
Ben Carman
b16b44bb8d Past tense 2020-04-21 13:23:07 -05:00
Ben Carman
39088475e3 Add sendrawtransaction CLI and Api commands 2020-04-21 13:14:02 -05:00
Nadav Kohen
ea4a5e0c42 Increased test coverage by 0.97% (#1343) 2020-04-20 12:53:51 -05:00
Ben Carman
b0150f006d Merge pull request #1316 from benthecarman/dark-mode-gui
Dark mode GUI
2020-04-13 11:42:17 -05:00
Ben Carman
aa8a2e14a6 Move Json Reader, Writers, and Serializers to App Commons (#1328)
* Move Json Reader, Writers, and Serializers to App Commons

* Move app-commons outside of app/
2020-04-10 14:33:37 -05:00
Chris Stewart
76a3edd0af 2020 04 02 get new address queue (#1299)
* WIP: Build queue for getnewaddress

* Implement background thread to process requests to getNewAddress so that we fix issue 1009 with it's async issues

* Run scalafmt

* Replace the mutable.ArrayBuffer in AddressHandling with ConcurrentLinkedQueue

* Put FundTransactionhandling.fundRawTransactionInternal's call to getNewChangeAddress() into the for expression so we don't generate an address when the funding of the transaction fails when selecting utxos

* Move thread initialization out of method

* Switch to using ArrayBlockingQueue, which will block thread with .take() so we don't need to loop constantly, add 'addressQueueSize' and 'addressQueueTimeout' configurations

* Update wallet-test/src/test/scala/org/bitcoins/wallet/AddressHandlingTest.scala

Co-Authored-By: rorp <rorp@users.noreply.github.com>

* Add error handling to return the failed future if the queue is full, add a unit test for when the queue is full

* Run scalafmt

* Rebase

* Add scaladoc for throwing an exception

* Run scalafmt again

Co-authored-by: rorp <rorp@users.noreply.github.com>
2020-04-10 14:19:39 -05:00
Ben Carman
0532d97ae5 Fix Block Header Callback (#1331) 2020-04-10 13:47:23 -05:00
Ben Carman
172eef84ca Set statusLabel.text 2020-04-09 12:06:29 -05:00
Ben Carman
b3250dcfba Update TxoState for transactions after they've been confirmed (#1178)
* Add onBlockHeadersReceived NodeCallback

* Add requiredConfirmations config option

* Update TxoState for transactions after they've been confirmed

* Response to review

* Fix compile issue
2020-04-08 16:51:17 -05:00
Ben Carman
09399f1349 Respond to review 2020-04-07 17:16:14 -05:00
Ben Carman
70d29050f8 Dark mode GUI 2020-04-07 16:06:55 -05:00
Ben Carman
c2a0051411 Network specific filterHeaderBatchSize (#1286)
* Network specific filterHeaderBatchSize

* Catch correct exceptions

* Add filter-header-batch-size-regtest to example configs
2020-04-03 17:36:29 -05:00
Ben Carman
402b9c9f3a Add CLI commands for current wallet apis (#1291) 2020-04-03 17:18:34 -05:00
Ben Carman
7326fd5035 Change NodeCallbacks to Future[Unit] s (#1206)
* Change NodeCallbacks to Future[Unit] s

* Fix compile issue

* Change try to future

* Change Future.sucessful(()) to FutureUtil.unit

* Callback failure handling, callback docs

* Create functions for executing callbacks, make merkleblock a future

* Convert MerkleBuffersTest to BitcoinSAsyncTest

* Fix compiler errors

* Reorder UpdateBloomFilter tests so that txFromWalletP is a success for both calls and the other test does not wait on the promise to complete
2020-04-03 08:57:41 -05:00
Ben Carman
29eb6c2e05 Wallet Transaction Tracking (#1197)
* Incoming and Outgoing Transaction Tables

* Remove script sigs for witness txs

* Create parent tx_table for incoming and outgoing txs

* Response to review

* Use isCloseEnough

* Fix test

* Fix rebase error

* Test that tx is tracking all sats correctly
2020-04-02 06:55:09 -05:00
Nadav Kohen
c31a4a3f8a Constructed simple Bitcoin-S wallet GUI (#1285)
* Constructed simple Bitcoin-S wallet GUI

* Added note about bitcoin-s server in doc

* Removed wallet dep from gui

* Replaced lambdas with constructors for compatibility with scala 2.11

* Fixed after rebase
2020-03-31 14:30:24 -05:00
Ben Carman
47c2bc08c4 Merge pull request #1268 from benthecarman/cli-stop
CLI command to stop node
2020-03-30 12:43:00 -05:00
Ben Carman
0bf4d2b51b Merge pull request #1273 from benthecarman/custom-fee-rate-sendtoaddr
Custom fee rate for wallet sends
2020-03-30 12:31:52 -05:00
Ben Carman
e9d261382d Fix CLI commands (#1271) 2020-03-28 08:53:31 -05:00
Ben Carman
2e5c3f1866 Terminate not reliant on node.stop 2020-03-25 13:48:13 -05:00
Ben Carman
5e4d23d562 Custom fee rate for wallet sends 2020-03-25 11:23:12 -05:00
Ben Carman
318c3a83df CLI command to stop node 2020-03-23 16:57:47 -05:00
Ben Carman
a286283aa4 CLI help message include commands and their arguments (#1254) 2020-03-19 08:04:56 -05:00
Ben Carman
fb4bf84891 Remove requirement for sats parameter (#1190) 2020-03-03 08:59:25 -06:00
Ben Carman
77674a3ca8 Allow getbalance to return in sats 2020-02-27 14:18:38 -06:00
Chris Stewart
03cfbc0803 2020 02 21 datadir configurable (#1156)
* Make it so that you can pass in the datadir from the command line

* Add example on website

* implement ben's solution
2020-02-24 09:50:40 -06:00
Nadav Kohen
7169455eff Got rid of warning messages! (#1133)
* Got rid of warning messages!

* Reverted collection conversion changes because scala 2.11 is dumb
2020-02-19 08:02:33 -06:00