Commit Graph

6303 Commits

Author SHA1 Message Date
sqrrm
15093720b9
Merge pull request #5625 from ripcurlx/unsigned-account-tooltip
Tooltip for unsigned accounts needs to provide more information
2021-08-16 12:15:43 +02:00
ghubstan
71a61c63da
Display Enabled=PENDING in CLI 'createoffer' output
A newly created offer has no OpenOffer+State (AVAILABLE || DEACTIVATED)
when displayed in the CLI's console.  This change adds a 'bool isMyPendingOffer'
to the OfferInfo proto + wrapper, and the CLI's console offer output formatter
uses it to determine if it should display a new offer's Enabled column value
as PENDING, instead of an ambiguous NO value.
2021-08-14 16:58:47 -03:00
Christoph Atteneder
9db2c18f2c
Merge pull request #5649 from sqrrm/refund-double-payout-fix
Avoid creating more than one refund payout
2021-08-12 20:43:22 +02:00
ghubstan
6e2400fb0f
Ensure UI OfferBook items are correctly added and removed
Using the API's CLI to edit offers can sometimes result in add/remove messages
being received on peers in the same batch of envolopes, and these messages
are sometimes passed to the UI in (1) add, (2) remove order.  This can result in
a newly edited offer being removed immediately after being added to the OfferBook
list. This change uses storage entry sequence number and storage entry payload
hash comparisons to avoid the problem.

- OfferBookListItem Added new constructor taking P2PDataStorage.ByteArray hashOfPayload,
  and int sequenceNumber params.  Added a new toString() method.

- OfferBook Added new checks on OfferBookListItem hashOfPayload and sequenceNumber while
  determining if offer candidates should be added or removed from the UI's OfferBook List.
  See OfferBook contructor's implementation of OfferBookChangedListener#onAdded and
  OfferBookChangedListener#onRemoved.  Added many comments explaining the add/remove rules,
  and plenty of debug statements to help trace the add/remove event process.

- OfferBookService#OfferBookChangedListener Added new P2PDataStorage.ByteArray hashOfPayload,
  and int sequenceNumber params to listener's onAdded and onRemoved method signatures.
  Added these two new paramater values to listener.onAdded and listener.onRemoved calls.

- TakeOfferDataModel Replaced unused, old tradeManager param in offerBook.removeOffer()
  with (null) P2PDataStorage.ByteArray hashOfPayload, and (-1) int sequenceNumber params.
  OfferBook will remove the candidate offer as before.

- MarketAlerts Adjusted onAdded() & onRemoved listener method signatures, even though
  new P2PDataStorage.ByteArray hashOfPayload, int sequenceNumber params are not used
  by the implementations.
2021-08-07 14:06:38 -03:00
ghubstan
369372880d
Merge branch 'master' into 05-update-api-beta-test-guide 2021-08-04 16:41:52 -03:00
sqrrm
8c666dba92
Avoid creating more than one refund payout
Double clicking the close ticketbutton creates two payout transactions.
This fix makes sure only one payout transaction is created for the
dispute.

Restarting the client allows for creating another refund transaction
for the dispute if needed.
2021-08-02 10:17:17 +02:00
Christoph Atteneder
fa4238c162
Merge pull request #5644 from jmacxx/fix_payment_account_deserialize_issue
Fix issue for deprecated payment account imported from backup
2021-08-01 20:50:20 +02:00
ghubstan
b8379e2003
Merge branch 'master' into 05-update-api-beta-test-guide 2021-07-30 11:53:34 -03:00
jmacxx
670ff92f4c
fix deserialize issue for deprecated payment account imported from backup 2021-07-29 21:56:44 -05:00
jmacxx
5cc3f8680e
keep chatview listener open until ack, mailbox, or error 2021-07-23 08:05:56 +02:00
Christoph Atteneder
e2e23a8611
Update bitcoinj checkpoints for v1.7.2 2021-07-19 15:34:08 +02:00
Christoph Atteneder
f0258d6dd1
Remove unused translation 2021-07-19 13:55:12 +02:00
BtcContributor
fb639c1e6d
Add missing info text for Capitual payment method 2021-07-19 13:55:11 +02:00
BtcContributor
870448f5fa
Add review feedbacks from KaiWitt 2021-07-19 13:55:11 +02:00
BtcContributor
50b6f42525
Add Capitual payment method. Waiting for final Info text to add. 2021-07-19 13:55:10 +02:00
Christoph Atteneder
57473a6e23
Update translations for v1.7.2 2021-07-16 20:38:58 +02:00
xyzmaker123
5a2592c832
Update core/src/main/resources/i18n/displayStrings.properties
Co-authored-by: Christoph Atteneder <christoph.atteneder@gmail.com>
2021-07-16 09:19:50 +02:00
xyzmaker123
b6e8f66553
Tooltip for unsigned accounts needs to provide more information 2021-07-16 09:19:49 +02:00
sqrrm
eace7c2b61
Merge pull request #5598 from ripcurlx/add-pazza-as-mediator
Add @pazza's mediator onion address and Keybase user name
2021-07-13 10:25:39 +02:00
sqrrm
30b100dfc0
Merge pull request #5621 from ripcurlx/add-payment-account-payload-safeguards
Add payment account payload safeguards
2021-07-13 10:24:49 +02:00
Christoph Atteneder
e4b00c6e32
Merge pull request #5611 from harrigan/master
List RSK Smart Bitcoin (R-BTC)
2021-07-13 09:25:35 +02:00
Christoph Atteneder
23a3c63e0f
Merge pull request #5614 from jmacxx/fix_payment_account_deserialize_issue
Fix payment account deserialize issue (e.g. CHASE_QUICK_PAY)
2021-07-13 09:20:23 +02:00
jmacxx
ab565d1368
fix payment account deserialize issue (e.g. CHASE_QUICK_PAY) 2021-07-12 06:58:05 -05:00
Christoph Atteneder
5ba7f043d4
Handle potential PaymentAccountPayload null values when detecting multiple holder names 2021-07-12 11:26:28 +02:00
Christoph Atteneder
51af19e5ec
Check if PaymentAccountPayload is null bfore trying to apply filter 2021-07-12 11:25:23 +02:00
Christoph Atteneder
c15958a94d
Return empty if no PaymentAccountPayload is available 2021-07-12 10:24:35 +02:00
chimp1984
8859503e49
Update comment 2021-07-08 01:09:50 +02:00
chimp1984
28a8116997
Add gc calls at areas where memory usage spikes are expected 2021-07-08 01:06:20 +02:00
chimp1984
0a5c1ca72c
Add txOutputsByTxOutputType map for performance improvement
Profiler reported the getTxOutputsByTxOutputType got called
very often. To avoid those iterations we use a lookup map.
2021-07-07 22:51:58 +02:00
chimp1984
4727f09066
Add System.gc() before we clone daoState and before we apply it to store.
Add it also before and after daoState monitor checks.

When letting the app run over night I saw that a lot of memory was not
released if System.gc() was not called.
By calling System.gc() it got to the expected state. Tested with the
G1 GC but saw similar behaviour with master with default GC version (parallel).

We could also run it periodically every 10 minutes or so, but I guess the block
interval covers that pretty good as well and those are the moment where load is
added and risk to run out of memory is higher.
We add a bit of delay to take into account that listeners might
react on the state change and to apply the gc after the event is processed completely.
2021-07-07 11:58:10 +02:00
chimp1984
da5dd523fb
Optimize DaoState snapshot behaviour
- Run persistence call in thread instead of user thread (serialisation
is very slow and had blocked user thread)
- Create new snapshot only after persistence is completed to avoid to
have 3 daoState objects in memory
- Set DaoState in store to null to let gc remove the old reference (was
left there before so we had 3 instances of daoStates in memory)
2021-07-06 17:59:44 +02:00
Christoph Atteneder
93df5c2849
Merge pull request #5599 from jmacxx/fix_chatmessage_status
Fix bug in chat message status display
2021-07-06 16:13:23 +02:00
Christoph Atteneder
f4ca766a97
Merge pull request #5602 from jmacxx/fix_withdrawal_fee_bug
Fix custom withdrawal fee bug
2021-07-06 16:04:22 +02:00
sqrrm
030a76522c
Merge pull request #5606 from bisq-network/release/v1.7.0
Release/v1.7.0
2021-07-06 12:40:52 +02:00
jmacxx
4a6eab1af3
fix custom withdrawal fee bug 2021-07-05 08:54:36 -05:00
jmacxx
a5f185484a
fix bug in chatmessage timeout status 2021-07-02 08:52:53 -05:00
Christoph Atteneder
a837c36e12
Add @pazza83's mediator onion address and Keybase user name 2021-07-02 10:55:53 +02:00
Christoph Atteneder
ab475724fe
Merge pull request #5593 from devinbileck/new-relaynode-address
Update relay-node address
2021-07-02 09:08:33 +02:00
Huey
26d33e10b2
Remove wiz monero explorer
@wiz is no longer running a Monero explorer
https://github.com/bisq-network/bisq/pull/4790
2021-07-01 09:12:34 +01:00
Devin Bileck
0eb8da083f
Update relay-node address
With Tor v2 addresses being deprecated soon, now is a good time to
update the relay-node used for mobile notifications with a new v3 onion
address.
2021-06-29 23:30:11 -07:00
Christoph Atteneder
3d88f9f112
Check if makerPaymentMethodId is available falling back to the payload object if not
This is the case for old dispute cases
2021-06-28 09:48:03 +02:00
Christoph Atteneder
e5765aeef2
Delay sending of payment account information during trade by @chimp1984
It also removes the op return from the multisig transaction
2021-06-28 09:47:52 +02:00
Christoph Atteneder
c7891e4a44
Update bitcoinj checkpoints for v1.7.0 2021-06-25 16:17:19 +02:00
m52go
4399885e61
Make edits as suggested in #5583 2021-06-24 18:17:28 -04:00
Christoph Atteneder
e6c3499384
Update translations for v1.7.0 2021-06-23 14:28:58 +02:00
sqrrm
8bc60d0909
Merge pull request #5573 from ripcurlx/add-hint-to-upgrade-to-tor-v3
Add hint to upgrade to tor v3
2021-06-23 13:41:03 +02:00
Christoph Atteneder
8d18e07f52
Apply PR Review suggestion by @sqrrm 2021-06-23 12:25:46 +02:00
Christoph Atteneder
6ab5ceca1a
Merge pull request #5563 from xyzmaker123/open-address-explorer
Fix incorrect tx link to tx explorer - fixes #5548
2021-06-22 16:45:49 +02:00
Martin Harrigan
639f6ee337
List RSK Smart Bitcoin (R-BTC) 2021-06-20 12:19:53 +01:00
ghubstan
81158662cf
Merge branch '03-api-editoffer-method' into 04-edit-bsq-offer 2021-06-19 11:25:45 -03:00
ghubstan
0a3e011ef5
Merge branch '02-refactor-for-api-editoffer-method' into 03-api-editoffer-method 2021-06-19 11:23:34 -03:00
ghubstan
ab2edac454
Merge branch 'master' into 02-refactor-for-api-editoffer-method 2021-06-19 11:21:07 -03:00
ghubstan
e32e0d1fbb
Add altcoin (bsq) offer editing validation check
BSQ offers are fixed-price only.  This change blocks an
attempt to change an altcoin offer to a margin price based
offer, or set a trigger price.
2021-06-18 17:46:16 -03:00
ghubstan
a603044f2e
Pass isMyOffer flag to trade/offer proto wrappers from core services 2021-06-18 17:41:45 -03:00
ghubstan
0e9c6650e3
Include isMyOffer flag in API's trade/offer proto wrappers
Optionally displaying an ENABLED column in CLI side getoffer output
depends on the value of offer.isMyOffer, which is passed via new
boolean arguments to the trade & offer pojo builders.
2021-06-18 17:40:21 -03:00
Christoph Atteneder
5a8e1cf688
Adapted tor migration message
Based on feedback by @m52go
2021-06-17 15:26:00 +02:00
ghubstan
1a56a5161a
Force codacy check after codacy config change 2021-06-17 10:13:18 -03:00
Christoph Atteneder
1a59e92910
Merge pull request #5551 from jmacxx/chat_msg_ack
Improve Chat message reliability
2021-06-17 15:04:22 +02:00
jmacxx
e75a4ef0de
Update core/src/main/resources/i18n/displayStrings.properties
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2021-06-16 08:43:14 -05:00
ghubstan
3d38a8555f
Make codacy just a bit happier 2021-06-15 13:40:33 -03:00
ghubstan
bc1576efbc
Throw exception is edit altcoin offer is attempted
Support for editing BSQ offers is in place, but will be added
in another PR.
2021-06-15 13:13:52 -03:00
ghubstan
e5b5a06b9b
Remove unused field 2021-06-15 12:04:39 -03:00
ghubstan
738d2f70ef
Fix editoffer validation bugs, tidy up CoreOffersService 2021-06-15 11:18:07 -03:00
ghubstan
32688a713f
Add bool isMyOffer to OfferInfo proto 2021-06-15 11:17:02 -03:00
xyzmaker123
cfdd4b4757
Fix incorrect tx link to tx explorer - update translations 2021-06-15 12:27:06 +02:00
Christoph Atteneder
ddd2ab490b
Merge pull request #5559 from jmacxx/dispute_tag_avatar
Feature to enable disputes user avatars and tag editing
2021-06-15 09:45:26 +02:00
Christoph Atteneder
54006dc0ef
Not require Tor v3 addresses on Regtest
Local dev environment normally uses localhost:PORT addresses not connecting through Tor.
2021-06-14 17:13:47 +02:00
Christoph Atteneder
8acd578ff2
Prevent nodes with Tor v2 address to participate in trading
After the date specified take offer requests by nodes with Tor v2 addresses will be rejected and their offers will be invisible to everyone else.
2021-06-14 17:01:40 +02:00
Christoph Atteneder
e9ef413722
Display a tor node address v3 upgrade prompt
whenever the client is in a state to do so without any problems.
2021-06-14 16:10:47 +02:00
ghubstan
21ac46ac0f
Fix log arg spec bug 2021-06-13 17:22:04 -03:00
ghubstan
54efad097d
Fix codacy issue 2021-06-13 14:05:00 -03:00
ghubstan
05f3985447
Fix problems found in codacy check 2021-06-13 13:54:16 -03:00
ghubstan
2344285ed3
Add editoffer method help 2021-06-13 12:55:23 -03:00
ghubstan
2b8b53bba8
Add server/core editOffer, adjust getMyOffer(s) impls
- Add editOffer to GrpcOffersService, CoreApi, CoreOffersService.

