Commit Graph

3978 Commits

Author SHA1 Message Date
Christoph Atteneder
d05e9f74b0
Update data stores for v1.3.0 2020-04-07 21:47:58 +02:00
chimp1984
956cb65a6c
Add BuyerVerifiesDonationAddress task
Buyer was not verifying if the donation address is either the default
DAO param address or the recent one changed by DAO voting. We do not
support past DAO param addresses to avoid that past addresses receive
funds.
2020-04-07 13:15:25 -05:00
Steven Barclay
a71f1e7e3f
Make UserThread::runAfter* methods thread safe
The runAfter* methods delegate to UITimer::run(Later|Periodically) in
the case of the desktop application. These use the JavaFX TimeLine API
(via bisq.common.reactfx.FXTimer) to schedule future events. However,
this API isn't thread safe and isn't meant to be called outside the FX
application thread. This causes occasional misfirings and out-of-order
scheduling when UserThread::runAfter is called outside the user thread.

Make the UITimer::run* methods safe to call from any thread by checking
we are in the application thread and delegating to UserThread::execute
otherwise. This also improves consistency between the contracts of the
runAfter* and execute methods. As the former has many call sites, this
is safer than trying to track down all the non-thread-safe uses.

(The Timer used in the headless app already appears to be thread-safe.)

This fixes #4055 (Bisq sometimes fails to prompt user for password to
unlock wallet), caused by out-of-order scheduling of the execute and
runAfter tasks in the WalletConfig.onSetupCompleted anonymous class
method in bisq.core.btc.setup.WalletsSetup.initialize.

Also prevent an exception caused by non-thread-safe calls into JavaFX
during the shutdown of OpenOfferManager, which was uncovered by the
above, by adding a missing UserThread::execute call.
2020-04-06 13:52:33 +08:00
jmacxx
0139a51b57
Replace the Get Support with Open Trader Chat until trade period is over
Showing an `Open Trader Chat` button until the trade period is over will
reduce the number of unnecessary support tickets and encourage
trader-to-trader dialogue.  If the trade timer expires without
completing the button changes (as before) to open a mediation ticket.

Implementation of this feature requires the button in TradeStepView to
notify its parent TradeSubView which in turn notify its parent
PendingTradesView that trader chat is to be opened.  Basically a
callback interface is passed two levels down the GUI hierarchy.

