Commit Graph

17231 Commits

Author SHA1 Message Date
Alejandro García
f15a5ded64
Merge pull request #6566 from alvasw/ci_use_gradle_build_action
CI: Use official Gradle Build Action
2023-02-05 19:04:03 +00:00
Alejandro García
f254dd9026
Merge pull request #6565 from alvasw/ci_target_setup_java_version_tag
GitHub Actions: Target setup-java action tag
2023-02-05 19:03:38 +00:00
Alejandro García
00bcb057f9
Merge pull request #6564 from alvasw/ci_checkout_do_not_fetch_full_history
Ci checkout do not fetch full history
2023-02-05 19:03:17 +00:00
Alejandro García
e23ad64b90
Merge pull request #6563 from alvasw/ci_target_checkout_version_tag
GitHub Actions: Target checkout action tag
2023-02-05 19:02:28 +00:00
Alejandro García
842c1977c3
Merge pull request #6559 from alvasw/remove_utilities_get_scheduled_thread_pool_executor
Remove unused Utilities.getScheduledThreadPoolExecutor(...)
2023-02-05 18:59:06 +00:00
Alejandro García
4e4e7fb67a
Merge pull request #6558 from alvasw/broadcaster_shutdown_executor
Broadcaster: Shutdown executor
2023-02-05 18:58:42 +00:00
Alejandro García
e6f2703738
Merge pull request #6557 from alvasw/export_json_files_service_shutdown_executor
ExportJsonFilesService: Shutdown Executor
2023-02-05 18:58:00 +00:00
Alejandro García
80ea00d104
Merge pull request #6556 from alvasw/scrypt_utils_fix_thread_leak
ScryptUtil: Fix thread leak
2023-02-05 18:57:10 +00:00
Alva Swanson
54d236ab67
CI: Use official Gradle Build Action 2023-02-05 14:31:49 +01:00
Alva Swanson
fe67785060
GitHub Actions: Target setup-java action tag 2023-02-05 14:18:28 +01:00
Alva Swanson
e7cd6a9570
Checkout (CI): Don't fetch full history 2023-02-05 14:13:28 +01:00
Alva Swanson
54668627ce
GitHub Actions: Target checkout action tag 2023-02-05 14:12:05 +01:00
Alva Swanson
bf95af07bd
Remove unused Utilities.getScheduledThreadPoolExecutor(...) 2023-02-05 13:42:39 +01:00
Alva Swanson
7e984f86ca
Broadcaster: Shutdown executor 2023-02-05 13:38:50 +01:00
Alva Swanson
7665780ca4
ExportJsonFilesService: Shutdown Executor 2023-02-05 13:36:09 +01:00
Alva Swanson
5506443d54
ScryptUtil: Fix thread leak
Each time someone called the static method
ScryptUtil.deriveKeyWithScrypt(...) a new worker pool was created. The
worker pool was never shutdown.
2023-02-05 13:31:15 +01:00
Alejandro García
e25c27ec99
Merge pull request #6551 from alvasw/fix_burningman_accounting_store_data_races
Fix BurningManAccountingStore data races
2023-02-04 12:43:36 +00:00
Alva Swanson
4779c82d0b
Fix BurningManAccountingStore data races
Multiple threads read and write to the accounting blocks list causing
data races. Luckily, the LinkedList threw a ConcurrentModificationException
to limit damage. Now, a ReadWriteLock protects the LinkedList against
data races. Multiple threads can read the list at the same time but only
one thread can write to it. Other writing threads wait until it's their
turn.

