Commit Graph

6624 Commits

Author SHA1 Message Date
jmacxx
b1e88e8338
Add ability to copy popup text to clipboard. 2022-02-16 19:26:37 -06:00
jmacxx
1227781d43
Show signed status when applicable in Trade & Dispute screens 2022-02-16 16:09:08 -06:00
ghubstan
84eb653366
Get fee from dao state service if JFX prop filterManager.getFilter is null 2022-02-16 14:27:05 -03:00
Christoph Atteneder
d671b6805a
Merge pull request #6032 from jmacxx/sign_verify_msg_dao
Sign/Verify message for DAO bonded roles
2022-02-15 21:01:21 +01:00
Christoph Atteneder
3f978252ac
Merge pull request #6040 from jmacxx/fix_bsq_sending_issue
Fix issue selecting specific BSQ UTXO for send.
2022-02-15 21:00:20 +01:00
jmacxx
f601e0f42f
Obtain trade fee settings from filter 2022-02-15 13:23:33 -06:00
jmacxx
518ca6e0c3
Fix issue selecting specific BSQ UTX for send.
The BisqDefaultCoinSelector is invoked multiple times when a
transaction is being built.  Problem was that the coin selection
was being reset within, ultimately leading to coin selection
being completely ignored.  Solution is to reset the selection
after the transaction has been built.

The UI for selecting UTXO inputs was being resized to the number
of UTXO available, which caused problems when there is a large
UTXO set.  Solution is to size the UI to accomodate 3 to 15 rows,
which provides a reasonable screen display and a scrollbar is
provided for the case of a large UTXO set.
2022-02-11 11:15:27 -06:00
jmacxx
5e7e1c5704
Sign/Verify message for DAO bonded roles 2022-02-10 20:45:43 -06:00
Christoph Atteneder
4e225738c8
Not keep empty translation key 2022-02-09 10:56:53 +01:00
xyzmaker123
9831d19849
Update "get help" message
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2022-02-08 09:44:26 +01:00
xyzmaker123
469f589582
Update "still not resolved" message
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2022-02-08 09:44:25 +01:00
xyzmaker123
19d6b2607c
Add support/help links on the UI - trade details 2022-02-08 09:44:23 +01:00
xyzmaker123
90c2bfa651
Introduce SimpleMarkdownLabel 2022-02-08 09:44:17 +01:00
Christoph Atteneder
9c70a8a62a
Merge pull request #6029 from jmacxx/fix_issue_5877
Fix unhandled exception when locale specifies unknown country/region code.
2022-02-07 21:56:14 +01:00
Christoph Atteneder
ee33feeff7
Merge pull request #6018 from jmacxx/fix_OutOfSyncBsqBlocks
Fix exception: heightOfLastBlock must match chainHeight
2022-02-07 10:28:45 +01:00
Christoph Atteneder
5e7ac77d69
Merge pull request #6005 from w0000000t/keybase_>_matrix
Remove references to keybase and switch to Matrix
2022-02-07 10:26:24 +01:00
jmacxx
78e9ed2382
Fix NPE when locale specifies unknown country code. 2022-02-05 11:21:59 -06:00
jmacxx
5c48a289a6
Warn and prompt for password before showing wallet keys. 2022-02-02 18:38:35 -06:00
WAT
7b191a4049
Remove references to keybase and switch to Matrix
Except `dao.bond.bondedRoleType.ROCKET_CHAT_ADMIN` which refers to an
unused role, every other instance of `keybase` has been contextually
updated to Matrix (bisq.chat); functions to display moderator name
and profile address on keybase have been updated to work with Matrix
usernames and urls.
Kept translated resources in original state as per jmacxx suggestion.
2022-02-02 16:57:06 +01:00
jmacxx
33644b0983
Fix exception: heightOfLastBlock must match chainHeight 2022-02-01 22:10:22 -06:00
Christoph Atteneder
fcb13ed772
Merge pull request #5976 from ghubstan/1-gettrades
Add API 'gettrades' method
2022-02-01 11:10:45 +01:00
jmacxx
57821b7474
Clear account payload info & chats from closed trades & disputes. 2022-01-31 14:58:22 -06:00
ghubstan
820642516a
Remove unnecessary casts 2022-01-27 17:27:20 -03:00
ghubstan
ad638e33cd
Revert "Sort API gettrades's response list by trade date"
This reverts commit f231aacb31.

