Commit Graph

1396 Commits

Author SHA1 Message Date
Alva Swanson
5ac3a10806
Support external Tor hostname 2023-10-08 23:19:32 +02:00
Alva Swanson
9c177830c0
common: Don't set Implementation-Version to commit hash 2023-08-04 13:02:10 +02:00
Alva Swanson
71c70540fb
common: Switch to 'bisq.javafx' Gradle Plugin 2023-08-04 12:58:29 +02:00
Alva Swanson
eb3a663b64
common: Move build configuration to its own build.gradle 2023-08-04 12:55:08 +02:00
Alejandro García
d95dc58a06
Bump version number for v1.9.12 2023-06-30 23:55:18 +02:00
Alejandro García
9f535bf163
Update data stores for v1.9.11 2023-06-22 15:45:34 +03:00
Alejandro García
31b427c92e
Bump version number for v1.9.11 2023-06-22 14:35:22 +03:00
Alejandro García
ac8ad24807
Merge pull request #6697 from stejbac/speed-up-burningman-and-statistics-view-loads
Speed up burningman and statistics view loads
2023-05-16 15:53:44 +00:00
Steven Barclay
a489697a54
Speed up candle data creation in getUpdateChartResult
Optimise (further) the ChartCalculations methods 'getItemsPerInterval' &
'getCandleData' by replacing HashSets in the former with sorted sets,
which avoids relatively expensive calls to 'TradeStatistics3.hashCode'
and needless subsequent re-sorting by date in 'getCandleData'. (Forming
the trade statistics into an ImmutableSortedSet, OTOH, is cheap since
they are already encountered in chronological order.)

Further optimise the latter by using a primitive array sort of the trade
prices to calculate their median, instead of needlessly boxing them and
using 'Collections.sort'.
2023-05-10 19:41:23 +01:00
Steven Barclay
1f8538f6c1
Add utilities for SortedSet ranging with mapped keys & predicates
Provide a 'RangeUtils' class for computing subsets of a navigable set
with natural element order, with each bound defined by a mathematical
filter (that is, a predicate specifying whether an element is 'big' -
true, or 'small' - false), instead of a specific element. This allows
the subset of all elements which map into a given range to be computed,
provided the mapping function is (strictly or non-strictly) increasing.
Provide a fluent interface for this in RangeUtils (with unit tests).

To support this, provide a Comparable sub-interface, 'ComparableExt', of
elements which may be compared with marks/delimiters instead of just
elements of the same type, to work round the limitation that sorted (&
navigable) Sets/Maps in Java do not support general binary searching
with a filter (predicate) on the keys instead of just a specific key.

This will make it possible to efficiently take subsets of objects within
a given date range, say, without having to scan the entire set, provided
it is sorted (w.r.t. a suitable natural order).
2023-05-10 19:41:19 +01:00
Alva Swanson
02107ad9f0
Common: Reformat MathUtilsTest 2023-05-08 17:19:35 +10:00
napoly
e19ffe2308
Upgrade JUnit4 to JUnit5 Jupiter 2023-05-04 20:04:49 +02:00
Alejandro García
31008865c3
Update data stores for v1.9.10 2023-04-03 10:39:44 +10:00
Alejandro García
4b4adbc2db
Bump version number for v1.9.10 2023-04-02 11:09:10 +10: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
c61bd70ead
Merge pull request #6562 from alvasw/move_get_single_thread_executor_to_own_utils
Move SingleThreadExecutors to its own Utils class
2023-02-05 22:42:02 +00:00
Alva Swanson
53837bf00b
Move SingleThreadExecutors to its own Utils class 2023-02-05 22:11:35 +01:00
Alva Swanson
b2870ccee3
Delagate thread pool shutdown to Guava MoreExecutors 2023-02-05 22:09:56 +01:00
Alva Swanson
c1c4caf87f
Gradle: Apply bisq.java-conventions to all projects 2023-02-05 22:02:13 +01:00
Alva Swanson
bf95af07bd
Remove unused Utilities.getScheduledThreadPoolExecutor(...) 2023-02-05 13:42:39 +01: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
6a8fb05156
Centralize all ExecutorService creations in Utilities 2023-01-27 16:15:24 +02:00
Alejandro García
fda3c45008
Merge pull request #6501 from HenrikJannsen/always_include_high_prio_payload_in_get_data_response
Always include high prio payload in get data response
2023-01-12 16:33:08 +00:00
Alejandro García
2705244e64
Merge branch 'master' into release/v1.9.9 2023-01-12 15:01:22 +00:00
Alejandro García
c55ecfa2d4
Bump version number for v1.9.9 2023-01-07 15:18:15 +02:00
HenrikJannsen
23e45a2843
Add GetDataResponsePriority enum
Add default getGetDataResponsePriority impl. to NetworkPayload

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-04 18:23:26 -05:00
HenrikJannsen
64db59ba53
Catch RejectedExecutionException at UncaughtExceptionHandler and log error instead calling the uncaughtExceptionHandler
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-01-04 14:05:19 +02:00
HenrikJannsen
abbee20284
Remove CompletableFutureUtil
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:54:10 -05:00
HenrikJannsen
c3acd5fb4a
Handle OutOfMemoryError to cause a shutdown at seed node 2022-12-27 17:54:01 -05:00
HenrikJannsen
e0f4aa281a
Catch RejectedExecutionException at UncaughtExceptionHandler and log error instead calling the uncaughtExceptionHandler
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-27 17:11:38 -05:00
Christoph Atteneder
cdb9fe44c1
Bump version number for v1.9.8 2022-12-22 08:44:13 +01:00
HenrikJannsen
30afccb2d6
Use ThreadPoolExecutor with custom set queueCapacity instead of CachedThreadPool
The previously used newCachedThreadPool carries higher risk for execution exceptions if exceeded.

