Commit Graph

7474 Commits

Author SHA1 Message Date
HenrikJannsen
f4d525cfd6
Add predicate to offer filter to check if offer amount exceeds trade limit.
Filter offers at OfferBookViewModel when the DaoState changes.
Check for offers amount exceeds trade limit at OpenOfferManager and add it to invalidOffers.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-29 18:05:14 +02:00
Alejandro García
2185bcba49
Merge pull request #7120 from HenrikJannsen/remove-survey-link-at-trade-feedback
Remove survey link and related text at trade complete feedback
2024-05-29 15:46:08 +00:00
HenrikJannsen
8c07c11668
Fix tests
Don't use 20 BTC amount as we limit to 2 BTC
Remove 30 BTC amounts
2024-05-26 18:30:08 +07:00
HenrikJannsen
3b7f72e3ef
Remove survey link and related text at trade complete feedback
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 18:24:22 +07:00
HenrikJannsen
bb191fa9bb
Improve code for adding exceedingOffers to invalidOffers
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 17:38:04 +07:00
HenrikJannsen
58a531d6aa
Refactor: Rename
Fix type
Add comment

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 17:32:39 +07:00
HenrikJannsen
344304034d
Remove exceptional handling of SiaFund (SF)
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 16:32:51 +07:00
HenrikJannsen
0d3aaacc38
Adjust trade limits of paymnet methods using custom trade limits by the factor of which the DAO param has changed.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 16:31:43 +07:00
HenrikJannsen
45a03db5cd
Add predicate to offer filter to check if offer amount exceeds trade limit.
Filter offers at OfferBookViewModel when the DaoState changes.
Check for offers amount exceeds trade limit at OpenOfferManager and add it to invalidOffers.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-26 16:02:11 +07:00
Alejandro García
1088868bb1
Update bitcoinj checkpoints for v1.9.16 2024-05-25 18:31:55 +02:00
Alejandro García
e824e98505
Update translations for v1.9.16 2024-05-24 17:58:39 +02:00
HenrikJannsen
29994d373f
Add new seed nodes provided by jester4042
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-21 13:38:34 +07:00
Gabriel Bernard
db04961300
Merge pull request #7101 from bisq-network/release/v1.9.15
Release/v1.9.15
2024-05-12 17:17:41 +00:00
Alejandro García
b89bb3dbde
Merge pull request #7097 from HenrikJannsen/add-check-that-price-is-not-0
Add check that price is not 0.
2024-05-09 19:01:07 +00:00
Alejandro García
f62d8d72ca
Merge pull request #7096 from HenrikJannsen/remove-seed-nodes-of-404State
Remove seed nodes of 404State
2024-05-09 19:00:20 +00:00
Alejandro García
6cef856b57
Merge pull request #7094 from HenrikJannsen/improve-button-text
Improve button text
2024-05-09 18:58:46 +00:00
Alejandro García
0b85e0615d
Merge pull request #7092 from stejbac/speed-up-vote-result-view-load
Speed up Vote Result display, cycle list item selection & JSON export
2024-05-09 18:57:53 +00:00
Alejandro García
0a5a0f316d
Merge pull request #7090 from HenrikJannsen/Improve-export-account-reputation-process-for-Bisq-2
Improve export account reputation process for bisq 2
2024-05-09 18:56:48 +00:00
Alejandro García
dc859e2c2b
Merge pull request #7082 from stejbac/speed-up-bond-repo-update-and-remove-raw-types
Speed up bond repository update and remove some raw types
2024-05-09 18:54:56 +00:00
HenrikJannsen
892db99dcb
Add check that price is not 0.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-08 17:13:33 +07:00
HenrikJannsen
c5f9eb2d9a
Remove seed nodes of 404State
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-08 16:55:25 +07:00
HenrikJannsen
1500837126
Improve button text
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-08 14:26:11 +07:00
Steven Barclay
3a70213d1b
Add new tx-by-id cache to speed up BsqWalletService.isWalletTransaction
Reduce a hotspot searching the BSQ wallet for the user's votes, upon
selecting a list item of the Vote Result view, by optimising the method
'BsqWalletService.isWalletTransaction(String)'. Do this by adding a
lazily initialised Map field, 'walletTransactionsById', kept in sync
with the existing 'walletTransactions' List field, similar to the tx-by-
id cache removed from the base class in the previous commit, so that a
linear scan of that list can be avoided. Don't bother to make the cache
thread safe, however, since 'isWalletTransaction' is only called from
the user thread and wasn't thread safe to begin with -- access to
'walletTransactions' isn't synchronised, and it is updated only on the
user thread, after a 100 ms delay upon any changes to the BSQ wallet.

Also remove the unused methods 'getUnverifiedBsqTransactions()' and
'getBsqWalletTransactions()' from the class.
2024-05-06 00:04:38 +02:00
Steven Barclay
d803a67d0d
Remove unnecessary tx-by-id cache from WalletService
This was added in an earlier commit (57b2b4b8) to speed up the Trade
History view, via the method 'getConfidenceFotTxId(String)', by
replacing a linear scan of the live wallet txs with a lookup into a
lazily initialised map. However, the delegating 'WalletService' method
'getTransaction(Sha256Hash)' already serves this purpose, with
'o.b.w.Wallet' itself maintaining a map of all the wallet txs. Use that
method instead, taking care to exclude dead txs from the lookups, to
exactly preserve the current behaviour.

