Commit graph

11142 commits

Author SHA1 Message Date
Florian Reimair
4ff4801e5c
Cleanup logging 2020-03-28 11:27:37 +01:00
Florian Reimair
c588b19074
Log output shows graceful shutdown message 2020-03-28 11:27:37 +01:00
Florian Reimair
0fb4f13319
Fix closing the app by gui exit
Before, the graceful shutdown procedures have been executed in the
user thread. However, the sync mechanics for connections/offers
caused a lockup, as some little parts of the code do execute on the
user thread as well.
2020-03-28 11:27:37 +01:00
Florian Reimair
0bbb8e6952
Harmonize System::exit usage
The actual System::exit commands have been scattered around various
places in the code. Sometimes, actual system exit depended on the
calling code to reach its end of execution.
2020-03-28 11:27:36 +01:00
Florian Reimair
8bab25ac17
Make sure to shut down tor
Here, the tor object is a member variable and there are cases where
this member variable is not set yet.
Situation arose where a sigterm/sigint shutdown is requested and due
to the member variable not set tor was left running.
2020-03-28 11:27:25 +01:00
Steven Barclay
9d10a6384f
Tidy payload instances wrongly implementing PersistableEnvelope
Remove an unused PersistableEnvelope interface from the following five
PersistableNetworkPayload implementations:

  AccountAgeWitness, BlindVotePayload, ProposalPayload,
  SignedWitness, TradeStatistics2

These already have corresponding *Store envelope classes which correctly
implement the interface.
2020-03-28 15:22:06 +08:00
ghubstan
94ee49c5af
Remove read stdin loop
Replaced the Scanner input read loop with upgraded joptsimple
dependency. Cli now takes a single, non-option program argument, runs
it and exits.  Also removed the "stop client" command because there is
no input loop, but shutdown() is called for orderly channel shudown
before the jvm terminates.  Also changed cmd syntax from camel case
to lowercase, mimicking bitcoin-cli.

Configured logback to supress all debug & info level netty output, and
bypassed logback to print results to System.out.
2020-03-27 12:27:36 -03:00
Christoph Atteneder
e2a01b6c66
Merge pull request #4096 from ghubstan/move-protobuf-defs
Move command & core proto defs to new subproject
2020-03-27 10:06:22 +01:00
Christoph Atteneder
b321cd9272
Merge pull request #4046 from stejbac/add-faster-payments-holder-name
Add holder name for new Faster Payments accounts
2020-03-27 10:03:47 +01:00
Steven Barclay
d84130ff5b
Improve popup text + layout of Faster Payments buyer form fields
Display the account number on the same row as the sort code in the trade
step view, to prevent scrolling with the extra name field (as suggested
in the code review).

(This also affects the layout of old accounts without the extra field.)

Also apply the suggested popup text simplifications.
2020-03-27 16:08:21 +08:00
jmacxx
bd5044a315
Address issues raised in review by sqrrm on 2020-03-26
- added a comment describing the `removeDust` method and its effects.
- applied a fix to the declaration of an ArrayList.
- use more descriptive variable names.
- made the logging more verbose to help log readers.
2020-03-26 21:40:51 -05:00
Chris Beams
ccde089af3
Rename :protodefintion subproject to :proto
This is done primarily for concision. This change also repackages
bisq.grpc => bisq.proto.grpc in anticipation of repackaging the
definitions in pb.proto from 'protobuf' to 'bisq.proto'. There should
not be any compatibility issues with doing this, but it's out of scope
here. When complete, the relationship between bisq.proto.grpc and
bisq.proto will be more intuitively clear, i.e. that bisq.proto.grpc has
certain dependencies on bisq.proto classes, but not the other way
around.
2020-03-26 17:37:37 +01:00
sqrrm
427d581f27
Merge pull request #4090 from ripcurlx/stake-validation-issue
Only use InputValidation when formatting voting stake
2020-03-26 17:29:22 +01:00
Florian Reimair
c20c4b63ac
Wait for connections to be closed
The close connection process did fire up worker threads to actually
close the connections. Yet, once all threads have been spawned,
the code proceeds assuming that there are no connections left open
without checking.
This lead to situations where tor has been shutdown already but
open connections. These connections tried to gracefully close but
without tor, that only caused a wall of exceptions.
2020-03-26 17:27:41 +01:00
Florian Reimair
53752f8522
Fix shutdown order 2020-03-26 17:27:12 +01:00
Chris Beams
b8db1cdf78
Organize grpc/protobuf imports properly 2020-03-26 17:10:59 +01:00
Florian Reimair
1bf1ae4377
Added graceful shutdown hook
Graceful shutdown has only be done in case of an error or when
using the GUI. A regular eg. seednode shutdown is not covered
though.

Now, SIGTERM and SIGINT triggers a graceful shutdown procedure.
2020-03-26 17:09:29 +01:00
ghubstan
aed3453142
Move command & core proto defs to new subproject
Protobuf definition files were moved from common and core to a new
protodefinition subproject.

