Commit Graph

214 Commits

Author SHA1 Message Date
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
Chris Stewart
792da6e92f Output logger configuration on startup now (#1814)
* Output logger configuration on startup now

* Remove core-test/logback-test.xml and core/common-logback.xml, consolidate and move them into testkit/src/main/resources/logback.xml

* Add comment for logging configuration
2020-08-13 12:36:42 -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
rorp
628fd80d30 Implement Wallet.listTransactions() (#1744) 2020-08-05 07:21:12 -07: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
0ece51379e CRUD Test suite + updateAll improvements (#1618)
* CRUD Tests

* Remove some hard coded values

* DeleteAll test optimization

* Make deleteAll transactional

* Fix deleteAll test
2020-07-30 10:10:56 -05:00
Ben Carman
82ba6fc09f Wallet API remove app config (#1706) 2020-07-28 15:19:10 -05:00
Ben Carman
ecd3449100 Address Tagging Attempt 2 (#1320)
* Address & UTXO tagging

* Fix docs

* Remove useless function, improve docs

* Fix rebase errors

* Rebase fixes

* Fix docs

* Fix small test errors

* Fix Postgres migration

* Fix postgres
2020-07-08 14:38:39 -05:00
Ben Carman
1957b0508c Rework signing logic to take full funding transaction (#1560) 2020-06-25 16:10:36 -05:00
Nadav Kohen
b92a93c912 ScriptSignature from P2WSH Witness (#1605) 2020-06-24 15:44:16 -05:00
Ben Carman
f1b9e312a3 Cap the amount of threads an actor system can spin up to 2 in tests (#1578)
* Cap the amount of threads an actor system can spin up to 2 in tests

* Add limits for internal dispatcher and default blocking io dispatcher

* Fix config

* Increase thread count to 2, remove unneeded lines
2020-06-22 14:05:21 -05:00
Ben Carman
cd594ab069 AppConfig Start Interface (#1598)
* AppConfig Start Interface

* Use StartStop interface
2020-06-21 09:33:43 -05:00
Ben Carman
5fba40a210 Add tests that NodeCallbacks are executed (#1582)
* Add tests that NodeCallbacks are executed

* Respond to review

* Rebase fixes

* Formatting changes

* Formatting
2020-06-20 08:47:51 -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
35822f4f33 Refactored to allow support and disabling of RBF (#1588)
Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-18 13:23:14 -05:00
Chris Stewart
ba0f38ccf6 2020 06 14 wallet root accounts (#1556)
* Implement unit test cases for initializing a wallet twice, and failing with an exception when we initialize a wallet with a different key-manager

* Use bip39PasswordOpt cached in the WalletUnitTest suite

* Turn off logging

* Run scalafmt

* Turn log level back to WARN

* Run scalafmt
2020-06-17 15:11:42 -05:00
Nadav Kohen
914c905bd7 Lots of misc. improvements from dlc branch (#1583) 2020-06-17 14:34:01 -05:00
Nadav Kohen
e5bd6e53a3 Added compile scope scalafmtCheck to travis runs (#1563) 2020-06-16 15:16:43 -05:00
Chris Stewart
1753f53fd1 Make it so wallet fixtures take a bip39PasswordOpt as a paramter (#1555)
* Make it so wallet fixtures take a bip39PasswordOpt as a paramter

* Fix doc
2020-06-16 10:45:41 -05:00
Nadav Kohen
baf49b7452 Schnorr Data Structures (#1564)
* Pulled down crypto things from dlc branch including: Schnorr data structures, Schnorr Bouncy Castle implementation, FieldElement, and tests for these things

* Call fromValidHex in CryptoUtil
2020-06-16 09:52:45 -05:00
Nadav Kohen
027bd39474 Fixed all walletTest threads not being closed (#1552) 2020-06-15 10:50:53 -05:00
Chris Stewart
6c20a06b45 Change ChainApi.getBestFilterHeader() return type to Future[Option[Co… (#1550)
* Change ChainApi.getBestFilterHeader() return type to Future[Option[CompactFilterHeaderDb]] to resolve issue 1549

* Run scalafmt
2020-06-13 17:01:51 -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
Ben Carman
a236073555 Optimize and Clean up WalletRpcTest (#1511) 2020-06-08 14:13:01 -05:00
Ben Carman
34255d8de7 Make Golomb Filter Test run in parallel (#1512) 2020-06-04 16:23:34 -05:00
Ben Carman
61d9f0efba Implement best block hash correctly (#1452)
* Implement best block hash correctly

* Handle no common history

* Fix getBlockProof to be BigInt instead of UInt32

* Fix warnings

* Make get best filter use chainwork

* Remove unused function, test isMissingChainWork

* Fix comparisons for chain work in sql

* Fix migrations from rebase

* Fix CI error

* Fix postgresql
2020-06-04 12:05:10 -05:00
Ben Carman
1dd6025b9d Testkit wallet with bitcoind uses bitcoind as api (#1499)
* Testkit wallet with bitcoind uses bitcoind as api

* Fix docs
2020-06-03 14:05:22 -05:00
rorp
823a392e98 PostgreSQL support (#1315) 2020-06-02 16:37:48 -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
Chris Stewart
fd67109d54 Bump scodec to 1.14 (#1489) 2020-05-30 07:53:11 -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
Chris Stewart
ccbc68d668 Add -Xfatal-warnings on Scala 2.13 (#1483)
* Add -Xfatal-warnings on Scala 2.13

* Turn off -Xfatal-warnings in docs/
2020-05-29 06:21:56 -05:00
rorp
932c7ede76 Upgrade Eclair to v0.4 (#1421)
* Upgrade Eclair to v0.4

* fix test binary

* logging

* unquote paths

* fix eclair-node.sh

* OSX fix

* cleanup
2020-05-28 10:50:57 -05:00
Nadav Kohen
bc5953b6c8 Rework Standard Finalizer (into pieces) (#1473)
* Made the standard non-interactive tx finalizer simple using composition of its (reusable) pieces

* Responded to code review and made minor improvements

* Fixed docs
2020-05-27 18:05:37 -05:00
Ben Carman
bbff8af1be Fix FeeUnit match not being exhaustive (#1472) 2020-05-27 06:06:06 -05:00
Nadav Kohen
dfd3353cc4 TxBuilder Refactor (#1426)
* Refactored Transaction

Created RawTxBuilder

Created RawTxFinalizer as layer on top of RawTxBuilder

Introduced RawTxSigner and replaced TxBuilder!

Deleted TxBuilder!

* fixed things after rebase

* Made RawTxBuilder compatible with older versions of scala

* Began responding to review

* Made Finalizer take a Builder rather than the other way around

* Added composition for finalizers

* Ran scalafmt

* Updated txbuilder example documentation

* Moved tests from old TxBuilderTest files to relevant new test files

* Added scaladocs
2020-05-21 09:47:08 -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
Chris Stewart
c26ef26d57 2020 05 19 improve test performance (#1449)
* Reduce number of property based tests on BIP32PathTest and add a Future to NetworkPayloadTest's property based tests so it hopefully runs faster on CI

* Run scalafmt

* Make a few more property based tests async

* Make forAllParallel, refactor some test cases to use it

* Make BlockMessageTest async

* Bump timeout
2020-05-20 06:55:36 -05:00
Ben Carman
4942315c9f Fix allowing BytesToPushOntoStack(0) (#1448) 2020-05-19 16:52:58 -05:00
Nadav Kohen
f2fb27dbe3 Fixed buggy type inference on Gen.frequency by explicitly passing in type parameter (#1439) 2020-05-18 14:56:57 -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
Chris Stewart
65f21acbf8 2020 05 11 bech32 addr tostring (#1413)
* Make Bech32Address.toString actually print the string representation not the object one

* Remove Bech32Address.toString all together and use the super class definition

* Add test case

* Run scalafmt
2020-05-11 10:59:36 -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
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
b8331d4cf1 Re-enable NeutrinoNodeWithWalletTest for Linux (#1366)
* Re-enable NeutrinoNodeWithWalletTest with it disabled for mac

* Change to only Linux

* Only disable for CI runs

* Move IsCI to BitcoinSUtil

* Fix compile issue for earlier versions

* Fix syncing compact filters to not skip last filter

* Fix test to be compatible with new start state

* Use correct isCI

* Fix compile issue

* set CI env
2020-04-27 18:20:47 -05:00
Chris Stewart
2a785388bf Create KeyManagerTestUtil.bip39PasswordNonEmpty for test case that requires non empty password (#1373) 2020-04-27 13:41:18 -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
e1bd6a158b Make fundWalletWithBitcoind have the same utxo amounts as FundedWallet (#1364) 2020-04-24 09:43:19 -05:00