Commit Graph

222 Commits

Author SHA1 Message Date
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
523f1098fc Implement OracleAttestmentV0TLV, save outcome to db (#2516)
* Implement oracleAttestmentV0TLV, save outcome to db

* Update with tlv changes

* Update tlv to not have 2 list sizes

* small change

* Update OracleEvent.verifyAttestations

* Use correct pub key

* Verify correct outcomes
2021-01-22 09:45:45 -06:00
benthecarman
09937e6ecf Fix rpc bind address from config (#2542)
* Fix rpc bind address from config

* Add to oracle server
2021-01-21 17:21:54 -06:00
benthecarman
962887dd0c Uniform GUI denominations (#2534) 2021-01-20 08:00:16 -06:00
Chris Stewart
1ec3092b2f 2021 01 15 dlc refactors (#2518)
* Kill DigitDecomp.isSigned

* Create TLVEndpoint, TLVMidpoint ADT. Also add helper method OutcomePayoutPoint.toTlvPoint
2021-01-16 07:55:42 -06:00
benthecarman
36b3a1bd81 Use mainnet for default server (#2453)
* Use mainnet for default server

* Fix server tests
2021-01-14 14:07:35 -06:00
benthecarman
d69c60b8b2 Bitcoind v0.21.0 support (#2414)
* Bitcoind v0.21.0rc3 support

* Use v0.21.0 instead of Experimental in node tests

* Bump to rc5

* Use official release

* Fix rebase issues

* Remove DoNotDiscover tag

* Fix count for NeutrinoNodeTest
2021-01-14 14:01:44 -06:00
Chris Stewart
54cd05a7f2 Add new sbt-native-image plugin that helps generate a correct native … (#2494)
* Add new sbt-native-image plugin that helps generate a correct native image for the cli

* Initialize everything at build time to try and get cli working again

* Get server working with native image build

* Add '--no-fallback' which will report failures if we fail to build a standalone image

* Revert server project, file issue 2506 to indicate problems with server build

* Add native cli publishing using github actions

* Preprend 'app/' to paths

* Enable http,https protocols on cli

* Remove old graalvm plugin settings related to sbt native packager
2021-01-13 09:41:00 -06:00
Chris Stewart
a210c1ec3b 2021 01 09 issue 2496 (#2500)
* WIP: Get something working that isn't network specific

Start putting things back in place

Add comment

Revert logback file

Remove BitcoinSLogger object

* fix unit test

* Network specific log location

Co-authored-by: benthecarman <benthecarman@live.com>
2021-01-11 16:48:49 -06:00
benthecarman
84cde975d8 Add createmultisig cli command (#2495) 2021-01-09 09:54:34 -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
benthecarman
b436f6cd2f Version Number in logs & Cli Command (#2467) 2021-01-05 07:27:40 -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
214dba8a8f Move RPC server logic into separate project (#2440) 2020-12-29 14:57:11 -06:00
Ben Carman
336d672764 Publish Cli as library (#2433) 2020-12-23 20:16:38 -06:00
Nadav Kohen
493673c68b Outstanding DLC branch diff (#2432) 2020-12-23 18:13:57 -06:00
Ben Carman
f10bdce179 Add getblockheader cli command (#2424) 2020-12-23 07:15:35 -06:00
Ben Carman
a5621efe94 Remove need for params in RPC request (#2418) 2020-12-22 16:08:51 -06:00
Ben Carman
4da53d5569 Bump Fee Cli commands (#2415)
* Bump Fee Cli commands

* Clarify fee rate, add to docs
2020-12-22 14:19:46 -06:00
Chris Stewart
a79c3ec948 Implement rpcbind to allow for binding to a different interface (#2409) 2020-12-22 07:25:50 -06:00
Chris Stewart
dbd3e950b6 Fix server configuration for the app server (#2413) 2020-12-22 06:18:39 -06:00
Ben Carman
67e7426260 Windows Secp Update & fix for parsing Windows paths (#2398)
* Windows Secp Update

* Add docs about errors

* Fix paths in config

* Bump timeout
2020-12-21 16:34:53 -06:00
Ben Carman
559bebbdbe Import Seed cli commands (#2376)
* Import Seed cli commands

* Respond to review
2020-12-21 06:53:20 -06:00
Chris Stewart
d204056ad8 2020 12 19 enable test compileropts (#2400)
* Fix bug where test compiler opts were not enabled

* Fix all exsting compiler warnings in test project

* Add scalaCollectionCompat dependency to bitcoindRpcTest so we can use @nowarn annotation on scala 2.12
2020-12-20 07:09:07 -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
Nadav Kohen
f7fdca3e22 DLC Data Structures on Master Cleanup (#2375)
* Moved dlc data structures from commons to core

* Renamed DLC payout curve classes

* Split OutcomeValuePoint up into an ADT

* Added utility for computing Schnorr multiple-signature points

* Replaced tuples in RoundingIntervals with types

* Replaced tuples in DLCPayoutCurve with Indexed

* Fixed a compile bug
2020-12-17 09:09:57 -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
794f6e073e Fix TLV parsing for non-standard strings (#2312)
* Fix TLV parsing for non-standard strings

* Create function

* Fix oracle migrations

* Forced all TLV strings to be normalized implicitly

* Removed redundant normalization

* Fix oracle

* Bump migration test

* Fix 2.12.12 compile

* Use NetworkElement & StringFactory

Co-authored-by: nkohen <nadavk25@gmail.com>
2020-12-03 12:30:17 -06:00
Ben Carman
ff90f34c5d Fix datadir config option (#2271)
* Fix datadir config option

* Move vals

* Use better names and docs
2020-11-24 16:05:20 -06:00
Ben Carman
fdb2b675e9 Create KeyManagerAppConfig (#2268)
* Create KeyManagerAppConfig

* Fix name

* Use module name
2020-11-19 06:23:26 -06:00
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
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
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
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