Commit graph

7127 commits

Author SHA1 Message Date
Alejandro García
85a457c6f1
Merge branch 'master' into release/v1.9.12 2023-07-13 15:11:38 +00:00
Gabriel Bernard
02e87d545d
Merge pull request #6767 from bisq-network/release/v1.9.11
Release/v1.9.11
2023-07-13 11:32:14 +00:00
HenrikJannsen
1ebc92e5b8
Add reset buttons for BM accounting 2023-07-01 14:25:43 +02:00
Alejandro García
0c3e5a8c5e
Use new burningman accounting file from full accounting node
PR #6740 was a diff against master (instead against the release/v1.9.11
branch). The previous merge into the release branch corrupted the
acounting file.
2023-06-30 22:43:25 +02:00
jmacxx
da9caf56a2
Seednode accounting set by command line, overrides UserPreferences. 2023-06-30 20:02:53 +02:00
Alejandro García
1cc2b35c89
Merge pull request #6744 from jmacxx/fix_seednode_accounting_pref
Seednode accounting option is by command line, overrides UserPreferences.
2023-06-30 18:00:50 +00:00
Alejandro García
60e48d92a2
Merge pull request #6741 from jmacxx/add_bsq_burned_to_report
Add BSQ burned column in monthly burningman status report.
2023-06-30 17:59:35 +00:00
jmacxx
a9bc45c173
Seednode accounting set by command line, overrides UserPreferences. 2023-06-30 10:10:23 -05:00
Alejandro García
23bea7a711
Merge branch 'master' into release/v1.9.11 2023-06-28 20:03:54 +03:00
jmacxx
8024b72860
Add burned BSQ column in monthly burningman status report. 2023-06-26 13:31:55 -05:00
HenrikJannsen
16bbef972f
Use new burningman accounting file recreated from scratch.
Remove old file.

