Commit Graph

75 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
Chris Stewart
41fab3dfd2
2024 08 07 createnewaccount rpc (#5638)
* Implement creatnewaccount rpc

* Get WalletRoutesSpec createnewaccount unit test passing

* Rename HDPurposes -> HDPurpose

* Fix docs

* Implement ConsoleCli arg, change HDPurpose json serialization to be a json string instead of a num
2024-08-13 10:32:03 -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
177542a13c
Remove grizzled.sl4fj was its no longer maintained (#5482) 2024-03-18 16:48:58 -05:00
Chris Stewart
34e023e93f
2022 09 29 handle unordered sigs (#4807)
* Get unit tests passing for unordered nonces/signatures

* Get v0 oracle announcements working again on listannouncements

* Add unit test to make sure we can still validate signatures for attestments with nonces out of order
2022-09-29 11:43:50 -05:00
Chris Stewart
9c506b639f
Add OrderedSchnorrSignatures, use it in OracleAttestment (#4803)
* Add OrderedSchnorrSignatures, use it in OracleAttestment, propagate it threw the codebase

* Small cleanups

* Add SortedVecFactory

* Fix test case with out of order nonces
2022-09-26 19:35:04 -05:00
Chris Stewart
4cb47c4ef4
Remove event descriptor parameter from SigningVersion.calcOutcomeHash() (#4796) 2022-09-23 06:17:38 -05:00
Chris Stewart
1b19872ac4
Implement exportstakingaddresswif (#4617)
* Implement exportstakingaddresswif

* Add documentation

* Add unit test
2022-08-16 12:37:58 -05:00
rorp
48189d5c1d
Make CRUD.run and CRUD.runVec transactional (#4059)
* Make `CRUD.run` and `CRUD.runVec` transactional

* remove explicit `transactionally` calls
2022-02-07 17:42:48 -06:00
Chris Stewart
49d4d7f179
2022 02 06 issue 4049 (#4056)
* WIP

* Make attestation creation transactional in the oracle
2022-02-06 19:07:32 -06:00
Chris Stewart
7f344ad3ff
2022 02 06 announcement creation logging (#4055)
* Add logs for creating announcements

* Add attestation logs

* scalafmt
2022-02-06 17:30:42 -06:00
benthecarman
142612f034
Make newConfigOfType use Vector[Config] (#4039) 2022-02-04 06:14:16 -06: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
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
benthecarman
524c5212e0
Add MasterXPubTable to list of DLCOracle tables (#3955)
* Add MasterXPubTable to list of DLCOracle tables

* Allow clean to be called by outside libraries
2021-12-31 06:30:44 -06:00
benthecarman
c3d1b2ee12
Give DLCOracle to filter events by pending/completed (#3953) 2021-12-30 06:33:16 -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
Chris Stewart
f71d3567ed
2021 11 23 crud action (#3851)
* WIP

* Finish implementing {CRUD,CRUDAction}.createAllAction()

* Try to make database inserts more atomic

* Consolidate more database calls in DLCWallet.initDLCForAccept()

* WIP2

* More refactor and using actions

* Add DLCIdDaoUtilNoPK for querying when dlcId is not a primary key

* Add DLCDataManagement.deleteDLC()

* make DLCWalletApi.createDLCOffer() use actions

* Rework DLCWallet.createNewDLCAccept() to use DBIOAction

* Use actions in DLCWallet.registerDLCAccept() a bit

* Create DLCActionBuilder, move actions to there

* Move more actions into ActionBuilder

* Implement transactionally on database writes for actions
2021-11-30 12:38:55 -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
b02a963ff8
Fix bug with unsigned digit decomp events and signing negative outcomes (#3728) 2021-10-07 07:55:32 -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
48213d9b81
Implement MasterXPubDAO (#3451)
* Implement MasterXPubDAO

* Fix nits

* Add postgres migrations

* Make sure tables are getting cleaned on postgres

* Get dlcOracleTest test cases passing with validation of the master xpub in the database on startup

* Fix test case

* Fix more tests

* Move things around so keymanager does not need to depend on dbCommons

* Get all walletTest passing

* Add unit test for wallet startup

* Fix rebase

* Get all sqlite tests passing

* Get postgres test cases passing locally

* Remove early call to walletAppConfig.start() in node project

* Make KeyManagerAppConfig.externalEntropy private

* Fix MasterXpubDAO.existsOneXpub()

* Fix bug in migrating database for oralce project
2021-09-21 08:05:23 -05: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
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
98ecdf7ac3
Refactor DLCOracle construction to be more safe (#3449) 2021-07-25 11:08:56 -05:00
benthecarman
36c4da7c95
Use AtomicInteger for keyIndex in DLCOracle (#3433)
* Use AtomicInteger for keyIndex in DLCOracle

* Make nextKeyIndexF private
2021-07-21 13:30:30 -05:00
benthecarman
2d96a9c519
Fix typo in DLCOracle (#3434) 2021-07-21 12:04:41 -05:00
Chris Stewart
ea1ead9a3f
Add nonces to error message for easier debugging (#3430)
* Add nonces to error message for easier debugging

* Add .hex calls
2021-07-21 11:53:31 -05:00
benthecarman
78e2fceb90
Use OrderedNonces type in DLC data types (#3352) 2021-06-30 06:35:02 -05:00
Nadav Kohen
58070f4120
Pulled down dlc and dlcTest projects into core and dlcTest (#3068)
* Pulled down dlc and dlcTest projects into core and dlcTest

Added dlcTest to CI runs and fixed compilation issues

* Fixed docs

* loosened fee rate bound assertions to only sanity test
2021-05-14 12:27:21 -05:00
benthecarman
2b8ac08cdc
Give oracle ability to sign messages with private key (#3070) 2021-05-12 10:09:34 -05:00
Chris Stewart
85fb931cba Implement BIP32Path.fromHardenedString(). (#2886)
* Implement BIP32Path.fromHardenedString(). This will throw exceptions a non hardened path in the string exists

* Do what ben says rather than re-implementing BIP32Path.fromString
2021-04-09 13:19:11 -05:00
benthecarman
3dbeac276e Add ability to delete Oracle signatures (#2851)
* Add ability to delete Oracle signatures

* Respond to review
2021-04-02 13:55:47 -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
8b6c0652a2 Completely remove range event descriptors (#2764) 2021-03-04 15:18:33 -06:00
benthecarman
2a6da6a4ea Fix DLCOracle to be Network Agnostic (#2749)
* Fix DLCOracle to be Network Agnostic

* improve comment

* Added test

* Improve comment
2021-03-03 15:31:56 -06:00
benthecarman
a0180884c5 Make sure DLCOracleAppConfig creates the oracle directory (#2720) 2021-02-24 13:20:26 -06:00
benthecarman
86566c575d Simplify oracle server RPC api (#2656) 2021-02-23 13:17:20 -06:00
benthecarman
93ec7ed4cb Change oracle db to have its own directory (#2667)
* Change oracle db to have its own directory

* Fix exists function

* Add to example config

* Move old dbs
2021-02-18 12:44:48 -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
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
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