The two main reasons for doing this are to speed up builds by not
having to regenerate common and core protobuf classes
every time a change is made in those subprojects, and to remove
the grpc cli's direct dependency on core, and the transitive dependency
on common.

In order to accomplish this, cli's BisqCliMain was stripped of
its dependencies on common and core.  Cli can only get the version
and balance now.

gRPC stub boilerplate was moved from BisqCliMain to a CliCommand
class to avoid some of the bloat that is going to happen as the
read-response loop supports more rpc commands.
2020-03-26 10:14:33 -03:00
sqrrm
7fd4cb5272
Merge pull request #4092 from ripcurlx/make-prompt-text-readable-in-dark-mode
Make prompt text readable in dark mode
2020-03-26 13:21:59 +01:00
Christoph Atteneder
d835afd92b
Merge pull request #4089 from ghubstan/apache-commons-version-conflicts
Upgrade and reduce version conflicts in build
2020-03-26 10:36:18 +01:00
Steven Barclay
a957fb167a
Add popup to advise user to recreate Faster Payments account
Open an info popup in the take/create offer view, upon choosing to take
or make a new offer, to instruct the user to recreate their old Faster
Payments account with an owner full name (and preserved salt). Also show
the popup upon manual selection of any old (i.e. missing full name)
Faster Payments account from the trading account combo box, analogously
to the ClearXchange (Zelle) warning popup logic.

(Also eliminate slight differences between the private
'maybeShow[ClearXchange|FasterPayments]Warning' methods in TakeOfferView
and MutableOfferView, to make the code easier to deduplicate in future.)
2020-03-25 17:48:06 +08:00
jmacxx
057e2c5e7c
Remove dust outputs created during withdraw from wallet
This change fixes an issue whereby dust change outputs are
inadvertently created when users make withdrawals from their
wallets.  (Funds -> Send Funds)

The solution taken here is to detect a dust TXO during the withdrawal
fee estimation process and add that amount to the fee thus eliminating
the dust output.

For example if the user has 1 BTC and goes to withdraw 0.99999900 BTC
it will detect a change TXO of 100 sats which is below the dust limit,
increase the fee by 100 sats and therefore withdraw 1 BTC.

This fix only applies to user withdrawals from their wallet.  Other
use cases such as P2P trading, deposits and fees will be handled
separately.

Related to #4039
2020-03-24 09:23:58 -05:00
Christoph Atteneder
37751c74c4
Make prompt text readable in dark mode 2020-03-24 12:53:11 +01:00
jmacxx
92530bda50
Remove dust outputs created during the trade process
This change fixes an issue whereby dust change outputs are
inadvertently created during the trading process, unbenownst to the
user.  The dust outputs cause the Bitcoin node to reject the
transaction and the trade then becomes stuck.

The solution taken here is to detect a dust TXO during the trade
process and remove it from the transaction before broadcasting.

Related to #4039
2020-03-23 12:56:40 -05:00
Christoph Atteneder
557ec7f449
Merge pull request #4025 from stejbac/make-persistence-thread-safe
Make serialisation in FileManager::saveToFile thread-safe
2020-03-23 13:49:27 +01:00
Christoph Atteneder
83d588d374
Only use InputValidation when formatting voting stake 2020-03-23 11:04:27 +01:00
ghubstan
962e11923b
Upgrade and reduce version conflicts in build
Some apache & logback dependency versions were bumped up, some
transitive dependencies declared as direct dependencies, and some
new exclusions were added to reduce the number of duplicated
dependencies in the build.
Also updated gradle-witness.gradle.

Here are some of the duplicated apache and logback dependencies
in the current build:

	commons-codec-1.10.jar
	commons-codec-1.9.jar
	commons-io-2.4.jar
	commons-io-2.6.jar
	commons-logging-1.1.1.jar
	commons-logging-1.2.jar

	httpclient-4.0.1.jar
	httpclient-4.5.3.jar
	httpclient-4.5.5.jar
	httpcore-4.0.1.jar
	httpcore-4.4.6.jar
	httpcore-4.4.9.jar

	logback-classic-1.1.10.jar
	logback-classic-1.1.11.jar
	logback-core-1.1.10.jar
	logback-core-1.1.11.jar

Upgraded:

	codecVersion 1.9 -> 1.13
	ioVersion  2.4 -> 2.6
	langVersion 3.4 -> 3.8
	httpclientVersion 4.5.3 -> 4.5.12
	slf4jVersion 1.7.22 -> 1.7.25

New dependency declarations:

	loggingVersion 1.2
	httpcoreVersion 4.4.13

This commit reduces the number of build dependencies by 10.

Partial fix for #4086
2020-03-22 16:06:40 -03:00
Steven Barclay
9ab649ec05
Restore type hierarchy of MeritList & VoteWithProposalTxIdList
Provide UserThreadMappedPersistableList subclass for persistable lists
which need to implement UserThreadMappedPersistableEnvelope, instead of
putting the interface on the base class.