- Set editOffer call rate meter to 1 / minute.

- Use new EditOfferValidator to verify editOffer params OK.

- Adust getMyOffer(s) rpc impl and OfferInfo model to use OpenOffer
  for accessing activation state and trigger price.
2021-06-13 12:24:45 -03:00
ghubstan
d9dd718b4c
Fix comment 2021-06-12 18:42:14 -03:00
ghubstan
81da6fbe5a
Refactor EditOfferDataModel for new editoffer api method
- Define set of editable offer payload fields in MutableOfferPayloadFields.

- Move bulk of EditOfferDataModel#onPublishOffer logic to OfferUtil.
2021-06-12 18:35:27 -03:00
ghubstan
786b2ec42b
Remove commented out test 2021-06-12 17:46:33 -03:00
Christoph Atteneder
fb55e436f5
Only allow failed trade to be moved to pending trades if local node address matches contract 2021-06-09 11:47:41 +02:00
Christoph Atteneder
ab7fe6673e
Only allow dispute to be reopened if local node address matches contract node address 2021-06-09 11:32:57 +02:00
jmacxx
cc7346544b
feature to enable user avatars and tags in Disputes 2021-06-08 15:15:52 -05:00
Christoph Atteneder
992a6aad72
Merge pull request #5552 from jmacxx/warn_user_dao_out_of_sync
Remind user when their DAO state needs to be refreshed
2021-06-08 09:31:23 +02:00
andyheko
5a955e8d24
Remove Chase QuickPay as a payment method
Solved #5547
2021-06-07 16:34:52 -07:00
jmacxx
87261eca04
warn user when DAO needs resync 2021-06-07 16:20:19 -05:00
sqrrm
a8013f8bc0
Merge pull request #5543 from ripcurlx/minor-ui-cleanups
Minor UI cleanups
2021-06-02 15:28:36 +02:00
jmacxx
e4f88bef15
ChatMessage show error if no ACK received 2021-06-01 12:49:32 -05:00
Christoph Atteneder
7883df2977
Merge pull request #5500 from BtcContributor/fix_uphold
Add Account owner full name field to Uphold payment method
2021-06-01 12:52:13 +02:00
BtcContributor
6de7a0d861
Improve code readability 2021-06-01 09:57:41 +02:00
Bisq GitHub Admin
806253b1bd
Merge pull request #5541 from bisq-network/release/v1.6.5
Release/v1.6.5
2021-05-31 15:34:27 +02:00
Christoph Atteneder
4f75d83bc3
Remove offer duplication new feature info 2021-05-31 11:04:11 +02:00
Christoph Atteneder
a3e7d539b9
Remove XMR auto confirm feature hint 2021-05-31 11:03:33 +02:00
Christoph Atteneder
670ba8720b
Merge pull request #5534 from sqrrm/fix-send-bsq-change
Manually create BSQ outputs
2021-05-27 15:38:15 +02:00
sqrrm
9b023a371f
Manually create BSQ outputs
Avoid relying on bitcoinj completeTx for creation of BSQ change
outputs as dust BSQ would be used for mining fee, thus burning
the BSQ.
2021-05-27 11:23:32 +02:00
sqrrm
e9d61dd3d3
Manually create BSQ outputs
Avoid relying on bitcoinj completeTx for creation of BSQ change
outputs as dust BSQ would be used for mining fee, thus burning
the BSQ.
2021-05-26 15:32:32 +02:00
sqrrm
262b768d98
Add pending callbacks to FeeService
This fix guarantees a callback if there is a pending request rather than just
dropping the fee request.

When requestFee() is called the callbacks are added to a list of callBacks.
Once the next fee request completes all callbacks in the list are called
and the list cleared.
2021-05-25 12:49:49 +02:00
Christoph Atteneder
3a31ed7867
Update bitcoinj checkpoints for v1.6.5 2021-05-25 10:39:36 +02:00
Christoph Atteneder
7233979d94
Merge pull request #5521 from m52go/wait-wording
Address #5513 and add minor improvements
2021-05-22 22:10:39 +02:00
Christoph Atteneder
d66a858d51
Update translations for v1.6.5 2021-05-21 19:59:42 +02:00
Christoph Atteneder
1fa5724b7b
Remove unused imports 2021-05-21 19:58:27 +02:00
Christoph Atteneder
2fd5f40239
Reduce the number of connected BTC nodes from 9 to 7 2021-05-21 19:58:09 +02:00
m52go
8b9046525a
Address #5513 and add minor improvements 2021-05-21 13:49:38 -04:00
Christoph Atteneder
f7e27a907e
Remove unused imports 2021-05-21 19:09:33 +02:00
Christoph Atteneder
a046db528a
Reduce the number of connected BTC nodes from 9 to 7 2021-05-21 17:19:38 +02:00
BtcContributor
ed6c046ff5
Add account owner on display account + fix a couple of minor issues 2021-05-21 11:53:06 +02:00
BtcContributor
f835389993
Fix codacy issue 2021-05-18 18:20:53 +02:00
BtcContributor
8dfe2601df
Restore proto order and add backward compatibility 2021-05-18 18:10:20 +02:00
Christoph Atteneder
08320d862f
Merge pull request #5484 from cd2357/faster-sync-dao
Speed up "Synchronizing DAO" by ~30%
2021-05-17 20:35:15 +02:00
BtcContributor
2809e8d768
Add Account owner full name field to Uphold payment method 2021-05-17 11:24:07 +02:00
Christoph Atteneder
ee6ccc4869
Merge pull request #5450 from jmacxx/bsq_fee_estimation
reduce BSQ fee estimation constant for segwit
2021-05-17 10:36:19 +02:00
cd2357
dd803b0ef6
Rename variable for clarity
Rename blocksByHash because it is not actually indexing blocks by hashes, instead it's a cache of known hashes.
2021-05-17 08:38:26 +02:00
cd2357
b6dbe85313
Strengthen index integrity
Update the two new indices on every known write to the list, namely addBlock() and addBlocks(). Restrict ability to modify the blocks list outside of these methods by overwriting the getBlocks() getter such that it returns an unmodifiable list.
2021-05-15 22:34:27 +02:00
BtcContributor
0940312d8b
Fix text overlapping in Wallet Info menu 2021-05-13 15:17:15 +02:00
Christoph Atteneder
e375e9aadb
Merge pull request #5416 from xrhodium/fixed-xrc-title
Fixed XRC coin title to correct one
2021-05-12 21:29:05 +02:00
cd2357
9977920e4c
Address Codacy complaint / newline 2021-05-11 12:20:51 +02:00
cd2357
fea717eeab
Add blockHeight cache in DaoState
Improve block lookup by height by introducing an index, instead of iterating through all blocks and comparing the height.
2021-05-11 12:03:46 +02:00
cd2357
792d135693
Remove duplicate lookup method
Method is duplicate of isBlockHashKnown().
2021-05-11 11:49:30 +02:00
cd2357
ede38c13a3
Cache block hashes in DaoState
Improve isBlockHashKnown() by about 100ms per call by caching the hashes of the known blocks.
2021-05-11 11:03:57 +02:00
cd2357
a6897e5eb6
Improve timer accuracy in BlockParser
Measure the entire parseBlock() duration, not just the substep of parsing transactions.
2021-05-11 10:29:32 +02:00
BtcContributor
7ee9eae4ae
Restore missing displayStrings strings in Settings 2021-05-09 20:56:51 +02:00
sqrrm
993f9b4e29
Merge pull request #5475 from BtcContributor/bsq_dust
Fix the formula used to calculate BSQ amount needed to avoid dust
2021-05-07 12:52:43 +02:00
Christoph Atteneder
eb9bce3033
Merge pull request #5451 from BtcContributor/fixstringmakingoffer
Fix string when creating a new offer
2021-05-07 11:52:17 +02:00
Christoph Atteneder
89729c41c9
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.6.3
# Conflicts:
#	scripts/install_java.sh
2021-05-07 10:33:45 +02:00
BtcContributor
ff18e8afbe
Fix the amount required to avoid BSQ dust as the formula used was incorrect. 2021-05-07 10:21:44 +02:00
Marcus0x
1e8db48a7b
Fixed XRC Coin Title 2021-05-06 16:51:22 +02:00
BtcContributor
270f7ba3cb
Fix string also for takers 2021-05-06 15:45:05 +02:00
BtcContributor
1f7c4fce05
Apply m52go suggestion
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2021-05-06 13:55:57 +02:00
Christoph Atteneder
83d9fa0ee8
Merge pull request #5453 from devinbileck/change-mempool.bisq.services-onion
Change mempool.bisq.services onion address
2021-05-05 14:27:06 +02:00
Christoph Atteneder
35ede06037
Filter banned seednodes with wrong format 2021-05-05 11:21:53 +02:00
Devin Bileck
f5fd99f9ad
Change mempool.bisq.services onion address
In the process of migrating the server to a new instance, my secret key
for the onion address seems to have become corrupted. Therefore, I
needed to generate a new onion address.
2021-04-30 14:43:56 -07:00
jmacxx
b68d7f31ec
per code-review, change BSQ segwit estimate to 70 2021-04-30 07:25:01 -05:00
BtcContributor
3047cd48d4
Fix missing verb in string when creating a new offer (again) 2021-04-30 11:24:21 +02:00
BtcContributor
943632fd7c
Fix missing verb in string when creating a new offer 2021-04-30 11:21:50 +02:00
jmacxx
5bfbac7191
reduce BSQ fee estimation constant for segwit 2021-04-29 14:20:28 -05:00
Christoph Atteneder
3520d9b16d
Remove key logger warning because of new notarization support and specific entitlements 2021-04-28 16:21:38 +02:00
Christoph Atteneder
12f4e0fc13
Remove key logger warning because of new notarization support and specific entitlements 2021-04-28 16:15:55 +02:00
Christoph Atteneder
ed21e1ac36
Merge pull request #5442 from m52go/remove-docs-links
Switch docs links to wiki links in strings file
2021-04-28 15:59:52 +02:00
Christoph Atteneder
81b3c0ac6a
Merge pull request #5443 from m52go/other-docs-links
Switch remaining docs links in repository
2021-04-28 15:59:13 +02:00
chimp1984
e46669d9b1
Move null check up 2021-04-28 07:35:52 -05:00
chimp1984
68af436ef4
Add missing check if tx was in correct phase
There have been 1 tx in cycle 17 and 2 txs in cycle 23 which have been confirmed outside of the phase.
The vote result had excluded it correctly but for the hash calculation for the blind vote monitor the
phase check was missing which results in an incorrect hash.
By fixing that the past hashes back to cycle 17 are all invalid. Once all seed nodes are running that
patch nodes should be in sync again. As it did not affect consensus but only the monitoring it is not
critical.
2021-04-27 22:49:59 -05:00
m52go
6d9c53ed0c
Switch old docs links to wiki links 2021-04-27 16:29:14 -04:00
m52go
1550597f63
Switch remaining docs links to wiki links 2021-04-27 16:07:39 -04:00
Christoph Atteneder
c615d5dbf9
Merge pull request #5109 from stejbac/implement-segwit-for-bsq-wallet
Wallet changes for Segwit BSQ implementation
2021-04-27 20:58:51 +02:00
Steven Barclay
9760526aaa
Factor out shared segwit keychain setup to WalletsManager
Move consecutive maybeAddSegwitKeychain(..) calls for the BTC & BSQ
wallets from BisqSetup to WalletsManager, as the latter class is used
for operations which should be applied to both wallets and this moves
the logic closer to the wallet domain.

