Commit Graph

11066 Commits

Author SHA1 Message Date
wiz
3775788a3f
Remove a @wiz bitcoin node to reduce total count to 16 nodes 2020-04-02 22:08:51 +09:00
wiz
8b8feae4c9
Replace a @wiz v2 seednode with a new v3 seednode 2020-04-02 21:49:05 +09:00
Florian Reimair
84be0da768
Add parsing to pricenode cmdline inputs 2020-04-02 11:08:17 +02:00
ghubstan
ee867013aa
Resolve grpc-auth and gson dependency conflicts
This change forces :relay's grpc-auth version to match the
version of all other io.grpc-* dependencies, and gets rid of
the duplcate gson dependency v2.8.2
2020-04-01 10:01:17 -03:00
Christoph Atteneder
a96bfd431d
Merge pull request #4060 from ghubstan/avoid-standby-mode
Improve AvoidStandyModeService
2020-04-01 11:21:32 +02:00
Christoph Atteneder
6c59f6eda3
Merge pull request #4107 from freimair/monitoring_install_script
Set expiry date to years in the future
2020-04-01 10:45:54 +02:00
Florian Reimair
a7f72cf6bd
Set expiry date to +years 2020-03-31 17:10:26 +02:00
sqrrm
55048dc4a3
Add vwap bsq price (#4098)
* Remove unused code

* Add VWAP calculation for USD/BSQ price

* Remove unused argument
2020-03-31 16:34:14 +02:00
Christoph Atteneder
c62c2d8586
Merge pull request #4028 from freimair/tor_0.4.2.6
Tor 0.4.2.6
2020-03-31 16:04:13 +02:00
Christoph Atteneder
73788e406f
Merge pull request #4106 from robkaandorp/add-onion-address-for-btcnode
Add onion address for @robkaandorp's btcnode
2020-03-31 15:27:20 +02:00
Christoph Atteneder
9891e58f2c
Merge pull request #4047 from freimair/graceful_shutdown
Added graceful shutdown hook
2020-03-31 15:20:58 +02:00
Rob Kaandorp
9e8113f7f9
Add onion address for @robkaandorp's btcnode
Network proposal https://github.com/bisq-network/proposals/issues/189
2020-03-31 14:14:27 +02:00
Christoph Atteneder
13604b61e5
Merge pull request #4104 from cbeams/fix-4103
Avoid startup failure when bannedSeedNodes arg is empty
2020-03-31 11:01:05 +02:00
Chris Beams
0ed5b4ebfc
Avoid startup failure when bannedSeedNodes arg is empty
This commit fixes #4103, where it was demonstrated that a
bisq.properties file containing the following entries would cause Bisq
to fail at startup:

    baseCurrencyNetwork=BTC_MAINNET
    bannedSeedNodes=
    bannedBtcNodes=
    bannedPriceRelayNodes=5bmpx76qllutpcyp

The source of the problem was that the jOptSimple argument parsing
library converts the empty value of bannedSeedNodes to a List<String> of
size 1 where the 0th element of the list is an empty string. This empty
string was then attempted to be converted into a new NodeAddress,
causing a validation error. This conversion happened during Guice
wiring, and manifested as a blank white screen appearing as wiring
errors often do in Bisq.

The fix is simple and surgical. We now filter out any empty string
elements before attempting to convert the banned seed node value to a
new node address. I have reviewed the other related options, such as
bannedPriceRelayNodes and bannedBtcNodes, and they do not cause the
problem described above, so no filtering or other changes have been made
to the way they work.
2020-03-31 10:42:15 +02:00
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
Florian Reimair
8f7a4991fd
Tor 0.4.2.6
Now the tor binaries are properly released on their own. Thus, there
is no need for them to be in the Bisq repo. Added checksums as well.
2020-03-30 16:15:26 +02: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
jmacxx
ea8b327f7b
Change the constant used to determine what amount is considered dust
Now using `Restrictions.getMinNonDustOutput()` which equates to 546 sats
2020-03-29 18:23:48 -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
jmacxx
378c57492b
Address issues raised in review by sqrrm on 2020-03-26
- added a comment describing the `removeDust` method and its effects.
- use more descriptive variable names.
- made the logging more verbose to help log readers.
- use a constant for the dust limit
- add a notice to the user when dust is padded to the fee
2020-03-28 21:22:40 -05:00
Steven Barclay
594b42a865
Delete PersistableHashMap & simplify PersistableList
Remove unused functionality to pass a custom 'toProto' function via a
constructor or setter, as it was unused and all subclasses override the
toProtoMessage() method anyway. In this way, the method may be removed
and the class (+ UserThreadMappedPersistableList) made abstract.

Also it appears PersistableHashMap was never used, so remove it.
2020-03-28 19:49:53 +08:00
Florian Reimair
50ba2cd740
Only send message bundle if not stopped 2020-03-28 11:27:37 +01:00
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