Commit graph

2360 commits

Author SHA1 Message Date
Chris Stewart
66ec96b1f5 2020 11 13 issue 2258 (#2260)
* Introduce ChainHandlerCached which behaves like the old ChainHandler. Now Chainhandler.getBestBlockHeader() will read headers from the database

* Remove ChainHandler.blockchains field, now it's only available in ChainHandlerCached

* De-futurify ChainHandler.fromDatabase()

* Adjust logging

* Patch test case

* Use BlockHeaderDAO.chainTips when getting best header rather thean BlockHeaderDAO.getBlockchains(). Implement a helper method ChainHandler.toChainHandlerCached()

* Fix chain.md,wallet.md

* Make ChainHandler.getBestBlockHeader() consider time of header if chainwork is the same. Make test cases less strict on what header is the best header when both chainwork and time are the same on the eader

* Only execute callbacks on headers that are going to be created in the database, not all headers passed into ChainHandler.processHeadersWithChains()

* Turn up log level again

* Small optimizations, check if we have seen a header before before processing it in ChainHandler.processHeadersWithChains(). Fix FilterSyncMarker.toString(). Use ChainHandlerCached in Node

* Remove ChainHandlerCached in appServer, re-add it in Node.scala
2020-11-17 06:19:07 -06:00
Chris Stewart
a8b1945408 Add helper OracleEventTLVV0.maturation method (#2267) 2020-11-17 06:18:32 -06:00
Scala Steward
0703241c7c Update sbt to 1.4.3 (#2266) 2020-11-16 14:32:31 -06:00
Ben Carman
b6a06d6e9c Fix listEvents in DLCOracle (#2265)
* Fix listEvents in DLCOracle

* Fix migration
2020-11-16 06:32:40 -06:00
Ben Carman
c29b787ab5 Add ability to change aes password (#2254)
* Add ability to change aes password

* Add docs

* Rename, add logs + tests
2020-11-15 08:07:49 -06:00
Scala Steward
3effd6601f Update spray-json to 1.3.6 (#2256) 2020-11-12 07:24:15 -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
Scala Steward
d0ae3b8443 Update sbt-mdoc to 2.2.12 (#2253) 2020-11-11 10:20:29 -06:00
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
Scala Steward
6043e4efa8 Update javafx-base, javafx-controls, ... to 16-ea+4 (#2249) 2020-11-09 11:02:22 -06:00
Scala Steward
f921b80966 Update scalatest to 3.2.3 (#2250) 2020-11-09 08:51:16 -06:00
Ben Carman
471c5348c9 Use PSBT type in bitcoind calls (#2242) 2020-11-09 08:50:48 -06:00
Ben Carman
fcf0c842ad Update Oracle TLVs (#2185)
* Update Oracle TLVs

* Change string size to be BigSizeUInt

* Move nonces to oracle event tlv

* Introduced EventDescriptor tests and NumericEventDescriptor methods to query possible outcome data

* Added contains function

* Added tests for containsToPrecision

* Remove EventDescriptor.outcomes and other related fields

* remove unused formatNum method

* Address code review from Ben

* Move oracle pub key to announcement

Co-authored-by: nkohen <nadavk25@gmail.com>
Co-authored-by: christewart <stewart.chris1234@gmail.com>
2020-11-07 16:26:21 -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
Scala Steward
dfe6b70781 Update scalacheck to 1.15.1 (#2243) 2020-11-07 09:24:56 -06:00
Ben Carman
a7da3f25b6 Bitcoind RPC Multi-wallet support (#2231)
* Bitcoind RPC Multi-wallet support

* Add to docs
2020-11-07 09:24:09 -06:00
Ben Carman
b02eb07cf0 Add listreservedutxos cli command (#2247) 2020-11-07 09:08:33 -06:00
Scala Steward
491c42bc95 Update sbt-bloop to 1.4.5 (#2241) 2020-11-06 07:00:55 -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
Scala Steward
97187fc4aa Update scodec-bits to 1.1.21 (#2239) 2020-11-05 15:18:28 -06:00
Scala Steward
e92ff5c3c5 Update sbt-mdoc to 2.2.11 (#2238) 2020-11-05 14:01:16 -06:00
Ben Carman
606041649d Make BIP 39 password a config option (#2234) 2020-11-05 07:36:02 -06:00
Scala Steward
cbc072cbfd Update sbt-ci-release to 1.5.4 (#2235) 2020-11-05 07:34:07 -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
d7ccc11805 Move newer functions to common rpc interface (#2230) 2020-11-02 18:25:39 -06:00
Ben Carman
d0b9e61dd9 Add bitcoind functions for load and unload wallet (#2229) 2020-11-02 07:41:37 -06:00
Scala Steward
b85615ac87 Update bcprov-jdk15on to 1.67 (#2228) 2020-11-02 07:34:52 -06:00
Scala Steward
9c202a44c8 Update sbt to 1.4.2 (#2232) 2020-11-02 07:19:03 -06:00
Scala Steward
df002e1983 Update javafx-base, javafx-controls, ... to 16-ea+3 (#2205) 2020-10-28 08:55:10 -05:00
Nadav Kohen
3cf6d3cb0a Fixed P2SH(Segwit) bug and brought down DLC-used PSBT functionality (#2140)
* Fixed P2SH(Segwit) bug and allowed redeem scripts when calling addFinalizedScriptWitnessToInput

* Add test

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-10-24 18:06:46 -05:00
Scala Steward
e317fa4a89 Update typesafe:config to 1.4.1 (#2212) 2020-10-23 09:15:24 -05:00
Ben Carman
6b6167bdf0 Only Validate PSBT BIP143 vulnerability on signing (#2204) 2020-10-22 13:05:58 -05:00
Ben Carman
7dd7e2574d Pretty Fee Rate toStrings (#2210) 2020-10-22 07:38:24 -05:00
Chris Stewart
1bb874db06 Fix overrides AppConfig.configOverrides with DLCOracleAppConfig, also remove hardcoded value out of AppConfig.configOverrides so people have to implement it (#2209) 2020-10-21 17:13:09 -05:00
Scala Steward
dc8f4b02be Update sbt to 1.4.1 (#2202) 2020-10-20 07:00:53 -05:00
Ben Carman
d7fe2c2ee6 Make GUI auto-update balance (#2197) 2020-10-19 09:49:07 -05:00
Scala Steward
ba48305681 Update sbt-mdoc to 2.2.10 (#2199) 2020-10-18 10:14:25 -05:00
Scala Steward
14a6c33748 Update postgresql to 42.2.18 (#2195) 2020-10-16 06:58:08 -05:00
Chris Stewart
5f3e720c28 Exclude sbt keys that unused (are they really unused?) (#2194)
* Exclude sbt keys that unused (are they really unused?)

* Add comment linking to PR
2020-10-15 10:46:31 -05:00
Ben Carman
c104bf11fb Make tx bytes functions lazy vals (#2180) 2020-10-14 14:18:24 -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
f628c265ae Add DbManagement tests for Oracle (#2186) 2020-10-14 08:04:00 -05:00
Scala Steward
ddea46545f Update sbt to 1.4.0 (#2119) 2020-10-14 07:20:56 -05:00
Ben Carman
4c711a5892 docs: Oracle Server setup docs (#2187) 2020-10-13 15:04:50 -05:00
Ben Carman
d267f66a93 Have api endpoints return json (#2178) 2020-10-13 10:13:57 -05:00
Chris Stewart
d37b563b40 2020 10 12 issue 2164 (#2173)
* Make private lazy val representing Flyway config in DbManagement, expose DbManagement.info() method

* Add more asserts based on new DbManagement.info() method

* Add extra +1 for flyway on postgres as it seems to apply an implicit migration needed to setup flyway
2020-10-13 10:11:37 -05:00
Chris Stewart
112ec90286 Refactor db configuration to use the key 'user' rather than 'username' inline with slick documentation (#2184) 2020-10-13 10:02:02 -05:00