Also migrate a BSQ address validator in one of the test mock classes
from Base58AddressValidator to BitcoinAddressValidator (missed earlier).
2021-04-27 11:45:00 +01:00
Steven Barclay
5f1e32a226
Perform segwit BSQ wallet migration upon startup
Uncomment & enable the m/44'/142'/1' native segwit BSQ account path and
add code to migrate the user's BSQ wallet to segwit upon startup, along
the same lines as the existing BTC wallet segwit migration logic. That
is, set P2WPKH as the default output type, add a native segwit key chain
(set to active) to the BSQ wallet and back up the old 'bisq_BSQ.wallet'
file to 'pre_segwit_bisq_BSQ.wallet.backup'.

Also filter out legacy addresses coming from the original keychain from
BsqWalletService.get(Unused|Change)Address.
2021-04-27 11:26:13 +01:00
sqrrm
036d5fa977
Merge pull request #5439 from ripcurlx/release/v1.6.3
Update data stores for v1.6.3
2021-04-27 12:21:17 +02:00
Steven Barclay
3470429746
Allow use of bech32 BSQ addresses
Remove the restriction to base58 (P2SH & P2PKH) addresses when parsing,
formatting & validating BSQ addresses, by replacing o.b.c.LegacyAddress
with its superclass o.b.c.Address throughout. Also remove restriction to
LegacyAddress in BsqTxListItem and BsqTransfer(Service|Model).

The bech32 BSQ addresses follow the same format as the old base58 BSQ
addresses, namely 'B' + <btc-address>.
2021-04-27 11:08:10 +01:00
Steven Barclay
ce73fb85f3
Code cleanup: Simplify Optional stream processing
Use flatMap(Optional::stream) instead of filter(..isPresent).map(..get)
and avoid a redundantly nested Optional in OpReturnType.

Also replace some unnecessary stream().forEach(..) invocations on lists
in BtcWalletService, as forEach is already part of the List interface.
2021-04-27 10:39:30 +01:00
jmacxx
889ac863f6
v1.6.3 wording changes recommended by btc_contributor and pazza 2021-04-26 11:24:02 +02:00
Christoph Atteneder
69c7817340
Merge pull request #5438 from jmacxx/wording_changes_v163
v1.6.3 wording changes / clarification
2021-04-26 10:20:13 +02:00
jmacxx
94ebbc4ff3
v1.6.3 wording changes recommended by btc_contributor and pazza 2021-04-25 23:05:32 -05:00
Christoph Atteneder
0f9f43c9ba
Update bitcoinj checkpoints for v1.6.3 2021-04-22 11:38:11 +02:00
Christoph Atteneder
f6b244ec78
Update translations for v1.6.3 2021-04-22 10:42:58 +02:00
sqrrm
469448a218
Merge pull request #5431 from ripcurlx/upgrade-javafax-14
Upgrade Java to v11 and JavaFX to v15
2021-04-22 10:18:42 +02:00
Christoph Atteneder
de76bd051b
Merge pull request #5427 from jmacxx/fix_issue_5334
Show a SPV resync suggestion if trade remains unconfirmed for 3 hours or more
2021-04-22 09:21:21 +02:00
jmacxx
3c3dca0053
show a SPV msg if trade deposit remains unconfirmed for 3 hours or more 2021-04-21 20:00:01 -05:00
jmacxx
a5d5eafddf
@m52go edits and popup informing new feature 2021-04-21 15:54:16 -05:00
jmacxx
7f73df5dfd
Functionality to duplicate an offer 2021-04-20 16:22:49 -05:00
sqrrm
12a9fcc1e0
Merge pull request #5420 from ghubstan/01-update-txfee
Adjust to changing minimum tx fee rates
2021-04-20 11:51:09 +02:00
sqrrm
de8213a95d
Merge pull request #5412 from ghubstan/complete-api-bsqbtc-trade-support
Complete API support for BSQ/BTC trade pair
2021-04-20 11:47:13 +02:00
Christoph Atteneder
fbd7c9fbee
Merge pull request #5312 from BtcContributor/sendcustomfee
Add custom withdrawal transaction fee options on Send funds (BTC)
2021-04-20 09:26:30 +02:00
ghubstan
2308afb41b
Adjust to changing minimum tx fee rates
- Append minFeeServiceRate to TxFeeRateInfo proto.
- Display min rate in CLI console.
- Fix broken test due to changing min fee rate.
2021-04-19 12:08:52 -03:00
BtcContributor
d235316528
Restore manual fees for BSQ transactions in Settings 2021-04-19 16:58:00 +02:00
ghubstan
e96da16df8
Complete API support for BSQ/BTC trade pair
- Finished API server's verify bsq payment impl.
- Added verifybsqsenttoaddress method to CLI.
- Added verifybsqsenttoaddress-help.txt to server.
- Fixed client getoffers, getmyoffers to work with BSQ offers.
2021-04-15 14:21:25 -03:00
ghubstan
8ac30262c0
Add verifyBsqSentToAddress to GrpcWalletsService, CoreApi
The implemenation is already present in CoreWalletsService
2021-04-15 11:40:19 -03:00
Christoph Atteneder
64fe6c18a4
Merge pull request #5370 from jmacxx/mediation_follow_up_issues2
Disputes UI improvements
2021-04-13 11:16:38 +02:00
Christoph Atteneder
c951dc2288
Merge pull request #5234 from BtcContributor/hidebankid
Fix BankId leak
2021-04-13 10:57:51 +02:00
Christoph Atteneder
ca2731e779
Merge pull request #5388 from jmacxx/fix_seednode_persist
Fix shutdown persistence issue in Seednode
2021-04-13 09:33:36 +02:00
Devin Bileck
88299236f9
Merge branch 'master' of https://github.com/bisq-network/bisq into add-btc-node-wubwzaadboxwiffa 2021-04-12 17:42:35 -07:00
Christoph Atteneder
92a9cb654b
Merge pull request #5402 from maxim-belkin/wording-tweak
Tweak wording for takeOffer.fundsBox.isOfferAvailable
2021-04-12 16:29:10 +02:00
Christoph Atteneder
d8b42d7aac
Merge pull request #5399 from jmacxx/cashbymail_enhance_terms
CashByMail show terms and conditions upon taking an offer
2021-04-12 16:05:06 +02:00
cd2357
e04537aca6
Merge remote-tracking branch 'bisq-network/hotfix/v1.6.2' into upgrade-javafax-14 2021-04-10 10:31:04 +02:00
Maxim Belkin
bf3714a604
Tweak wording for takeOffer.fundsBox.isOfferAvailable 2021-04-09 14:21:40 -05:00
jmacxx
e5399f189c
Wait for AckMessage before completing task 2021-04-09 09:41:41 -05:00
jmacxx
42428b79b9
CashByMail show terms and conditions upon taking an offer 2021-04-06 22:03:52 -05:00
Devin Bileck
b85b0862cb
Add BTC node wubwzaadboxwiffa.onion
Adding this node to help alleviate the increased network load.
2021-04-05 11:53:44 -07:00
jmacxx
62021e4223
Fix shutdown persistence issue in Seednode 2021-04-02 23:26:35 -05:00
ghubstan
6bde12ba40
Improve takeoffer output and failure reason messaging
- Added AvailabilityResultWithDescription proto for better takeoffer failure msgs.
- Added VerifyBsqSentToAddress impl to api, but don't expose to CLI yet.
- Show BSQ Buyer Address in gettrade output (changed cli output formatting classes).
- Fixed api.model.PaymentAccountPayloadInfo altcoin instant acct support bug
2021-04-01 16:40:08 -03:00
ghubstan
6299dc33d9
Merge branch '01-api-add-createcryptopaymentacct' into 02-api-trade-contract-details 2021-04-01 15:58:59 -03:00
ghubstan
58c885efc1
Add support for creating instant altcoin payment accounts in api
- Added bool tradeInstant field to proto message def.
- Adjusted core createcryptopaymentacct impl to new tradeInstant request param.
- Adjusted cli side createcryptopaymentacct impl to new tradeInstant request param.
- Fixed CliMain's takeoffer help text (was missing the --payment-account opt).
2021-04-01 15:43:48 -03:00
ghubstan
2d66a5996d
Merge branch 'master' into 01-api-add-createcryptopaymentacct 2021-04-01 14:54:05 -03:00
jmacxx
089e476901
fix NPE in portfolio view when market price n/a 2021-04-01 09:47:12 +02:00
jmacxx
d567170bdb
use semaphore for SPV resync 2021-04-01 09:47:02 +02:00
Christoph Atteneder
dca0d5b5c2
Merge pull request #5385 from jmacxx/fix_npe_portfolio_view
Fix NPE in Portfolio View when market price n/a
2021-04-01 09:43:37 +02:00
sqrrm
308d8dec52
Merge pull request #5380 from jmacxx/spv_resync_use_semaphore
Use semaphore for SPV resync
2021-03-31 23:00:25 +02:00
jmacxx
e00532a040
fix NPE in portfolio view when market price n/a 2021-03-31 15:13:10 -05:00
jmacxx
26da6cbbe3
use semaphore for SPV resync 2021-03-30 22:42:48 -05:00
cd2357
ca5f41a9d9
Merge remote-tracking branch 'bisq-network/hotfix/v1.6.1' into upgrade-javafax-14
# Conflicts:
#	build.gradle
2021-03-29 18:37:14 +02:00
jmacxx
bf81c03708
Add a visual border indication for dispute chat window 2021-03-28 15:53:01 -05:00
jmacxx
094da74433
allow default fee values in leniency check 2021-03-28 20:14:59 +02:00
Christoph Atteneder
0815a99930
Update translations for v1.6.1 2021-03-28 20:13:34 +02:00
Christoph Atteneder
fd17c5790e
Merge pull request #5365 from jmacxx/fee_validation_default_rate
Allow default fee values in leniency check
2021-03-28 20:04:52 +02:00
jmacxx
93da6815b3
allow default fee values in leniency check 2021-03-27 15:50:58 -05:00
ghubstan
9e035e5542
Provide more offer & contract detail available to CLI.
This change adds offer and trade contract detail to the API's Offer
and Trade protos, and improves CLI output formatting.

