Commit Graph

254 Commits

Author SHA1 Message Date
benthecarman
105942efa2 Use filters for bitcoind backend syncing if available (#2926)
* Use filters for bitcoind backend syncing if available

* Start bitcoind polling after sync is done

* Fix compile issue and test
2021-04-20 17:28:23 -05:00
Chris Stewart
136d6f50f9 2021 04 19 Zip Bitcoin-s datadir (#2927)
* Fix bug where we weren't closing zip file

* Add filter for chaindb.sqlite

* Fix rebase
2021-04-20 10:30:15 -05:00
Chris Stewart
0aa32916ab Implement workaround for spendinginfodb by rescanning to find missing spendingTxId (#2918)
* implement workaround for rescanning to find missing spendingTxId

* Add links to PR

* Fix compile bug
2021-04-20 06:41:11 -05:00
Chris Stewart
4e1ace2706 2021 04 18 Use akka streams in BitcoindRpcBackendUtil.syncWalletToBitcoind (#2916)
* Initial implementation of wallet sync with bitcoind with akka streams

* Make BitcoindRpcBackendUtil.startBitcoindBlockPolling use akka streams

* rework BitcoindRpcBackendUtil.syncWalletToBitcoind() to use akka streams
2021-04-19 15:54:34 -05:00
Chris Stewart
a3954dbcae 2021 04 17 spendinfodb invariant (#2912)
* Add invariant to spendingInfoDb to that requires if the spendinginfodb is in a TxoState.spentStates, the SpendingInfoDb.spendingTxIdOpt is defined

* Remove unused SpendingInfoDAO.updateTxoState()

* Remove comment

* Make TxoState and explicit parameter for test methods. Most test methods depend on a sample utxo state, so make the caller of the method specify what state they want the txo to be in

* Fix github actions config

* Fix RoutesSpec test
2021-04-18 09:02:49 -05:00
benthecarman
b1be3347c9 Fix ZMQ Config with bitcoind backend (#2897)
* Fix ZMQ Config for bitcoind backend

* Fix nits
2021-04-13 14:56:28 -05:00
Chris Stewart
4f1f53e7ad Bump hikari logging interval to 10 minutes (#2888)
* Bump hikari logging interval to 10 minutes

* Change example configuration
2021-04-10 13:51:31 -05:00
benthecarman
d0629486ab Wallet Rebroadcast Transactions thread (#2711)
* Wallet Rebroadcast Logic

* Use wallet scheduler for address queue rather than it's own thread

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>

* Bump default

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-04-07 08:13:43 -05:00
Chris Stewart
c738f23e58 Fix build warnings that came with sbt 1.5.0 (#2857)
* Fix build warnings that came with sbt 1.5.0

* Fix more deprecation warnings

* Fix more warnings
2021-04-06 06:01:11 -05:00
benthecarman
fa80f36d2f Get all of Core working with JS (#2826)
* core-test-js-json

* Add SigPointComputer cross compile
Co-authored-by: Nadav Kohen <nadavk25@gmail.com>

* Fix java.time for scalajs

* InetAddress for scalajs

* Fix linking errors in coreTestJS

* Easy fixes

* InetAddress Tests

* Update micropickle, fix exact functions

* Get BigSizeUIntTest working with upickle

* Fix exact funcs

* Update Base58Test with upickle

* Update ScriptSignatureTest with upickle

* Update TransactionTest with upickle

* Update BlockFilterTest with upickle

* Update ScriptInterpreterTest with upickle

* Update MnemonicCodeTest with upickle

* Add InetAddress unit tests

* Fix compile errors

* Get core tests running, not passing

* Sign with js

* Fix PSBTUnitTest

* Fix PBKDF2 for JS

* Use bcrypto's secp256k1 instead of ecdsa

* Fix 2.12.12 compile

* Core tests passing :)

* Test corejs
2021-03-31 15:04:30 -05:00
benthecarman
85ff255df3 Update akka to v10.2.4 (#2832) 2021-03-29 09:59:34 -05:00
benthecarman
07514e2348 Remove logging from core (#2810)
* Remove logging from core

* Remove slf4j from testkit core

* Remove logback from coretest
2021-03-21 19:11:55 -05:00
benthecarman
9494eec1b8 Move blockhash to tx table from spending info table (#2744)
* Move blockhash to tx table from spending info table

* Add test, fix spending tx id col name

* Scaladocs, add test

* Add more unit test

* Make id not comparable in process tx test

* Fix tests

* attempt to fix

* Add mempool comment to scaladoc

* Deparallelize process inputs & outputs
2021-03-16 10:05:29 -05:00
Chris Stewart
5b4aac5178 Refactor starting second bitcoind in MempoolRpcTest, remove Thread.sleep (#2776)
* Refactor starting second bitcoind in MempoolRpcTest, remove Thread.sleep

* Add AkkaUtil.nonBlockingSleep(), replace usages of Thread.sleep() with it where possible

* Remove more Thread.sleep()

* Try bumping threadpool for scheduler

* Reduce scheduler threadpool size to 2

* Push to github to force re-run of CI
2021-03-10 09:36:34 -06:00
benthecarman
4bf4f0a027 Add signed outcome to getevent rpc, fix other small api bugs (#2757)
* Add signed outcome to get event rpc, fix other small api bugs

* Create separate type for decomp DLCAttestationType

* Add DLCOutcomeType to Oracle Event

* Calculate dlcOutcome, add invariant

* Fix test
2021-03-08 10:55:47 -06:00
benthecarman
8b6c0652a2 Completely remove range event descriptors (#2764) 2021-03-04 15:18:33 -06:00
benthecarman
7aa68998f1 Correct log location and logs for oracle server (#2722)
* Correct log location and logs for oracle server

* Fix staking address to be mainnet

* fix network in test
2021-02-26 09:16:05 -06:00
Chris Stewart
94934e113d Rework docker configuration to pass in a custom configuration file (#2718)
* Rework docker configuration to pass in a custom configuration file

* Add default user of bitcoin-s for docker images

* Add runtime docker configuration to website
2021-02-26 07:35:20 -06:00
benthecarman
86566c575d Simplify oracle server RPC api (#2656) 2021-02-23 13:17:20 -06:00
Chris Stewart
d94a4ed87e 2021 02 15 appserver docker (#2673)
* App Server docker configuration w/ refactors

Get app server configuration working with docker

Add section for building the appServer for docker

* Remove compile commands
2021-02-18 13:57:18 -06:00
Chris Stewart
56a14325e1 Get basic docker image working with oracle server (#2668)
* Get basic docker image working with oracle server

* Get docker file working with custom configuration

* Switch base image to generic openjdk

* Add docker documentation
2021-02-18 10:03:19 -06:00
Aris
85087b0f70 Refactoring chain (#2662) 2021-02-13 14:10:40 -06:00
benthecarman
931a528723 Give oracle server its own port (#2653)
* Give oracle server its own port

* Don't have default cli command port

* Default port in config

* Remove unused server conf

* Oracle own config option
2021-02-13 13:59:16 -06:00
Chris Stewart
8f958bf5d9 Update scalafmt (#2619) 2021-02-03 16:37:12 -06:00
benthecarman
22e373e63d Fix bestblockhash rpc call (#2612) 2021-02-02 13:03:05 -06:00
Nadav Kohen
93f33d26b6 Update dlc before release (#2543)
* Pulled down DLC data structure work

* Responded to Ben's review

* Gave Vector types names

* Pulled down Chris' work
2021-02-02 08:14:24 -06:00
benthecarman
cf98d9e31e Wallet name in walletinfo (#2603) 2021-02-01 12:50:42 -06:00
benthecarman
86d9aaf1af Rename createevent rpc to createenumevent (#2604) 2021-02-01 12:06:08 -06:00
benthecarman
beac2be195 Update Oracle Server docs, fix oracle server bugs (#2581) 2021-01-29 08:14:28 -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
45aa2988ad Fix oracle cli to use announcements (#2576) 2021-01-27 15:19:48 -08:00
benthecarman
fa27fb3fb1 Create BlockSyncState type (#2567) 2021-01-27 14:15:07 -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
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