Originally we had only one executor with a corePoolSize of 15 and a maximumPoolSize of 30 and queueCapacity was set to maximumPoolSize.
This was risky when the 15 corePool threads have been busy and new messages or connection creation threads are
queued up with potentially significant delay until getting served leading to timeouts.
Now we use (if maxConnections is 12) corePoolSize of 24, maximumPoolSize 36 and queueCapacity 10. This gives
considerable headroom. We also have split up the executors in 2 distinct ones.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-19 16:50:55 +01:00
Christoph Atteneder
2b77f777a3
Update data stores for v1.9.7 2022-12-14 11:13:23 +01:00
Christoph Atteneder
68ea90a1fb
Bump version number for v1.9.7 2022-12-14 10:36:20 +01:00
Christoph Atteneder
5dea677644
Merge pull request #6459 from HenrikJannsen/handle_exception_at_send
Handle exception at send
2022-12-14 10:20:07 +01:00
Christoph Atteneder
71d6e126dd
Merge pull request #6423 from HenrikJannsen/add-burningman-accounting
Add burningman accounting
2022-12-14 10:17:38 +01:00
HenrikJannsen
776714fbd4
Remove setting of RejectedExecutionHandler
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 20:36:36 -05:00
HenrikJannsen
8c65da9c85
Add thread index format
Add name param to newCachedThreadPool

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 20:35:49 -05:00
HenrikJannsen
071a352443
Remove rejectedExecutionHandler at newCachedThreadPool.
It is more convenient to handle the RejectedExecutionException in the calling code to get more context for error logging.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:33:31 -05:00
HenrikJannsen
6addd27a33
Add params to newCachedThreadPool method.
Use executor at httpClient builder.
Use httpClient.sendAsync.
Add keep-alive header.
Add RejectedExecutionHandler.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:06:01 -05:00
HenrikJannsen
46b2cf914b
Remove DevEnv.isDevTesting
Add check for number of confirmations in devMode to show support button after 5 blocks

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:19 -05:00
HenrikJannsen
2615309931
Add Config options 2022-12-11 11:15:16 -05:00
HenrikJannsen
ff55830405
Add DateUtil and Hex.decodeLast4Bytes
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
a6a018883d
Add isDevTesting method for adjusting behaviour for dev testing purposes
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
3308e35e8c
Add newCachedThreadPool to Utilities
Use newCachedThreadPool instead of getThreadPoolExecutor

Utilities.getThreadPoolExecutor use a BlockingQueue which prevents the intended
behaviour to increase the pool size to the max value.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-08 09:56:11 -05:00
HenrikJannsen
3a4ed1fc01
Add seedNodeReportingServerUrl option
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:51:49 -05:00
HenrikJannsen
f4536b6a56
Add CompletableFutureUtil
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:47:51 -05:00
HenrikJannsen
96f7db9c80
Print log path
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:47:38 -05:00
HenrikJannsen
a925017e4b
Rename readCommitHash to findCommitHash, make it static and return optional.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:03:08 -05:00
Alejandro García
a6293a64cb
Merge pull request #6396 from jmacxx/show_commit_hash
Store the build's commit hash in Jarfile manifest
2022-11-25 17:36:34 +02:00