- Appended missing fields to OfferInfo proto message:
	uint64 sellerSecurityDeposit = 20;
	string offerFeePaymentTxId = 21;
	uint64 txFee = 22;
	uint64 makerFee = 23;

- Added new api proto messages ContractInfo and PaymentAccountPayloadInfo.
  Lighterweight protos are needed because core Trade/Contract classes are
  not visible to CLI.

- Appended ContractInfo field to api proto message TradeInfo.

- Added proto / model converters for ContractInfo and PaymentAccountPayloadInfo,
  and adjusted OfferInfo & TradeInfo.

- Improved CLI output formatting.  Added more trade detail to CLI's gettrade output,
  and prepared to support BTC/BSQ trading pair.  Note a reviewer is advised to
  look at the CLI outout formatting class files instead getting bogged down in the
  many commit changes.
2021-03-25 19:23:06 -03:00
ghubstan
c3f5669cf8
Add api method createcryptopaymentacct
This change supports creation of BSQ BLOCKCHAIN payment method accounts.

- Added proto message defs to grpc.proto.
- Added grpc server boilerplate to GrpcPaymentAccountsService.
- Added server impl to CoreApi, CorePaymentAccountsService.
- Added createcryptopaymentacct-help.txt.
- Added CLI side support for new api method.
- Added opt parsing unit tests to OptionParsersTest.

This is the 1st PR in a series, with the goal of supporting the BTC/BSQ trading
pair.  Support for other crypto currency payment accounts will be added later.
2021-03-25 18:36:26 -03:00
Christoph Atteneder
306f0f0126
Update bitcoinj checkpoints for v1.6.0 2021-03-24 10:55:02 +01:00
jmacxx
39d86b4f80
Fee validation leniency using old DAO param values 2021-03-24 09:58:24 +01:00
Christoph Atteneder
4290613973
Merge pull request #5347 from jmacxx/fee_validation_allow_old_param
Fee validation leniency using old DAO param values
2021-03-24 09:58:02 +01:00
jmacxx
508b523186
Review changes for Disputes GUI
highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
2021-03-24 09:46:25 +01:00
jmacxx
e9b3b9ac1f
Review changes for Disputes GUI
highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
2021-03-23 23:02:21 -05:00
jmacxx
f85667b55a
Fee validation leniency using old DAO param values 2021-03-23 15:32:01 -05:00
jmacxx
8a9843bc15
Pop-up warning for trading with risky payment methods 2021-03-23 15:11:57 +01:00
jmacxx
fb1f5855bd
Pop-up warning for trading with risky payment methods 2021-03-22 14:45:53 -05:00
ghubstan
306dc05a65
Fix method name and error msg 2021-03-22 14:48:34 +01:00
ghubstan
1635ede936
Remove log statement, add comment 2021-03-22 14:48:20 +01:00
ghubstan
d21e462d27
Fix typo 2021-03-22 14:48:14 +01:00
ghubstan
d0338d729b
Set WalletsManager key if missing
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda229.
2021-03-22 14:48:04 +01:00
ghubstan
dd2b17fde7
Block UI popups in api startup's encrypted wallet init
Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
2021-03-22 14:47:42 +01:00
sqrrm
9c40a641f3
Merge pull request #5337 from ghubstan/01-fix-api-encrypted-walletappsetup
Fix API startup's wallet.init failure when wallet is encrypted
2021-03-22 12:36:13 +01:00
Christoph Atteneder
0fd7efd80f
Merge pull request #5000 from stejbac/implement-segwit-for-bsq
Implement Segwit for BSQ
2021-03-22 12:01:15 +01:00
sqrrm
94995da39a
Revert "Lower tolerated small amount"
This reverts commit 99123b7297.
2021-03-22 11:37:49 +01:00
sqrrm
520b6481f4
Revert "Lower tolerated small amount"
This reverts commit 99123b7297.
2021-03-22 11:12:10 +01:00
Steven Barclay
f21379160b
Merge branch 'release/v1.6.0' into implement-segwit-for-bsq 2021-03-20 23:18:49 +00:00
ghubstan
d819e91b0c
Fix method name and error msg 2021-03-20 19:18:40 -03:00
ghubstan
cfd52cdb8c
Remove log statement, add comment 2021-03-20 18:48:01 -03:00
ghubstan
6913e82f74
Fix typo 2021-03-20 18:47:21 -03:00
Steven Barclay
05ea293595
Activate Segwit DAO hard fork 4 weeks after v1.6.0 release
Push back the (2nd) DAO hard fork activation block height to 680300,
which is 4 weeks after the planned 1.6.0 release around 2021/03/25.
(Also push back the testnet block activation height to 1943000 - 2 weeks
from now assuming an average block time of 10 minutes.)
2021-03-20 21:39:26 +00:00
ghubstan
838595cb03
Set WalletsManager key if missing
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda229.
2021-03-20 18:38:33 -03:00
ghubstan
eb15fda229
Block UI popups in api startup's encrypted wallet init
Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
2021-03-20 18:22:52 -03:00
ghubstan
1bf2fd7642
Validate paymentAccountId in createAndPlaceOffer 2021-03-19 21:24:32 +01:00
ghubstan
344f1613d1
Fix api getfundingaddresses bug
This change uses recently added walletService.isAddressUnused to ensure
the api's CoreWalletsService creates an unused address if none exists.

- grpc.proto:  Add bool isAddressUnused field to message AddressBalanceInfo.
- AddressBalanceInfo:  Adjust AddressBalanceInfo proto wrapper.
- CoreWalletsService:  Use walletService.isAddressUnused in getFundingAddresses.
- GrpcClient:  Adjust to modified AddressBalanceInfo.
- TableFormat, ColumnHeaderConstants:  Add 'Is Used' column to getfundingaddresses output.

Note: bugfix is out of scope for this PR, but the test case helped expose this bug.
2021-03-19 21:24:26 +01:00
ghubstan
2bd6d72c40
Avoid NPE due to null fee while wrapping tx in TxInfo
Add debugging convenience to core.api.model.TxInfo.
2021-03-19 21:19:42 +01:00
ghubstan
9b62a005df
Refactor takeoffer reply proto & ErrorMessageHandler
- Add description msg TakeOfferReply proto, and fromProto method
  to core.offer.enum AvailabilityResult.  The description field
  maps a client usable error message to the enum.

- Adjust GrpcErrorMessageHandler to add AvailabilityResult.description()
  to takeoffer reply.

- Refactor (split up) GrpcClient's takeOffer.  Add getTakeOfferReply()
  to give clients a chance to make choices based on the reply's
  AvailabilityResult when the takeoffer command did not result in a
  trade. (Some errors are fatal, some not.)
2021-03-19 19:38:03 +01:00
ghubstan
14215a1fbd
Adjust grpc & core services to new takeoffer error handling
- GrpcErrorMessageHandler  A new ErrorMessageHandler implementation
  to get around the api specific problem of having to use Task
  ErrorMessageHandlers that build task error messages for the UI.

- GrpcExceptionHandler  A new method for working with the
  ErrorMessageHandler interface.

- GrpcTradesService, CoreApi, CoreTradesService:  Ajdusted takeoffer
  error handling to give a failure reason provided by the new
  GrpcErrorMessageHandler.
