Commit graph

4060 commits

Author SHA1 Message Date
jmacxx
f1de079901
Change wording of the dust informative message per review by m52go
Moved message text into displaystrings.properties
2020-03-30 21:09:19 -05:00
Christoph Atteneder
5faf77079e
Merge pull request #4097 from ghubstan/remove-read-stdin-loop
Remove read stdin loop
2020-03-30 19:46:09 +02:00
ghubstan
aba595b8e8
Implement requested changes in PR #4097
Change member name OptionParser cmdParser -> parser.
Change server listening port to 9998, client port to 9998.
Change constructor argument from String[] param -> args.
Print the result only, w/out exec time.
Handle help command & print that to stdout;  print help
triggered by user error to stderr.
Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
2020-03-30 12:53:45 -03:00
jmacxx
4fce853dec
Apply the dust fix to trades which use BSQ for the fee
Also, use `Restrictions.getMinNonDustOutput()` for the dust limit
2020-03-29 20:23:11 -05:00
Steven Barclay
74022e0cc4
Make MeritList & VoteWithProposalTxIdList standalone classes
Remove an unnecessary PersistableEnvelope interface by making them
standalone @Value classes with private List fields, instead of extending
PersistableList. As they weren't using any functionality of the latter
other than the getList() and stream() methods, this should not alter
behaviour, outside MeritList::toString.

Also comment out the MERIT_LIST PersistableEnvelope protobuf message
type, which shouldn't be encountered as merit lists were never persisted
directly to a storage file.

This removes the last superfluous PersistableEnvelope implementations,
leaving the following type hierarchy:

  PersistableEnvelope *
  +- NavigationPath
  +- PeerList
  +- PersistableList *
  +- ThreadedPersistableEnvelope *
  |  +- AccountAgeWitnessStore
  |  +- BlindVoteStore
  |  +- DaoStateStore
  |  +- PersistableNetworkPayloadList              *  is abstract
  |  +- ProposalStore
  |  +- SequenceNumberMap
  |  +- SignedWitnessStore
  |  +- TempProposalStore
  |  \- TradeStatistics2Store
  \- UserThreadMappedPersistableEnvelope *
     +- AddressEntryList
     +- DisputeList *
     |  +- ArbitrationDisputeList
     |  +- MediationDisputeList
     |  \- RefundDisputeList
     +- UserThreadMappedPersistableList *
     |  +- BallotList
     |  +- MyBlindVoteList
     |  +- MyProofOfBurnList
     |  +- MyProposalList
     |  +- MyReputationList
     |  +- MyVoteList
     |  +- PaymentAccountList
     |  \- UnconfirmedBsqChangeOutputList
     +- PreferencesPayload
     +- TradableList
     \- UserPayload
2020-03-29 21:13:49 +08:00
Florian Reimair
c588b19074
Log output shows graceful shutdown message 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
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
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
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
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
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
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
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
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
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
Dominykas Mostauskis
1d02aaf1a2
get rid of empty step in BisqSetup 2020-03-16 15:04:16 +01:00
Dominykas Mostauskis
af03629882
Revert to only check local BTC node's port
Testing showed that the new mechanic for checking a local BTC node's
configuration is unstable. This commit reverts to just checking if the
relevant port is open. The recent refactoring and centralization of
logic is still in place.
2020-03-16 15:04:08 +01:00
Christoph Atteneder
646f23ea69
Revert to previous local node information 2020-03-16 14:55:06 +01:00
Christoph Atteneder
253ec9cd8f
Revert to previous local node information
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-03-16 14:54:41 +01:00
Dominykas Mostauskis
167be79269
get rid of empty step in BisqSetup 2020-03-16 12:07:16 +01:00
Dominykas Mostauskis
4d9d06e25b
Revert to only check local BTC node's port
Testing showed that the new mechanic for checking a local BTC node's
configuration is unstable. This commit reverts to just checking if the
relevant port is open. The recent refactoring and centralization of
logic is still in place.
2020-03-16 11:57:28 +01:00
sqrrm
a551eef7d4
Dump delayed txs of closed trades 2020-03-16 09:18:40 +01:00
sqrrm
bb32526210
Dump delayed txs of closed trades 2020-03-15 16:09:37 +01:00
Dominykas Mostauskis
7b60744b08
reformat exception handling 2020-03-14 11:24:59 +01:00
Dominykas Mostauskis
4d9a2bd5a9
put in future timeout in case bitcoinj hangs 2020-03-14 11:24:48 +01:00
Christoph Atteneder
d309fd6e42
Merge pull request #4058 from dmos62/localbitcoinnode-hanging
Give LocalBitcoinNode a timeout in case BitcoinJ hangs during handshake attempt
2020-03-14 11:24:32 +01:00
ghubstan
c0f9073698
Improve AvoidStandyModeService
This change substitutes use of memory efficient, OS supplied sleep/suspend
inhibitor utilties for the silent audio file player on Linux, merges
OSXStandbyModeDisabler functionality into AvoidStandyModeService, and
removes that class.

This change also stops Bisq from running the audio file on OSX;  it is
currently running both caffeinate and the silent audio file, and the avoid
standby mode button in the the OSX settings view is currently toggling
the audio player on and off, but not caffeinate.  (The only way to shut
down caffeinate is by shutting down Bisq.)

The OSX avoid standby mode button button has not been hidden so a cached
'do not avoid standby mode' preference does not leave the user stuck without
a caffeinate service the next time they start Bisq. (They can use it to
turn caffeinate on, but it can't be used to turn it off without shutting
down Bisq too.)

The avoid standy mode button is now displayed on Linux because the native
inhibitor can be toggled on and off.

There is no change to the avoid shutdown service on Windows and Unix.
2020-03-13 15:19:19 -03:00
Christoph Atteneder
c306781252
Remove redundant closing of connection
Fixes #4052, as the peer.close() already calls closeConnection if
a writeTarget is established successfully.
2020-03-13 17:46:53 +01:00
Dominykas Mostauskis
f5253c885f
reformat exception handling 2020-03-13 16:16:50 +01:00
Dominykas Mostauskis
ba229cf5d2
put in future timeout in case bitcoinj hangs 2020-03-13 15:04:46 +01:00
Christoph Atteneder
e7a22f48db
Remove redundant closing of connection
Fixes #4052, as the peer.close() already calls closeConnection if
a writeTarget is established successfully.
2020-03-12 17:52:27 +01:00
Steven Barclay
a829969089
Add holder name for new Faster Payments accounts
Use excludeFromJsonDataMap to add an optional owner full name property
to Faster Payments (GBP) accounts, without affecting the trade JSON
contract (for backwards compatibility). This is to fix #3976, that some
banks have started checking the recipient name.

Make the name a non-optional field for _new_ accounts, but display the
details for old Faster Payments accounts in exactly the same way as
before, only showing the extra field in the info popup, account and
trade step views when it is present.

Also update the now misleading payment instructions in the buyer popup.
TODO: Update translations (which probably aren't needed anyway).
2020-03-11 19:15:12 +08:00
sqrrm
94999670ec
Allow refresh at least every 4 hours 2020-03-11 09:00:47 +01:00