The current accounting data are missing about 10% of transactions due to threading issues at processing the transactions in earlier versions.
2023-06-23 22:20:19 +02:00
Alejandro García
4d7c577b06
Merge pull request #6736 from alejandrogarcia83/update-data-stores-for-v1.9.11
Update data stores for v1.9.11
2023-06-22 19:36:24 +00:00
Stephan Oeste
63cc8e11dc
Remove one seednode from Wiz. 2023-06-22 18:42:13 +02:00
Alva Swanson
ce3643d235
Update DelayedPayoutTxReceiverService Activation Date 2023-06-22 15:59:56 +03:00
Alejandro García
e8cc4da279
Update bitcoinj checkpoints for v1.9.11 2023-06-22 14:38:35 +03:00
Alejandro García
694ac651a7
Update translations for v1.9.11 2023-06-22 14:36:52 +03:00
Alva Swanson
4f4f6de629
Update DelayedPayoutTxReceiverService Activation Date 2023-06-21 14:45:19 +03:00
Alejandro García
153e578d6c
Merge pull request #6723 from jmacxx/resend_dispute_ticket
Allow dispute agent to resend ticket.
2023-06-20 13:15:21 +00:00
Alejandro García
5439108141
Merge pull request #6722 from jmacxx/add_sepa_country_gi
Add SEPA Payment Account country: GI (Gibraltar)
2023-06-20 13:14:49 +00:00
helixx87
aca897fa03
API: gettransactions method 2023-06-08 10:19:41 +02:00
jmacxx
b486522c89
Allow dispute agent to resend ticket, fixes #6690. 2023-06-05 15:27:14 -05:00
jmacxx
9bc99f516a
Cleanup, SEPA instant countries same as SEPA. 2023-06-03 16:36:49 -05:00
jmacxx
ea2a4e57b2
Add Gibraltar (GI) to list of SEPA countries. 2023-06-03 16:26:26 -05:00
Gabriel Bernard
f4368b3185
Merge pull request #6675 from HenrikJannsen/clone_offer_with_shared_maker_fee
Add feature for cloning an offer with shared maker fee
2023-05-25 11:08:08 +00:00
HenrikJannsen
93ba24aabb
Exclude mostRecentAddress from EqualsAndHashCode
The getter was called by EqualsAndHashCode which throws an exception as it is is not intended to get used anymore.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-25 00:52:53 +02:00
Alejandro García
ad2908b2fc
Merge pull request #6702 from HenrikJannsen/cleanup_date_check
Remove date check
2023-05-23 09:05:09 +00:00
Alejandro García
91e10d4970
Merge pull request #6701 from HenrikJannsen/remove_activation_date_for_distributed_BM
Remove BurningManService.isActivated and apply changed to client code.
2023-05-23 09:04:25 +00:00
HenrikJannsen
114af3fef4
Add link to wiki
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-21 19:33:50 +02:00
HenrikJannsen
3cd164588c
Remove USE_FEE_FROM_FILTER_ACTIVATION_DATE and new Date().before(USE_FEE_FROM_FILTER_ACTIVATION_DATE) as it would always be false
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 13:42:08 +07:00
HenrikJannsen
0327872550
Remove BurningManService.isActivated and apply changed to client code.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 13:36:40 +07:00
HenrikJannsen
92f1c86687
Change activation date to July 15th
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 13:10:26 +07:00
HenrikJannsen
bf325938d5
Add getMostRecentAddress with throwing a UnsupportedOperationException to make sure the old field is not used anymore from any client.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 13:08:34 +07:00
HenrikJannsen
95023216ec
Use new getReceiverAddress methods instead of getMostRecentAddress
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 13:05:36 +07:00
HenrikJannsen
7253411b79
Add new field receiverAddress to BurningManCandidate.
Implement new selection algorithm.
Add methods for accessing the receiverAddress (not used yet, but will be used in next commits)

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 12:58:40 +07:00
HenrikJannsen
694e101646
Add isCustomAddress to CompensationModel
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 12:54:56 +07:00
HenrikJannsen
6a649416c2
Refactor code for assigning address for better to make it more clear when we use the custom address and when the change address.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 12:53:59 +07:00
HenrikJannsen
658a01e5ae
Refactoring: Rename HOTFIX_ACTIVATION_DATE to BUGFIX_6699_ACTIVATION_DATE,
isHotfixActivated to isBugfix6699Activated,
wasHotfixActivatedAtTradeDate to wasBugfix6699ActivatedAtTradeDate

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 12:45:26 +07:00
HenrikJannsen
23156a3286
Remove handling of isHotfixActivated in getReceivers method.
We still keep the parameter as it will be reused later for the new bugfix

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-17 12:41:17 +07: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
HenrikJannsen
4262e91f1f
Reapply original code from @jmacxx in AddressEntryList
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-05-13 22:45:39 +07:00
Alejandro García
2a79370bb9
Merge pull request #6692 from alvasw/fix_broken_coin_util_test_test_get_adjusted_amount
core: Fix broken CoinUtilTest.testGetAdjustedAmount
2023-05-13 15:33:30 +00:00
Alva Swanson
e94da0d74f
core: Fix broken CoinUtilTest.testGetAdjustedAmount
Relates to #6619
2023-05-13 14:09:34 +07:00
Steven Barclay
f0b011e0ac
Optimise Price.getVolumeByAmount to speed up USD & BSQ conversions
Short circuit the BigInteger arithmetic in 'AltcoinExchangeRate' &
'org.bitcoinj.utils.ExchangeRate' (from which the former is adapted), by
using ordinary long arithmetic when it is guaranteed not to overflow due
to the two quantities to be multiplied fitting in an int. This will be
the case most of the time. Also remove duplicated logic, to ensure that
all conversions of BTC amounts to volumes happen via the 'Price'
instance methods, so that the optimisation always applies.

In particular, this speeds up the BTC -> BSQ conversions in the burning
man view, as well as the USD price calculations for the candles in the
trades charts view via 'TradeStatistics3.getTradeVolume()'.

Additionally, fix the lazy initialisation pattern in TradeStatistics3 to
ensure that it is thread safe (that is, it only has benign data races),
by making it of the form:

  Foo foo = this.foo;
  if (foo == null) {
      this.foo = foo = computeFoo();
  }
  return foo;

This avoids the problem that 'foo' is a nonvolatile field and can
therefore be seen to alternate any number of times between null and
nonnull from the PoV of the thread initialising it (at least when the
initialisation is racy).
2023-05-10 19:41:27 +01:00
Steven Barclay
b8505db48d
Memoise BurningManAccountingService.getAverageBsqPriceByMonth()
Add an 'averagePricesValid' boolean field to avoid needless refilling of
the cached BSQ prices map when calling 'getAverageBsqPriceByMonth()'.
(Also skip a redundant filling of the map will non-historical data upon
startup of the service.) Since the prices are calculated from the
(observable) set of all trade statistics, add a listener to the set to
invalidate the cache whenever it changes.