2021-03-19 19:37:10 +01:00
ghubstan
7683569abf
Inject CoreContext into OpenOfferManager, adjust test 2021-03-19 19:37:00 +01:00
ghubstan
d747acc567
Adjust protos for takeoffer error handing
- Add PRICE_CHECK_FAILED to enum AvailabilityResult.
- Add enum AvailabilityResult to TakeOfferReply message.
2021-03-19 19:36:48 +01:00
sqrrm
53f42c4885
Merge pull request #5303 from ghubstan/03-add-long-running-trade-test
Add LongRunningTradesTest to apitest
2021-03-19 12:20:00 +01:00
sqrrm
59a0cc41dc
Merge pull request #5302 from ghubstan/02-modify-txinfo
Avoid NPE due to null fee while wrapping tx in TxInfo
2021-03-19 12:05:09 +01:00
sqrrm
1c3fc41c33
Merge pull request #5294 from ghubstan/01-fix-takeoffer-err-handling
Improve takeoffer error handing
2021-03-19 11:55:18 +01:00
ghubstan
0b22c98802
Disambiguate payment acct json form's "country" field
Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
2021-03-18 20:34:10 +01:00
ghubstan
67252642c7
Disambiguate payment acct json form's "country" field
Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
2021-03-18 16:14:28 -03:00
Christoph Atteneder
3cf1f53e4f
Update translations for v1.6.0 2021-03-18 19:20:53 +01:00
Christoph Atteneder
d34a73276e
Merge pull request #5326 from sqrrm/lower-deposit
Lower min deposit to 0.001 BTC
2021-03-18 19:02:24 +01:00
ghubstan
dc4f730605
Validate paymentAccountId in createAndPlaceOffer 2021-03-18 14:46:28 -03:00
sqrrm
e6b7c88bed
Lower min deposit to 0.001 BTC
Lower min refund to half of min deposit as it doesn't make sense to have
a higher min refund than the min deposit.
2021-03-18 13:44:05 +01:00
jmacxx
47ad4219e2
Merge branch 'master' into mempool_check_maker_tx 2021-03-17 16:26:38 -05:00
jmacxx
9fcd65f320
Validate maker/taker fees using mempool lookup
apply @chimp1984 patch.txt code review suggestions
taker tx check moved to trade step 2, after confirmation
solve issue with calculating expected fees for unconfirmed tx
resolve conflict with PR5207 (Disputes UI)
check new offers after 1 block; check Json string not null; warn -> info
remove unused parameter
remove debugging log.warn message
2021-03-17 16:23:18 -05:00
jmacxx
8dd2328b03
handle case where bitcoind chain height is stale
improve description of chain height display
2021-03-17 16:00:57 -05:00
Christoph Atteneder
9270398fb3
Merge pull request #5207 from jmacxx/improve_dispute_chat
Improve chat functionality of mediation/arbitration
2021-03-17 09:38:35 +01:00
Christoph Atteneder
16230c7723
Merge pull request #5316 from chimp1984/add-pay-from-bsq-wallet-button
Add pay from BSQ wallet button
2021-03-17 09:35:09 +01:00
Christoph Atteneder
033ec325d2
Merge pull request #5318 from sqrrm/lower-unsigned-size
Lower tolerated small amount
2021-03-17 09:27:02 +01:00
sqrrm
99123b7297
Lower tolerated small amount
Split tolerated amount for placing offers with unsigned accounts
and tolerated amount for taking offers.
2021-03-16 13:07:42 +01:00
chimp1984
2702a7eff4
Add button to buyers trade step 2 view in case of a BSQ
trade to fill in the amount and address to the BSQ send view.
2021-03-15 17:58:05 -05:00
jmacxx
ad4927a666
code review changes requested by @ripcurlx
renamed alertCountProperty to badgeCountProperty
changed the badge counting policy so that the count of chat messages does not contribute to the badge number, but merely the presence of chat messages, and/or the new flag.
show an explanatory message when trader is not allowed to close own dispute ticket
removed some comments and code that were accidentally included from PR5160
renamed variable tpe to tradePeriodEnd
renamed variable cptyName to counterpartyName
clear the new badge on double-click of dispute tablerow
2021-03-15 17:24:00 -05:00
chimp1984
80c23883c8
Add popup for summary of trade history 2021-03-15 16:30:11 -05:00
ghubstan
8783889c36
Fix api getfundingaddresses bug
This change uses recently added walletService.isAddressUnused to ensure
the api's CoreWalletsService creates an unused address if none exists.

- grpc.proto:  Add bool isAddressUnused field to message AddressBalanceInfo.
- AddressBalanceInfo:  Adjust AddressBalanceInfo proto wrapper.
- CoreWalletsService:  Use walletService.isAddressUnused in getFundingAddresses.
- GrpcClient:  Adjust to modified AddressBalanceInfo.
- TableFormat, ColumnHeaderConstants:  Add 'Is Used' column to getfundingaddresses output.

Note: bugfix is out of scope for this PR, but the test case helped expose this bug.
2021-03-15 16:15:06 -03:00
chimp1984
b421605345
Add formatCoin method with appendCode param
Remove @NotNull annotation (unnecessary verbose, default is non null, if null then we annotate with @Nullable)
2021-03-15 11:07:12 -05:00
ghubstan
98c6a8ee67
Merge branch '01-fix-takeoffer-err-handling' into 02-modify-txinfo 2021-03-15 11:20:16 -03:00
ghubstan
1d56d79457
Refactor takeoffer reply proto & ErrorMessageHandler
- Add description msg TakeOfferReply proto, and fromProto method
  to core.offer.enum AvailabilityResult.  The description field
  maps a client usable error message to the enum.

- Adjust GrpcErrorMessageHandler to add AvailabilityResult.description()
  to takeoffer reply.

- Refactor (split up) GrpcClient's takeOffer.  Add getTakeOfferReply()
  to give clients a chance to make choices based on the reply's
  AvailabilityResult when the takeoffer command did not result in a
  trade. (Some errors are fatal, some not.)
2021-03-15 11:17:09 -03:00
BtcContributor
ebd98f850f
Add custom withdrawal transaction fee options on Send funds and remove it from settings 2021-03-15 15:03:38 +01:00
ghubstan
64d4c311fb
Avoid NPE due to null fee while wrapping tx in TxInfo
Add debugging convenience to core.api.model.TxInfo.
2021-03-14 12:08:13 -03:00
ghubstan
4a68773cfc
Merge branch 'master' into 01-fix-takeoffer-err-handling 2021-03-14 11:52:40 -03:00
BtcContributor
e1b9afa169
Code refactoring and delete translations 2021-03-12 11:10:20 +01:00
sqrrm
edbac95f7c
Merge pull request #5292 from ghubstan/00-fix-corecontext-usage
Fix singleton CoreContext usage
2021-03-11 17:24:55 +01:00
Christoph Atteneder
0e6ce20453
Merge pull request #5216 from huey735/rename-summary-notes-category
Rename summary notes "Seller not responding"  category
2021-03-11 17:01:56 +01:00
Christoph Atteneder
caac1b4c1e
Merge pull request #5272 from BtcContributor/fixbackupbutton
Fix Set Password text button
2021-03-11 16:07:26 +01:00
BtcContributor
2c945b0c40
change text and navigation 2021-03-11 15:55:47 +01:00
sqrrm
a1939f92e6
Merge pull request #5222 from ripcurlx/fix-key-shortcut-documentation
Fix key shortcut documentation when using CMD+Y
2021-03-11 11:55:53 +01:00
Christoph Atteneder
7394da5462
Merge pull request #5206 from jmacxx/improve_mediation_tools
Improve mediation tools / logging.
2021-03-11 11:49:58 +01:00
Christoph Atteneder
43b8f0afbf
Merge pull request #5209 from JaredBoone/master
Changes "Verify result" to "Check signature"
2021-03-11 09:36:44 +01:00
ghubstan
d0590d93a9
Adjust grpc & core services to new takeoffer error handling
- GrpcErrorMessageHandler  A new ErrorMessageHandler implementation
  to get around the api specific problem of having to use Task
  ErrorMessageHandlers that build task error messages for the UI.

- GrpcExceptionHandler  A new method for working with the
  ErrorMessageHandler interface.

- GrpcTradesService, CoreApi, CoreTradesService:  Ajdusted takeoffer
  error handling to give a failure reason provided by the new
  GrpcErrorMessageHandler.
2021-03-10 14:16:15 -03:00
ghubstan
067a5c7a08
Inject CoreContext into OpenOfferManager, adjust test 2021-03-10 14:15:59 -03:00
ghubstan
5c097d3bcf
Adjust protos for takeoffer error handing
- Add PRICE_CHECK_FAILED to enum AvailabilityResult.
- Add enum AvailabilityResult to TakeOfferReply message.
2021-03-10 14:15:29 -03:00
sqrrm
eabb173767
Add NGN as a default currency 2021-03-10 14:41:28 +01:00
ghubstan
58100fda6a
Fix singleton CoreContext usage
After GrpcServer builds a gRPC server instance, it calls injected
CoreContext#setApiUser(true).  The same, singleton CoreContext object
is injected into CoreService constructors, which use the coreContext#
isApiUser value (set true by the server builder) to set their own class
level boolean isApiUser fields.

When CoreContext was added, I was fooled by the correct behavior I
saw while stepping through the server debugger.  But now I see that
the correct boolean value in CoreContext is only available after
CoreService constructors have finished instantiating themselves -
- not in time.

In this change, the CoreContext becomes a class level final field
in CoreServices, and the correct coreContex.isApiUser value is available
in the CoreService methods.
2021-03-10 08:26:14 -03:00
sqrrm
463f87b39e
Merge pull request #5284 from ghubstan/07-validate-paymentacct-n-new-offer
Validate offer <-> payment-acct in createoffer
2021-03-09 16:51:56 +01:00
ghubstan
2161c936f1
Adjust canceloffer to getmyoffer bugfix (commit d6c79fc) 2021-03-08 16:36:01 -03:00
ghubstan
d6c79fca70
Filter out 'my' offers from 'available' offers 2021-03-08 16:26:16 -03:00
ghubstan
04b52f873e
Fix setSelectedCurrency bug, and replace unnecessary reflection usage
Commit de59c0a5f9 did not persist the
assigned selected currency, this fixes the bug.
2021-03-08 16:02:18 -03:00
ghubstan
de59c0a5f9
Assign selected trading currency on new payment accts (api only)
If a new account has a trading currency, assign it as the selected trading currency.

Also fixed a payment acct console formatting issue (left justify the ccy code).
2021-03-08 15:22:28 -03:00
ghubstan
b4f4d90e05
Add tradeCurrencies field to Transferwise acct form
These changes make tradeCurrencies a required twise acct form field.

Addresses issue https://github.com/bisq-network/bisq/issues/5281

- Added comment to PaymentAccountForm about special 'tradeCurrencies' field handling.
- Added support for Transferwise 'tradeCurrencies' to PaymentAccountTypeAdapter.
- Added instance of isTransferwiseAccount check to PaymentAccount.
- Added methods to CurrencyUtil to convert comma delimited code list to TradeCurrency list.
- Added methods to ReflectionUtil for getting fields and methods on class.
- Added required field check to CorePaymentAccountsService.
- Added CreatePaymentAccount test cases.
2021-03-08 14:47:30 -03:00
ghubstan
baca7001ea
Fix unnecessary use of fully qualified name 'String.format' 2021-03-07 20:05:39 -03:00
ghubstan
99fea74e09
Validate offer <-> payment-acct in createoffer
This change prohibits creation of new offers with incompatible payment
accounts with the api.

- PaymentAccountUtil
  Renamed isAnyTakerPaymentAccountValidForOffer -> isAnyPaymentAccountValidForOffer.
  Renmaed isTakerPaymentAccountValidForOffer -> isPaymentAccountValidForOffer.
  Deleted commented code.

- PaymentAccounts: Adjusted to PaymentAccountUtil method name changes.