Fixes #6545
2023-02-03 23:41:51 +01:00
Alejandro García
8dbdecd6f1
Merge pull request #6549 from alvasw/fix_mailbox_message_service_thread_leak_explosion
Fix MailboxMessageService thread leak/explosion
2023-02-03 15:15:39 +00:00
Alejandro García
f24e0f231d
Merge pull request #6548 from alvasw/fix_dao_state_storage_service_shutdown_data_corruption_bug
DaoStateStorageService: Fix shutdown data corruption bug
2023-02-03 15:14:44 +00:00
Alejandro García
2239924225
Merge pull request #6552 from stejbac/speed-up-closed-trades-view-load
Speed up loading and scrolling of trade history
2023-02-03 15:13:58 +00:00
Alejandro García
27613de363
Merge pull request #6546 from jmacxx/offer_availability_dao_sync_check
Maker check DAO health when handling OfferAvailabilityRequest.
2023-02-03 15:10:57 +00:00
Steven Barclay
57b2b4b864
Add txs-by-id cache to WalletService to speed up trade history view
Add a third cache to WalletService, cleared upon wallet change events,
which maps txIds to txs. This allows the speedup of repeated calls to
'WalletService.getConfidenceForTxId', by avoiding the need to copy and
scan the entire set of wallet txs to find the one with matching id,
for each method invocation.

This is mainly to provide a further speedup to the closed-trades-view
load, by making it much faster to filter the list of BSQ swap trades by
tx confirmation status in 'ClosedTradesDataModel.applyList' and
'ClosedTradesManager.getNumPastTrades'.
2023-02-01 23:02:25 +08:00
Steven Barclay
42ea12f74c
Rename WalletService.getAddressToMatchingTxSetMultiset to multimap
The return value is a (cached) SetMultimap, not a multiset.
2023-02-01 20:48:32 +08:00
Steven Barclay
f02bc787d5
Optimize 'getNumPastTrades' to speed up trade history view
Reduce a bottleneck in the closed-trades-view load & table scrolling,
caused by a call to 'ClosedTradesManager.getNumPastTrades' for each
list item displayed. This repeatedly scans the entire collection of
closed trades and BSQ swap trades, in order to count all those which
share a given peer node address. (Scanning the BSQ swap trades is
particularly slow due to their filtering by tx confirmation status.)

To this end, cache the counts of trades by peer node address with a
nullable Multiset field in ClosedTradesManager & BsqSwapTradeManager,
so that the trades are scanned at most once when the view loads. Add
listeners to clear the respective cache when the trade list changes or
the BSQ wallet txs change.
2023-02-01 19:59:48 +08:00
Alejandro García
742d251193
Merge pull request #6550 from alvasw/xmr_tx_proof_request_shutdown_executor_service_in_terminate
XmrTxProofRequest: Shutdown executor service in terminate()
2023-01-31 19:11:35 +00:00
Alejandro García
9b61966e07
Merge pull request #6547 from alvasw/make_proto_output_stream_thread_safe
Make ProtoOutputStream thread-safe
2023-01-31 19:09:24 +00:00
Alejandro García
3f518d1602
Merge pull request #6538 from yonson2023/fix_issue_6536
Fix delimiter used for combined fields copypaste.
2023-01-31 19:07:54 +00:00
Alva Swanson
d9372f3a4c
XmrTxProofRequest: Shutdown executor service in terminate() 2023-01-31 17:21:34 +02:00
Alva Swanson
10c46a3163
Fix MailboxMessageService thread leak/explosion
Each time when MailboxMessageService.onAdded(...) got called with
multiple mailbox entries a new thread got created. That thread was never
shutdown. This change explicitly creates a new Thread and sets its
result with a SettableFuture. After its computation the thread
terminates.
2023-01-31 17:02:09 +02:00
Alva Swanson
1066e83a27
DaoStateStorageService: Fix shutdown data corruption bug
The DaoStateStorageService submits tasks to a daemon thread executor
service. The JVM continues to execute threads until all non-daemon
threads have terminated. So the JVM will kill the DaoStateStorageService
during write requests leading to data corruption.