Sorting cumulative trade history lists should be done once, in GrpcTradesService.
2022-01-27 16:36:14 -03:00
ghubstan
f231aacb31
Sort API gettrades's response list by trade date 2022-01-26 11:43:31 -03:00
Christoph Atteneder
ffd2a92ae9
Merge pull request #5963 from xyzmaker123/transactions-filtering
Add missing filtering on lists
2022-01-26 09:59:53 +01:00
ghubstan
4c8cec54f3
Push Trade->TradeModel mapping down from CoreApi into CoreTradesService 2022-01-25 19:11:24 -03:00
ghubstan
4ab4c3d213
Log exception and return "Not Available" when trade role cannot be found 2022-01-25 12:21:22 -03:00
ghubstan
d902e77710
Add Bisq license banners 2022-01-25 11:44:42 -03:00
Christoph Atteneder
9be361aa08
Merge pull request #5987 from xyzmaker123/refactor-remove-unused-classes
Cleanup: remove unused classes
2022-01-25 11:36:27 +01:00
xyzmaker123
669bc88900
Remove unused classes 2022-01-25 11:18:14 +01:00
xyzmaker123
752606d788
Add missing filtering on lists - adapt PendingTradesView to use FilterBox 2022-01-24 17:20:02 +01:00
sqrrm
f315bd299e
Merge pull request #5993 from bisq-network/release/v1.8.2
Release/v1.8.2
2022-01-24 16:26:35 +01:00
Christoph Atteneder
ded4c072cb
Merge pull request #5965 from MwithM/patch-2
Include penalty for exceeding transfer limits
2022-01-24 10:30:18 +01:00
ghubstan
3e14bd3fbe
Change var name 2022-01-23 17:05:55 -03:00
ghubstan
0e020e8987
Add payout fields to trade proto msgs, show optional trade/tx fees in swaps 2022-01-23 17:03:43 -03:00
ghubstan
fadaaf9151
Display tx-fee from BsqSwapProtocolModel 2022-01-22 16:22:41 -03:00
ghubstan
6e0299642e
Fill out gettrades-help.txt 2022-01-22 16:03:34 -03:00
ghubstan
69e6c9ce70
Remove duplicated buyer/seller proto fields (already exist no OfferInfo) 2022-01-20 16:50:08 -03:00
ghubstan
2e7346a695
Fix comments 2022-01-20 15:54:19 -03:00
Christoph Atteneder
fd42c4507d
Merge pull request #5966 from jmacxx/tor_bridges_fix
Tor bridges preferences fix
2022-01-20 18:15:17 +01:00
Christoph Atteneder
300b4aa613
Merge pull request #5975 from ripcurlx/update-data-stores-for-v1.8.1
Update data stores for v1.8.1
2022-01-20 18:12:18 +01:00
Christoph Atteneder
58dca6fd1b
Merge pull request #5981 from Emzy/master
update hostname of BSQ explorer mempool.emzy.de
2022-01-20 09:49:50 +01:00
Christoph Atteneder
638d638d25
Use isFiat method for checking if it is a fiat method 2022-01-20 09:48:13 +01:00
Christoph Atteneder
cad973efd1
Not create and publish account age witnesses for BSQ swap accounts 2022-01-20 09:48:02 +01:00
Stephan Oeste
6637806019
update hostname ob BSQ explorer
The new version 2.3.0 of mempool.space supports BSQ exporer only on a separate domain.
update URL to http://bisq.mempool.emzy.de/....