Also do some minor cleanup of the class, mainly to remove IDE warnings.
2024-05-05 22:37:32 +02:00
HenrikJannsen
13f124566c
Apply patch from @jmacxx (https://github.com/bisq-network/bisq/issues/7066#issuecomment-2087336098)
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-05-02 16:04:20 +07:00
Alejandro García
add2f983f2
Merge pull request #7050 from devinbileck/scan-qr-code
Restore QR code scanner feature for mobile notification pairing
2024-04-30 03:13:31 +00:00
Steven Barclay
3a97953152
Fix cubic time bug in BondedRolesRepository.update()
Alleviate a cubic time bug during the update of the bonded roles
repository, reducing it to quadratic running time. On Mainnet, this
gives a roughly ten-fold speedup and should allow better scaling in the
event that many new bonded roles are added.

Replace calls to 'BondedRolesRepository.findBondedAssetByHash' with a
lookup into a lazily initialised map of bonded assets (Roles) by hash
(reset at the start of each call to 'BondRepository.update()' to prevent
stale caching). This avoids rescanning the roles list for every pair of
roles and lockup tx outputs, thus reducing the number of steps (to
highest order) from:

  #roles * #roles * #lockup-tx-outputs

to:

  #roles * #lockup-tx-outputs

(The logs show 2 or 3 calls to 'BondedRepository.update()' every time a
new block arrives, and while this was only taking around a second or so
on Mainnet, it could potentially grow to something problematic with
cubic scaling in the number of bonded roles.)
2024-04-19 23:49:48 +02:00
Devin Bileck
0f373cee43
Restore QR code scanner feature for mobile notification pairing
This restores the functionality that was removed in b5beea58. However,
this implementation utilizes the JavaCV library rather than the
webcam-capture library as discussed in #4940. As a result, this should
now provide macOS support.
2024-04-01 21:52:40 -07:00
HenrikJannsen
bf6128306f
Increase maxItems from 3000 to 15000.
3000 items are about 180.325 kB.

For nodes not being online for longer the repeated requests consumes quite some time.
With 15k we can expect a 1 MB payload which is still acceptable.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2024-04-01 11:50:08 +07:00
Alejandro García
8b381bfb45
Merge pull request #7064 from jmacxx/postpone_bm_activation_date
Give more time before activating BM capping algo change (#2)
2024-03-27 09:15:12 +00:00
Alejandro García
0e50d241ee
Merge pull request #7057 from jmacxx/rename_role_community_admin
Rename Keybase admin to Community admin
2024-03-27 09:12:52 +00:00
Alejandro García
85e7f495b5
Merge pull request #7036 from jmacxx/api_confirm_payment_xmr
Add API for payment started with XMR auto conf params
2024-03-27 09:10:00 +00:00
Alejandro García
ee987bef1c
Merge pull request #7005 from jmacxx/sepa_qr_code
Add SEPA QR Code for buyer payment
2024-03-27 09:09:23 +00:00
jmacxx
f9ae4cd9e9
Move prop 412 activation date into the future: May 1 2024. 2024-03-20 15:04:35 -05:00
jmacxx
5c8204ab83
Rename Keybase admin to Community admin fixes #7048. 2024-03-16 09:53:18 -05:00
Steven Barclay
0a1df44daf
Add debug perf logging to BondRepository.update()
This is in anticipation of speedups we wish to make, as JProfiler
reveals it to be a hotspot during new block arrivals (which are tricky
to profile, as they occur at random).
2024-03-09 21:18:24 +08:00
Steven Barclay
7d2e050474
Fix broken PreferencesTest mocks (revealed by strict Mockito stubbing)
Fix the broken stubbing of 'PersistenceManager', which had gone stale as
a result of the conversion of 'Preferences' to asynchronous persistence
in commit 3f4d6e6 (2020/10/12). This caused the assertions in the
'readPersisted' continuation blocks of 3 of the 4 tests not to be
reached. Fix by stubbing the async 'persistenceManager::readPersisted'
method with a callback, instead of stubbing 'getPersisted'.

NOTE: Alternatively, we could add a testing-only 'readPersistedSync'
method to 'Preferences' for consistency, as this is how the other broken
(failing) tests resulting from 3f4d6e6 were fixed (in commit 68583d8).
2024-03-09 20:38:34 +08:00
Steven Barclay
c94fa98417
Generify remaining raw types used by the DAO packages
Fix raw usage of the following types, all of which (apart from
Comparator) touch the DAO packages somewhere:

  Comparable, Comparator, GetStateHashesResponse, NewStateHashMessage,
  RequestStateHashesHandler, PersistenceManager

(Also replace 'Integer.valueOf' with the non-boxing but otherwise
identical method 'Integer.parseInt', in the class 'TxOutputKey'.)
2024-03-09 01:26:36 +08:00
Steven Barclay
e1a8424f12
Generify Bond raw types & rename BondRepository type params
Replace all raw uses of 'Bond<T extends BondedAsset>', mostly with
wildcards (that is, 'Bond<?>'), to prevent compiler/IDE warnings.

Also rename the 'T extends Bond<R>' & 'R extend BondedAsset' type params
of 'BondRepository<..>' to 'B' & 'T' respectively, as this is a little
less confusing.
2024-03-08 21:11:31 +08:00
Steven Barclay
314e976bbc
Cleanup: replace putIfAbsent-then-get with computeIfAbsent
Use the simpler & slightly more efficient 'Map::computeIfAbsent' method
in place of the common pattern:

  map.putIfAbsent(key, newValue());
  V value = map.get();

(Clean up BondRepository + some cases missed from BurningManService.)
2024-03-08 14:40:44 +08:00
jmacxx
e75fc1ce79
Add SEPA QR Code for buyer payment. 2024-02-27 14:23:43 -06:00
jmacxx
9738d5387e
Add API for payment started with XMR auto conf params. 2024-02-26 08:39:39 -06:00
Alejandro García
f941ef300f
Merge pull request #7047 from stejbac/fix-remaining-accounting-store-data-race
Fix remaining data race in BurningManAccountingStore
2024-02-25 14:34:35 +00:00
Alejandro García
42d40e56a1
Merge pull request #7041 from jmacxx/remove_wiz_bsq_explorer
Remove reference to non-functioning BSQ explorer
2024-02-25 14:33:51 +00:00
Alejandro García
117f282a50
Merge pull request #7035 from bisq-network/update-data-stores-for-v1.9.15
Update data stores for v1.9.15
2024-02-25 14:32:11 +00:00
Alejandro García
e53fb3521f
Merge pull request #7023 from jmacxx/fix_issue_7022
GetTrades should not filter open failed trades
2024-02-25 14:31:39 +00:00
Alejandro García
c86d965b33
Merge pull request #7012 from jmacxx/api_get_dao_status
Add API call to get DAO status
2024-02-25 14:31:06 +00:00
Alejandro García
29c4999f36
Merge pull request #7008 from jmacxx/fix_issue_7006
Refactor detectMultipleHolderNames for efficient use of RAM.
2024-02-25 14:30:31 +00:00
Alejandro García
ebc987b8a4
Merge pull request #7045 from wiz/wiz/20240222-remove-wiz-bitcoin-nodes
Remove 2 more of wiz Bitcoin nodes
2024-02-24 15:15:37 +00:00
Steven Barclay
0214566619
Simplify & optimise BurningManAccountingStore.purgeLastTenBlocks
Remove the last 10 blocks one-by-one from the end of the internal linked
list of blocks, instead of rebuilding a truncated list from scratch.
(This all takes place within a write-lock anyway, so it's atomic.)
2024-02-24 11:26:16 +08:00
Steven Barclay
02ee5bc6ea
Fix remaining data race in BurningManAccountingStore
Add missing synchronisation to the 'toProtoMessage' method, by first
copying the internal list of blocks inside a read-lock, prior to
serialisation (still outside the lock, to maximise concurrency). Since
we only make a shallow copy, this should be fast and take no more than a
MB or so of extra memory.

This prevents a race seen to cause a ConcurrentModificationException
during store persistence, that sometimes occurred when the application
resumed from a long suspension.
2024-02-24 11:12:33 +08:00
Stephan Oeste
79571aa99f
Remove seednodes from jmacxx and add 403State 2024-02-23 17:59:27 +01:00
wiz
8d1aea62fe
Remove 2 more of wiz Bitcoin nodes 2024-02-22 15:09:14 +09:00
jmacxx
b151d11e00
Remove non-available BSQ explorer. 2024-02-17 16:50:38 -06:00
jmacxx
1cad6c86e6
GetTrades should not filter open failed trades.
API add has_failed and error_message properties to TradeInfo.
Code review fixes from @dutu.
2024-02-14 16:59:11 -06:00
Alejandro García
5ef92e33cc
Update bitcoinj checkpoints for v1.9.13 2024-02-12 13:17:00 +02:00
Alejandro García
42966420f6
Update translations for v1.9.15 2024-02-12 12:57:20 +02:00
Alejandro García
c5a73c0c86
Merge pull request #7007 from jmacxx/bsq_market_cap_chart
Add BSQ market cap chart
2024-02-11 10:05:48 +00:00
Alejandro García
4c1b1cd161
Merge pull request #6986 from yonson2023/fix_transferwise
Wise: fix account summary and add copy icon to form.
2024-02-11 10:04:38 +00:00
jmacxx
0eb50d420b
Expose isDaoStateReadyAndInSync status to API clients. 2024-02-09 13:30:28 -06:00
yonson2023
25a6e08c09
Wise: fix account summary and add copy icon to form.
Add copy icon to Pix form holder name field.
Prompt for holder name if empty.
Optimize form layout.
2024-02-07 20:44:41 -06:00
jmacxx
bc4a46b3df
Refactor detectMultipleHolderNames for efficient use of RAM.
Fixes issue #7006 (Out Of Memory Exception thrown)
2024-02-07 10:32:38 -06:00
Steven Barclay
99f639a589
Replace MockitoSession with the Mockito test extension
Now that 'mockito-junit-jupiter' has been added to the build test
dependencies, we may replace the manual setup & tear down of a Mockito
session with the 'MockitoExtension' JUnit 5 test extension, as the old
Mockito JUnit 4 test runner was no longer available upon upgrading to
Jupiter. This slightly simplifies the tests which use '@Mock', '@Spy',
etc.
2024-02-03 02:36:31 +08:00
Steven Barclay
c41903f7ab
Clean up TxValidatorTest & resource loading in other tests
Fix inspection warnings and other minor defects (unchecked casts, bad
'assert*' usage, unused assignments/declarations, missing null checks,
object equality on enum instances, needless statement lambdas, missing
final, redundant 'toString', needless visibility) in 'TxValidatorTest'.

Also, uniformise and slightly tidy resource loading in other test
classes, replacing 'Files.readAllBytes' with Java 11 'Files.readString'
(which assumes UTF-8 as desired, instead of the default charset).
2024-02-03 01:44:25 +08:00
Steven Barclay
1e3320917c
Use Paths.get(URI) instead of Path.of(String) to fetch test resource
Fix resource loading in 'MakerTxValidatorSanityCheckTests', which breaks
when the working directory has spaces in its absolute path, due to the
fact that the test resource paths are URL encoded.

(This pattern is already used to load resources in a few other tests, so
there hopefully won't be a regression on Windows.)
2024-02-03 00:39:03 +08:00
Alejandro García
66483b4354
Merge pull request #7021 from alvasw/test_all_taker_bsq_cases
Test all Taker BSQ cases
2024-01-31 11:39:52 +00:00
Alejandro García
c5aa473dc3
Merge pull request #7020 from alvasw/test_all_maker_bsq_cases
Test all Maker BSQ Cases
2024-01-31 11:39:01 +00:00
Alejandro García
51e15e3e61
Merge pull request #7019 from alvasw/test_all_taker_btc_cases
Test All Taker BTC Cases
2024-01-31 11:38:03 +00:00
Alejandro García
21f97feb59
Merge pull request #7015 from alvasw/test_all_maker_btc_cases
Test All Maker BTC Cases
2024-01-31 11:36:14 +00:00
Alejandro García
98933e16e8
Merge pull request #7014 from alvasw/test_taker_tx_vouts
Refactor and Add Maker Transaction Vouts Tests
2024-01-31 11:33:50 +00:00
Alejandro García
07def78e4d
Merge pull request #7013 from alvasw/test_maker_tx_vouts
Test Maker Transaction Vouts
2024-01-31 11:32:25 +00:00
Alva Swanson
d93340abcd
Test all Taker BSQ cases
- unconfirmedTransaction
- newBsqTx
- takerExactFeeMatchBsqTest
- takerHigherBsqFeeThanExpected
- takerLowerButWithinToleranceBsqFee
- takerPassFilterFeeCheck
- takerFailFilterFeeCheck
- takerNoFilterFeeMatchesDifferentDaoParameter
- takerNoFilterFeeTooLow
2024-01-29 14:40:28 +01:00
Alva Swanson
36cc5e84df
Test all Maker BSQ cases
- unconfirmedTransaction
- newBsqTx
- makerExactFeeMatchBsqTest
- makerHigherBsqFeeThanExpected
- makerLowerButWithinToleranceBsqFee
- makerPassFilterFeeCheck
- makerFailFilterFeeCheck
- makerNoFilterFeeMatchesDifferentDaoParameter
- makerNoFilterFeeTooLow
2024-01-29 14:40:28 +01:00
Alva Swanson
a3fa6e73c0
Test all Taker BTC cases
- takerCheckFeeAddressBtcInvalidFeeAddress
- takerCheckFeeAddressBtcTooOldValidFee
- takerExactFeeMatchBtcTest
- takerHigherBtcFeeThanExpected
- takerLowerButWithinToleranceBtcFee
- takerPassFilterFeeCheck
- takerFailFilterFeeCheck
- takerNoFilterFeeMatchesDifferentDaoParameter
- takerNoFilterFeeTooLow
2024-01-27 14:17:40 +01:00
Alva Swanson
6e05fc7fbe
Add takerInvalidFeeBtcAddressTest 2024-01-27 14:17:40 +01:00
Alejandro García
e9e62b9e48
Merge pull request #7003 from alvasw/fix_crash_on_missing_vin_0_prevout
TxValidator: Fix crash on missing vin[0].prevout
2024-01-25 11:26:35 +00:00
Alejandro García
23b5424d53
Merge pull request #6974 from kiocosta/release/v1.9.14
Update 'reason for payment' warning instructions
2024-01-25 11:24:48 +00:00
Alva Swanson
000b7a78aa
Test all Maker BTC cases
- makerCheckFeeAddressBtcInvalidFeeAddress
- makerCheckFeeAddressBtcTooOldValidFee
- makerExactFeeMatchBtcTest
- makerHigherBtcFeeThanExpected
- makerLowerButWithinToleranceBtcFee
- makerPassFilterFeeCheck
- makerFailFilterFeeCheck
- makerNoFilterFeeMatchesDifferentDaoParameter
- makerNoFilterFeeTooLow
2024-01-24 15:12:55 +01:00
Alva Swanson
077c5f5e71
TakerTxSanityCheckTests: Add checkFeeAmountMissingVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
873757e865
MakerTxSanityCheckTests: Add checkFeeAmountMissingVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
9fd48c0cd0
Add getValidBtcMakerFeeMempoolJsonResponseString test asset 2024-01-24 15:12:55 +01:00
Alva Swanson
c81ba0d686
TakerTxSanityCheckTests: Add checkFeeAmountMissingVinPreVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
49725689ca
MakerTxSanityCheckTests: Add checkFeeAmountMissingVinPreVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
b0d5712070
Fix: Call parseJsonValidateTakerFeeTx in taker tests 2024-01-24 15:12:55 +01:00
Alva Swanson
3a7a67d7ca
MakerTxSanityCheckTests: Handle test asset IOException locally 2024-01-24 15:12:55 +01:00
Alva Swanson
8d331a6de1
Reuse makerTx in TakerTxValidatorSanityCheckTests 2024-01-24 15:12:55 +01:00
jmacxx
997bf0d6b8
Add BSQ market cap chart. 2024-01-22 14:33:11 -06:00
Alva Swanson
516d3c8d7d
TxValidator: Fix crash on missing vin[0].prevout
The `checkFeeAmountBTC` method looks up the `value` field of the
`vin[0].prevout` field without checking whether `vin[0].prevout` exists.
When the field is missing `JsonElement jsonVIn0Value =
jsonVin0.getAsJsonObject("prevout").get("value");` (line 193) throws a
NullPointerException.
2024-01-15 10:29:49 +01:00
Alva Swanson
ba09db4356
Test too few outputs in fee payment 2024-01-15 10:29:49 +01:00
Alva Swanson
05dfbca07d
Test too few inputs in fee payment 2024-01-15 10:29:48 +01:00
Caio Costa
77479fffdf
Update 'reason for payment' warning instructions 2024-01-14 23:50:34 +00:00
Alejandro García
4d4c9e3186
Merge pull request #7000 from alvasw/txvalidator_fix_crash_on_invalid_vin_vout_json_array
TxValidator: Fix crash on invalid vin or vout JSON Array
2024-01-14 11:50:17 +00:00
Alejandro García
5872e9e1d6
Merge pull request #6998 from jmacxx/allow_mediation_failed_closed_trades
Allow mediation of failed and closed trades
2024-01-14 11:48:59 +00:00
Alejandro García
501b554d78
Merge pull request #6997 from alvasw/fix_fee_check_invalid_json_crash
Fix fee check crash on invalid JSON response
2024-01-14 11:48:31 +00:00
Alejandro García
f755efa765
Merge pull request #6994 from jmacxx/resync_popup_change
Change unconfirmed popup to 24h after trade start.
2024-01-14 11:48:08 +00:00
Alva Swanson
d7cd1e2c92
TxValidator: Fix crash on invalid vin or vout JSON Array
The `TxValidator`s `getVinAndVout(...)` method assumes that
`json.get("field").getAsJsonArray()` returns null when the field is not
a JSON array. The `getAsJsonArray()` throws an `IllegalStateException`
exception, however. The `IllegalStateException` doesn't get caught by
any caller.
2024-01-13 11:06:17 +01:00
Alva Swanson
9f4a4d6913
TxValidator: Add missing vin and vout tests 2024-01-13 11:06:10 +01:00
Alva Swanson
d86583c6b7
Run TxValidatorSanityCheckTests for maker and taker 2024-01-13 11:05:48 +01:00
yonson2023
6a146cd4ac
Show prompt if holderName is blank. 2024-01-12 16:08:19 -06:00
Alva Swanson
62496b8bd5
Fix mempool test resource path on Windows 2024-01-10 15:57:25 +01:00
yonson2023
9e5fa8f1b1
Add holdername to MoneyBeam account. 2024-01-09 17:50:07 -06:00
jmacxx
ff52c43d4f
Allow mediation of failed and closed trades. 2024-01-09 12:56:30 -06:00
Alva Swanson
9f760edd25
TxValidator: Fix fee check crash on invalid JSON response
The initialSanityChecks method only checks whether the JSON response is
null (HTTP request failed) or the response is empty (HTTP 200) before
parsing the JSON response. A invalid JSON response would throw a
JsonSyntaxException exception which the callers are not catching.
2024-01-09 10:44:10 +01:00
Alva Swanson
be857cb40c
Add TxValidatorSanityCheckTests 2024-01-09 10:44:10 +01:00
Alva Swanson
d7b8587708
Add FeeValidationStatus.NOT_CHECKED_YET tests 2024-01-09 10:44:10 +01:00
Alva Swanson
ecb667c85d
Remove redundant OpenOffer intial state constructor
The inital state is always OpenOffer.State.AVAILABLE.
2024-01-09 10:44:10 +01:00
Alva Swanson
a127cde9ac
Test OpenOffer inital state 2024-01-09 10:44:10 +01:00
Alva Swanson
ab8f890a44
Test OpenOffer FeeValidation NOT_CHECKED_YET status 2024-01-09 10:43:47 +01:00
Alejandro García
566ab53c8f
Merge pull request #6995 from alvasw/on_get_blocks_request_handling_create_raw_block_list_once
Create GetBlocksRequestHandler's reply list once
2024-01-08 09:17:42 +00:00
Alejandro García
172628f782
Merge pull request #6989 from jmacxx/postpone_bm_activation_date
Give more time before activating BM capping algo change
2024-01-08 09:16:41 +00:00
Alejandro García
36734e9c90
Merge pull request #6987 from wiz/patch-1
Remove 2 of wiz's Bitcoin nodes
2024-01-08 09:16:13 +00:00
Alejandro García
01f13cb4c5
Merge pull request #6972 from yonson2023/fix_avoid_standby
Bugfix: avoid standby mode should adhere to the user preference setting.
2024-01-08 09:15:26 +00:00
Alva Swanson
1e78902bbf
Create GetBlocksRequestHandler's reply list once
Previously, the onGetBlocksRequest method created an ArrayList and two
LinkedList before creating the GetBlocksResponse. The first two lists
were never used. PR #6947 introduced the second LinkedList creation.
With this change, the GetBlocksRequestHandler only creates a single
LinkedList.
2024-01-06 08:16:44 +01:00
jmacxx
e082a49760
Change unconfirmed popup to 24h after trade start. 2024-01-05 22:13:48 -06:00
jmacxx
a4dc1ac04a
Activate proposal 412 a month later: Feb 1 2024. 2024-01-02 07:14:45 -06:00
wiz
9771e0c4ce
Remove 2 of wiz's Bitcoin nodes 2024-01-01 06:48:23 +09:00
Alejandro García
5a3a7071f9
Merge pull request #6980 from alvasw/core_do_not_add_old_fitler_to_invalid_filters_if_new_signer_banned
core: Don't add old filter to invalid filters if new signer banned
2023-12-31 13:46:06 +00:00
Alejandro García
f12069aeeb
Merge pull request #6979 from alvasw/FilterManagerMockedPrivilegeKeysTests
Add FilterManagerMockedPrivilegeKeysTests
2023-12-31 13:45:13 +00:00
Alejandro García
1f072bf774
Merge pull request #6977 from alvasw/FilterManagerAddFilterToNetworkTests
Add FilterManagerAddFilterToNetworkTests
2023-12-31 13:44:07 +00:00
Alejandro García
143628b5a0
Merge pull request #6976 from alvasw/FilterManagerInitializationTests
Add FilterManagerInitializationTests
2023-12-31 13:42:53 +00:00
Alejandro García
e5ed806235
Merge pull request #6952 from jmacxx/fee_validation_reason_codes
Display the reason for auto-disabling an open offer.
2023-12-31 13:35:44 +00:00
Alva Swanson
d6aa5b16f6
core: Don't add old filter to invalid filters if new signer banned
Before this change, the currentFilter will be added to the
invalidFilters list after comparing both filters creation date and
before checking whether the new filter was created by a banned signer.

Note: The invalid filters list is only used on the security manager Bisq
instances. This list is never read by regular user clients.
2023-12-28 15:00:21 +01:00
Alva Swanson
78ac425414
Write FilterManagerMockedPrivilegeKeysTests 2023-12-28 15:00:21 +01:00
Alva Swanson
b255dad5c3
Write FilterManagerAddFilterToNetworkTests 2023-12-28 08:50:13 +01:00
Alva Swanson
8a978a2c14
DevEnv: Add static getDevPrivilegePubKeys() method 2023-12-28 08:50:13 +01:00
Alva Swanson
bf98531c46
Config: Make configFile field private and add getter 2023-12-28 08:50:13 +01:00
Alva Swanson
e7cb152e11
DevEnv: Make DEV_PRIVILEGE_PRIV_KEY private and add getter 2023-12-28 08:50:13 +01:00
Alva Swanson
c96b7d2ade
DevEnv: Make DEV_PRIVILEGE_PUB_KEY private and add getter 2023-12-28 08:50:13 +01:00
Alva Swanson
ff15d5a066
Write FilterManagerInitializationTests 2023-12-28 08:50:10 +01:00
yonson2023
65daec0659
Bugfix: avoid standby mode should adhere to the user preference setting. 2023-12-20 12:27:22 -06:00
Alejandro García
70a15ceb06
Merge pull request #6965 from yonson2023/pix_add_holder_name
Update Pix payment account, add HolderName
2023-12-20 05:05:18 +00:00
Alejandro García
d9ac3340b0
Merge pull request #6964 from yonson2023/update_transferwise
Update Wise payment account (was TransferWise)
2023-12-20 05:03:27 +00:00
Alejandro García
99d45f720d
Merge pull request #6955 from yonson2023/fix_npe_persistence
Fix potential NPE in persistence of Contract.
2023-12-20 05:00:57 +00:00
Alejandro García
237c7054be
Merge pull request #6949 from stejbac/change-burning-man-capping-algorithm
Change burning man capping algorithm
2023-12-20 04:59:40 +00:00
yonson2023
d899e84ddc
Add HolderName to Pix account. 2023-12-15 15:20:18 -06:00
yonson2023
01dc89edc5
Update Wise (TransferWise) account.
TransferWise has rebranded to Wise, rename user-facing parts.
Add HolderName (mandatory for new accounts).
2023-12-15 15:05:11 -06:00
yonson2023
5e0803a392
Add accessors for HolderName. 2023-12-11 10:57:10 -06:00
yonson2023
b9fcbd4ee8
Detect and handle corrupted SPV state allowing user-initiated resync. 2023-12-09 10:50:04 -06:00
jmacxx
265ca17e32
Check live Tx as part of BSQ fee validation process. 2023-12-07 13:01:25 -06:00
yonson2023
c7f36b255b
Fix potential NPE in persistence of Contract. 2023-12-03 10:14:53 -06:00
jmacxx
0ad71fc680
Fee validation refactor. 2023-11-28 12:26:38 -06:00
Steven Barclay
32d4a8f50d
Replace deprecated 'initMocks' calls with MockitoSession
Since the 'MockitoAnnotations.initMocks' method used to initialise
@Mock, @Spy, etc. fields is deprecated, use MockitoSession instead, as
suggested by the Javadoc. (Or just remove the call, if the test class is
not actually using any Mockito annotations.)

This allows strict stubbing (the default for Mockito 4), though it must
be configured to be lenient in the P2P test classes, to prevent failures
due to unused stubs.
2023-11-28 03:36:25 +08:00
Steven Barclay
4c0c11bb27
Implement BM capping algorithm change (with delayed activation)
Change the algorithm used to adjust & cap the burn share of each BM
candidate to use an unlimited number of 'rounds', as described in:

  https://github.com/bisq-network/proposals/issues/412

That is, instead of capping the shares once, then distributing the
excess to the remaining BM, then capping again and giving any excess to
the Legacy Burning Man, we cap-redistribute-cap-redistribute-... an
unlimited number of times until no more candidates are capped. This has
the effect of reducing the LBM's share and increasing everyone else's,
alleviating the security risk of giving too much to the LBM (who is
necessarily uncapped).

Instead of implementing the new algorithm directly, we simply enlarge
the set of candidates who should be capped to include those who would
eventually be capped by the new algorithm, in order to determine how
much excess burn share should go to the remaining BM. Then we apply the
original method, 'candidate.calculateCappedAndAdjustedShares(..)', to
set each share to be equal to its respective cap or uniformly scaled
upwards from the starting amount accordingly.

To this end, the static method 'BurningManService.imposeCaps' is added,
which determines which candidates will eventually be capped, by sorting
them in descending order of burn-share/cap-share ratio, then marking all
the candidates in some suitable prefix of the list as capped, iterating
through them one-by-one & gradually increasing the virtual capping round
(starting at zero) until the end of the prefix is reached. (The method
also determines what the uncapped adjusted burn share of each BM should
be, but that only affects the BM view & burn targets.) In this way, the
new algorithm runs in guaranteed O(n * log n) time.

To prevent failed trades, the new algorithm is set to activate at time
'DelayedPayoutTxReceiverService.PROPOSAL_412_ACTIVATION_DATE', with a
placeholder value of 12am, 1st January 2024 (UTC). This simply toggles
whether the for-loop in 'imposeCaps' should stop after capping round 0,
since doing so will lead to identical behaviour to the original code
(even accounting for FP rounding errors).
2023-11-26 21:54:20 +08:00
Steven Barclay
7dfd6aa5e1
Use TreeMap to prevent potential nondeterminism in BM share summation
Replace HashMap in 'BurningManService.getBurningManCandidatesByName'
result construction with a TreeMap, to ensure that the map values are
ordered deterministically (alphabetically by candidate name) when
computing floating point sums. The map values are streamed over in a few
places in this method and elsewhere in 'DelayedPayoutTxReceiverService',
when performing double precision summation to compute the DPT. This
introduces potential nondeterminism due to the nonassociativity of FP
addition, making sums dependent on the term order.

(Note that 'DoubleStream::sum' uses compensated (Kahan) summation, which
makes it effectively quad precision internally, so the chance of term
reordering causing the result to differ by even a single ULP is probably
quite low here. So there might not be much problem in practice.)
2023-11-26 03:41:03 +08:00
Steven Barclay
c234c2351c
Add adjusted burn share assertions + test for inactive/expired BM
Add a missing test case for burning man candidates with fully expired
compensation issuance or proofs-of-burn, or who are inactive because
they have never carried out a proof-of-burn, to prevent regressions in
the forthcoming capping algorithm code changes.

Also add missing assertions for the expected 'adjustedBurnAmountShare'
property of each candidate to the test cases. Note that these only
affect the UI, including the displayed burn targets, not the actual BM
revenue (DPT outputs or fee recipient selection), so we use approximate
equality in the test assertions as usual for floating point expressions.
2023-11-26 00:47:38 +08:00
Alejandro García
95e74937c1
Merge pull request #6947 from djing-chan/fix-initial-data-request-handling
Fix initial data request handling
2023-11-24 08:02:18 +00:00
Steven Barclay
23f93fc0ec
Add tests for share calculations by 'getBurningManCandidatesByName'
Add an inner class to 'BurningManServiceTest' to test the cap shares &
(capped + uncapped) burn shares allocated to each candidate found upon
calling 'BurningManService.getBurningManCandidatesByName'. To this end,
set up mocks of 'DaoStateService' and the other injected dependencies of
'BurningManService' to return skeletal proof-of-burn & compensation
issuance txs & payloads for the test users supplied for each case.

Ensure the test cases exercise the capping algorithm fairly thoroughly,
which is to be changed in the proceeding commits, per the proposal:

  https://github.com/bisq-network/proposals/issues/412

In particular, provide test cases where more than two capping rounds
would be applied by the new algorithm, as opposed to the current
algorithm which always applies at most two. (This leads to strictly
lower shares for the Legacy Burning Man and non-strict increases in the
shares of all the other burning men.)
2023-11-21 23:11:22 +08:00
djing chan
34857c9d89
Add flag to avoid multiple calls of onDataReceived
Only start requesting blocks after wallet is synced.
Update connection state when doing repeated block requests.
Improve logs.
2023-11-19 16:42:37 +07:00
djing chan
536a29f76a
Improve logs for block requests 2023-11-19 15:22:38 +07:00
djing chan
08118e387e
Use onDataReceived instead of onUpdatedDataReceived for considering p2p network state as initialized 2023-11-19 14:47:52 +07:00
Alejandro García
dd3f1341cd
Merge pull request #6931 from jmacxx/refactor_fee_service
Refactor & simplify fee service.
2023-11-15 21:41:41 +00:00
jmacxx
15617ae5a0
Apply code review change. 2023-11-09 21:41:42 -06:00
Alejandro García
1280aa0e57
Merge pull request #6938 from HenrikJannsen/remove_pricenode_and_seednodes_of_wiz
Remove price node and seed nodes from wiz
2023-10-31 19:25:54 +00:00
HenrikJannsen
bfed79019e
Remove price node and seed nodes from wiz
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-29 15:31:43 +07:00
jmacxx
6b42bb9657
Adapt fee service client calls to simplified interface.
Obsolete async requests removed, replaced by getTxFee().
2023-10-25 17:07:03 -05:00
jmacxx
7f4bde8669
Fix deviation in open portfolio offers & history. 2023-10-24 10:43:16 -05:00
jmacxx
f1af9d84ff
Refactor fee service.
Use fees retrieved from getAllMarketPrices.
More frequent fee updates (was 5 minutes, now 1).
Saves one socket connection.
Saves one threadpool.
Service failover to new node works (previously did not).
Uses POJO data transfer object instead of parsing Json in a tree.
Code footprint is reduced.
Clients no longer need to request fee updates.
See issue 5509.
2023-10-18 15:10:22 -05:00
Alejandro García
e9bdee6400
Merge branch 'master' into release/v1.9.14 2023-10-16 19:47:43 +00:00
Alva Swanson
e08445dd40
Support dockerized regtest seednodes 2023-10-13 21:49:20 +02:00
HenrikJannsen
4b48ce079b
Add CheckRestrictions task
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 20:37:36 +02:00
HenrikJannsen
f4fe66a103
Fix test
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 20:37:35 +02:00
HenrikJannsen
01bd8bb86e
Delay payout if buyers account got flagged as risky by filter data
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 20:37:35 +02:00
HenrikJannsen
3a25eef64a
Add sellerConfirmedPaymentReceiptDate to Trade
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 20:37:35 +02:00
HenrikJannsen
57ef8bedc7
Add delayedPayoutPaymentAccounts to Filter
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 20:37:35 +02:00
HenrikJannsen
a2340f640b
Add CheckRestrictions task
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-09 21:27:36 +07:00
HenrikJannsen
6e1b6a7840
Fix test
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-08 19:08:52 +07:00
HenrikJannsen
ef6335ab62
Delay payout if buyers account got flagged as risky by filter data
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-08 19:08:52 +07:00
HenrikJannsen
c2e8189571
Add sellerConfirmedPaymentReceiptDate to Trade
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-08 19:08:52 +07:00
HenrikJannsen
91a70d89a4
Add delayedPayoutPaymentAccounts to Filter
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-10-08 19:08:52 +07:00
jmacxx
1a010ec274
Log warning when unable to sign AccountAgeWitness. 2023-09-19 13:07:32 -05:00
Alejandro García
524eee2ac3
Update bitcoinj checkpoints for v1.9.13 2023-09-15 14:03:03 +02:00
Alejandro García
d54a5023f5
Update translations for v1.9.13 2023-09-15 14:01:53 +02:00
Alejandro García
9f5368f0b5
Merge pull request #6851 from jmacxx/add_mercadopago_payment_method
Add MercadoPago payment method.
2023-09-11 21:28:19 +00:00
jmacxx
c5ecb4fcb2
Resource name correction (Code review). 2023-09-11 08:47:54 -05:00
Alejandro García
d3f60c4a5f
Merge pull request #6848 from jmacxx/streamline_create_take_offer_flow
Improve flow in create/take offer process.
2023-09-06 21:41:12 +00:00
Alejandro García
83f216afa3
Merge pull request #6845 from jmacxx/fix_memory_leak
Fix memory leak in PriceRequest.
2023-09-06 21:39:12 +00:00
Alejandro García
c9f39a902a
Merge pull request #6842 from jmacxx/fix_issue_6841
Handle NPE when checking isSignWitnessTrade.
2023-09-06 21:38:11 +00:00
jmacxx
dd1c339432
Add MercadoPago payment method. 2023-09-05 16:27:31 -05:00
jmacxx
e9ec3d72e1
Improve flow in create/take offer process.
When creating or taking an offer the user gets the choice to fund the
trade from an external wallet for potentially better privacy (avoid
coin merge if inputs from ext. wallet are kept separated). From
feedback it seems that most users are not using that option and then
they need to do that extra click on the "Fund from internal Bisq
wallet" button.
We offer a way to avoid that extra step if the user chooses
to use the internal wallet. We show at the first time a popup
with background info why funding from an external wallet could
improve privacy and if the user prefers to not use that to give them
an option to skip that step in future. In the settings we could add
a toggle to re-enable it again.
The review screen can be skipped if user chooses this feature,
leading to data entry > confirm rather than
data entry > fund > review > confirm.
2023-09-04 13:35:46 -05:00
jmacxx
b8aa79450d
Fix memory leak in PriceRequest thread name.
The thread name is being appended at each price request with the
request URL.  This is a leak because the size of the string forever
increases.

There's actually no benefit to modifying the thread name with
the request URL, as whatever small amount of logging is done in
the price subsystem includes the applicable url in the message
itself.  So applying the KISS rule, we no longer munge the
thread name at all.
2023-09-02 14:29:42 -05:00
jmacxx
e082eb1c86
Handle NPE when checking isSignWitnessTrade. 2023-09-01 08:41:37 -05:00
jmacxx
4bc5494ce9
Add info popup about ARS market prices. 2023-08-30 14:33:35 -05:00
HenrikJannsen
248f6b2870
Rename revenue to profit
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-08-28 11:20:28 +02:00
jmacxx
9600d79584
Remove unused dependency on Pricenode metadata strings. 2023-08-22 10:58:17 -05:00
Alejandro García
34d61d1f56
Merge pull request #6814 from jmacxx/tx_validation_timing_issue
Fix: BTC maker/taker fee validation
2023-08-19 19:45:06 +00:00
jmacxx
e208b3f0c1
Fix issue if BTC taker fee validation requested before DAO state is ready. 2023-08-16 10:18:27 -05:00
Alejandro García
8a188104aa
Merge pull request #6811 from jmacxx/fix_issue_6809
Updated mediators new onion addresses.
2023-08-15 18:12:52 +00:00
jmacxx
1e2fe3556b
Updated mediators new onion addresses. Fixes #6809 2023-08-15 10:47:33 -05:00
jmacxx
ec9a3b6491
Allow Tx validation requests when the DAO state is ready. 2023-08-15 08:27:15 -05:00
Alva Swanson
3d9483378d
core: Switch to 'bisq.javafx' Gradle Plugin 2023-08-04 13:27:55 +02:00
Alva Swanson
b35dcef2e1
core: Move build configuration to its own build.gradle 2023-08-04 13:27:05 +02:00
Alejandro García
cbfc68b4dd
Merge pull request #6777 from jmacxx/fix_issue_6661
Show AmazonGC country in offer book.
2023-07-25 16:37:58 +00:00
Alejandro García
5ef7ccd630
Merge pull request #6762 from HenrikJannsen/change_displaystrings_for_bonded_role_types_for_new_bisq2_roles
Change bond roles names for Bisq 2 roles
2023-07-25 16:36:23 +00:00
jmacxx
53c6b15b9d
Show AmazonGC country in offer book. 2023-07-19 17:00:06 -05:00
jmacxx
b96bb50ad8
Apply code review changes from @alvasw
Co-Authored-By: Alva Swanson <alvasw@protonmail.com>
2023-07-19 13:45:54 -05:00
jmacxx
2d340432eb
Refactor dispute agent selection. 2023-07-19 11:18:50 -05:00
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
010b89ced6
Change bond roles names for Bisq 2 roles
Repurpose not used bonded roles for Bisq 2 roles.

We prefer to not add new roles to avoid risks with DAO consensus issues.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2023-07-10 11:38:56 +02:00
HenrikJannsen
1ebc92e5b8
Add reset buttons for BM accounting 2023-07-01 14:25:43 +02:00