- OfferFilter: Adjusted to PaymentAccountUtil method name changes.

- OfferBookViewModelTest: Adjusted to PaymentAccountUtil method name changes.

- Add CoreOffersService#verifyPaymentAccountIsValidForOffer

- ValidateCreateOfferTest, OfferTest: Added test cases.
2021-03-07 19:51:29 -03:00
chimp1984
f43dc2032f
Handle flush at shutdown differently to flush at backup 2021-03-06 12:02:17 -05:00
chimp1984
569a2de641
Call onAllServicesInitialized on PersistenceManager and
prevent write to disk before it is called.

In case the user started Bisq 2 times, the second process
would have called the flushAllDataToDisk at shutdown and
overwrote data from the running app.
2021-03-06 10:24:25 -05:00
jmacxx
cc56470b2f
Improve chat functionality of mediation/arbitration
Show badge with number of unread chat messages on each ticket
Use icons for chat, info and process ticket functions
Select a row by clicking on it, no clunky select button needed.
Show chat messages in a movable popup window.
More space for ticket list.

Implement requested feature additions:

Indicate if the trade period is over
Indicate more clearly the sender of each chat message
Support badge count
Indicate the XMR tx proof (when applicable)
Allow trader to close own mediation ticket if the trade is paid out

Fixes:

null check for cases when extraData null/not applicable
when upgrading closed disputes, clear chat unread count
2021-03-03 18:41:17 -06:00
BtcContributor
ba5705ca74
fix setpassword text button 2021-03-03 12:13:10 +01:00
Christoph Atteneder
0c9d278629
Merge pull request #5235 from jmacxx/mempool_minimumFee
Obtain minimumFee from mempool api in place of hardcoded value
2021-03-01 11:18:16 +01:00
sqrrm
80c722803d
Merge pull request #5247 from bisq-network/release/v1.5.7
Release/v1.5.7
2021-02-26 22:34:08 +01:00
jmacxx
fd7ce51bf9
Field id strings for FeeService extracted to Config.java 2021-02-25 11:51:40 -06:00
ghubstan
e125ba8ab8
Prepare to adjust api to new minimum fee per vbyte (from feeService)
Commit c33ac1b983 changed the source of
the min tx fee rate, and the api will adjust after the associated PR
is merged.  For now, the required change is a comment.
2021-02-25 11:53:12 -03:00
ghubstan
b725f06514
Adjust api to new minimum fee per vbyte
The BaseCurrencyNetwork#getDefaultMinFeePerVbyte now returns
15 (sats/byte) since commit b341bb6e89.

This change adjusts the api to the new min tx fee rate by validating
the api's setTxFeeRatePreference param, and throwing an appropirate
exception if the param value is below the minimum.  Also adjusted a broken
test, and added a new test to check the appropriate exception is received
from the server.
2021-02-25 11:31:13 -03:00
jmacxx
be78f47b0e
Update Preferences tests to new constructor signature 2021-02-25 08:27:30 -06:00
ghubstan
3dde3cbeef
Fix typo in toString 2021-02-25 10:37:30 -03:00
jmacxx
c33ac1b983
Obtain minimumFee from mempool api in place of hardcoded value 2021-02-24 22:47:06 -06:00
Christoph Atteneder
0feb1079b8
Merge pull request #5223 from BtcContributor/lengthcheck
Fix length check text on manual payout tool
2021-02-24 10:33:06 +01:00
jmacxx
dab8b638ae
TraderChatManager to handle onAllServicesInitialized
Upon receipt of onAllServicesInitialized, TraderChatManager should
call tryApplyMessages in order to process any pending mailbox
messages stored up while offline.
2021-02-24 09:14:02 +01:00
jmacxx
b3263be5e9
Fix initialization ordering issue
TradeManager must be inited before MailboxMessageService
2021-02-24 09:13:52 +01:00
jmacxx
d3b62b1a58
TraderChatManager to handle onAllServicesInitialized
Upon receipt of onAllServicesInitialized, TraderChatManager should
call tryApplyMessages in order to process any pending mailbox
messages stored up while offline.
2021-02-23 21:12:59 -06:00
BtcContributor
6edb318236
Fix length check text on manual payout tool 2021-02-23 17:57:47 +01:00
Christoph Atteneder
5951e140e3
Fix key shortcut documentation when using CMD+Y
This behavior change as you cannot manually fails an open trade anymore. Only unfail it after selecting it in the failed trades section and pressing CMD+Y
2021-02-23 09:23:31 +01:00
jmacxx
0e5c7e5de7
Fix initialization ordering issue
TradeManager must be inited before MailboxMessageService
2021-02-22 17:56:30 -06:00
Christoph Atteneder
aae52f801a
Update translations for v1.5.7 2021-02-22 15:54:53 +01:00
Christoph Atteneder
c30fd72990
Update bitcoinj checkpoints for v1.5.7 2021-02-22 15:51:33 +01:00
Huey
b8d24291b7
Rename summary notes "Seller not responding" category
I renamed the string for the
disputeSummaryWindow.reason.SELLER_NOT_RESPONDING key because
BTC buyers can also be unresponsive.
2021-02-22 10:16:32 +00:00
Jared Boone
5ddce75213
resolves #5208 2021-02-19 17:12:35 -08:00
Christoph Atteneder
314e6ce314
Merge pull request #5142 from chimp1984/add-coin-input-control
Add coin input control
2021-02-19 19:13:31 +01:00
jmacxx
df0acf1469
Improve mediation tools.
Emergency payout tool to also show Open mediation tickets.
Log txHex of MediatedPayoutTxPublished.
2021-02-18 16:15:35 -06:00
Christoph Atteneder
14ae0c3f8c
Merge pull request #5156 from chimp1984/improve-facts-and-figures
Improve facts and figures
2021-02-18 21:32:17 +01:00
Christoph Atteneder
2e89e590b3
Merge pull request #5196 from jmacxx/fix_SignaturePubKey_error
Prevent erroneous logging of 'SignaturePubKey in message does not match'
2021-02-18 21:18:49 +01:00
chimp1984
9ae76b621f
Add comment 2021-02-18 11:44:12 -05:00
chimp1984
5b2fed0b8a
Fix typos 2021-02-18 11:42:16 -05:00
chimp1984
fdad973f4c
Add TxInputSelectionWindow for coin input selection.
It is both for BSQ and non-BSQ (BTC) used.
2021-02-18 11:42:16 -05:00
chimp1984
b345918219
Add getSpendableBsqTransactionOutputs and getSpendableNonBsqTransactionOutputs
methods.
Add overridden getPreparedSendBsqTx and getPreparedSendBtcTx methods
with utxoCandidates param.

If utxoCandidates is not null we apply it to our coinSelector.
As the coin selector is re-used we re-set it immediately after
it was applied (inside coin selector select method).

Set preferences in nonBsqCoinSelector
2021-02-18 11:42:16 -05:00
chimp1984
06a7ecd382
Add support for utxo set used in coin selection if set
We use that to use only the selected utxos instead of all available.
2021-02-18 11:42:16 -05:00
chimp1984
24370146e6
Implement isDustAttackUtxo protection 2021-02-18 11:42:15 -05:00
chimp1984
cd0a28361f
Add average bsq price text fields from timeline selection 2021-02-18 11:40:30 -05:00
chimp1984
683e768a00
Add total volume text fields 2021-02-18 11:40:30 -05:00
chimp1984
25f35fea9e
Update text field values when time interval selection changes 2021-02-18 11:40:30 -05:00
chimp1984
f421411bba
Add price and volume charts 2021-02-18 11:40:30 -05:00
chimp1984
d2f43373fd
Add comments 2021-02-18 11:40:29 -05:00
chimp1984
9dab4fd65a
Add total issuance and total burned series 2021-02-18 11:40:29 -05:00
chimp1984
632653a751
Add new chart view 2021-02-18 11:40:28 -05:00
chimp1984
db86b89377
Exclude proof of burn amounts from trade fee display.
Use Proof of burn fee instead of burned BSQ from invalid tx.
2021-02-18 11:40:10 -05:00
ghubstan
1154085632
Add api method 'stop'
This change gives CLI users a 'stop' command to shutdown a daemon.

- Server side gRPC boilerpate was added to :proto and :daemon.

- When the new GrpcShutdownService accepts a 'stop' request from the CLI,
  it calls UserThread.runAfter(BisqHeadlessApp.getShutDownHandler(), 500, MILLISECONDS);

- Method help file 'stop-help.txt' was added to :core.

- Client side gRPC boiler plate and 'stop' implementation was added to :cli.
2021-02-18 11:54:10 -03:00
cd2357
7c2b4e02b8
Merge remote-tracking branch 'bisq-network/hotfix/v1.5.6' into upgrade-javafax-14 2021-02-17 23:16:52 +01:00
jmacxx
4afa846a1c
Check isPubKeyValid only if message is one we are listening for.
The order of checks was wrong.

PRE: it was checking the SignaturePubKey for messages that
were handled by other subsystems, such as OfferAvailability.

POST: make sure that this is a relevant message before checking that
its signature matches the trade.
2021-02-16 10:43:46 -06:00
jmacxx
d82a61d0a6
Fix issue with TriggerPriceService deactivating offer too early
TriggerPriceService is changed to use a BootstrapListener
on the P2PService so that it can start after the P2P network
is ready.

Fixes #5190 : Prevents an Uncaught Exception error at startup.
2021-02-13 15:51:50 -06:00
Christoph Atteneder
31b7292d56
Merge pull request #5117 from jmacxx/add_country_amazon_account
Specify Amazon eGift Card country
2021-02-12 20:34:51 +01:00
jmacxx
f89e4187af
When country not known, prompt user to ask in Trader Chat. 2021-02-12 12:37:56 -06:00
Christoph Atteneder
de57900765
Merge pull request #5175 from jmacxx/fix_NPE_trader_chat
Fix NPE in trader chat
2021-02-12 11:35:44 +01:00
Christoph Atteneder
8bcd32f498
Merge pull request #5123 from jmacxx/add_sepa_countries
Add four SEPA Payment Account countries: AD, SM, VA, JE.
2021-02-12 11:21:02 +01:00
Christoph Atteneder
a520802399
Merge pull request #5137 from jmacxx/replace_deprecated_explorer
Replace deprecated bisq explorer settings
2021-02-12 09:54:03 +01:00
jmacxx
1826902066
Replace deprecated bisq explorer settings
If user preferences were set to a bisq explorer that has been
retired, switch it to another explorer from the provided list.