Fixes #3801
2020-04-05 04:27:02 -05:00
sqrrm
c54a5acbb0
Merge pull request #4094 from jmacxx/fix_dust_trading
Prevent dust outputs from being created during the trade process
2020-04-03 18:30:10 +02:00
sqrrm
d0a8890c09
Merge pull request #4093 from jmacxx/fix_dust_wallet
Prevent dust outputs from being created during withdraw from wallet
2020-04-03 15:56:05 +02:00
Christoph Atteneder
0a22f46ca4
Merge pull request #4112 from freimair/input_parsing
Add parsing to pricenode cmdline inputs
2020-04-02 16:07:52 +02:00
Florian Reimair
57157c7e4f
Report HS version to pricenode (#4027)
* Report HS version to pricenode

In order to evaluate progress on https://github.com/bisq-network/projects/issues/23,
the Bisq app reports its hiddenservice version.

This change is going to be undone as soon as we do not need the
info anymore.

* Added hsversion scraper script

* Added installer/uninstaller

* Cleanup

* Fix unit name
2020-04-02 16:06:00 +02:00
Christoph Atteneder
2b39662861
Merge pull request #4113 from wiz/add-wiz-v3-seednode
Replace a @wiz v2 seednode with a new v3 seednode
2020-04-02 16:04:01 +02:00
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
Christoph Atteneder
a96bfd431d
Merge pull request #4060 from ghubstan/avoid-standby-mode
Improve AvoidStandyModeService
2020-04-01 11:21:32 +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
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
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
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
sqrrm
b5e3e0b1bc
Allow refresh at least every 4 hours 2020-03-10 18:21:25 +01:00
Christoph Atteneder
a183d3bb78
Update translations for v1.2.8 2020-03-10 18:12:56 +01:00
sqrrm
bad27f2a07
Log delayed payout tx bytes as soon as it's signed during trade init 2020-03-10 17:57:54 +01:00
Christoph Atteneder
6c8110aef8
Merge pull request #4040 from sqrrm/log-delayedtx-at-trade-init
Log delayed payout tx bytes as soon as it's signed during trade init
2020-03-10 16:40:52 +01:00
sqrrm
d2d52847dc
Log delayed payout tx bytes as soon as it's signed during trade init 2020-03-10 13:19:02 +01:00
Christoph Atteneder
d786375710
Update bitcoinJ checkpoints 2020-03-10 09:28:29 +01:00
Christoph Atteneder
6d457e4163
Merge pull request #4021 from freimair/update_offer_address_on_clean
Update offer address to new hidden service files
2020-03-10 09:01:30 +01:00
Steven Barclay
91fa07343c
Add UserThreadMappedPersistableEnvelope for greater explicitness
Make the default toPersistableMessage() method of PersistableEnvelope
simply delegate to Proto.toProtoMessage for speed, so that stores can
explicitly implement (Threaded|UserThreadMapped)PersistableEnvelope if
they actually need concurrency control.

As part of this, make PeerList implement PersistableEnvelope directly
instead of extending PersistableList, as it is non-critical & cloned on
the user thread prior to storage anyway, so doesn't need be thread-safe.
In this way, only PaymentAccountList & small DAO-related stores extend
PersistableList, so they can all be made user-thread-mapped.

After this change, the only concrete store classes not implementing
(Threaded|UserThreadMapped)PersistableEnvelope are:

  AccountAgeWitness, BlindVotePayload, ProposalPayload, SignedWitness,
  TradeStatistics2, NavigationPath & PeerList

The first five appear to erroneously implement PersistableEnvelope and
can be cleaned up in a separate commit. The last two are non-critical.

(Make NavigationPath.path an immutable list, for slightly better thread
safety anyway - that way it will never be observed half-constructed.)
2020-03-10 12:05:33 +08:00
Christoph Atteneder
698716d17a
Merge pull request #4029 from sqrrm/dump-failed-delayedtx
Dump failed delayedtx
2020-03-09 11:58:27 +01:00
wiz
622613ccbf
Update URL for mempool.ninja blockchain explorer 2020-03-08 02:32:45 +09:00
sqrrm
529f0a1d39
Merge pull request #4024 from dmos62/network-info-local-bitcoin-node-background-info
Changes to local BTC node reminder in Settings > Network info
2020-03-07 16:40:09 +01:00
Steven Barclay
cbb59c155b
Remove redundant @Nullable from account payload excludeFromJsonDataMap
Since this map is final and every PaymentAccountPayload constructor
initialises it to something nonnull, the @Nullable field annotation is
redundant, so remove it.

Further simplify the code by passing an empty map into the constructor
directly from each subclass constructor, rather than mapping empties to
nulls from each 'proto.getExcludeFromJsonDataMap()' result, then mapping
nulls back to empties in the base constructor. This is safe, since
getExcludeFromJsonDataMap() always returns a nonnull map.

Finally, tidy the code slightly by replacing 'Charset.forName("UTF-8")'
with StandardCharsets.UTF_8 in each PaymentAccountPayload subclass.
2020-03-07 20:08:50 +08:00
sqrrm
df54c121f6
Also dump failed trades delayed payout txs 2020-03-05 18:49:39 +01:00
sqrrm
40fb1ab49f
Move dump delaytx to separate class 2020-03-05 18:28:08 +01:00
sqrrm
879c3f2eb2
Merge pull request #4015 from freimair/remove-uid
Remove unused uid in fee provider service
2020-03-05 18:04:54 +01:00
Steven Barclay
6487f92d84
Make serialisation in FileManager::saveToFile thread-safe
Add toProtoMessageSynchronized() default method to PersistableEnvelope,
which performs (blocking) protobuf serialisation in the user thread,
regardless of the calling thread. This should prevent data races like
the ConcurrentModificationException observed in #3752, under the
reasonable assumption that shared persistable objects are only mutated
in the user thread.

Also add a ThreadedPersistableEnvelope sub-interface overriding the
default method above, to let objects which are expensive to serialise
(like DaoStateStore) be selectively serialised in the 'save-file-task-X'
thread as before, but directly synchronised with each mutating op. As
most objects are cheap to serialise, this avoids a noticeable perf drop
without having to track down every mutating method for each store.

In all cases but one, classes implementing ThreadedPersistableEnvelope
are stores like TradeStatistic2Store, with a single ConcurrentHashMap
field. These require no further serialisation, since the map entries are
immutable, so the only mutating operations are map.put(..) calls which
are already synchronised with map reads. (Even if map.values().stream()
sees updates @ different keys happen out-of-order, it should be benign.)

The remaining case is DaoStateStore, which is only ever reset or
modified via a single persist(..) call with a cloned DaoState instance
and hash chain from DaoStateSnapshotService, so there is no aliasing
risk from the various DAO state mutations done in DaoStateService and
elsewhere.

This should fix #3752.
2020-03-04 15:10:20 +08:00
Dominykas Mostauskis
2105b219c9
Changes to local BTC node info in Settings 2020-03-03 18:50:44 +01:00
Steven Barclay
18f75869a2
Make 'fromProto' static methods return most specific type
Minor change for consistency: narrow the signature of some remaining
such methods, which have return type 'PersistableEnvelope'.

(This excludes some other cases with return type 'NetworkEnvelope'.)
2020-03-04 00:54:48 +08:00
Christoph Atteneder
fa56b91f6d
Revert "Vote Reveal - Silent Fail" 2020-02-28 16:01:03 +01:00
Florian Reimair
ff0d473778
Added node address update 2020-02-28 11:21:20 +01:00
Florian Reimair
b8f0532dba
Move capabilities update 2020-02-28 11:21:20 +01:00
Florian Reimair
8abc52b257
Move protocol version update 2020-02-28 11:21:04 +01:00
sqrrm
1d1cba1e4d
Merge pull request #3982 from dmos62/local-btc-node-configuration-check
Add local Bitcoin node configuration detection
2020-02-27 15:29:49 +01:00
Dominykas Mostauskis
85e4515f53
Remove reference to removed constant 2020-02-27 12:14:32 +01:00
Florian Reimair
edcc8338f2
Remove unused uid in fee provider service
Bisq frequently (once per minute) queries our price nodes for up-to-date
fee information. It does so by HTTP GET request. However, it provided
a UID via the "User-Agent" HTTP header field. This UID has been a random
number which changed everytime Bisq gets started up.

This UID has never been used. Thus, remove it.
2020-02-27 11:38:10 +01:00
Chris Beams
57b7041dfe
Remove unnecessary LOCAL_BITCOIN_NODE_PORT constant
This was originally added with the intention that the local Bitcoin node
port could be customized, but in fact it never could be, because Guice
configuration always hard-wired the value to the default port for the
CurrentBaseNetwork's Parameters (eg. 8333 for BTC_MAINNET).

This change removes the constant, removes any Guice wiring and injection
and localizes the hard-coded assignment to the LocalBitcoinNode
constructor to simplify and make things explicit.

If it is desired to allow users to specify a custom port for their local
Bitcoin node, a proper option shoud be added to Config. In the meantime,
users may work around this by using `--btcNodes=localhost:4242` where
4242 is the custom port. Note however, that the pruning and bloom filter
checks will not occur in this case as the provided node address will not
being treated as a LocalBitcoinNode.
2020-02-27 09:53:40 +01:00
Chris Beams
c1a99ccc55
Polish LocalBitcoinNode method names and visibility
- Rename #willUse => #shouldBeUsed
 - Rename #willIgnore => #shouldBeIgnored
 - Reduce visibility of methods where appropriate
 - Edit Javadoc typos and use @link syntax where appropriate
2020-02-27 09:35:36 +01:00
Chris Beams
b93ca2b2b1
Polish formatting 2020-02-26 21:24:38 +01:00
Dominykas Mostauskis
fdaced460f
Changes to Background information popup 2020-02-26 17:20:55 +01:00
Dominykas Mostauskis
30578bfa9d
Have detection work on other network modes
This makes detection work on other BTC network modes, not only mainnet.
2020-02-26 17:09:01 +01:00
Dominykas Mostauskis
a92b6ad9dc
Minor requested changes (non-github batch) 2020-02-26 14:34:08 +01:00
dmos62
6dec780ab4
Minor requested changes (github batch)
Co-Authored-By: Christoph Atteneder <christoph.atteneder@gmail.com>
2020-02-26 14:21:03 +01:00