This change uses a non-daemon thread executor service at waits during
shutdown until all data is written to disk.
2023-01-31 16:04:06 +02:00
Alva Swanson
871656b18d
Make ProtoOutputStream thread-safe
Before SynchronizedProtoOutputStream created a new thread and made a
blocking call to ProtoOutputStream.writeEnvelope(...). Each connection
had an instance of SynchronizedProtoOutputStream, so we had a redundant
thread per connection. This change makes ProtoBufOutputStream
thread-safe and reduces the number of thread per connection as a
side effect.
2023-01-30 17:50:06 +02:00
jmacxx
d43a0e42cf
Maker check DAO health when handling OfferAvailabilityRequest. 2023-01-29 21:46:56 -06:00
Alejandro García
f43b5fe04b
Merge pull request #6544 from jmacxx/fix_withdrawal_fee_estimation
Fix withdrawal fee calculation & the min relay fee problem.
2023-01-28 19:25:06 +00:00
Alejandro García
0a24f4c2d4
Merge pull request #6543 from alvasw/sychronized_proto_output_stream_try_graceful_shutdown_first
Sychronized proto output stream try graceful shutdown first
2023-01-28 19:24:32 +00:00
Alejandro García
b87de3dcbd
Merge pull request #6542 from alvasw/connection_close_proto_outputstream_before_socket
Connection: Close protoOutputStream before closing socket
2023-01-28 19:23:43 +00:00
Alejandro García
71c05f6ac2
Merge pull request #6541 from alvasw/dao_state_storage_service_do_not_call_executor_service_shutdown_twice
DaoStateStorageService: Don't call executorService.shutdown() twice
2023-01-28 19:23:23 +00:00
Alejandro García
5562b7688f
Merge pull request #6540 from alvasw/move_all_executor_service_creation_to_utilities
Centralize all ExecutorService creations in Utilities
2023-01-28 19:22:39 +00:00
Alejandro García
74d0eaf462
Merge pull request #6537 from yonson2023/fix_issue_6529
Differenciate offer removal pop-ups for BSQ swaps and regular trades.
2023-01-28 19:21:19 +00:00
jmacxx
efac12e8ce
Fix withdrawal fee calculation & the min relay fee problem. 2023-01-27 12:02:02 -06:00
Alva Swanson
7524425e74
SychronizedProtoOutputStream: Try graceful shutdown first
ProtoOutputStream is not thread-safe. This change tries to close the
stream on the same thread first. Before forcefully killing it after a
timeout.
2023-01-27 17:14:17 +02:00
Alva Swanson
9e8b54054a
Connection: Create shutdown timeout constant 2023-01-27 17:14:17 +02:00
Alva Swanson
e593adb602
Connection: Close protoOutputStream before closing socket
The protoOutputStream depends on the sockets OutputStream. Closing the
socket before closing the protoOutputStream will always trigger an
IOException.
2023-01-27 17:08:08 +02:00
Alva Swanson
eca9aedaa7
DaoStateStorageService: Don't call executorService.shutdown() twice
MoreExecutors.shutdownAndAwaitTermination(executorService, ...) calls
executorService.shutdown() before starting its force shutdown timer.
2023-01-27 16:28:44 +02:00
Alva Swanson
6a8fb05156
Centralize all ExecutorService creations in Utilities 2023-01-27 16:15:24 +02:00
Alejandro García
d682d956a1
Merge pull request #6539 from HenrikJannsen/improve_price_feed_service
Improve price feed service
2023-01-27 13:45:08 +00:00
HenrikJannsen
fa03f16917
Use auto-indexed thread name as prefix for thread name
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-26 12:27:30 +08:00
yonson2023
0b049d5a52
Fix delimiter used for combined fields copypaste. 2023-01-25 10:46:45 -06:00
yonson2023
5d55248b7e
Differenciate offer removal pop-ups for BSQ swaps and regular trades. 2023-01-25 10:38:19 -06:00
Alejandro García
74e1078318
Merge pull request #6527 from yonson2023/disk_space_warning
Warn user when free disk space is too low.
2023-01-24 16:17:11 +00:00