This significantly speeds up the burning man view, since the getter is
called several times when activating it.
2023-05-10 19:41:26 +01:00
Steven Barclay
ade339349c
Clean up BurningManAccountingService: deduplicate code
Factor out duplicated logic in the 'Stream.map' lambdas to compute the
BSQ value of the BTC of each streamed ReceivedBtcBalanceEntry, returned
as an 'Optional<Long>'. Also simplify the logic slightly and return an
OptionalLong instead for greater efficiency.

(Also replace a statement lambda with an expression lambda.)
2023-05-10 19:41:26 +01:00
Steven Barclay
e287177e49
Speed up burn target calculations in burning man view
Optimise 'BurningManPresentationService.getCandidateBurnTarget' to avoid
the repeated computation of the total accumulated decayed burned amount
for every listed burning man. To this end, cache the total in a nullable
Long field, along with the method 'getAccumulatedDecayedBurnedAmount()'
to lazily initialise it. (This eliminates a minor hotspot in the burning
man view revealed by JProfiler.)
2023-05-10 19:41:25 +01:00
Steven Barclay
914d75682c
Cache enum.values() in ChartCalculations & TradeStatistics3
Cache enum arrays 'TickUnit.values()' & 'PaymentMethodWrapper.values()'
as the JVM makes defensive copies of them every time they are returned,
and they are both being used in tight loops. In particular, profiling
suggests this will make 'TradeStatistics3.isValid' about twice as fast.
2023-05-10 19:41:22 +01:00
Steven Barclay
0ba2e491ca
Fix quadratic time bug in AveragePriceUtil.getUSDAverage
Now that the trade statistics are retrieved as a sorted set, it can be
assumed that the USD & BSQ trade lists passed to 'getUSDAverage' are
already sorted. Use this to avoid repeatedly scanning the USD trade list
for the first trade dated after each given BSQ trade, by moving two
cursors in a single pass across the respective lists simultaneously.
2023-05-10 19:41:20 +01:00
Steven Barclay
b417e36a28
Make TradeStatistics3 comparable & hold in a TreeSet
Make TradeStatistics3 implement the previously added ComparableExt
interface and make TradeStatisticsManager hold them as a TreeSet instead
of a HashSet, to support fast retrieval of statistics in any given date
range. (Even though red-black trees are generally slower than hash
tables, this should not matter here since the set is only being iterated
over and infrequently appended, and does not benefit from O(1) lookups/
additions/removals.)

Add a 'TradeStatisticsManager.getNavigableTradeStatisticsSet' accessor,
which returns the backing TreeSet of the current ObservableSet field, so
that callers can access its NavigableSet interface where needed (as
there is no ObservableSortedSet or similar in JavaFX). Use this to
optimise 'AveragePriceUtil.getAveragePriceTuple',
'DisputeAgentSelection.getLeastUsedDisputeAgent' and
'MutableOfferDataModel.getSuggestedSecurityDeposit', to obtain a narrow
date range of trade statistics without streaming over the entire set.

Additionally optimise & simplify the price collation in
'TradeStatisticsManager.onAllServicesInitialised', by exploiting the
fact that the statistics are now sorted in order of date (which is the
presently defined natural order).
2023-05-10 19:41:20 +01:00
Steven Barclay
e231c64cc2
Use primitive arrays & streams to optimise InlierUtil
Use a DoubleStream when streaming over 'List<Double>' method arguments
in InlierUtil, as well as a primitive array sort in 'InlierUtil.trim'
(followed by taking a sublist view), instead of calling 'Stream.sorted'.

To this end, use Guava 'Doubles.asList' to pass lists of Doubles to/from
the InlierUtil methods without incurring any boxing or unboxing costs,
since their spliterators can be simply downcast to Spliterator.OfDouble
(opportunistically), instead of needing to use 'mapToDouble' to unbox.

This was a minor hotspot when called from AveragePriceUtil (used by the
burning man and BSQ dashboard views).
2023-05-10 19:41:19 +01:00