Commit Graph

3377 Commits

Author SHA1 Message Date
Chris Stewart
5aeecdb893
Reworking/refactoring acceptDLCOffer (#4048)
* Part 1 of reworking/refactoring acceptDLCOffer

* scalafmt

* WIP

* Move offer creation into initDLCForAccept

* Refactor method name to getDlcDbOfferDbAccountDb

* Push to github to force re-run of CI
2022-02-07 11:41:17 -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
Chris Stewart
590cd9c72e
2022 02 06 remoteclaimed refactor (#4054)
* Small refactors to make things more readable

* Add invariants to make sure things are defined when doing the RemoteClaimed flow

* Move where we update DLCDb state to RemoteClaimed so its atomic with the rest of the db updates

* Consoldiate uses of updatedDlcDb

* Add logs

* scalafmt
2022-02-06 16:31:13 -06:00
Chris Stewart
d213e9935d
Add better exception messages (#4053) 2022-02-06 11:14:58 -06:00
Chris Stewart
7a6f0430d6
2022 02 03 issue 4032 (#4042)
* get all dlcWalletTest/test passing

* Get dlcTest/test working with ignored test cases

* WIP

* Rework match oracleSignatures

* Refactor checkSingleContractInfoOracleSigs to use matchOracleSignatures

* Clean up checkOracleSignaturesAgainstContract for disjoint, still doesn't pass test cases

* Some DRY in numeric test cases

* Add test case for enum contracts

* Fix disjoint union contract bug

* Refactor matching of oracle announcements and oracle signatures into DLCUtil

* Fix compile on on 2.12.x

* Address parts of code review
2022-02-05 09:04:04 -06:00
benthecarman
142612f034
Make newConfigOfType use Vector[Config] (#4039) 2022-02-04 06:14:16 -06:00
benthecarman
afc6a32c62
Update lnd to v0.14.2 (#4040) 2022-02-04 06:11:25 -06:00
rorp
2066447cdc
Add isEndpoint to numeric contract descriptor serialization (#4033)
* Add isEndpoint to numeric contract descriptor serialization

* Fix compile

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-02-01 09:42:21 -06:00
rorp
546e030dde
[GUI] Fix 'First and last points must be endpoints' exception (#4029) 2022-01-31 14:55:28 -06:00
Chris Stewart
883b01006d
Fetch blockHeight earlier in TransactionProcessing.processBlock() (#4025) 2022-01-30 16:41:29 -06:00
Chris Stewart
8d04ca1cd3
2022 01 30 optimize processblock (#4024)
* Reduce allocations in parameters to processTransactionImpl parameters for Some

* Move cachedReceivedOptF map out of the hot path on processBlockCachedUtxos

* Move spentSpendingInfoDbs out of the hot path on processBlockCachedUtxos

* Cache all inputs in block earlier to avoid looping over them over and over

* Call correctly processTransactionImpl on accumulated wallet

* Fix compile
2022-01-30 15:53:55 -06:00
benthecarman
03abb7537b
Add basic esplora client (#4018)
* Add basic esplora client

* Improve error message
2022-01-28 15:48:44 -06:00
Chris Stewart
cf16d93648
Fix bug where we didn't set spendingTxId when transitioning from Reserved -> PendingConfirmationsSpent (#3909)
* Fix bug where we didn't set spendingTxId when transitioning from Reserved -> PendingConfirmationsSpent

* Try to add unit test

* WIP

* WIP2

* Get reserved state working

* Fix assertion, cleanup logs

* Cleanup test case
2022-01-28 06:50:24 -06:00
Chris Stewart
08941206fc
Bump timeout to 60 seconds (#4021) 2022-01-27 11:52:19 -06:00
Chris Stewart
71711ca582
Add invariant to make sure spendingTxId is different than the txid (#4019) 2022-01-27 09:52:12 -06:00
Chris Stewart
b918cf78b7
Fix bugs where we were building internally inconsistent SpendingInfoDb (#4016)
* Fix bugs where we were building internally inconsistent SpendingInfoDb

* Fix error message
2022-01-27 07:22:09 -06:00
Chris Stewart
bd5bcfef3a
2022 01 18 issue 3969 Add serialization_version to global_dlc_data (#3992)
* Get refactor working where we decouple CETSignatures and the partial refund signature

* WIP

* Implement migration to specify serialization_version on global_dlc_data table

* Fix migrations test

* WIP

* implement contractid computation

* Get migration working for wallet on testnet

* Add check to make sure we only try to migrate old wallets

* Refactor DLCDataManagement.getOfferAndAcceptWithoutSigs to not use DLCTxBuilder

* WIP

* Bubble up Option[] into DLCWallet, trivially assert on it and then use .get. We will have to do the refactor of DLCWallet sometime in the future

* Change global_dlc_data serializationVersion at database level to not have an Option

* Add DLCDbState, propogate it through the codebase

* Remove log

* Remove invariant for making sure all DLCs are defined on migraiton, add log for the case of issue 4001

* Add filter on ALPHA serialization DLCs. We dont need to migrate DLCs that are using the beta serialization

* Rebase onto 4004

* Refactor to use the refund signature in the accept/sign message

* Add output index to the return of DLCTxBuilder.buildFundingTransaction()

* Fix compile

* Remove log
2022-01-26 14:57:45 -06:00
Chris Stewart
98c5d816ac
2022 01 25 issue 4014 (#4015)
* Refactor testkit tests to use same nodeCallbacks that BitcoinSServerMain uses for neutrino

* Add test case

* Add logs for callbacks

* Cleanup

* Add test case for when funds are spent when we are offline

* Turn off logging again

* Cleanup more logs and comments
2022-01-26 13:16:15 -06:00
Chris Stewart
d983ad14f3
Fix contractid computation (#4012) 2022-01-26 05:30:29 -06:00
Chris Stewart
dbfd58da86
Add log txids inside of inventories in big endian rather than little endian (#4013) 2022-01-25 10:50:58 -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
d2f53db82e
Change BTC RPC log level (#4010) 2022-01-24 18:51:35 -06:00
Chris Stewart
52dcf51e82
Automatically download binaries if they are used in test suite (#4005)
* Remove download binary scripts from CI, try to make binary downloads contingent on tests being run in a project

* Cleanup docs to remove unecessary downloadBitcoind
2022-01-23 17:43:30 -06:00
Chris Stewart
21de609ed8
2022 01 22 cetsignatures refactor (#4004)
* Get refactor working where we decouple CETSignatures and the partial refund signature

* Add DLCAcceptWithCetSigs() for the case where we have a refund sig, but no cet signatures

* Fix bugs

* Fix sighash parsing bugs
2022-01-23 16:13:36 -06:00
Chris Stewart
7ee1f0f406
Implement batching of database calls for our chain callback (#4003) 2022-01-23 07:39:10 -06:00
benthecarman
42d6955f79
Filter dust from coin selection (#3866) 2022-01-21 13:15:12 -06:00
user411
3162c1b2d0
Ignore .DS_Store files when making backups (#4000) 2022-01-21 12:57:38 -06:00
rorp
f438ce2897
Refactor zipDatadir (#3999)
* Refactor zipDatadir

* cleanup
2022-01-21 10:03:53 -06:00
Scala Steward
13f5fb8dcb
Update javafx-base, javafx-controls, ... to 18-ea+10 (#3998) 2022-01-20 17:40:59 -06:00
Scala Steward
011fdc2cdb
Update akka-grpc-runtime_2.12, ... to 2.1.3 (#3997) 2022-01-20 17:40:43 -06:00
benthecarman
0079489a15
Create DbMapper for DoubleSha256Digest (#3995) 2022-01-19 15:00:08 -06:00
rorp
2dcbe73504
Update Tor version to 0.4.6.9 (#3993)
* Update Tor version to 0.4.6.9

* remove PluggableTransports
2022-01-19 14:58:13 -06:00
Scala Steward
635bc453e4
Update javafx-base, javafx-controls, ... to 18-ea+9 (#3960) 2022-01-18 12:35:26 -06:00
dependabot[bot]
8bc419ff88
Bump shelljs from 0.8.4 to 0.8.5 in /website (#3985)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-18 12:31:14 -06:00
rorp
8a881b37f4
Add DLC callback for refunded DLC (#3989) 2022-01-18 12:29:19 -06:00
rorp
21c97bba12
Filter transactions for onTransactionProcessed (#3990) 2022-01-18 09:52:41 -06:00
Chris Stewart
ee0d62c5b8
2022 01 14 DLCDataManagement refactor (#3982)
* WIP

* Finish refactor, get unit tests working

* Remove log
2022-01-18 08:12:27 -06:00
Chris Stewart
214213b59d
2022 01 16 issue 3983 (#3987)
* Add test case

* Add check that the pubkey is valid in WitnessScriptPubKeyV1.isValidAsm()
2022-01-17 14:38:51 -06:00
Chris Stewart
2aa6f168eb
Implement rpc password in GUI (#3986) 2022-01-15 20:41:27 -06:00
Scala Steward
e520b492bb
Update slf4j-api to 1.7.33 (#3981) 2022-01-14 07:15:09 -06:00
rorp
d88e2494e0
Make RPC authentication optional for localhost (#3980) 2022-01-13 13:08:48 -06:00
Chris Stewart
44a66e72e5
Upgrade to Scala 2.13.8 (#3789)
* Upgrade to Scala 2.13.7

* Upgrade to Scala 2.13.8
2022-01-13 10:17:11 -06:00
Chris Stewart
2e49bedf7d
upgrade to scala-js 1.8.0 (#3979)
* upgrade to scala-js 1.8.0

* upgrade the scoverage plugin to 1.9.3
2022-01-13 09:07:55 -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
5f4053b2e4
Create FallbackFeeRateApi (#3974)
* Create AggregateFeeRateApi

* Rename, add docs
2022-01-13 05:43:05 -06:00
Scala Steward
e095a1b225
Update sbt-bloop to 1.4.12 (#3977) 2022-01-13 05:40:45 -06:00
Chris Stewart
bf8b165fe9
Implement recovery for when we cannot receive a fee rate from a FeeRateApi (#3975)
* Implement recovery for when we cannot receive a fee rate from a FeeRateApi. Now we return -1 sats/vbyte if we cannot get the fee rate from a fee provider rather than throwing an internal server error

* Fix compile
2022-01-12 14:09:15 -06:00
Chris Stewart
e24efd65ae
2022 01 12 docker ws (#3976)
* Add port 19999 to bitcoin-s-server exposed ports, Add port 19999 to documentation

* Get docker containers working correctly with websockets

Co-authored-by: Ivan <erickson.ivan@gmail.com>
2022-01-12 14:07:11 -06:00
Chris Stewart
9dd126bb9f
Modify estimatefee endpoint to return a number rather than a string (#3973)
* Modify estimatefee endpoint to return a number rather than a string

* Fix compile

* Fix infinite loop on converting to sats/vb, add tests
2022-01-12 12:17:04 -06:00