Commit Graph

573 Commits

Author SHA1 Message Date
benthecarman
6845caf778
Make all uint64 types from lnd a UInt64 (#4332)
* Make all uint64 types from lnd a UInt64

* Make all uint32 types from lnd a UInt32
2022-05-11 05:05:16 -05:00
rorp
3dc709386a
Upgrade Eclair to v0.7.0 (#4308)
* Upgrade Eclair to v0.7.0

* Scala 2.12 compatibility

* reformat
2022-05-02 09:04:56 -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
6db1f26625
2022 03 22 getrelevantoutputs upfront (#4219)
* WIP

Try and debug

WIP

Fix bug for incomingAmount

Clean up logs

more cleanups on logs

Remove another uncessary log

Don't process tx if we don't have a relevant received output for that specific tx

* Group hashes in batches of 1,000 before querying the db
2022-04-26 11:12:44 -05:00
Nadav Kohen
525fb2ac0d
Default createDLCOffer to current block height (#4285)
* Added createDLCOffer endpoint which doesn't take a locktime and uses current block height instead

* Made cetLocktime an option instead of an argument to the CLI, updated docs

* fix compile

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-04-25 14:30:32 -05:00
rorp
3831b35817
Prevent the wallet from creating duplicate UTXOs (#4290)
* Prevent the wallet from creating duplicate UTXOs

* respond to the PR comments

* cleanup
2022-04-25 11:56:37 -05:00
rorp
f5940c93d4
Contact list (#4234)
* Contact list

* fix unit tests

* Add contact rpc tests

* Add documentation

* Refactor ConsoleCli into app-commons

* Add commands to bitcoin-s-cli

* Fix timeout for rescan

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-04-21 13:02:35 -05:00
Chris Stewart
90970058f9
Improve TLV error message (#4283) 2022-04-21 09:55:13 -05:00
Chris Stewart
07209ce670
2022 04 14 dlctxsigner err msg (#4262)
* Improve error messages for invariants in DLCTxSigner

* scalafmt
2022-04-14 09:19:03 -05:00
benthecarman
0a092e4e03
Add fromString for TransactionOutPoint (#4261) 2022-04-14 05:38:09 -05:00
Chris Stewart
37da24b94b
Add SignDbState to fix rescan exception (#4246)
* Add SignDbState to fix rescan exception

* Cleanup

* Add test, doesn't pass

* Add unit tests, add invariants

* Add unit test to appServerTest

* Fix handling so an exception is not thrown internally when a contractId does not exist
2022-04-11 08:06:53 -05:00
Chris Stewart
ddabc91294
2022 04 02 fix walletdlcsetup test (#4237)
* WIP

* Fix test case so it passes
2022-04-02 11:40:33 -05:00
Chris Stewart
f2fa56221d
2022 03 31 collateral invariant (#4232)
* DLCMessage.totalCollateral -> DLCMessage.collateral

* Fix bad names of {DLCOfferTLV,DLCAcceptTLV}.totalCollateralSatoshis, its not the total collateral, rather the collateral being contributed by the offerer and acceptor

* Fix rebase

* Fix appServerTest

* Fix docs
2022-03-31 09:48:08 -05:00
Chris Stewart
8081772b57
Allow acceptor to upsert same outpoint multiple times for different offers (#4230)
* Allow acceptor to upsert same outpoint multiple times for different offers

* Remove extra log

* Revert DLCOffer invariant

* Fix OP_RETURN tests
2022-03-31 07:47:10 -05:00
Chris Stewart
413dbcacbb
Rename clearUtxosAndAddreses(account) -> clearUtxos(account) (#4206) 2022-03-22 13:08:03 -05:00
Chris Stewart
5475a994cf
Bump default address gap limit to 100, add log indicating we didn't find funds in the last addressBatchSize addresses (#4201) 2022-03-19 19:02:32 -05:00
Chris Stewart
d5807daeab
Remove SpendingInfoDb.txid parameter (#4199) 2022-03-19 15:21:36 -05:00
Chris Stewart
8d2a749df6
Rename WitnessScriptPubKeyV1 -> TaprootScriptPubKey (#4198) 2022-03-19 13:26:03 -05:00
Chris Stewart
a3dba47970
Refactor pending receives/spent states into one spot (#4026) 2022-03-19 13:25:26 -05:00
Chris Stewart
46229d712c
Rename clearAllUtxosAndAddresses() -> clearAllUtxos() (#4193)
* Rename clearAllUtxosAndAddresses() -> clearAllUtxos()

* Fix unit test

* Fix docs
2022-03-16 08:53:08 -05:00
rorp
a747f84bbb
Mark extarnal payout addresses (#4173)
* Mark extarnal payout addresses

* fix unit tests
2022-03-09 15:37:16 -06:00
Chris Stewart
668ab21ca1
2022 03 09 label refactor (#4175)
* Rename existing getaddresslabels -> getaddresslabel

* Fix missing rename of GetAddressLabel

* Modify pk constraint on wallet_address_tags to be tag_name rather than tag_type

* Add dropaddresslabel for a specific address

* Fix migrations

* Add unit tests and fix existing tests

* Add docs
2022-03-09 15:36:44 -06:00
benthecarman
c379cf4a73
Round Bitcoins to nearest Satoshi (#4154) 2022-03-09 12:01:26 -06:00
Chris Stewart
5e9be9d69e
Fix hardened serialization (#4160) 2022-03-04 08:26:10 -06:00
Chris Stewart
c3300aec52
2022 03 03 hdpath fromstring factory exn (#4159)
* Add explicit excpetion when we are unaware of the purpose in a hd path

* Remove test

* Cleanup
2022-03-04 06:05:49 -06:00
rorp
56d0ae68ad
offer-send RPC (#4153)
* offer-send RPC

* docs

* change offet-send signature

* change offer_send signature

* add local address parameter

* remove local address parameter

* use temo contract id to send offers

* respond to the PR comments
2022-03-03 21:00:32 -06:00
Chris Stewart
0bb0d9acdb
Add AdaptorSigComputation states to states that a DLC can be cancelled in (#4158) 2022-03-03 20:52:19 -06:00
Chris Stewart
d1fc32758b
Fix tempContractId hash so we include LnMessage() bytes (#4150) 2022-03-01 19:02:33 -06:00
Chris Stewart
30226219e6
2022 03 01 static wix upgrade product code (#4149)
* Try fixing a stic wix productId so the windows OS can understand installations of bitcoin-s are the same product

* Add this branch to release.yml

* Use 1.9.0 windows product id

* Add EnvUtil.parseCommitsSinceLastTag, make last number on windows version be the number of commits since last tag

* Add ability to parse the version from a string

* use upgradeId rather than productId

* Remove feature branch from release.yml

* Remove test
2022-03-01 18:25:13 -06:00
Chris Stewart
6b7058af4a
Add the temporaryContractId field to the json rpc response for offers (#4146)
* Add the temporaryContractId field to the json rpc response for offers

* Fix test case
2022-03-01 13:00:44 -06:00
Chris Stewart
c315dce05b
Add jdk version to log (#4142) 2022-03-01 10:12:44 -06:00
rorp
c1dccd7831
Offer inbox RPC (#4129)
* Offer inbox RPC

* fix syntax errors

* change parameter type

* change receivedAt type

* rename RPC methods

* WS support

* fix syntax errors
2022-02-28 14:25:46 -06:00
Chris Stewart
7a5c2971dd
Refactor receive flow to use the same utxo state transitions (#4134)
* Refactor receive flow to use the same utxo state transitions as the rest of the wallet

Get tests passing again with refactored utxos

Remove unecessary wallet methods

Fix test cases

* Remove fixture on UTXOHandlingTest

* Fix bug where funding happens in parallel in fixture and can lead to blockchain reorgs
2022-02-26 19:08:50 -06:00
Chris Stewart
3ba95700b2
Add RescanState, make sure we don't start concurrent rescans (#4131) 2022-02-25 05:23:51 -06:00
rorp
34b7d18268
External payout addresses for acceptdlc (#4121) 2022-02-22 14:47:48 -06:00
Chris Stewart
528e7c8f0e
Remove TxoState.DoesNotExist (#4108) 2022-02-18 16:31:03 -06:00
benthecarman
f657510d80
Remove invoice max amount limit (#4104) 2022-02-18 12:16:39 -06:00
rorp
5777ec1c31
Add an ability to set custom payout and change addresses (#4101)
* Add an ability to set custom payout and change addresses

* config changes

* formatting

* respond to the comments
2022-02-18 09:29:00 -06:00
Chris Stewart
2bce49b519
Remove things deprecated in 1.8 (#4097) 2022-02-15 09:24:22 -06:00
rorp
4d85b7a3d7
Support for big SPKs (#4084)
* Support for big SPKs

* Support for big SPKs

* Bump number of migrations

* Fix other test case

* cleanup

* cleanup

* fix psql migrations

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2022-02-14 07:22:34 -06:00
Chris Stewart
13c46e0af8
Move expensive script checks to last inside of P2PKWithTimeoutScriptPubKey (#4087)
* Move expensive script checks to last inside of P2PKWithTimeoutScriptPubKey

* Fix compile
2022-02-12 16:18:23 -06:00
Chris Stewart
9de4b0272a
2022 01 31 issue 4030 (#4066)
* WIP

* WIP

* Get basic unit test passing for new adaptor sig states

* Fix compile
2022-02-09 13:15:44 -06:00
Chris Stewart
f253b5055e
2022 02 08 dlc accept refactor (#4064)
* Create buildAcceptWithoutSigs

* Create DLCAcceptUtil

* Address roman's code review
2022-02-09 07:39:07 -06:00
rorp
e2b9c458e4
Change DLCUtil.buildOracleSignatures (#4061) 2022-02-07 19:50:53 -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
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
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
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