Commit Graph

605 Commits

Author SHA1 Message Date
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
Chris Stewart
66e23b61a8
2021 01 11 issue 3938 (#3971)
* WIP

* Remove blocking on Future that wont complete until the websocket is disconnected

* Add Sink.ignore to drain webscoket queue if no one is connected
2022-01-12 09:04:40 -06:00
Shreyansh
a58ef1cd02
Storing peers in database (#3773)
* rebase

* fix

* fix

* remove unwanted diffs

* fix

* formatting

* changes from comments

* Revert "changes from comments"

This reverts commit eb8a795718dc590802a19c7ce4cce4501bd2de1f.

* changes from comments

* add PeerManager

* add sha3-256

* add NetworkUtilTest

* formatting
2022-01-09 07:21:59 -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
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
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
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
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
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
Chris Stewart
4646ef6e19
Remove BitcoinSServerMain.startedFP (#3928) 2021-12-20 14:29:03 -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
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
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
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
a38309bed1
Add range of block heights to the error message (#3886) 2021-12-09 09:01:01 -06:00
Chris Stewart
0d37c4b54f
2021 12 08 block parsing bug caused by 65 byte taproot signatures (#3887)
* Add block  0000000000000000000593310d3b0cdc082af49f38b8a1611239072aef8433a8 test vector

* Add test cases

* wip

* Fix bug where we were classifying taproot txs as P2WPKHWitnessV0

* revert logging level

* Some cleanup

* Add logback.xml for scripts, remove scheduler in scan bitcoind

* Fix imports

* Take ben's suggestion and add check to CryptoUtil.isValidPubKey
2021-12-09 06:38:25 -06:00
Chris Stewart
d393848cc2
2021 11 30 issue 3847 (#3862)
* Start pulling over accept serializers from dlc message spec PR

* Get sign tlv json serialization working

* Implement decodeaccept,decodesign in CoreRoutes

* Move messages to DLCTestUtil, add documentation
2021-12-01 13:30:18 -06:00
Chris Stewart
8765c2f845
Disjoint union dlc (#3839)
* Implemented Disjoint Union DLC related data structures with dlcTest passing

Broke DLCClientTest up into multiple test files

Optimized DLC execution unit tests by checking all outcomes on a single setup DLC

Refactored DLCTest to allow for Disjoint Union DLC construction and validation, added tests

Responded to review

Fixed after cherry-pick

Fixed docs

* Fixed things after rebase

* Rebase

* Fix json serializer

* Finish fixing compile

* Start trying to make APIs better for multi oracle contract infos

* Clean things up in the GUI, try to make failures on disjoint union contracts as explicit as possible

* Use less numDigits as optimization for non secp CI test cases

* Fix compile

* Refactor BroadcastDLCDialog

* Fix test case optimization

* Clean up comment

Co-authored-by: nkohen <nadavk25@gmail.com>
2021-11-29 19:26:00 -06:00
rorp
41cb26a3bb
Make DLC node's external IP configurable (#3838)
* Make DLC node's external IP configurable

* docs

* some more changes
2021-11-19 14:51:23 -06:00
Chris Stewart
1d7529236f
2021 11 13 scan bitcoind witspkv1 mempool (#3825)
* Add script to count witness spk v1 txs

* more fixes and information

* Clean up
2021-11-16 13:06:51 -06:00
user411
856e455be3
Remove 'not set' rate of return % sign on wallet (#3828) 2021-11-16 13:06:36 -06:00
Chris Stewart
5189b6ad5c
revert logging directives on request/response back to DEBUG (#3819) 2021-11-12 10:39:14 -06:00
Chris Stewart
a40ef1ab21
Break existing api to get new address to remove the requirement for null label (#3818) 2021-11-12 09:58:50 -06:00
rorp
21fab4ee70
Improve app server validation error handling (#3796) 2021-11-05 10:03:16 -05:00
Chris Stewart
aa748c012f
2021 11 03 protocol version (#3793)
* ProtocolVersion WIP

* Start incorporating protocol version into DLC Offer

* Fix doc
2021-11-03 15:13:19 -05:00
rorp
e02c9bba12
Overridable Tor config (#3780) 2021-10-27 12:57:10 -05:00
rorp
403c78fd8f
Server Docker config (#3775) 2021-10-25 06:35:02 -05:00
Chris Stewart
7a3497ab9c
2021 10 15 createcontractinfo numeric (#3758)
* Implement payout function reader and tlv points reader/writer

* Add support for numeric contract infos in the createcontractinfo rpc

* Adjust logging level

* Remove unused endpoint

* Add new format to site
2021-10-15 19:56:00 -05: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
80d498d288
Fix bug where getbalances was always retruning sats (#3750) 2021-10-13 14:51:13 -05:00
Chris Stewart
94e219befd
Update getbalance rpcs to return a number rather than a string (#3746)
* Update getbalance rpcs to return a number rather than a string

* Make sure serialized number returned is a javascript number, not string
2021-10-12 15:43:54 -05:00
Chris Stewart
d912665067
Remove cors handler for all requests (#3736) 2021-10-07 14:55:24 -05:00
Chris Stewart
1b88d26095
Bump logging level back to INFO on http servers (#3734) 2021-10-07 13:49:04 -05:00
Chris Stewart
6cbbd8825d
2021 10 02 create contract info (#3713)
* WIP createcontractinfo

* Fix ordering issue

* Use existing contract descriptor serializer, begin fixing test case

* Get DLCRoutesSpec createcontrafctinfo passing again

* Finish implementing createcontractinfo

* Add doc

* Fix native image build by adding hard coded static private key for OracleAnnouncementV0TLV.dummy
2021-10-05 06:24:25 -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
Chris Stewart
781e77844f
Implement ability to get proper version of BitcoindRpcClient from BitcoindRpcApConfig.clientF (#3699) 2021-09-29 06:43:15 -05:00
Chris Stewart
4e56fb7901
Make it so bitcoind backend exceptions don't get swallowed (#3697)
* Make it so bitcoind backend exceptions don't get swallowed when doing IBD against bitcoind

* Move zmq polling into syncWalletWithBitcoindAndStartPolling() method
2021-09-28 17:55:47 -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
4a44f9cd58
Run appServerTest on both windows and mac (#3609)
* Run appServerTest on both windows and mac

* Add just mac test name

* Add downloadBitcoind task to windows matrix

* Make exception easier to be hit

* Remove deleting of directory as that shouldn't be needed

* Add support for not running bitcoind in test suites as a daemon on windows

* Fix bug where i forgot to re-add daemon config
2021-09-27 10:25:48 -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
0fb2cd0149
Remove implicit conversions from BitcoinSAppConfig -> {WalletAppConfig,ChainAppConfig,NodeAppConfig} etc (#3652) 2021-09-08 13:54:18 -05:00
Shruthii RG
d53f164478
BitcoindRpcClient Improvements (#3600)
* Changes in bitcoind-rpc module

* Get things compiling

* Implement BitcoindInstanceRemote & BitcoindInstanceLocal

* Fix doc compile

* bitcoind remote instance test

* rename BitcoindInstanceRemote

* Scalafmt

* Applied requested changes(except one)

* implemented fromConfigFile and fromDataDir for BitcoindInstanceRemote

* implemented fromNetworkVersion

* BitcoindInstanceRemote changes

* Get things compiling

* Add implict type parameter to InstanceFactory

* Fix recursive reference of version <-> getNetworkInfo

* bug fix

* bug fix 2

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-09-07 08:49:01 -05:00
benthecarman
515e85b1c5
Decode DLC messages cli commands (#3636)
* Decode DLC messages cli commands

* Move decoding to picklers, add contractInfo decoder

* Add decoding examples
2021-09-03 09:46:09 -05:00
benthecarman
40f89af597
Give help messages for DLC cli commands and document them (#3642) 2021-09-02 08:18:17 -05:00
benthecarman
ba21c24d6f
Give funding txid in DLC Signed state (#3640)
* Give funding txid in DLC Signed state

* Improve test
2021-09-02 08:17:20 -05:00
benthecarman
656e9b1b5d
Sort DLC table by last updated (#3607)
* Sort DLC table by last updated

* Add LastUpdatedDb

* Make visible

* Fix compile

* Add time, fix sorting

* Switch to local time

* fix compile

* Fix test

* Fix postgres migration

* Specify zoneId
2021-08-31 14:27:36 -05:00
user411
11dd28085a
Add debug window button to unreserve all utxos (#3633) 2021-08-30 12:31:38 -05:00
Chris Stewart
f5ed232946
Bump fee by more to make sure our fee rate is increasing the test case (#3625) 2021-08-29 18:08:07 -05:00
user411
55c57c487e
Add CORS handling for running from a local dev server (#3612) 2021-08-27 07:57:36 -05:00
Chris Stewart
0746b14331
Move BitcoindRpcAppConfig into the bitcoind-rpc project (#3610) 2021-08-27 06:43:31 -05:00
Chris Stewart
a5f4f9663c
Add BitcoinSServerMain test to connect to bitcoind (#3591)
* Add BitcoinSServerMain test to connect to bitcoind

* Add tor tests

* Fix compile

* Remove println

* Allow to reset BitcoinSServer promise

* Remove println

Co-authored-by: benthecarman <benthecarman@live.com>
2021-08-26 09:08:38 -05:00
benthecarman
479f8e249c
Remove unneeded CoreApi (#3599) 2021-08-24 14:17:04 -05:00
Chris Stewart
b980f4894d
Implement BitcoinSAppConfig with ActorSystem (#3596) 2021-08-24 07:41:05 -05:00
Chris Stewart
75bbda66dd
Add AppConfigActorSystem (#3590) 2021-08-23 14:49:13 -05:00
user411
8cff5b6e33
Change bitcoind RPC Password to PasswordField (#3587) 2021-08-23 11:12:13 -05:00
Chris Stewart
e62615dc5e
Add guard to not allow us to check the network configuration on bitcoind (#3582)
* Add guard to not allow us to check the network configuration on bitcoind if we are using tor because tor isn't started yet

* Remove unecessary logs, revert config
2021-08-20 14:49:37 -05:00
user411
072c4164db
Add Tor running text to UI (#3546)
* Add Tor running text to UI

* Fix tor/proxy references

* Set network and proxy enabled from final config

* Cleanup

* Change to Tor Proxy indicator when enabled
2021-08-19 18:24:34 -05:00
Chris Stewart
9ef27e4d7e
Turn on bitcoin-s.node.relay=true by default on bundle/appServer (#3580) 2021-08-19 17:37:55 -05:00
benthecarman
68afe90778
Flip buttons for Offer and Accept (#3579) 2021-08-19 17:31:54 -05:00
benthecarman
0a31d6a4e2
Have wallet broadcast transaction for sendrawtransaction (#3578) 2021-08-19 17:24:17 -05:00
user411
01617be190
Add welcome pane to right view on startup (#3577) 2021-08-19 17:24:02 -05:00
user411
fd02d3642e
Add dialog to show transaction id and link after wallet Send (#3570)
* Add dialog to show transaction id and link after wallet Send

* Add transaction sent to rebroadcast closing tx

* Add Platform.runLater() for Ubuntu support

* Add block explorer timing warning

* Add Funding Transaction dialog, mempool.space urls
2021-08-19 12:24:41 -05:00
user411
5567d2214f
Move DLC/Event loading operations to Pane (#3567)
* Move DLC/Event loading operations to Pane

* Change labeling to Accept Offer / Build Offer

* Cleanup comment
2021-08-19 11:16:22 -06:00
rorp
c915711908
Make Tor setup Docker compatible (#3552) 2021-08-19 08:13:23 -07:00
user411
589077f2f3
Enum outcome labels to match numeric outcome labels (#3568)
* Enum outcome labels to match numeric outcome labels

* Add vertical space above outcomes

* Bump vertical spacing
2021-08-18 06:49:24 -05:00
user411
b545915fc0
Implement rebroadcast closing tx (#3564)
* Implement rebroadcast closing tx

* Add minWidth to Rebroadcast buttons
2021-08-17 12:16:46 -05:00
Chris Stewart
7cd21edb12
2021 08 17 rebroadcast funding tx (#3561)
* Add check for valid broadcast states

* Add rebroadcast funding tx button

* remove printlns

* Add status to error message to get compile working

* println -> logger.info

Co-authored-by: Ivan <erickson.ivan@gmail.com>
2021-08-17 08:41:55 -05:00
Chris Stewart
b7d85264a0
Implement TorAppConfig.start(), use tor logs to detect when the tor is fully started (#3549)
* Implement TorAppConfig.start(), use tor logs to detect when the tor binary is fully started

* Clean up comments

* take ben's suggestion and only start the binary when tor is enabled

* Add cases for when binary is alreayd started

* Actually set the stop flag correctly

* Scalafmt
2021-08-15 14:01:12 -05:00
Chris Stewart
bbd3cd2bc4
Stop tor binary when server is shutdown (#3543) 2021-08-13 10:24:47 -05:00
user411
e08dc636a1
Wallet on top UI, minWidth on DLC View fields (#3540) 2021-08-13 10:22:51 -05:00
user411
63ccfbe1a0
Add Network label to statusbar (#3541) 2021-08-13 08:45:01 -05:00
user411
da0d583471
Style wallet startup screens (#3542) 2021-08-13 07:54:49 -05:00
user411
e0ecafc5f9
Add debug window to view log fixes #3516 (#3536)
* Add debug window to view log

* Test with Desktop.open() vs Desktop.edit()

* Use Runtime.exec() to open unix file

* Ubuntu log file open works

* Cleanup

* Brace cleanup

* Add logging for unsupported platforms
2021-08-13 07:20:03 -05:00
user411
77539c570a
Adjust DLCTableView column widths and "counter party" to "counterparty" (#3539) 2021-08-13 07:14:11 -05:00
benthecarman
04678b5ed9
Add tor config to bundle application.conf (#3537)
* Add tor config to bundle application.conf

* Fix to correct proxy config
2021-08-12 14:18:15 -05:00
user411
309d9ec217
Add proxy and tor sections to reference conf (#3530) 2021-08-12 07:07:44 -05:00
Chris Stewart
037ab7341e
Reduce logs for inv messages and wallet callbacks to DEBUG (#3524) 2021-08-11 11:13:04 -05:00
user411
b2065a9c02
SplitPane flat Dialog UI (#3505)
* SplitPane flat Dialog UI

* Fix Scala 2.12 nits

* Cleanup bool names and unused code
2021-08-11 07:29:59 -05:00
Chris Stewart
5aac4fd8d5
Bump server startup timeout from 60 seconds to 120seconds (#3514) 2021-08-10 14:03:22 -05:00
benthecarman
43e0287fed
Package Tor with Bitcoin-s (#3483)
* Tor packaged in Bitcoin-S

* Ensure not a bridge relay

* Respond to review

* Move repeat function
2021-08-10 11:56:17 -05:00
rorp
3d4cf1fc91
Tor support for all sub-projects (#3506) 2021-08-10 08:07:12 -05:00
user411
b98aa7c8e1
GUI code cleanup (#3504)
* GUI cleanup

* Remove import {}
2021-08-09 17:55:38 -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
user411
5524f7d393
Add style classes, center Rounding Info (#3496) 2021-08-07 11:39:54 -05:00
user411
84e6097d48
Set disable to context menu items based on selection, add Refund/Execute (#3477)
* Set disable to context menu items based on selection, add Refund/Execute

* Fix DLCStatus.state matching for disabling

* Add all explicit states to match
2021-08-06 16:17:32 -05:00
benthecarman
66813dc7c5
Fix error parsing address in AcceptOfferDialog (#3491) 2021-08-05 17:44:05 -05:00
user411
e315fb0563
Move to GridPane wallet, dynamic sizing (#3492) 2021-08-05 17:42:04 -05:00
user411
831e0fd96d
Evenly space footer status items (#3485) 2021-08-05 06:51:11 -05:00
user411
3177b1586b
Adds Tor Address to UI, if set (#3481)
* Adds Tor Address to UI, if set

* Put .error-label back in

* Use GUIUtil.getCopyToClipboardButton
2021-08-04 15:55:07 -05:00
user411
2dd348a79f
Fix dialog results optionality nesting to match dialogOpt (#3479) 2021-08-04 14:25:53 -05:00
benthecarman
b39ca47268
Create TorAppConfig (#3476) 2021-08-04 14:16:22 -05:00
user411
bc3140c6bb
Default Use Tor to config value, space login pages the same (#3472)
* Default Use Tor to config value, space login pages the same, GUIUtil updates

* Use socks5ProxyParams.isDefined for Use Tor and add types to GUIUtil
2021-08-04 13:34:18 -05:00
user411
00841160e0
Modifer keys per OS, Mac native menubar (#3474)
* Modifer keys per OS, Mac native menubar

* Remove menuUtil in favor of ShortcutDown
2021-08-04 13:31:26 -05:00
benthecarman
7cac44de4d
DLC P2P in AppServer and GUI (#3462) 2021-08-04 07:06:19 -05:00
user411
ef16082b95
Add preferences for wallet window x,y,w,h persistence (#3473)
* Add preferences for wallet window x,y,w,h persistence

* Remove printlns
2021-08-03 18:42:31 -05:00
user411
c022261c4f
Remove colons from DLC view labels (#3471) 2021-08-03 16:57:10 -05:00
rorp
ca40af5d94
Tor support for BTC RPC (#3470)
* Tor support for BTC RPC

* change config format
2021-08-03 11:07:05 -05:00
benthecarman
1051e6365a
DLC P2P Client (#3402)
* DLC P2P WIP

* P2PClient refactor (#10)

* Add to CI

* Remove unused

* Attempt to create DLCNode and Tests

* Full Tor support

* Get DLCNegotiationTest passing

* Config options, connect & send func

* Test for DLCNode

* Add createDLCNode to config

* Fix formatting

* Update DLC state after all other data is set

* Remove unneeded line

* Respond to some review

* 2021 07 26 dlc node code review (#13)

* WIP

* WIP2

* Rewrite tests not use Await.result()

* Skip Tor test on CI

* Cleanup threadpool leaks in tests

* Handle actor pattern matching better

* Respond to review

* Implement DLCNode.stop

* sock5 -> socks5

* Use Tcp.Unbind

* Respond to review

* Implement postStop

* Switch to unbind

Co-authored-by: rorp <rorp@users.noreply.github.com>
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-08-02 18:15:56 -05:00
user411
9aadf9053d
Dialogs to CliCommandProducers with buildView(), common fileChooser (#3456)
* Dialogs to CliCommandProducers with buildView(), common fileChooser

* Fix Insets import error

* Code cleanup

* Parameterize CliCommandProducer to allow us to be more specific about the CliCommand

* Refactor CliCommandProducer to return just T rather than Some[T]

* Use Option rather than null

* Add error-label style

* Move Dialog tracking to Option[Dialog]

* Move GUIUtil params to Options

* Fix buildView param ordering and Try() notation

* Use match notation on file handling Options

* Fix Option variable naming/handling

* Add privates and style cleanup

Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
2021-07-30 12:30:11 -05:00
Shruthii RG
e2c2798e60
Implemented the ability to fetch unconfirmed transactions (#3429)
* relay flag in version message made configurable

* modified test classes as well

* Update configuration.md

* reverted few files and cleaned up format

* fixed mistake

* enabled neutrino node to receive transactions as a callback

* added txid to log message

* changed txId to txIdBE

* unit test added for checking if we're getting transaction as a callback
2021-07-23 13:01:07 -05:00
benthecarman
2597904019
Move DLCWalletApi to core module (#3438) 2021-07-21 15:25:18 -05:00
Shreyansh
4be2b2109b
[WIP] Adding multi-peer support (#3401)
* establish conn with multiple peers

squash 1

squash 2

squash 3

* add tests

* change log msg level

* minor changes

* fix

* formatting

* fix docs

* commit to rerun ci

* changes from comments

* fix bug

* rerun ci
2021-07-21 15:18:45 -05:00
benthecarman
f20cdf667c
Pretty print PnL in table view (#3400) 2021-07-16 10:15:35 -05:00
user411
19fb1cf17a
Add network selection combobox for Neutrino (#3409)
* Add network selection combobox for Neutrino fixes 3406

* Internalized ComboBox items, added .onion proxy.enabled auto-flagging

* Change ComboBox to BitcoinNetwork type

* Separate proxy and config building

* Resolve network name to canonical dirName
2021-07-16 09:03:54 -06:00
rorp
8b663d91b6
Tor support for P2P (#3311)
* Tor support for P2P

* fix stuck connections

* unit tests

* docs

* update docs

* respond to the PR comments

* fix docs
2021-07-13 14:27:24 -05:00
benthecarman
c1715760c6
Add connection indicator to GUI (#3381) 2021-07-11 06:36:16 -05:00
user411
253f7444c6
Show error on SignedDigit contract (#3376) 2021-07-07 15:51:29 -05:00
user411
bb838624ce
Export Result and Save Backup handle no file selection (#3370)
* Export Result and Save Backup handle no file selection, New Point in curve not marked Endpoint

* Revert endpoint defaullt change

* Change to Option[File] from Save Dialog

* Explicit no return from cases
2021-07-07 15:35: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
benthecarman
5df7a8bdf3
Add test for ZMQ Polling backend (#3088)
* Add test for ZMQ Polling backend

* Use TestAsyncUtil, increase maxTries

* Add multiple attempts
2021-07-06 19:20:12 -05:00
benthecarman
629c2a2c31
Set sync height on new wallet (#3368) 2021-07-06 12:33:38 -05:00
benthecarman
6af9e47e38
Fix showing error popups in GUI (#3353) 2021-07-01 10:27:23 -05:00
benthecarman
2f7e5876d3
Set default neutrino peer based on network (#3360) 2021-07-01 10:27:05 -05:00
benthecarman
6414833111
Call trim on DLC message text boxes (#3348) 2021-06-29 14:18:06 -05:00
benthecarman
81fe7d76ee
Remove canceled DLCs from table (#3349) 2021-06-29 13:30:32 -05:00
benthecarman
53cafa7898
Set closing txid on execute from View Dialog (#3340) 2021-06-29 12:28:35 -05:00
benthecarman
d7b753a869
Add invariant and better error message for invalid numeric contract descriptor (#3338)
* Add invariant and better error message for invalid numeric contract descriptor

* Better error message

* Fix test name
2021-06-28 10:58:15 -05:00
benthecarman
af9bf21058
Improve logs in BitcoindRpcBackendUtil (#3339) 2021-06-28 09:44:26 -05:00
benthecarman
d669bd58ae
Resolve bundle config and read/write in tmp file (#3327)
* Have it save config for next time

* Fix compile
2021-06-28 07:46:32 -05:00
Chris Stewart
cb5ec20eac
Silence all scaladoc warnings (#3336) 2021-06-28 07:14:09 -05:00
user411
1f43a1910f
Add ExplorerEnv.fromBitcoinNetwork() and use for View on Oracle Explorer siteUrl (#3332) 2021-06-25 12:31:47 -05:00
benthecarman
88b99b03b5
Add view on oracle explorer button (#3328)
* Add view on oracle explorer button

* Fix compile

* Fix docs
2021-06-25 09:53:01 -05:00
Chris Stewart
ea26c8b3a3
2021 06 23 scalafx dep (#3324)
* WIP

* Remove usage of JFXApp, use JfxApp3
2021-06-23 18:15:32 -05:00
benthecarman
05204e6235
Make it so table doesn't reorder on single update (#3321)
* Make it so table doesn't reorder on single update

* Default ordering by status

* Sort table on every update

* Secondary sort by evenId

* Sort by dlcId too

* Switch to contract Id

* Update instead of delete and replace

* move to function, use for updateDLCs
2021-06-23 18:14:43 -05:00
benthecarman
a98a26c929
Make mempool.space fee provider network specific (#3316) 2021-06-22 12:07:44 -05:00
benthecarman
b8538f0300
Fix DLC Table View not being updated (#3315)
* Fix DLC Table View not being updated

* Fix DLC Table View not being updated
2021-06-22 10:53:15 -05:00
Chris Stewart
94081502c8
Remove previous stable version usage for windows builds as for some reason it doesn't work when setting up dev envs for the first time (#3292) 2021-06-18 09:18:54 -05:00
benthecarman
d6878b0226
Use same network as bitcoind backend (#3285)
* Require same network for bitcoind and appServer

* Use same network as bitcoind backend

* touchups
2021-06-17 10:44:25 -05:00
benthecarman
898ebed4e9
Windows packaging (#3210) 2021-06-17 07:20:07 -05:00
benthecarman
00e11b4930
Fix rows in ViewDLCDialog (#3275) 2021-06-17 06:50:25 -05:00
benthecarman
bd11c84462
Add ability to sweep wallet (#3274)
* Add ability to sweep wallet

* Respond to review

* empty
2021-06-16 14:37:40 -05:00
benthecarman
7ecf3edbd6
Update utxo states correctly for bitcoind backend (#3276) 2021-06-16 12:30:43 -05:00
Chris Stewart
63083bf642
Make getDLCs async to improve performance (#3222)
* Make getDLCs async to improve performance

* remove logs

* remove unecessary logs

* Fix unused
2021-06-15 09:38:36 -05:00
benthecarman
935354993b
Populate Broadcast DLC GUI (#3260) 2021-06-13 09:29:08 -05:00
benthecarman
65f096f65a
Populate Sign GUI when choosing a file (#3243)
* Populate Sign GUI when choosing a file

* Add error messages, add for numeric
2021-06-11 15:14:18 -05:00
benthecarman
95f6c0d790
Skip adding DLC sigs if we already have them (#3236)
* Skip adding DLC sigs if we already have them

* Fix compile

* Fix test
2021-06-09 18:42:17 -05:00
benthecarman
cd59aff063
Fix for showing txid on send (#3237) 2021-06-09 07:58:02 -05:00
Chris Stewart
9431be2f25
2021 06 07 dlc wallet pnl (#3229)
* WIP

* Add profit and loss and rate of return for entire wallet

* Fix rebase

* Address part 1 of code review from Ben

* Add unit test for wallet accounting
2021-06-08 15:05:40 -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
5036c419be
Add from file ability for AddDLCSigsAndBroadcast DLCs (#3219) 2021-06-03 21:14:03 -05:00
benthecarman
1af9465881
Update balance on cancel DLC (#3205) 2021-06-02 06:16:54 -05:00
benthecarman
549d840d02
Only update DLC we are viewing (#3211) 2021-05-31 17:45:00 -05:00
benthecarman
deb0862e07
Fix showing reserved balance instead of unconfirmed in GUI (#3207) 2021-05-31 16:30:54 -05:00
benthecarman
d3f827a127
Update DLC Table with scheduler (#3204) 2021-05-31 11:27:37 -05:00
Chris Stewart
bf02e89faa
2021 05 29 dlc pnl (#3198)
* WIP

* WIP2

* Get tableview rendering something

* Add basic unit tests for accounting

* Add rate of return

* Add myPayout and theirPayout to json objects

* Address code review

* Fix 2.12 compile, adjust table view

* drop isInit column on table view

* Fix scala 2.13
2021-05-31 11:12:24 -05:00
benthecarman
acc3d228d1
Better messaging while syncing headers (#3202) 2021-05-31 10:50:31 -05:00
benthecarman
4f4c342f80
Sort points in numeric gui (#3203)
* Sort points in numeric gui

* Print outcomesValuePoints
2021-05-31 10:50:14 -05:00
Chris Stewart
bd877c80a9
Get logging working in bundle (#3200)
* Get logging working in bundle by making sure the system property is first thing set

* Switch GUI to lazy
2021-05-31 08:00:23 -05:00
benthecarman
ccc4035056
Sync Height on screen (#3196) 2021-05-29 07:00:00 -05:00
benthecarman
5580771f03
Add export and copy result buttons (#3193)
* Bring back export result button

* Add export and copy result buttons
2021-05-29 06:57:13 -05:00
benthecarman
46b33ec0b8
Make add sigs broadcast the funding transaction (#3179)
* Make add sigs broadcast the funding transaction

* Rename to Broadcast DLC
2021-05-28 20:02:24 -05:00
benthecarman
7a5e108ff2
Add button to zip datadir in GUI (#3183) 2021-05-28 19:17:41 -05:00
benthecarman
bcda2467ef
Add error messages for when DLC GUI functions timeout (#3184) 2021-05-28 19:17:13 -05:00
benthecarman
03a0ca5ee9
Add QR Code to get adress dialog (#3186) 2021-05-28 06:33:37 -05:00
benthecarman
604194293c
Replace GUI balance thread with a akka scheduler (#3174)
* Replace GUI balance thread with a akka scheduler

* Make actory system a param
2021-05-27 13:17:32 -05:00
Chris Stewart
4146876369
Add DatadirUtil to centralize logic for finding our actual datadir (#3171) 2021-05-27 13:08:14 -05:00
benthecarman
f8d5202974
Add contract info to ViewDLC (#3177) 2021-05-27 13:07:50 -05:00
benthecarman
66e160a918
Send txId instead of full serialized transaction (#3175) 2021-05-27 11:59:42 -05:00
benthecarman
957c5c3a8a
Open bundle GUI at last used tab (#3164) 2021-05-27 07:48:26 -05:00
benthecarman
521a1e2555
Remove unused AcceptDLCDialog file (#3158)
* Remove unused AcceptDLCDialog file

* Remove others
2021-05-27 07:13:37 -05:00
benthecarman
180d7dfcd3
Make loading icon appear until server is full started (#3168) 2021-05-27 07:05:41 -05:00
benthecarman
3d728837ee
Add ability to enter contract info in offer dialogue (#3160) 2021-05-27 06:54:46 -05:00
benthecarman
fb81552f6d
Don't fetch all DLC data when canceling DLC (#3159)
* Don't fetch all DLC data when canceling DLC

* Allow unmarkUTXOsAsReserved when canceling DLC

* Add ability to cancel a Signed DLC

* add gui conf window
2021-05-27 06:28:09 -05:00
benthecarman
96fc544572
Fix logging in bundle (#3167) 2021-05-27 06:17:04 -05:00
Chris Stewart
6c9d82166e
Fix main class in bundle (#3161)
* Fix main class in bundle

* Fix missing gui mainclass
2021-05-26 18:09:53 -05:00
benthecarman
379ffebd9c
Add startup config flow for bundle (#3142)
* Add startup config flow for bundle

* Add explainers and bundle config
2021-05-26 16:07:24 -06:00
benthecarman
c7bb783b1a
DLC GUI pulldown (#3148)
* adaptor-dlc GUI pulldown

* hodl-mccormack-dlc pulldown
2021-05-26 12:12:57 -05:00
Chris Stewart
55db4fbd6b
Remove logging requests and responses for directives unless logging is DEBUG level (#3141) 2021-05-25 19:51:31 -05:00
benthecarman
be8e965367
DLC Wallet pulldown (#3138)
* DLC Wallet pulldown

* Respond to review
2021-05-25 17:31:01 -05:00
Chris Stewart
80e6a91056
Add application.conf to bundle (#3118)
* Add application.conf to bundle, move some configurations into db-commons/reference.conf

* Fix config
2021-05-21 10:59:23 -05:00
Chris Stewart
42966b3cbe
Remove logback from the cli module (#3117)
* Remove logback from the cli module

* Reset submodule
2021-05-21 07:11:07 -05:00
benthecarman
1e87cb0fde
Remove need for bitcoind install with remote (#3114) 2021-05-20 13:05:44 -06:00
Chris Stewart
fcf55df165
2021 05 19 jpackage bundle release (#3108)
* Remove tags usage, as our current tags are invalid for mac

* First try trying to get jpackage to work with bitcoin-s bundle

* Simplify bundle name for now

* Try to fix linux formatting

* Empty commit to re-run ci

* Empty commit to re-run ci 2

* Fix references to krystal bull artifacts

* Add icon to deb file

* Add icns file for bitcoin-s for mac

* Use same icon as mac os x

* Try to get tagging logic correct

* Add fetch depth 0

* Try bumping java ubuntu version to 1.16

* Try using openjdk@1.16.0-1

* Remove jpackage feature branch to test

* Empty commit to re-run ci 2

* Remove unused ico file
2021-05-19 16:38:32 -05:00
Chris Stewart
ba91ba5596
Add assembly instructions for bundle project (#3104)
* Add assembly instructions for bundle project

* revert reference.conf
2021-05-19 06:35:31 -05:00
Nadav Kohen
ac3bae403b
Pulled down all remaining non-wallet non-gui code on adaptor-dlc (#3101) 2021-05-18 06:29:46 -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
benthecarman
8e29b5c6f6
Change outpoint output format for cli commands (#3048)
* Change outpoint output format for cli commands

* Use lockunspent format

* update docs
2021-05-08 08:15:49 -05:00
benthecarman
1cda5cbf1e
Allow remote bitcoind backend (#3034) 2021-05-04 17:51:35 -05:00
Chris Stewart
f0a5833e6b
Fix compiler error (#3035) 2021-05-04 16:32:14 -05:00
benthecarman
f86f90dc32
Add getbalances cli command (#3022)
* Add getbalances cli command

* Add docs

* Locked -> reserved
2021-05-04 12:19:15 -05:00
Aris
507f5c772e
Remove request rejection duplication in ServerRoute (#3010) 2021-05-04 12:17:50 -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
benthecarman
bf831ae32e Fix lockunspent RPC (#2984)
* Fix lockunspent RPC

* Fix test
2021-04-29 07:57:14 -05:00
benthecarman
6fbaf9f9ce Add estimate fee cli command (#2983) 2021-04-28 16:43:20 -05:00
benthecarman
e3017fd17d Peer Message Receiver Refactor (#2938) 2021-04-27 15:54:44 -05:00