There is a redirect from the old location to the new one. 
So nothing is broken and the PR is low prio.
2022-01-19 17:32:49 +01:00
Christoph Atteneder
5e158e8300
Use isFiat method for checking if it is a fiat method 2022-01-19 16:55:09 +01:00
ghubstan
3cd1e05a9f
Try to display accurate status of closed trades, or "Pending" if still open 2022-01-18 13:01:42 -03:00
Christoph Atteneder
b7af53d22f
Update bitcoinj checkpoints for v1.8.1 2022-01-18 11:33:16 +01:00
Christoph Atteneder
1f22f89bb4
Not create and publish account age witnesses for BSQ swap accounts 2022-01-18 11:29:41 +01:00
ghubstan
d98d795c77
Add server impl for gettrades (open|closed), refactor getrole methods 2022-01-16 16:46:45 -03:00
ghubstan
fdd94fe1f2
Remove commented code 2022-01-16 16:44:18 -03:00
ghubstan
a9e7484aee
Add buyer/seller dep & status-desc fields to TradeInfo 2022-01-16 16:43:34 -03:00
ghubstan
5c217793c8
Add buyer/seller dep & status-desc fields to TradeInfoV1Builder 2022-01-16 16:42:34 -03:00
ghubstan
a53fee345f
Add List<OpenOffer> getCanceledOpenOffers() ClosedTradableManager 2022-01-16 16:41:53 -03:00
ghubstan
50bbbfe6c4
Add List<Trade> getTrades() to TradeManager (w/out transitive jfx dep) 2022-01-16 16:41:09 -03:00
ghubstan
b4fa52f4e4
Add List<Trade> getTrades() to FailedTradesManager (w/out transitive jfx dep) 2022-01-16 16:39:07 -03:00
jmacxx
684fd39c75
Force persistence write when editing Tor Bridge settings.
This is necessary because Tor settings are edited before the app has
completed startup and normally persistence is prohibited.
2022-01-16 11:52:44 -06:00
MwithM
7d1e8a1649
Include penalty for exceeding transfer limits
Nequi payment method did not include that there might be a penalty for exceeding the transfer limits. I have used the same wording for every payment method.
2022-01-13 20:01:21 +01:00
Christoph Atteneder
efac836fa2
Update translations for v1.8.1 2022-01-12 10:54:00 +01:00
Christoph Atteneder
63a241a64e
Remove unused translation keys 2022-01-12 10:47:11 +01:00
Bisq GitHub Admin
808c3ad9d9
Merge pull request #5930 from xyzmaker123/modify-accepted-countries
SEPA Account - editable account name and accepted countries
2022-01-12 10:32:20 +01:00
Bisq GitHub Admin
8401b3885b
Merge pull request #5870 from jmacxx/mediation_payout_ux
Improve user experience once mediation has been accepted by both parties
2022-01-12 10:23:02 +01:00
Bisq GitHub Admin
ddead5ef54
Merge pull request #5953 from jmacxx/logs_upload
Feature enabling log file upload to mediators
2022-01-12 09:41:32 +01:00
jmacxx
d9ad531b3c
Fix issue of space in file path 2022-01-11 09:23:49 -06:00
Christoph Atteneder
a1d0e570d1
Apply minor improvements and clean-ups 2022-01-11 12:36:44 +01:00
Christoph Atteneder
310b9a97f2
Merge pull request #5949 from jmacxx/fix_trade_fee_validation
Fix trade fee validation bug
2022-01-11 11:09:09 +01:00
Christoph Atteneder
4a3e29daf5
Improve wording of trade completed notification popups 2022-01-11 11:02:55 +01:00
Christoph Atteneder
9759cebc4d
Remove unused translations 2022-01-11 10:48:06 +01:00
Christoph Atteneder
5c26c635e5
Merge pull request #5961 from ghubstan/2-api-fail-unfail-trade
Add API methods 'failtrade', 'unfailtrade' + test case (#2)
2022-01-10 12:29:54 +01:00
Christoph Atteneder
96878e5789
Merge pull request #5957 from jmacxx/fix_issue_5956
Wording for Bsq swap cancellation popups & withdrawal prompt
2022-01-10 12:01:33 +01:00
xyzmaker123
1da71f6c66
SEPA Account - possibility to modify account name 2022-01-10 10:52:39 +01:00
xyzmaker123
b3bf1903be
SEPA Account - possibility to modify accepted countries 2022-01-10 10:52:25 +01:00
jmacxx
3ea1543882
fixes for Windows compatability, test added 2022-01-07 19:42:24 -06:00
ghubstan
7690ffd953
Add API methods 'failtrade', 'unfailtrade'
Prerequisite for next PR: Add API method 'gettrades'

The `gettrades` method will show 'open', 'closed', and 'failed' trades.
Users already needed to be able to fail and unfail trades for the
same reasons they do in the UI.  API test cases will need to be able to
fail and unfail trades to check correct behavior of 'gettrades' method.

Based on branch `rename-keepfunds2closetrade`.
2022-01-07 19:11:34 -03:00
jmacxx
99b4071bdf
Wording for Bsq swap cancellation popups & withdrawal prompt 2022-01-07 10:03:14 -06:00
jmacxx
9334cffc89
Feature enabling log file upload to mediators 2022-01-06 13:22:44 -06:00
ghubstan
a9aaba87fa
Rename API method keepfunds -> closetrade
Trade proceeds and deposits have already been transfered to Bisq wallets
before the `keepfunds` command is (was) executed;  `keepfunds` merely moves
open trades to closed trades lists and persistence files.  Renaming `keepfunds`
as `closetrade` makes its purpose clear to API users.

The commit modifies only method names and comments in api server+cli classes,
apitest cases, and api trade simulation scripts.

Based on `master`
2022-01-05 12:10:46 -03:00
jmacxx
298aca40bc
Fix trade fee validation bug when two BSQ UTXOs used to pay the fee.
A test has been added to validate the UTXO issue above.
Other tests have been updated as a result of the changes in PR 5826
where fee parameter is now supplied from a filter; this results
in more accurate (less lenient) fee checking.
2022-01-04 09:25:05 -06:00
Christoph Atteneder
dde48f7d9e
Merge pull request #5935 from jmacxx/dao_state_store_and_statistics
Improve DAO state store persistence and statistics logging [chimp1984]
2022-01-03 12:24:18 +01:00
Stan
53d693d710
Merge branch 'master' into 7-deprecate-api-getmyoffer 2021-12-27 12:09:22 -03:00
ghubstan
5f571cccca
Deprecate API 'getmyoffer'
The method 'getoffer' should support looking up a user's open-offers, and other users' available offers.

- Adjust api-beta-test-guide.md to use only 'getoffer'.
- Adjust trade simulation scripts to use only 'getoffer'.
- Adjust api testcases to use 'getoffer' in place of 'getmyoffer'.
- Mark appropriate methods and protobuf msgs as deprecated.
2021-12-27 12:05:17 -03:00
jmacxx
1162060e28
Simplify the trade complete summary dialog 2021-12-24 14:22:59 -06:00
jmacxx
9378fe4603
Patch from chimp1984 improving the DaoState persistence 2021-12-23 14:40:11 -06:00
Christoph Atteneder
23d1856a60
Merge pull request #5852 from ghubstan/create-swift-acct-with-api
Support and test creation of Swift accounts via API
2021-12-20 11:49:20 +01:00
KanoczTomas
dfbde480c6
Remove trailing spaces. 2021-12-18 23:41:33 +01:00
KanoczTomas
364560e348
Correct typo in list/array of nodes 2021-12-18 22:37:04 +01:00
KanoczTomas
6969ed7a84
Add @KanoczTomas btc node with onion v3 address 2021-12-14 23:58:07 +01:00
sqrrm
cf81fd451c
Merge pull request #5876 from ghubstan/5-api-bsqswap-simulation-n-docs-update
API BSQ swap simulation script and doc updates #5
2021-12-14 15:47:51 +01:00
Christoph Atteneder
a7c38630e8
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.8.0
Conflicts:
	core/src/main/resources/i18n/displayStrings_pl.properties
2021-12-13 11:51:16 +01:00
chimp1984
97e4ed5a59
Revert usage of File.separator
File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: https://github.com/bisq-network/bisq/pull/5909#pullrequestreview-827992563
2021-12-09 20:07:21 +01:00
chimp1984
0f65567e1a
In case the BSQ blocks directory does not exist in resources (as in case of REG_TEST)
we do not want to log an error stacktrace but just an info message.

Use `File.separator` instead of "/"
2021-12-09 20:07:20 +01:00
chimp1984
225b78317f
Revert usage of File.separator
File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: https://github.com/bisq-network/bisq/pull/5909#pullrequestreview-827992563
2021-12-09 13:13:37 -05:00
chimp1984
d74bffb595
In case the BSQ blocks directory does not exist in resources (as in case of REG_TEST)
we do not want to log an error stacktrace but just an info message.

Use `File.separator` instead of "/"
2021-12-09 11:04:55 -05:00
Christoph Atteneder
eb074ac0e2
Merge pull request #5908 from ripcurlx/update-data-stores-for-v1.8.0-again
Update data stores for v1.8.0 (again, again)
2021-12-09 16:03:39 +01:00
chimp1984
444d045c4f
At shutdown the executor can throw a RejectedExecutionException which
is expected as we shut down the executor immediately.
If not thrown at shutdown or exception is not a RejectedExecutionException
we log a warning and re-throw the exception (to avoid change of behaviour
of current version). The exception is likely not handled by callers and goes up to
the uncaught exception handler.
2021-12-09 10:10:06 +01:00
Bisq GitHub Admin
be4cbcdcec
Merge pull request #5901 from chimp1984/handle-RejectedExecutionException-in-RpcService
Add Exception handling at RpcService
2021-12-09 10:09:24 +01:00
Steven Barclay
e07c7b5d4b
Fix BSQ blocks resync from resources on Windows & Linux
Prevent a "URI is not hierarchical" IllegalArgumentException from the
expression, 'new File(dirUrl.toURI())', which occurs on Linux & Windows
when listing the resource directory of BSQ blocks. Adapt a solution from
StackOverflow which uses two separate code paths depending on the
environment, into the new method 'FileUtil::listResourceDirectory'.

The issue is caused by the resource URL taking one of the two forms:

  file:/Users/[USER]/Java/bisq/bisq/p2p/out/production/resources/BsqBlocks_BTC_MAINNET
  jar:file:...p2p.jar!/BsqBlocks_BTC_MAINNET

depending on whether the system is OSX or not.
2021-12-09 09:52:30 +01:00
Christoph Atteneder
601163eeb3
Merge pull request #5900 from stejbac/fix-resync-blocks-from-resources
Fix resync BSQ blocks from resources
2021-12-09 09:51:51 +01:00
Christoph Atteneder
7d66264453
Update data stores for v1.8.0 (again, again) 2021-12-08 21:13:21 +01:00
chimp1984
81d112bdf3
Add null checks
Return early at connection if stopped
Cleanup logs
2021-12-08 19:39:37 +01:00
chimp1984
ee1371276f
Reduce timeouts
Add logs when shutdown starts
2021-12-08 19:39:37 +01:00
chimp1984
d5d60b59cc
Extract duplicated code at shutdown
Move timeout before shutdown sequence starts and use a Timer thread instead of
UserThread to avoid that in case the UserThread gets blocked that the timeout
would not get triggered.
Reduce timeout from 20 sec. to 10 sec.
2021-12-08 19:39:37 +01:00
Christoph Atteneder
ff3809713b
Merge pull request #5905 from chimp1984/improve_shutdown_process
Improve shutdown process
2021-12-08 19:39:22 +01:00
chimp1984
32cd812744
Increase trade protocol timeout from 60 sec to 120 sec 2021-12-08 19:37:41 +01:00
chimp1984
3d40b3bf29
Add null checks
Return early at connection if stopped
Cleanup logs
2021-12-07 21:07:40 -05:00
chimp1984
2474e0daf9
Reduce timeouts
Add logs when shutdown starts
2021-12-07 20:45:02 -05:00
chimp1984
4eb14fb226
Extract duplicated code at shutdown
Move timeout before shutdown sequence starts and use a Timer thread instead of
UserThread to avoid that in case the UserThread gets blocked that the timeout
would not get triggered.
Reduce timeout from 20 sec. to 10 sec.
2021-12-07 20:42:53 -05:00
chimp1984
b5b7e86323
Increase trade protocol timeout from 60 sec to 120 sec 2021-12-07 19:39:22 -05:00
chimp1984
e85e46cb13
At shutdown the executor can throw a RejectedExecutionException which
is expected as we shut down the executor immediately.
If not thrown at shutdown or exception is not a RejectedExecutionException
we log a warning and re-throw the exception (to avoid change of behaviour
of current version). The exception is likely not handled by callers and goes up to
the uncaught exception handler.
2021-12-07 09:58:11 -05:00
Steven Barclay
ec58b26657
Fix BSQ blocks resync from resources on Windows & Linux
Prevent a "URI is not hierarchical" IllegalArgumentException from the
expression, 'new File(dirUrl.toURI())', which occurs on Linux & Windows
when listing the resource directory of BSQ blocks. Adapt a solution from
StackOverflow which uses two separate code paths depending on the
environment, into the new method 'FileUtil::listResourceDirectory'.

The issue is caused by the resource URL taking one of the two forms:

  file:/Users/[USER]/Java/bisq/bisq/p2p/out/production/resources/BsqBlocks_BTC_MAINNET
  jar:file:...p2p.jar!/BsqBlocks_BTC_MAINNET

depending on whether the system is OSX or not.
2021-12-07 11:48:07 +00:00
Christoph Atteneder
75ca2faeb2
Update translations for v1.8.0 (again) 2021-12-07 11:12:29 +01:00
Christoph Atteneder
ed1dac715b
Add missing import 2021-12-07 10:01:24 +01:00
Christoph Atteneder
ce541f6401
Add missing import 2021-12-07 09:51:54 +01:00
Christoph Atteneder
d39820bbcd
Apply suggestions and fix edge case when BSQ legacy payment account offer is duplicated 2021-12-07 09:41:41 +01:00
Christoph Atteneder
f41203858c
Add visual icon for duplicate offer functionality 2021-12-07 09:41:41 +01:00
Christoph Atteneder
4d1ee3fc9b
Add support to duplicate bsq swap offers 2021-12-07 09:41:40 +01:00
Bisq GitHub Admin
5041dc57ef
Merge pull request #5886 from ripcurlx/add-bsq-swap-duplicate-offer-support
Add support to duplicate BSQ swap offers
2021-12-07 09:41:10 +01:00
Steven Barclay
ceb9b9acbd
Code cleanup: proto fields, duplicated expr & null char separator
1. Reorder the PoW fields in the 'Filter' proto by field index, instead
 of contextually.
2. Deduplicate expression for 'pow' & replace if-block with boolean op
 to simplify 'FilterManager::isProofOfWorkValid'.
3. Avoid slightly confusing use of null char as a separator to prevent
 hashing collisions in 'EquihashProofOfWorkService::getChallenge'. Use
 comma separator and escape the 'itemId' & 'ownerId' arguments instead.

(based on PR #5858 review comments)
2021-12-07 09:35:45 +01:00
Steven Barclay
92209c3ed7
Inline predicates to simplify HashCashService & FilterManager
Remove all the 'challengeValidation', 'difficultyValidation' and
'testDifficulty' BiPredicate method params from 'HashCashService' &
'ProofOfWorkService', to simplify the API. These were originally
included to aid testing, but turned out to be unnecessary.

Patches committed on behalf of @chimp1984.
2021-12-07 09:35:45 +01:00
Steven Barclay
772cd74ab2
Store difficulty as floating point in Filter & PoW
Change the type of the 'difficulty' field in the Filter & ProofOfWork
proto objects from int32/bytes to double and make it use a linear scale,
in place of the original logarithmic scale which counts the (effective)
number of required zeros.

This allows fine-grained difficulty control for Equihash, though for
Hashcash it simply rounds up to the nearest power of 2 internally.

NOTE: This is a breaking change to PoW & filter serialisation (unlike
the earlier PR commits), as the proto field version nums aren't updated.
2021-12-07 09:35:44 +01:00
Steven Barclay
266a7ccea4
Add+enable service to mint/verify Equihash proofs of work
Add an abstract base class, 'ProofOfWorkService', for the existing PoW
implementation 'HashCashService' and a new 'EquihashProofOfWorkService'
PoW implementation based on Equihash-90-5 (which has 72 byte solutions &
5-10 MB peak memory usage). Since the current 'ProofOfWork' protobuf
object only provides a 64-bit counter field to hold the puzzle solution
(as that is all Hashcash requires), repurpose the 'payload' field to
hold the Equihash puzzle solution bytes, with the 'challenge' field
equal to the puzzle seed: the SHA256 hash of the offerId & makerAddress.

Use a difficulty scale factor of 3e-5 (derived from benchmarking) to try
to make the average Hashcash & Equihash puzzle solution times roughly
equal for any given log-difficulty/numLeadingZeros integer chosen in the
filter.

NOTE: An empty enabled-version-list in the filter defaults to Hashcash
(= version 0) only. The new Equihash-90-5 PoW scheme is version 1.
2021-12-07 09:35:44 +01:00
Steven Barclay
23252caa3b
Fix method name typo: redoProofOfWorkAndRepublish 2021-12-07 09:35:44 +01:00
Steven Barclay
c3e5dfd19e
Add PoW version(-list) fields to ProofOfWork & Filter
Add a numeric version field to the 'ProofOfWork' protobuf object, along
with a list of allowed version numbers, 'enabled_pow_versions', to the
filter. The versions are taken to be in order of preference from most to
least preferred when creating a PoW, with an empty list signifying use
of the default algorithm only (that is, version 0: Hashcash).

An explicit list is used instead of an upper & lower version bound, in
case a new PoW algorithm (or changed algorithm params) turns out to
provide worse resistance than an earlier version.

(The fields are unused for now, to be enabled in a later commit.)
2021-12-07 09:35:43 +01:00
Steven Barclay
484afbc522
Code cleanup: replace (Bi)Function<..,Boolean> with (Bi)Predicate<..>
Replace 'BiFunction<T, U, Boolean>' with the primitive specialisation
'BiPredicate<T, U>' in HashCashService & FilterManager.

As part of this, replace similar predicate constructs found elsewhere.
NOTE: This touches the DAO packages (trivially @ VoteResultService).
2021-12-07 09:35:41 +01:00
Christoph Atteneder
0a31bf899e
Merge pull request #5858 from stejbac/add-asic-resistant-pow
Provide ASIC resistant PoW scheme for BSQ swaps
2021-12-07 09:34:50 +01:00
Steven Barclay
24d2a7f222
Code cleanup: proto fields, duplicated expr & null char separator
1. Reorder the PoW fields in the 'Filter' proto by field index, instead
 of contextually.
2. Deduplicate expression for 'pow' & replace if-block with boolean op
 to simplify 'FilterManager::isProofOfWorkValid'.
3. Avoid slightly confusing use of null char as a separator to prevent
 hashing collisions in 'EquihashProofOfWorkService::getChallenge'. Use
 comma separator and escape the 'itemId' & 'ownerId' arguments instead.

(based on PR #5858 review comments)
2021-12-06 22:55:14 +00:00
Christoph Atteneder
f5db85bc3d
Merge pull request #5894 from chimp1984/check-recipient-address-only-after-wallet-is-synced
Fix premature validation call
2021-12-06 20:29:27 +01:00
Christoph Atteneder
2cb238318f
Fix broken test 2021-12-06 12:05:34 +01:00
Christoph Atteneder
21f84bcd45
Fix broken test 2021-12-06 12:03:26 +01:00
chimp1984
60b3e1216a
Change max retries from 3 to 12
When doing a resync from genesis the number of blocks is limited to 6000
so that requires lots of requests and with that increases risk of broken
connections. Giving more tolerance for retries avoids that the user has
to restart the app.
2021-12-06 11:52:13 +01:00
chimp1984
c34a019a31
Fixes https://github.com/bisq-network/bisq/issues/5882
When syncing from genesis the number of blocks are limited so we get the
`onParseBlockCompleteAfterBatchProcessing` called each time when the received
 blocks are processed, and as we are not at wallet height we repeat requesting
 blocks. But the new check for the BTC recipient triggers a resync from resource call.
We add now a check that we do this check only once the wallet is synced and our
block height from dao state matches wallet blockheight.
2021-12-06 11:52:12 +01:00
Christoph Atteneder
6e1a805b22
Merge pull request #5875 from chimp1984/fix-incorrect-chainheight
Fix incorrect start height for block request
2021-12-06 11:36:00 +01:00
Christoph Atteneder
e5c70717f8
Merge pull request #5884 from MwithM/patch-1
Substitute Unconfirmed for Processing BSQ swap
2021-12-06 11:29:17 +01:00
chimp1984
e802e68506
Fix handling for genesis height and case when wallet sync is not completed yet.
- At genesis we use the genesis height for request (not height+1)
- If wallet is not synced yet we do not call onParseBlockChainComplete (as it was before)
2021-12-06 11:17:41 +01:00
chimp1984
84cd67f54d
Fix incorrect start height for block request
We added 1 as with the lite monitor mode we persist the most recent block,
thus we request with the start height for the next block.
But that cause a problem at a DAO full mode which has lite monitor mode set
as then the block parsing would not be triggered.

We refactor it so that we take the chainHeight from the dao state
directly and add 1 at the requests.
We add a check if we are at chain tip, and if so we skip requests
and call the onParseBlockChainComplete directly.
2021-12-06 11:17:33 +01:00
Christoph Atteneder
319a9d96a7
Improve BSQ swap success message 2021-12-06 11:04:48 +01:00
Christoph Atteneder
a1ecf35007
Apply suggestions and fix edge case when BSQ legacy payment account offer is duplicated 2021-12-06 11:04:01 +01:00
Christoph Atteneder
ec5f217f2f
Improve warning when BSQ swap offer is removed 2021-12-06 10:43:58 +01:00
Bisq GitHub Admin
b06852be73
Merge pull request #5891 from ripcurlx/improve-remove-bsq-offer-warning
Improve warning when BSQ swap offer is removed
2021-12-06 10:43:26 +01:00
Steven Barclay
981d6ff000
Validate input script types to prevent BSQ swap tx fee underpaying
Add a check of 'scriptTypeId' field, against the output of the spending
tx, to the 'RawTransactionInput::validate' method. Also make the seller
as well as the buyer validate each raw BSQ/BTC input received from the
peer. This prevents either peer from claiming that any of their
non-segwit inputs are segwit in order to underpay the tx fee.
2021-12-04 19:52:07 +01:00
Steven Barclay
efd590b9e7
Fix BSQ swap buyer tx fee theft vulnerability
Prevent the seller from stealing the combined tx fee as change by lying
about the value of one or more of his BTC inputs, which are passed to
the buyer as raw inputs in the 'BsqSwapFinalizeTxRequest' message.

To this end, add a 'RawTransactionInput::validate' method to check the
'value' field against the output value of the respective spending tx and
run it on every seller input in 'ProcessBsqSwapFinalizeTxRequest', so
that the buyer is no longer just trusting those numbers.

Additionally, check that the spending txIds from the raw BTC inputs
supplied by the seller actually match those of his signed inputs in the
accompanying partially signed tx, thus tying the raw input values to the
seller's tx.
2021-12-04 19:52:07 +01:00
Steven Barclay
acad642b53
Fix misleading comment: BSQ swap taker tx fee tolerance
(Actual tolerance by maker of agreed tx fee is 50%, not 10%.)
2021-12-04 19:52:06 +01:00
Christoph Atteneder
628ac27e25
Merge pull request #5889 from stejbac/fix-bsq-swap-tx-fee-theft-vulnerability
Fix BSQ swap buyer tx fee theft vulnerability
2021-12-04 19:50:50 +01:00
jmacxx
4b60be0ebb
Always use fresh address for MULTI_SIG context 2021-12-04 19:49:11 +01:00
chimp1984
d7c9ce462b
Change max retries from 3 to 12
When doing a resync from genesis the number of blocks is limited to 6000
so that requires lots of requests and with that increases risk of broken
connections. Giving more tolerance for retries avoids that the user has
to restart the app.
2021-12-04 11:11:26 -05:00
chimp1984
747916ac2f
Fixes https://github.com/bisq-network/bisq/issues/5882
When syncing from genesis the number of blocks are limited so we get the
`onParseBlockCompleteAfterBatchProcessing` called each time when the received
 blocks are processed, and as we are not at wallet height we repeat requesting
 blocks. But the new check for the BTC recipient triggers a resync from resource call.
We add now a check that we do this check only once the wallet is synced and our
block height from dao state matches wallet blockheight.
2021-12-03 20:09:47 -05:00
chimp1984
c9e0265e13
Fix handling for genesis height and case when wallet sync is not completed yet.
- At genesis we use the genesis height for request (not height+1)
- If wallet is not synced yet we do not call onParseBlockChainComplete (as it was before)
2021-12-03 19:48:17 -05:00
ghubstan
5f7fd6257b
Merge branch 'master' into 6-api-xmr-trading 2021-12-03 13:19:24 -03:00
Christoph Atteneder
ccda66d2c6
Improve warning when BSQ swap offer is removed 2021-12-03 12:21:03 +01:00