Commit Graph

17289 Commits

Author SHA1 Message Date
Steven Barclay
4b2c7b15c4
Iterate over wallet keychains instead of using hard coded BIP32 paths
Add private method 'WalletInfoView.addAccountPaths', similar to the
method 'addXpubKeys', to iterate over the active wallet keychains,
formatting & displaying the derivation paths, instead of using the 4
constants defined in BisqKeyChainGroupStructure. Also simplify the code
slightly by updating the 'gridRow' field directly instead of passing it
as a method argument.
2023-03-11 15:03:24 +08:00
Steven Barclay
1672bb6e74
Add missing segwit BSQ keychain path to wallet info
Add the new account path "44'/142'/1'" for segwit BSQ to the wallet info
view, which was missed from PR #5109 making the wallet & UI changes to
implement segwit BSQ. Also format the paths from the constants defined
in 'BisqKeyChainGroupStructure', instead of using string literals, so
that they are only defined in one place. (Though it is extremely
unlikely the paths would ever change.)
2023-03-11 09:44:15 +08:00
Alejandro García
cfeb597cf1
Merge pull request #6591 from bisq-network/dependabot/github_actions/gradle/gradle-build-action-2.4.0
Bump gradle/gradle-build-action from 2.3.3 to 2.4.0
2023-02-27 21:24:38 +00:00
Alejandro García
cbc30f497d
Merge pull request #6590 from yonson2023/fix_issue_5725
Payout tx confidence should be after block height of deposit.
2023-02-27 21:23:50 +00:00
dependabot[bot]
df6148fafe
Bump gradle/gradle-build-action from 2.3.3 to 2.4.0
Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](https://github.com/gradle/gradle-build-action/compare/v2.3.3...v2.4.0)

---
updated-dependencies:
- dependency-name: gradle/gradle-build-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 14:58:42 +00:00
yonson2023
030bb3f64c
Payout tx confidence should be after block height of deposit. 2023-02-19 16:21:54 -06:00
Alejandro García
d83a205fe2
Merge pull request #6586 from alvasw/implement_network_statistics_service
Decouple NetworkStatistics from UI thread [1/2]
2023-02-18 18:13:06 +00:00
Alejandro García
71615824a8
Merge pull request #6585 from yonson2023/fix_payment_started_bug
Fix NPE at trade payment started event.
2023-02-18 18:12:04 +00:00
Alva Swanson
4c6c9100b3
Implement NetworkStatisticsService
The NetworkStatisticsService is an attempt to decouple the network
statistic computation from the UI thread. Here, the
NetworkStatisticsService schedules repeating tasks on a
ScheduledExecutorService.
2023-02-15 20:35:58 +02:00
Alejandro García
bed76128b7
Merge pull request #6580 from alvasw/server_remove_redundant_is_stopped_bool
Server: Remove redundant isStopped boolean
2023-02-15 18:32:57 +00:00
Alejandro García
3dc3464114
Merge pull request #6581 from alvasw/rename_network_filter_to_ban_filter
Rename NetworkFilter to BanFilter
2023-02-15 18:24:55 +00:00
Alejandro García
9d091bea44
Merge pull request #6588 from jmacxx/fix_exception_accountingstore
Fix exception due to missing read lock.
2023-02-15 18:23:17 +00:00
jmacxx
6801ebfbd7
Fix exception due to missing read lock. 2023-02-15 10:48:59 -06:00
Christoph Atteneder
7d2e110a1d
Merge pull request #6582 from alvasw/remove_unused_connection_listener_on_error
Remove unused ConnectionListener.onError(...) method
2023-02-15 17:43:29 +01:00
Christoph Atteneder
229eeef024
Merge pull request #6583 from bisq-network/dependabot/github_actions/actions/setup-java-3.10.0
Bump actions/setup-java from 3.9.0 to 3.10.0
2023-02-15 16:38:13 +01:00
Christoph Atteneder
4f2a68acc4
Merge pull request #6584 from ghubstan/adjust-to-removed-daoactivated-opt
Adjust to removed --daoActivated opt
2023-02-15 16:34:37 +01:00
Christoph Atteneder
91f77ec722
Merge pull request #6587 from HenrikJannsen/reduce_height_of_bm_table
Reduce burningman table height to 5 rows
2023-02-15 16:30:13 +01:00
HenrikJannsen
c74319c969
Reduce burningman table height to 5 rows
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-02-15 17:34:25 +07:00
yonson2023
9d4d575739
Fix NPE at trade payment started event. 2023-02-13 21:29:41 -06:00
ghubstan
ade885e205
Ignore v1 protocol bsq offer test 2023-02-13 19:14:08 -03:00
ghubstan
e26955bf60
Adjust to removal of --daoActivated opt 2023-02-13 19:09:54 -03:00
ghubstan
f69fb3a959
Update for bticoind v23 + IDE format 2023-02-13 19:09:01 -03:00
dependabot[bot]
0507ce46b0
Bump actions/setup-java from 3.9.0 to 3.10.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 14:59:39 +00:00
Alva Swanson
d411ae1252
Remove unused ConnectionListener.onError(...) method 2023-02-12 20:44:38 +02:00
Alva Swanson
f9a0e5d6d0
Rename NetworkFilter to BanFilter 2023-02-12 20:30:58 +02:00
Alva Swanson
81a224bfea
Server: Remove redundant isStopped boolean
We can track the server status with the interrupted status of the
server thread. The isStopped boolean is not needed.
2023-02-12 20:23:25 +02:00
Alejandro García
b4822761a8
Merge pull request #6578 from alvasw/server_extract_running_check_to_is_active_method
Server: Extract isStopped check to method
2023-02-12 18:13:49 +00:00
Alejandro García
f00152d42f
Merge pull request #6577 from alvasw/server_switch_to_atomic_is_stopped_bool
Server: Switch to atomic isStopped boolean
2023-02-12 18:13:05 +00:00
Alejandro García
4a4e13c5da
Merge pull request #6576 from alvasw/move_server_thread_to_server_class
NetworkNode: Move server threading logic to server
2023-02-12 18:12:13 +00:00
Alejandro García
581fbd1d2d
Merge pull request #6579 from stejbac/further-speed-up-transactions-view-load
Further speed up transactions view load
2023-02-12 14:05:36 +00:00
Alejandro García
3b1a5f0337
Merge pull request #6575 from yonson2023/fix_exception_governance
[1.9.10] Fix unhandled exception in DAO Governance view.
2023-02-12 14:04:39 +00:00
Alejandro García
0bdebb59e8
Merge pull request #6569 from alvasw/pass_connection_uid_to_executor_service_name
Connection: Pass uid to executor service name
2023-02-12 14:04:05 +00:00
Steven Barclay
6a84500710
Cache txo addresses to speed up isRefundPayoutTx in some cases
In the (hopefully rare) case that the user has multiple past trades that
end in arbitration, the entire wallet tx output set was scanned once for
every such trade (via 'TransactionAwareTrade.isRefundPayoutTx' calls),
to look for any outputs matching the payout address. This potentially
causes a slowdown of the Transaction view load for each new arbitration
case added. To avoid this problem, cache the last set of recipient
address strings of the provided tx, as the next call to
'isRefundPayoutTx' is likely to be for the same tx.

Also check that there is exactly one input (the multisig input) for any
candidate delayed payout tx, to speed up 'isDelayedPayoutTx' in case the
wallet contains many unusual txs with nonzero locktime.
2023-02-12 12:35:05 +08:00
Alva Swanson
2127e0745c
Server: Extract isStopped check to method 2023-02-11 22:19:43 +02:00
Alva Swanson
3cd24d67ed
Server: Switch to atomic isStopped boolean 2023-02-11 21:41:50 +02:00
Alva Swanson
ee2157aa24
NetworkNode: Move server threading logic to server 2023-02-11 21:40:55 +02:00
yonson2023
baad09bfc8
Fix unhandled exception when empty txId passed. 2023-02-11 08:55:08 -06:00
Steven Barclay
37b6a4becf
Cache formatters to speed up DisplayUtils.formatDateTime
Make 'FormattingUtils.formatDateTime(Date, boolean)' two or three times
faster by caching the 'java.text.DateFormat' objects used to format the
given date & time in either the local or UTC time zone. Since these
formatters are not thread safe (though they may be reused), use a
ThreadLocal to store them (as a tuple, along with the current locale to
make sure it hasn't changed since the last invocation).

This is a minor hotspot for the Transactions view load, since the date
strings in TransactionsListItem are formatted eagerly (via DisplayUtils)
for the purpose of filtering the items by substring match. (Other list
views seem to format dates lazily, though it's possible that there will
be speedups elsewhere in the UI.)
2023-02-11 15:47:04 +08:00
Steven Barclay
ee45202521
Remove redundant listener from TransactionsListItem
Eliminate a minor quadratic time bug, caused by the unnecessary addition
of a (BtcWalletService) TxConfidenceListener for each list item in the
Transactions view. (Since the confidence listeners are internally held
in a CopyOnWriteArraySet, this sadly runs in quadratic time, slowing
down the Transactions view load a little.)

The confidence listener is apparently redundant because of a set of
calls to 'TransactionsListItem.cleanup' immediately upon construction of
the item list, which removes all the listeners just added. (This code
appears to date from at least February 2016, in commit c70df86.)

(The confidence indicators are kept up to date by simply reloading the
entire list upon each wallet change event.)
2023-02-11 09:40:03 +08:00
Steven Barclay
2e8f03061e
TransactionsListItem cleanup: remove unused local variable
(This also avoids a redundant call to 'Tradable.getShortId', shaving off
another percent or two from the Transactions view load.)
2023-02-11 08:04:21 +08:00
Steven Barclay
97ef9c1308
Place filter in front of 'isRelatedToTransaction' for speedup
Use a crude Bloom filter (of sorts) to cut down the quadratic number of
calls to 'TransactionAwareTradable.isRelatedToTransaction' (that is, one
for each tx-tradable pair) during the Transactions view load. In this
way, we may reduce the number of calls roughly 40-fold, for a Bisq
instance with similar numbers of BSQ swap trades and escrow trades.

(Sadly, profiling does not show a 40-fold reduction in the size of the
'isRelatedToTransaction' hotspot, likely due to the remaining calls
being expensive ones involving disputed trades or unusual txs with
nonzero locktime, e.g. dust attacks or funds from Electrum wallets.)

To this end, partition the wallet transactions into 64 pseudo-randomly
chosen buckets (with a dedicated bucket for txs which might be delayed
payouts, namely those with nonzero locktime). Add an interface method,
'TransactionAwareTradable.getRelatedTransactionFilter', which returns an
IntStream of all the indices of buckets where a related tx may plausibly
be found. Where this is unclear, e.g. for trades involved in a dispute,
just return everything (that is, the range 0..63 inclusive).

Add a class, 'RelatedTransactionFilterSlices', that holds a provided
list of TransactionAwareTradable instances and 64 bitsets of all the
slices through their respective filters (each realised as 64-bit word
instead of a streams of integers). In this way, a list of tradables
plausibly related to any given tx may be quickly found by simply
selecting the appropriate bitset of the 64 (by the tx bucket index).
2023-02-11 07:55:36 +08:00
Steven Barclay
19a80d19bb
Short circuit txId hex encoding for BSQ swap offers
Inline a local variable, to eliminate another minor Sha256Hash.toString
hotspot in the Transactions view load, this time coming from
'TransactionsAwareOpenOffer.isRelatedToTransaction'. This is helpful in
the case that the user has a large number of (possibly disabled) BSQ
swap offers.
2023-02-10 10:28:02 +08:00
Steven Barclay
fb78345ba3
Avoid repeated Set<Tradable> build in transactions view load
Move the line,

   Set<Tradable> tradables = tradableRepository.getAll();

to the top level of 'TransactionsView.updateList', instead of needlessly
calling 'TradableRepository.getAll' (which builds a new set every
invocation) for each wallet transaction being iterated over.

This was causing a significant slowdown of the view load.
2023-02-09 21:35:32 +08:00
Steven Barclay
3aacc99f38
Tidy up TransactionsView slightly
1. Expression lambda -> method reference;
2. Statement lambda -> expression lambda;
3. Field -> local variable.
2023-02-09 21:16:40 +08:00
Steven Barclay
c913b7a428
Cache last txId to further speed up 'isRelatedToTransaction'
Use a mutable static tuple field to cache the last result of
'Sha256Hash.toString', which is used to get the ID string of the input
tx, when calling 'TransactionAwareTrade.isRelatedToTransaction'. In this
way, consecutive calls to 'isRelatedToTransaction' on the same input tx
(over all the past trades, as done by 'TransactionsView.updateList') are
sped up significantly, since hex encoding the txId is a bottleneck.
2023-02-09 17:13:14 +08:00
Steven Barclay
88dd924577
Clean up TransactionAwareTrade & speed it up slightly
Replace the "Optional.ofNullable(...)..." constructs with more direct
code using short-circuit operators, as this is shorter and a little
faster. Also use "trade.get[Deposit|Payout]TxId()" instead of the code
"trade.get[Deposit|Payout]TxId().getTxId()", as (upon inspection of the
code) there should never be a case where the deposit/payout transaction
field of a Trade object is set but the respective txID field is null (or
set to an inconsistent value).

Also remove a redundant 'RefundManager.getDisputesAsObservableList'
method call, which was also slowing things down slightly.

The minor speedups afforded by the above are important because the
method 'TransactionAwareTrade.isRelatedToTransaction' is called a
quadratic number of times and consequently a major bottleneck when
loading the Transactions view.
2023-02-09 14:34:18 +08:00
Alva Swanson
20c7dc3777
Connection: Rename singleThreadExecutor to executorService 2023-02-07 11:58:56 +01:00
Alva Swanson
b1e16f2748
Connection: Pass uid to executor service name 2023-02-07 11:58:10 +01:00
Alejandro García
b1e2cb03ad
Merge pull request #6568 from alvasw/gradle_apply_central_bisq_java_conventions
Gradle apply central bisq java conventions
2023-02-05 22:43:48 +00:00
Alejandro García
c41f21bbad
Merge pull request #6567 from alvasw/create_gradle_java_convention_precompiled_script
Gradle: Create bisq.java-conventions precompiled script
2023-02-05 22:42:53 +00:00