Commit Graph

3325 Commits

Author SHA1 Message Date
Chris Stewart
93c5121632
2021 01 06 tlv invariants (#3965)
* Add invariant to CETSignaturesTLV so we don't have empty adaptor sigs

* Add invariant to make sure FundingSignaturesTLV witnesses are not empty

* Add invariant that contractOraclePairs aren't empty

* Add fundingInputs and ordered announcement invariants

* fix docs

* Move invaraints from TLVs to in memory data structures

* WIP

* WIP2

* Modify return type of DLCDataManagement.executorAndSetupFromDb() to return an Option. The None case represents when we have pruned CET signatures from the database

* Add some comments, clean up a bit

* more cleanup
2022-01-08 16:21:58 -06:00
benthecarman
3ba8fb6dd4
Allow creating invoices with description hash (#3966) 2022-01-07 09:56:40 -06:00
Chris Stewart
eeeecb00c5
Reduce polling log to trace when we try to poll bitcoind (#3964) 2022-01-06 09:24:35 -06:00
Chris Stewart
8857af2b66
Address ben's code review on #3854 (#3962)
* Address ben's code review

* Rename DLCSerializationVersion

* Scalafmt and bug fix'

* Fix docs
2022-01-05 08:49:23 -06:00
benthecarman
b342f373ae
Make ContractDescriptorTemplate an unsealed trait (#3963) 2022-01-05 08:49:11 -06:00
Chris Stewart
8c5288d758
Implemented general payout curves (#3854)
* Implemented general payout curves including hyperbola curve piece support

WIP

Get GUI compiling

* WIP

* Get backward compatible serialization working, everything is equivalent except for in memory Scala data structures

* Get numeric contracts backward compatible

* Get rest of codebase compiling

* Add test case for old contract info

* Add sanity test vector for old enum contract descriptors

* Fix docs

* Remove comment

* Scalafmt

* Add DLCSerializationVersion, replace isOldSerialization

* Remove ValueIterator.takeNoSkip()

* Fix docs

Co-authored-by: nkohen <nadavk25@gmail.com>
2022-01-05 07:07:22 -06:00
Chris Stewart
a7af8cac4c
Patch bug where zipdatadir doesn't work if the directory was not created (#3959)
* Patch bug where zipdatadir doesn't work if the directory was not created

* Remove uneeded Files.createFile()
2022-01-04 15:11:41 -06:00
rorp
5de325e7de
Exclude seeds from backup (#3950) 2022-01-04 09:04:14 -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
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
benthecarman
c3d1b2ee12
Give DLCOracle to filter events by pending/completed (#3953) 2021-12-30 06:33:16 -06:00
benthecarman
f4a2ec8554
Make AesEncryptedData a network element / factory (#3952) 2021-12-30 06:30:31 -06:00
Scala Steward
e61ff11619
Update junit-interface to 0.13.3 (#3951) 2021-12-30 06:29:44 -06:00
Chris Stewart
f8f8f50aae
Implement ping every 5 seconds to keep websocket connection alive (#3947) 2021-12-29 17:43:56 -06:00
Scala Steward
af250fcdd3
Update sbt to 1.6.1 (#3949) 2021-12-29 07:12:16 -06:00
Chris Stewart
7527388be5
2021 12 20 ws dlc callbacks (#3926)
* Implement DLC wallet callbacks

Add callbacks and tests for Claimed/RemoteClaimed

Add unit test for confirmed state

Propogate DLC callbacks over the websocket

* move buildDLCWalletCallbacks to WebsocketUtil
2021-12-28 10:24:51 -06:00
Scala Steward
bfee5f7e8d
Update sbt to 1.6.0 (#3945) 2021-12-27 15:42:47 -06:00
Scala Steward
62852a3d19
Update sbt-scalafmt to 2.4.6 (#3940) 2021-12-27 15:24:15 -06:00
Nadav Kohen
6652448f99
Added constructor for p2pkh for decompressed public keys (#3944) 2021-12-27 15:23:38 -06:00
Scala Steward
1ec444da00
Update scalamock to 5.2.0 (#3943) 2021-12-27 15:17:59 -06:00
benthecarman
7f9fb87a55
Call trim on peer address in Accept dialog (#3942) 2021-12-25 19:39:09 -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
rorp
41b96c4c7e
Add rescan field to walletinfo response (#3933) 2021-12-23 14:30:26 -08:00
Scala Steward
0c134c7e9b
Update logback-classic to 1.2.10 (#3931) 2021-12-23 09:07:28 -06:00
benthecarman
6c2bb0d111
Rename database username and password variables (#3930) 2021-12-23 06:46:01 -06:00
rorp
4b07629d56
Add getmediantimepast RPC call (#3921)
* Add `getmediantimepast` RPC call

* update docs

* respond to the PR comments
2021-12-22 16:15:30 -06:00
Scala Steward
0c625346e7
Update sbt to 1.5.8 (#3929) 2021-12-20 18:27:13 -06:00
Chris Stewart
4646ef6e19
Remove BitcoinSServerMain.startedFP (#3928) 2021-12-20 14:29:03 -06:00
Chris Stewart
4ca586ca46
2021 12 19 dlc callbacks (#3923)
* Implement DLC wallet callbacks

Add callbacks and tests for Claimed/RemoteClaimed

Add unit test for confirmed state

* Add some docs

* Address ben's code review

* Fix scalafmt
2021-12-20 14:28:52 -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
Scala Steward
f6608f49b2
Update akka-actor, akka-discovery, ... to 2.6.18 (#3925) 2021-12-20 08:17:06 -06:00
Scala Steward
4015909633
Update metrics-core to 4.2.7 (#3922) 2021-12-20 06:50:20 -06:00
Scala Steward
b200b1cc16
Update akka-grpc-runtime_2.12, ... to 2.1.2 (#3918) 2021-12-17 17:28:02 -06:00
Chris Stewart
665f931721
Work around for WalletAppConfig.scheduler being blocked by AddressQueueRunnable (#3917)
Add smallest workaround for 3916
2021-12-17 11:58:40 -06:00
rorp
c0c54acc24
Make non-final bitcoind RPC error message more descritptive (#3915) 2021-12-17 10:18:09 -06:00
Scala Steward
fa5588d111
Update logback-classic to 1.2.9 (#3914) 2021-12-17 10:15:19 -06:00
Chris Stewart
2d9d12816b
Add WalletCallbacks.onBlockProcessed() (#3912) 2021-12-16 12:26:48 -06:00
Chris Stewart
1969056372
Add better logs for fundTransactionInternal (#3911)
* Add better logs for fundTransactionInternal to understand the state of utxos when they are selected

* Move where log happens for unreserving utxos
2021-12-16 11:28:52 -06:00
Scala Steward
2dbc6aa59e
Update metrics-core to 4.2.6 (#3908) 2021-12-16 07:57:59 -06:00
Scala Steward
0bd59ec8e1
Update sbt to 1.5.7 (#3907) 2021-12-15 12:18:42 -06:00
Chris Stewart
8307fdc0d1
2021 12 12 wallet doublespend tests (#3898)
* WIP

* Fix sql queries, fix up unit tests that were implicitly using wallet.processOurTransaction()

* Remove default parameter markAsReserved=false on FundTransactionHandling.fundRawTransactionInternal()

* Fix submodule

* Add test to make sure if we fail to reserve utxos, we roll the database transaction back

* Add some clarifying comments

* address ben's code review for failures in finishSend()

* Scalafmt
2021-12-15 07:03:11 -06:00
rorp
f8f5a8e8dc
Update docker-application.conf (#3905) 2021-12-14 17:34:23 -06:00
rorp
7e214da601
Improve BitcoinSAppConfig.zipDatadir (#3903) 2021-12-14 17:23:18 -06:00
Scala Steward
d1f191bfc6
Update logback-classic to 1.2.8 (#3902) 2021-12-14 17:21:30 -06:00
benthecarman
d66afe9e43
Add satoshisRounded to Bitcoins (#3904) 2021-12-14 17:20:57 -06:00
Chris Stewart
6c67e83d3f
2021 12 10 issue 3891 (#3894)
* Add some logs to indicate how long startup time is

* Parallelize submodule configuration startup between modules dependent on tor and modules not dependent on tor

* Start tor dependent modules in parallel too

* Make Wallet.initialize() use DBIOAction

* Scalafmt

* Make Wallet.initialize() use .transasctionally
2021-12-13 14:20:51 -06:00
Chris Stewart
174c511cd3
2021 12 12 wallet optimization (#3897)
* Add logs for receiving/spending utxos in a block, modify code to use sql query

* Fix bug on join

* Turn off logging
2021-12-12 16:02:31 -06:00
rorp
41585a18ca
Make Bitcoin Core RPC backend to retry on Error -28: Verifying blocks (#3896) 2021-12-12 15:46:22 -06:00
Chris Stewart
d060c1c5fa
Use bigendian txids in wallet log messages (#3893) 2021-12-10 12:03:25 -06:00
Scala Steward
52ca1d8644
Update sbt to 1.5.6 (#3892) 2021-12-10 10:46:01 -06:00