Users can still choose their own explorer, or enter a custom
explorer address (such as their local node).
2021-02-10 08:23:50 -06:00
sqrrm
7e7c87698f
Merge pull request #5136 from chimp1984/add-warning-if-no-filter-is-delivered
Show popup if no filter is delivered
2021-02-10 14:43:43 +01:00
sqrrm
9ef4ea164d
Merge pull request #5120 from stejbac/speed-up-deposit-and-transactions-view-loads
Speed up deposit and transactions view loads
2021-02-10 14:39:49 +01:00
sqrrm
cedf108926
Merge pull request #5108 from jmacxx/pre_release_notifications
New Feature: Pre-release notifications
2021-02-10 14:38:53 +01:00
sqrrm
570ed0e032
Merge pull request #5148 from bisq-network/release/v1.5.5
Release/v1.5.5
2021-02-10 10:35:35 +01:00
Christoph Atteneder
ae188d9fd8
Merge pull request #5167 from huey735/edit-mediator-name
Fix Mediator's name
2021-02-10 09:57:49 +01:00
Christoph Atteneder
a3c707303b
Merge pull request #5157 from ghubstan/fix-method-help-typos
Fix method help typos
2021-02-10 09:57:16 +01:00
Christoph Atteneder
5ad670fe27
Merge pull request #5178 from jmacxx/refund_agent_payout_fee
Refund agent payout to use withdrawal fee rate from settings
2021-02-09 21:03:25 +01:00
jmacxx
fc04e88a55
Refund agent payout to use withdrawal fee rate from settings 2021-02-09 10:51:01 -06:00
jmacxx
ed78d0fbb4
Fix NPE when sending trader chat
Show error message to user when trader chat message cannot be sent.
2021-02-08 17:35:56 -06:00
Huey
c0efa156c7
Fix Mediator's name
@leo816 was mentioned twice. One of which should be @huey735
2021-02-07 11:53:51 +00:00
ghubstan
ae2e60c749
Fix typo 2021-02-06 14:04:30 -03:00
ghubstan
6890ba68b0
Fix typo 2021-02-05 19:10:34 -03:00
ghubstan
433079abc8
Add missing backslash in multi line command 2021-02-05 15:29:47 -03:00
ghubstan
5ce9bc184d
Fix method help typos
And add a createoffer example.
2021-02-05 15:27:08 -03:00
cd2357
5a358b49de
Merge remote-tracking branch 'bisq-network/release/v1.5.5' into upgrade-javafax-14 2021-02-04 11:58:43 +01:00
Steven Barclay
b4ad6bf637
Upgrade jsonrpc4j & Jackson; simplify BitcoindClient
Change jsonrpc4j version from 1.5.3 to 1.6.0.bisq.1, forked to the Bisq
repo from the recent 1.6.0 release. The forked version changes the class
'com.googlecode.jsonrpc4j.HttpException' to be public, instead of (prob.
mistakenly) package private, so we can avoid using reflection to catch
it and re-throw as a 'bisq.network.http.HttpException'. Remove the now
unused constructors from the latter.

As part of this, upgrade Jackson to the latest stable (2.12.1) release,
since jsonrpc4j now depends on a newer version than the previous 2.8.10.
2021-02-04 07:51:38 +00:00
jmacxx
d72b1a6639
Specify Amazon eGift Card country
Adds countryCode to AmazonGiftCardAccountPayload
Account upgrade done at startup => Eurozone accounts will prompt for country.
Trade buyer step 2 prompts use of the appropriate Amazon website for buying gift card.
2021-02-03 13:57:20 -06:00
sqrrm
de38bc7067
Merge pull request #5126 from ghubstan/do-wallet-check-on-createoffer
Check wallet is avaiable and/or unlocked on createoffer
2021-02-03 16:22:06 +01:00
Christoph Atteneder
a8365cad07
Update translations for v1.5.5 2021-02-01 19:26:16 +01:00
chimp1984
a8fc33c30d
On mainNet we expect to have received a filter object, if not show a
popup to the user to inform the Bisq devs.
Set filterWarningHandler before calling onAllServicesInitialized
2021-01-30 13:08:00 -05:00
Steven Barclay
9f9818d673
Fix broken WalletService.getTransactionConfidence(tx, address)
Undo the earlier simplification changes to getTransactionConfidence,
which preserved its original but broken behaviour. Fix the original
stream pipeline so that each matching tx input maps to the confidence of
the connected parent tx (if any), not the child tx. In this way, it
correctly considers parent tx confidences when determining the most
recent confidence of all the matching inputs & outputs.

Before it was simply feeding a repeating list of identical objects into
getMostRecentConfidence, via the erroneous line:

  .map(o -> tx.getConfidence())

(Also add a missing @Nullable annotation & make getMostRecentConfidence
private instead of protected.)

Finally, simplify BisqWalletListener.onTransactionConfidenceChanged, by
no longer feeding a singleton list into getMostRecentConfidence whose
element is already a return value of that method, as that is a no-op.
2021-01-29 20:33:59 +00:00
jmacxx
3757ec36f7
Wording change for CashByMail suggested by @m52go 2021-01-29 11:48:27 +01:00
ghubstan
017db11217
Check wallet is avaiable and/or unlocked on createoffer
Do not attempt to create an offer if the server wallet is
unavailable.  And if the wallet is encrypted, do not attempt
to create an offer if the wallet is not unlocked.
2021-01-28 14:50:22 -03:00
jmacxx
a11d8a42c3
Add 4 missing SEPA countries AD, SM, VA, JE. 2021-01-27 23:20:30 -06:00
Steven Barclay
db26a1fe2d
Optimise TransactionAwareTrade.isRelatedToTransaction
Attempt to remove a bottleneck during the transactions view load, as
revealed by JProfiler, by optimising the code to determine if any given
transaction and trade are related. Since both these sets will tend to
grow linearly with time, causing quadratic slowdown of TransactionsView,
try to alleviate (without completely fixing) the problem.

To do this, add a cached set of disputed trade IDs to DisputeListService
so that TransactionAwareTradable.is(Dispute|RefundPayout)Tx can be made
O(1) in the common case that the given trade is not involved in any
dispute. Also avoid calling Sha256Hash::toString by passing tx IDs as
Sha256Hash objects directly to is(Deposit|Payout)Tx, and short circuit
an expensive call BtcWalletService.getTransaction in isDelayedPayoutTx,
in the common case, by pre-checking the transaction locktime.

This also fixes a bug in isRefundPayoutTx whereby it incorrectly returns
false if there are >1 disputes in the list returned by RefundManager but
the given trade is not involved in the last one.
2021-01-26 20:10:47 +00:00
Steven Barclay
97779f10d8
Use cache for WalletService.getConfidenceForAddress
Use a guava SetMultimap (a many-to-many mapping without duplicates) to
cache the set of live txs in the user's wallet with a given address as
an input or output. As with the cache of output counts from the previous
commit, compute all the tx sets in one go (by a tx stream followed by a
map inverse) and store in an ImmutableSetMultimap<Address, Transaction>,
invalidating the entire cache immediately upon each wallet change event.

This is to fix another (larger) quadratic time bug in DepositView, when
getting the confidence (i.e. confirmation count) of each wallet address.