Make the (non-storage) classes MeritList and VoteWithProposalTxIdList
keep the original PersistableList superclass, deriving the remaining
subclasses of PersistableList from the new class instead. In this way,
further persistence-related changes are less likely to inadvertently
alter the behaviour of those two consensus-critical classes.

Removing the superfluous PersistableEnvelope interface from the two
classes (via the base class) will be done in a separate PR.
2020-03-22 14:12:57 +08:00
Florian Reimair
85106b10e8
Check BSQ wallet as well 2020-03-20 18:10:28 +01:00
Christoph Atteneder
17bb7b4ba6
Merge pull request #4045 from jmacxx/fix_btcnode_ipv6
Allow IPv6 connections to Bitcoin nodes
2020-03-20 16:12:35 +01:00
Florian Reimair
28eca1dc7f
Fix error reporting
Until now, an error in the offer creation process is only reported
to the logs, the GUI times out after a while and shows a timeout
error and asks the user to report a bug.

Now, the actual error is reported.
2020-03-20 15:50:17 +01:00
Florian Reimair
565c51bac8
i18n 2020-03-20 15:49:49 +01:00
Florian Reimair
7f86956def
Limit number of unconfirmed transactions 2020-03-20 15:49:35 +01:00
jmacxx
b1a8d944bf
Allow IPv6 connections to Bitcoin nodes
Currently bisq desktop does not accept IPv6 addresses in the settings for
custom nodes or via the --btcNodes command line option.  The separation of
address and port is handled incorrectly in core / BtcNodes::fromFullAddress.
This results in IPv6 addresses being ignored.  Where Tor is enabled for
Bitcoin connections, we need to handle the IPv6 address response
from Tor DNS lookup.

Fixes #3990
2020-03-19 14:20:50 -05:00
Florian Reimair
3fdfb50c47
Limit number of unconfirmed offers 2020-03-19 16:27:06 +01:00
Florian Reimair
8b792f2b17
Draft: Tor 0.4.2.6
Upgrade Tor to a version that defaults to HSv3.
Upgrade jtorctl to handle HSv3 properly.
Upgrade netlayer os it uses the new jtorctl and tor.
2020-03-19 13:06:52 +01:00
sqrrm
7056cffdc6
Merge pull request #4077 from ripcurlx/handle-unsupported-payment-methods
Improve handling of filtered offers and unsupported payment methods
2020-03-19 11:55:32 +01:00
Christoph Atteneder
290bd6ed42
Filter out banned offers completely to prevent any unexpected error by offer misconfigurations 2020-03-19 10:10:01 +01:00
Christoph Atteneder
a859c7485d
Default in case unknown payment methods to high risk and log an error 2020-03-19 09:39:00 +01:00
Christoph Atteneder
b39cdbab1f
Improve messaging layout 2020-03-19 09:38:19 +01:00
Christoph Atteneder
89cfb34b8d
Merge pull request #4031 from jmacxx/fix_resize_issue_4030
Size the offer book on window activation
2020-03-18 14:44:06 +01:00
Christoph Atteneder
d9b54224c0
Merge pull request #4068 from jmacxx/fix_column_sort_range
Sorting order of offers appropriately by min/max range
2020-03-18 14:42:58 +01:00
jmacxx
d4dae4b6b1
Sort order of offers appropriately by min/max range
This change fixes an issue with sorting the offer list when the amount
is shown as a range.  In OfferBookView::activate() we add a listener
for the sortTypeProperty on amountColumn and volumeColumn. When the
sortType is changed we set the comparator to be the approprate property
of the Offer; either getAmount/getMinAmount; getVolume/getMinVolume.

Fixes #3818
2020-03-18 07:09:18 -05:00
jmacxx
02d37b7042
Size the offer book on window activation
Currently the offer book tables are only being sized when the window
proportions change. However if the window is made bigger before the
offer book is opened, then the tables are not resized from their
default.

Other windows (for example Market -> Trades) solve this by make a
sizing call in the activate method.  In order to do this the sizing
code is separated into a layout method where it can be called from
both activate and the existing heightProperty listener. The same
approach is taken here.

Fixes #4030
2020-03-18 07:03:20 -05:00
Christoph Atteneder
fdc17e90eb
Merge pull request #4074 from wiz/tweak-bond-title-strings
Update ops team bonded role titles to match current names
2020-03-17 16:32:52 +01:00
sqrrm
deb3f658f5
Merge pull request #4075 from bisq-network/release/v1.2.9
Merge v1.2.9 release branch back to master
2020-03-17 14:56:11 +01:00
Christoph Atteneder
0c874b04d7
Revert to SNAPSHOT version 2020-03-17 14:44:25 +01:00
wiz
814c786382
Update ops team bonded role titles to match current names
* Rename "Data relay node operator" to "Price node operator"
* Rename "Markets operator" to "Markets API operator"
* Rename "BTC node operator" to "Bitcoin node operator"
2020-03-17 21:42:12 +09:00
Christoph Atteneder
956331d9c4
Revert to previous local node information 2020-03-16 15:04:30 +01:00
Christoph Atteneder
2926b646ec
Revert to previous local node information
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-03-16 15:04:22 +01:00