Commit Graph

77 Commits

Author SHA1 Message Date
Chris Stewart
7c07aa0355
Pull over simple syntax changes for {cli,oracleServer,bench,dlcNode,dlcOracle,dlcOracleTest,eclairRpc,lndRpc,lndRpcTest} from #5713 (#5721) 2024-10-17 15:41:43 -05:00
Scala Steward
afddf73c48
Update scalafmt-core to 3.8.1 (#5501)
* Update scalafmt-core to 3.8.1

* Update .scalafmt.conf settings to be factory default settings

* Fix typo

* scalafmt

* Empty commit to re-run CI

* Revert some scalafmt back to original scalafmt.conf

---------

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2024-04-20 19:55:49 -05:00
Chris Stewart
1dff918848
2023 02 21 pekko (#5413)
* Get dependencies resolving, get tor module compiling

* Get everything compiling with pekko

* Rework configs/logging to use pekko namespace

* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
2024-02-22 10:26:21 -06:00
Chris Stewart
a36e55c892
Fix patterns I missed when updating logback (#4713) 2022-09-06 10:41:32 -05:00
Chris Stewart
3ee4fe1138
Upgrade dependencies (#4705)
* Upgrade dependencies

* upgrade micropickle to 2.0.0

* Add .env file with FLYWAY_CLEAN_DISABLED=false to allow cleaning in test cases

* Fix logging pattern bug

* Add action to load .env file

* Add default flyway.conf at root of repository, disable flywayClean

* remove env action
2022-09-05 07:11:23 -05:00
Chris Stewart
c266ba849f
Set entrypoint scripts so they are executable by anyone, revert daemonUserId to test on umbrel (#4678) 2022-08-29 10:38:50 -05:00
Chris Stewart
ac24bfb230
Revert #4601 / #4624 so that docker works on umbrel again (#4665)
* Revert #4601 / #4624 so that docker works on umbrel again

* Fix
2022-08-25 11:21:29 -05:00
Chris Stewart
2001e86ab9
If DISABLE_JLINK set, don't try to chmod jre/bin/java (#4651)
* If DISABLE_JLINK set, don't try to chmod jre/bin/java

* Do it for oracle server as well
2022-08-23 13:16:42 -05:00
Chris Stewart
2dad9f57b8
Fix bug where we weren't specify the bash script for each project to modify file permissions (#4625) 2022-08-18 08:29:10 -05:00
Chris Stewart
1b19872ac4
Implement exportstakingaddresswif (#4617)
* Implement exportstakingaddresswif

* Add documentation

* Add unit test
2022-08-16 12:37:58 -05:00
Chris Stewart
4b83286922
2022 07 25 wallet api refactor (#4545)
* Move MockChainQueryApi/NodeApi out of BaseWalletTest

* refactor BitcoinSServerMain.start() to return WalletHolder

* Add walletConfig to WalletWithBitcoind

* Move findOutputsBeingSpent into WalletApi

* Add WalletApi.clearAllAddresses(), HDWalletApi.{findAccount, getnewaddress(account)}

* Add HDWalletApi.fundRawTransaction() with an account as parameter

* Add WalletApi.findByScriptPubKey()

* Fix lots of tests in WalletIntegrationTest

* Create WalletApi.processOurTransaction()

* Get things compiling

* Fix tag integration test

* Refactor AnyDLCHDWalletApi -> DLCNeutrinoHDWalletApi

* Fix docs

* Get postgres tests passing locally

* Move initBalance map before calling callback in CallBackUtilTest

* Get compile working, rename to destroyOnlyWalletWithBitcoindCached

* Fix docs

* Fix missing destroyWalletAppConfig

* Fix scalafmt

* Fix bug in dlcWalletTest where wallet db thread pools weren't being shutdown after unit test completes

* Empty commit
2022-07-31 08:04:39 -05:00
Chris Stewart
6f42f83146
Move OSX check inside of jre path check, fix bug where quarantine wasn't working in case where we are in the same directory as script (#4508) 2022-07-14 06:57:52 -05:00
Chris Stewart
5b44c074f1
Fix chmod: jre/bin/java: No such file or directory errors (#4493)
* Fix 'chmod: jre/bin/java: No such file or directory' errors

* Remove echos

* Remove duplicate quaratine in oracle-server-extra-startup-script.sh
2022-07-11 15:04:04 -05:00
Chris Stewart
aed92c35af
Implement DISABLE_JLINK env variable to disable jlink jre's usage at runtime (#4426) 2022-06-26 13:20:22 -05:00
Chris Stewart
3154362f1a
Add platform specific name to bitcoin-s artifacts (#4401)
* Add platform specific name to bitcion-s artificats so they don't overwrite each other on releases

* Fix so artifact name is changed, but startup script name is not changed
2022-06-16 17:08:06 -05:00
Chris Stewart
171001273c
Implement a workaround for 4369 on docker images and m1 macs IF the user has another java installed on their machine (#4377) 2022-06-09 15:10:28 -05:00
user411
8a01432db4
Try to debug why shutdown isn't working on windows (#4349)
* Try to debug why shutdown isn't working on windows

* Add 2022-05-18-shutdown-bug branch so it triggers release.yml

* Cleanup OracleServerMain shutdown

* Make cleaner shutdown messages

* Remove feature branch

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-05-24 14:41:12 -05:00
Chris Stewart
e4d38ba53a
2022 05 05 OS specific jlink builds (#4322)
* Add OS specific zips

* Try to fix windows build

* Try to fix windows build shell

* Try to see if double zip works w/o mac verified developer error

* Add bash script to handle making file executable and make it non quarantine on mac

* Do chmod regardless of os

* Remove chmod as that cannot work by definition, revert to only packaging stage/ directory

* Make java exectuable on every OS

* refactor CommonSettings.jlinkIgnore

* Try to build appServer

* Make cli use jlink

* Make bash scripts more generic on mac

* Remove feature branch on release.yml

* Fix startup scripts
2022-05-07 18:42:02 -05:00
Chris Stewart
f4d864fab8
2022 04 26 Startup time of appServer (#4294)
* Make Server's route be async

* WIP

* Add StartedBitcoinSAppConfig to indicate when tor starts up

* Add torStarted flag to getinfo response
2022-04-28 13:50:28 -05:00
Chris Stewart
17944c4aad
Update rolling policies for log files (#4291) 2022-04-25 10:38:54 -05:00
benthecarman
bac3cb4190
Fix rolling log file (#4288) 2022-04-25 06:53:08 -05:00
Chris Stewart
e802254a20
2022 01 24 rm appconfig varargs (#4011)
* Get things compiling

* Get tests passing

* Fix docs
2022-01-25 07:25:05 -06:00
rorp
f438ce2897
Refactor zipDatadir (#3999)
* Refactor zipDatadir

* cleanup
2022-01-21 10:03:53 -06:00
rorp
ee3ee53191
RPC password authentication (#3961)
* RPC password authentication

* fix compiler error

* add more unit tests

* change default behavior

* Cleanup and add unit test for sad path for rpc authentication

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-01-13 05:55:33 -06:00
Chris Stewart
d06b064b6b
2021 12 28 blockprocessed callback (#3946)
* WIP

* Get appServerTest passing with chain notifications

* Reorder where SourceQueue gets initialized so that we can use it to construct the wallet's callbacks

* DRY

* Fix missing callback for neutrino chaincallbacks

* Bump timeout

* Bump timeout

* When wallet is empty call doSync() with the last blockheader bitcoind has seen

* Revert skipping compact filters on IBD for bitcoind

* Revert logging
2021-12-30 13:41:17 -06:00
Chris Stewart
50bec2abc6
2021 12 14 websockets (#3906)
* WIP

* Get basic websocket working (sort of)

* Push websocket fixes

* WIP: Implementing SpendingInfoDb json serializer

* Implement onreserved callbacks, add json serializers for SpendingInfoDb

* Get first unit test working for websockets when a address is generated

* Rework WalletNotification to have case classes, get unit test working for receiving addresses over the websocket

* WIP

* Add websocket callback for when a wallet processes a block

* Cleanup

* basic updates to unit test

* Fix compile

* Fix submodule

* Fix compile

* Get both unit tests passing when run by themselves

* Fix so both test cases can be run

* Implement unit tests for blockpressed and reservedutxos websockets

* Fix RoutesSpec get a block header test

* Implement configuration for wsbind and wsport via bitcoin-s.conf

* Add some nonblocking sleeps on all WebsocketTests

* Add documentation

* Properly close the server with .terminate() rather than .unbind()

* Add BitcoinSServerMainBitcoindFixture.afterAll()

* Add println

* Add more println

* Try to downgrade bitcoind version

* Fix datadir bug

* Cleanup callbacks so they don't have nested futures

* Fix SpendingInfoDb.apply() pattern match

* Add spendingInfoDb json serializer test, does not pass

* Fix SpendingInfoDb json serializer

* Make small refactors

* Fix compile

* Add maxBufferSize, change overflow strategy to OverflowStrategy.dropHead

* Address Nadav's code review

* Address ben's code review
2021-12-25 11:11:04 -06:00
Chris Stewart
3cd57d37f5
Remove backupwallet / backup oracle (#3920)
* Remove backupwallet / backup oracle

* Add zipdatadir documentation

* Fix submodule
2021-12-20 08:19:46 -06:00
rorp
5a5f1e00c7
Store oracle name in the database (#3748)
* Store oracle name in the database

* fix pg tests

* respond to the PR comments
2021-10-14 09:35:11 -05:00
Chris Stewart
ea375f9c55
Actually validate master xpub on startup (#3719)
* Fix bug where we didn't validate the master xpub on oracle server startup

* Add test for WalletAppConfig and seeds

* Remove comments

* Fix scalafmt
2021-10-04 10:37:37 -05:00
Chris Stewart
466de3e46a
Update ConsoleCli endpoints, update docs (#3705)
* Update ConsoleCli endpoints, update docs

* Rename methods in DLCOracleApi from signAnnouncement -> createAttestation

* Fix dates on deprecation

* WIP, createattestation rpc not working for some reason

* Fix misspelling

* Rename endpoint from createattestation -> signenum

* Fix docs

* Fix use of deprecated method after rebase
2021-10-02 08:01:46 -05:00
Chris Stewart
3d725adc92
2021 09 29 delete announcement (#3701)
* Implement delete attestations

* Add DLCOracleApi.deleteAnnouncements()

* Make sure we don't have attestations before deleting announcements

* Add endpoint in OracleRoutes for delete announcement

* Add ConsoleCli implementation

* deleteattestations -> deleteattestation

* Document endpoints and add warnings

* Wire up ConsoleCli with deleteannouncement/deleteattestation

* Fix use of deprecated methods
2021-10-01 14:42:59 -05:00
Chris Stewart
26d7f99173
2021 09 30 rename endpoints (#3703)
* Deprecate things with the Event suffix in DLCOracleApi

* Rename classes used in OracleRoutes

* Rename endpoints

* Update docs

* listevents -> listannouncements
2021-09-30 14:22:17 -05:00
rorp
698fe9e800
Add backupwallet and backuporacle endpoints (#3694)
* Add backupwallet and backuporacle endpoints

* respond to the PR comments
2021-09-28 07:46:33 -05:00
Chris Stewart
2191eb2049
Add 'getversion' endpoint to fetch the version from the backend (#3689)
* Add 'getversion' endpoint to fetch the version from the backend

* Use EnvUtil.getversion
2021-09-27 07:42:21 -05:00
Chris Stewart
4a5265801c
Allow for enternal entropy to be passed into a docker container for the appServer and oracleServer (#3679) 2021-09-20 13:27:20 -07:00
Chris Stewart
132479d271
Implement ability to provide external entropy to bitcoin-s (#3672)
* Encapsulate initialization of DLCOracle.start() method

* Use internal WalletAppConfig.kmConf rather than passing in custom key manager parameters

* Add KeyManagerAppConfig.defaultAccountType

* Get all tests passing besides TrezorAddressTest

* Get TrezorAddressTest passing with provided entropy

* Add unit test to make sure we can always derive the seed

* Get docs compiling

* Fix dlcWalletTest test cases

* Add more test cases to keymanager

* Add the new configuration to the example configuration

* Add more test cases

* Remove coverage on 2.12 as it isn't accurate

* Rework DLCOracleAppConfig.start() to call kmConf.start() so the oracle can use entropy provided via bitcoin-s.conf
2021-09-18 09:49:11 -05:00
user411
27d4c09d37
Add sha256 announcement/event ids on oracleServer 'getevent' for use in UI (#3673) 2021-09-17 12:32:01 -05:00
Chris Stewart
cd9db4f4a9
Adjust the permissions of the statup script for the oracle server on docker so that any user can run the script (#3654) 2021-09-09 16:13:24 -05:00
Chris Stewart
4f7b6422ea
2021 08 06 app config refacotr (#3498)
* Move AppConfig into app-commons, reduce classpath deps on keyManager,tor

* Move test ServerArgParserTest

* Fix compile error
2021-08-07 14:36:11 -05:00
Chris Stewart
bc79a24f53
Get both bundle and app server logging working (#3362)
* Get both bundle and app server logging working, oracleServer does not compile

* Get everythig compiling

* Fix bug where bundle wouldn't use command line param rpc port for ConsoleCli

* Add unit tests to make sure we are translating to config properly

* Fix bug where app config wasn't re-created after parsing bundle args

* Fix datadir resolution in BundleGUI

* Implement force-recalc-chainwork

* fix bug

* Try not using tilde on windows

* Try to print datadir on CI

* Try using stackoverflow answer

* Try escaping windows path

* Take ben's suggestion of using AppConfig.safePathToString

* Just check the paths are equal

* Fix nullpointerexceptions on startup

* Fix bug where bitcoin-s-bundle.conf was not being read

* Remove usage of --conf flag in bundle when starting backend server

* Fix compile

* Rename usedDir -> networkDir

* Fix passing in datadir
2021-07-07 10:59:11 -05:00
Chris Stewart
a61c11acfc
Implement sharing of actor systems across the GUI and backend app server (#3220)
* Implement sharing of actor systems across the GUI and backend app server

* Add timestamp to system names

* Fix test case
2021-06-07 11:38:33 -05:00
benthecarman
2b8ac08cdc
Give oracle ability to sign messages with private key (#3070) 2021-05-12 10:09:34 -05:00
Chris Stewart
84661bd122 Refactor BitcoinSRunner to use StartStop[Async] (#2986)
* Refactor BitcoinSRunner to use StartStop[Async]. This makes it easier to have a uniform interface to write for destruction code in BitcoinSRunnerTest

* Fix other ServerRunTest to cleanup after itself
2021-04-29 16:43:15 -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
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
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