Also simplify getTransactionConfidence & onTransactionConfidenceChanged
methods slightly, which generated (possibly unintentionally) repeating &
singleton lists of TransactionConfidence objects to pass to
WalletService.getMostRecentConfidence(..) respectively.
2021-01-26 17:43:03 +00:00
Steven Barclay
217aaf826d
Use cache for WalletService.getNumTxOutputsForAddress
Use a guava Multiset to cache the total number of tx outputs (out of the
live txs in the user's wallet) with a given address. Since this requires
a scan of the entire tx set, compute all the counts in one go and store
in an ImmutableMultiset<Address>. Invalidate the entire cache any time a
tx set change occurs, by attaching a WalletChangeEventListener to the
wallet (using a direct executor for immediate effect).

This is to fix a quadratic time bug in DepositView, which uses the count
to determine if a given address in the BTC wallet is used/unused.
2021-01-26 15:35:19 +00:00
Steven Barclay
70a13b8783
Refactor: add & remove wallet listeners from the same class
Make the WalletService.walletEventListener field private and add it via
a protected method defined in the base class, addListenersToWallet(), so
that the setup code in the two subclasses (Bsq|Btc)WalletService can be
deduplicated and more easily kept in sync with the listener removal code
in WalletService.shutDown().

Also remove some unnecessary deprecation warning suppressions.
2021-01-26 12:54:26 +00:00
jmacxx
7ea3f1c9d9
Wording change for CashByMail suggested by @m52go 2021-01-25 22:24:57 -06:00
Christoph Atteneder
cae95ce2f9
Update bitcoinj checkpoints for v1.5.5 2021-01-25 09:37:59 +01:00
Jakub Loucký
53344da9e0
Fix wording 2021-01-24 15:06:42 +01:00
Jakub Loucký
d205110d39
Add details about mediation in "Cash by mail" 2021-01-24 15:06:28 +01:00
Jakub Loucký
3ccb087da5
Fix spaces in "Cash by Mail" 2021-01-24 15:06:18 +01:00
Jakub Loucký
fafa81811b
Fix wording 2021-01-23 23:46:09 +01:00
Jakub Loucký
803d373e44
Add details about mediation in "Cash by mail" 2021-01-23 23:40:14 +01:00
Jakub Loucký
966502247b
Fix spaces in "Cash by Mail" 2021-01-23 19:21:49 +01:00
jmacxx
849f1ec45f
code cleanup 2021-01-22 20:18:23 -06:00
jmacxx
da45b8e6cf
Add pre-release software update notifications 2021-01-22 20:08:02 -06:00
Steven Barclay
e0aa76e440
Rename rpc.dto.RawX to RawDtoX to avoid confusion
Avoid name clashes between the Json RPC client DTOs & the corresponding
raw (un-parsed) DAO state entities. Also prepend the other DTO classes
with 'Dto' for consistency.
2021-01-21 11:14:56 +00:00
Steven Barclay
a8b0863264
Ensure RPC client works with Bitcoin Core 0.21.0
Add missing 'connections_(in|out)' JSON properties to NetworkInfo that
came with the recent 0.21.0 release of Bitcoin Core. Also ensure that
unrecognised JSON properties are ignored, so that future changes to the
RPC API are less likely to break our client.

Also, for the benefit of the tests, change the JSON property order of
RawInput to better match observed 'getblock' responses. (It appears that
in 0.21.0, extra "txinwitness" fields have started appearing in coinbase
inputs, which may be a bug.)
2021-01-21 10:10:32 +00:00
Steven Barclay
1abf4c5d96
Exclude segwit pubkeys by block height instead of a blacklist
Since extraction of segwit pubkeys technically represents a hard fork,
activate it by block height in the same way as the fork defined in
TxOutputParser, instead of relying on the absence of premature segwit
BSQ inputs outside of a blacklist. This also means we no longer need to
exclude all but the first tx input from segwit pubkey extraction to
maintain backwards compatibility, which is a little safer and consistent
with the original behaviour of extracting every available P2PKH pubkey.

Provisionally activate this (2nd) DAO hard fork at block height 672646,
which should be 6 weeks from now, just under 5 weeks from the planned
1.5.5 release on 2021/01/27. (Block 1906689 for testnet - 2 weeks from
now assuming an average block time of 10 minutes, but it's erratic.)
2021-01-21 10:10:31 +00:00
Steven Barclay
4b0711bfcc
Add Bitcoin Core version & health check to RpcService
Make a 'getnetworkinfo' RPC call to bitcoind immediately upon startup,
to check that the node is up (and throw a ConnectException to ensure
that the user is presented with an appropriate warning popup otherwise).
Log a warning if the node version is outside the 0.18.0 - 0.20.1 range.

Additionally, call 'getbestblockhash' to check that the chain tip is not
stale (> 6 hours old). As part of this, make sure the 'getblock' RPC
call works correctly with verbosity < 2, by fixing JSON deserialisation
of the response when the block or txs are in summary (hex string) form.

(These version & health checks are almost identical to the ones done by
the original btcd-cli4j library during RPC client startup.)
2021-01-21 10:10:31 +00:00
Steven Barclay
d595cac477
Add getNetworkInfo & getBestBlockHash RPC client methods
Provide a 'NetworkInfo' DTO class (with associated nested DTO classes),
returned by the 'getnetworkinfo' RPC method call to bitcoind. This will
be used during startup of RpcService to determine if Bitcoin Core is
available and which version it is using. Add a unit test to round-trip a
sample NetworkInfo JSON response.

Also add the missing 'getbestblockhash' RPC method, which will be needed
by RpcService to determine the Bitcoin Core node health.
2021-01-21 10:10:31 +00:00
Steven Barclay
a850adadb6
Make special case for irregular tx with segwit BSQ inputs
Selectively disable pubkey extraction from segwit inputs of a particular
tx at block height 660384 (2020-12-07), which spends spuriously created
segwit BSQ (later burned), to prevent a change in the DAO state hashes
from that point.

(Since a tx with a given ID can only appear on one chain, a fixed global
exclusion list of IDs should not cause any issues on testnet/regtest
versus mainnet. This is simpler than conditioning by block height.)
2021-01-21 10:10:30 +00:00
Steven Barclay
796097abbc
Fix data race in BitcoindDaemonTest
Prevent intermittent test failures, caused by a race between checking
whether the mock socket is closed upon accepting a new connection and
setting 'socketClosed' to true during shutdown. Waiting to accept and
then checking the flag needs to be done in a synchronized block.
2021-01-21 10:10:30 +00:00
Steven Barclay
93b46e3a40
Fix Codacy issues & deduplicate code in RpcService
Factor out shared construction logic to a new 'getBlockFromRawDtoBlock'
method in RpcService. Also add some 'NOPMD' comments in an attempt to
suppress unfixable Codacy warnings about qualified imports.
2021-01-21 10:10:29 +00:00
Steven Barclay
6ca42c0cd1
Enable extraction of segwit pubkeys from raw tx inputs
Factor out a new RpcService.extractPubKeyAsHex method, to take public
keys from the inputs of the raw transactions returned by the RPC client,
when building TxInput objects to incorporate into the DAO state. Enhance
the method to additionally support segwit (P2WPKH & P2SH-P2WPKH) inputs
(but only the first input for backwards compatibility - see code
comment). Also fix a bug when handling non-SIGHASH_ALL input signatures.

This will allow segwit BSQ to be used in proof-of-burn and issuance txs,
which need a public key associated with the tx to establish ownership of
it, when signing messages with a proof-of-burn or staking merit awarded
from a compensation issuance, respectively.

Also add unit tests for the factored-out method and add a missing RawTx
toString() method, to aid debugging the TxInput fields within the
processed block returned by RpcService.
2021-01-21 10:10:29 +00:00
Steven Barclay
8104301b52
Use new Bitcoind(Client|Daemon) & remove btcd-cli4j
Migrate RpcService over to the new block notification daemon and RPC
client based on jsonrpc4j. Drop in own DTO classes in place of the ones
defined by btcd-cli4j and rename requestBtcBlock & addNewBtcBlockHandler
to requestDtoBlock & addNewDtoBlockHandler respectively.

Also remove now redundant filtering from the logback config and update
grade-witness.
2021-01-21 10:10:28 +00:00
Steven Barclay
ac78639656
Improve exception handling in BitcoindDaemon
Wrap any exception that occurs during socket IO or within the supplied
BlockListener with a new 'BlockNotificationException'. This brings the
exception handling more in line with that of the old BtcdDaemonImpl and
makes it easier to match them downstream in FullNode.handleError.
2021-01-21 10:08:24 +00:00
Steven Barclay
4470af8edb
Add missing copyright headers to new files 2021-01-21 10:08:23 +00:00
Steven Barclay
f34231abb6
Factor out failure callback logic into new Utilities method 2021-01-21 10:08:23 +00:00
Steven Barclay
863392bc74
Factor out executor shutdown logic into new Utilities method 2021-01-21 10:08:22 +00:00
Steven Barclay
b7c7eaf1f2
Add replacement bitcoind block notification daemon
Provide a new 'BitcoindDaemon' block notification socket server, to
replace 'com.neemre.btcdcli4j.daemon.BtcdDaemonImpl'. This starts a
single service thread to listen for raw block hashes on localhost port
512*, sent by the specified 'blocknotify' shell/batch script, delegating
to a pool of worker threads to run the supplied BlockListener handler.
Unlike the original BtcdDaemonImpl class, a call to the 'getblock' RPC
method is not made automatically to supply a complete block to the
handler, instead requiring a separate, manual BitcoindClient.getBlock
invocation from within RpcService.

Also provide unit tests using a mock ServerSocket + Socket.

TODO: Use the new Bitcoind(Client|Daemon) implementations in RpcService,
 in place of btcdcli4j Btcd(Client|Daemon)Impl & remove the old library.
2021-01-21 10:08:22 +00:00
Steven Barclay
dbe4953f63
Add replacement bitcoind RPC client using jsonrpc4j
Create a new 'BitcoindClient' interface and a corresponding builder, to
replace the old 'com.neemre.btcdcli4j.core.client.BtcdClientImpl' class
from the btcdcli4j library. This is instantiated by jsonrpc4j using a
dynamic proxy. It provides only a cut down version of the bitcoind RPC
API, exposing the methods 'getblock', 'getblockcount' & 'getblockhash',
as they are the only ones currently being used by RpcService.

Add corresponding Jackson-annotated DTO classes to model the JSON
structures returned by bitcoind, very similar to the classes provided by
btcdcli4j. Note that we use Double instead of BigDecimal to represent
fractional fields (difficulties + coin amounts in BTC), as they have
more consistent Jackson (de)serialisation and appear to be able to
faithfully round-trip numeric fields produced by bitcoind. Also note
that doubles can faithfully represent any valid decimal BTC amount (that
is, with 8 d.p. of precision) up to 21 million.

For now, keep the old BtcdClientImpl instance used by RpcService in
place, as the btcdcli4j block notification daemon is dependent upon it
and would also need to be replaced.

Also add unit tests for BitcoindClient which test against sample regtest
responses, using a mock HttpURLConnection.
2021-01-21 10:08:22 +00:00
Steven Barclay
5990fcf9e7
Bring ScryptType enum up to date with latest bitcoind
Add 'witness_v1_taproot' script type to the enum and proto.pb, so that
it doesn't cause any problems when Taproot is activated and the new
script type starts showing up in RPC getBlock(..) responses (including
possibly BSQ transactions).

Also change the Java enum order (which shouldn't cause any problems as
the ordinal isn't used directly in hashCode calculations) and add the
missing 'witness_unknown' enum value to pb.proto to bring it in sync.
2021-01-21 10:08:15 +00:00
Christoph Atteneder
334fbdbc86
Merge pull request #5092 from jmacxx/add_cashbymail3
Add payment method "Cash by mail"
2021-01-21 10:26:59 +01:00
Christoph Atteneder
570d6a8b38
Merge pull request #5093 from ghubstan/02-trading-scripts
Add api trade simulation scripts
2021-01-21 09:42:14 +01:00
jmacxx
2ab96d997f
Update core/src/main/resources/i18n/displayStrings.properties
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2021-01-20 16:34:43 -06:00
ghubstan
b2d8faf2cd
Log price feed request warnings, do not throw to CLI
The price feed service throws PriceRequestExceptions when switching
currencies, log those exceptions as warnings in the server and don't
pass them up to the CLI.
2021-01-20 19:27:35 -03:00
ghubstan
d18b2d5a10
Run an async price feed request when CLI needs market price
The CLI was receiving stale, cached market prices from the feed service.
2021-01-20 17:46:35 -03:00
ghubstan
ced422e930
Add new api CLI method 'getbtcprice'
The server impl was there, but it is now needed by the trading
sim scripts (CLI) to get the price from the Bisq server instead
of the feed.  (The server does not request prices more than
once a minute.)
2021-01-20 15:01:16 -03:00
ghubstan
078f010125
Remove api dev/test log statement
This server log output was intended as an aid to api devs, but
is no longer needed after the change to posix-sytle method opts
with self explanatory labels (replacing the ambiguous positional
CLI method opts).
2021-01-20 12:03:21 -03:00
Christoph Atteneder
f0f27db83e
Fix typo in trigger price tooltip 2021-01-20 15:22:25 +01:00
ghubstan
67eed01d74
Fix tx-fee-rate opt description
For requested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560906913
2021-01-20 11:12:21 -03:00
ghubstan
72731e5c03
Add parens around (sats/byte) 2021-01-20 11:07:55 -03:00
ghubstan
11096d5c85
Fix tx-fee-rate opt description
For requested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560907371
2021-01-20 11:05:23 -03:00
ghubstan
031b18edfa
Fix typo
For requested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560906396
2021-01-20 11:02:09 -03:00
ghubstan
fce3aab40d
Improve description
For suggested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560905251
2021-01-20 10:59:49 -03:00
ghubstan
86758414b7
Fix punctuation
For suggested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560902858
2021-01-20 10:45:41 -03:00
ghubstan
71ffa0f997
Explain that paid tx fees are forfeited
For suggested change
https://github.com/bisq-network/bisq/pull/5093#discussion_r560901896
2021-01-20 10:41:21 -03:00
chimp1984
ccc6f3f466
Do not pass proxySocketFactory to BlockingClientManager
if we use a local Bitcoin node.
2021-01-19 15:08:49 -05:00
ghubstan
fbc31a5e86
Merge branch 'master' into 01-add-method-help-docs 2021-01-19 10:23:41 -03:00
jmacxx
531e8ca408
Add CASH_BY_MAIL to TradeStatistics3 enum 2021-01-19 07:12:14 -06:00
Christoph Atteneder
728439eecb
Merge pull request #5077 from stejbac/fix-reimbursement-validator
Fix request amount bounds in ReimbursementValidator
2021-01-19 11:00:17 +01:00
Christoph Atteneder
3d9e2a5ad8
Merge pull request #5083 from stejbac/fix-btc-node-converter-test
Avoid reverse DNS lookup in BtcNodeConverterTest
2021-01-19 10:37:27 +01:00
Christoph Atteneder
3f5c455f06
Merge pull request #5091 from jmacxx/test2
Reword "trade started" popup messages per suggestion
2021-01-19 10:27:43 +01:00
Christoph Atteneder
88c4272c63
Merge pull request #5080 from chimp1984/do-not-require-reason-for-payment
Change rule for "reason for payment" field to not use trade ID but leave it empty
2021-01-19 10:01:52 +01:00
jmacxx
3839f5961c
codacy 2021-01-18 21:58:14 -06:00