Commit graph

3887 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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