Commit Graph

4363 Commits

Author SHA1 Message Date
chimp1984
8e8354b1ad
Optimize application shutdown
There have been several long delays as well a wrong order of the
shutdown process (wallet got shutdown after network shutdown.

Shutdown is now pretty fast, but depends on open offers and connections.
2020-08-12 20:46:17 -05:00
chimp1984
a9ce9f423e
Bow to Codacy robot
Private constructors are OK if injection is used.
Empty methods are also ok if requires for interface...
2020-08-12 16:25:56 -05:00
chimp1984
55b070f955
Optimize AssetService
Previous version had several performance issues:
- We kept tradeStatistics in a lookup map in memory (about 40 MB)
- We built up the StatefulAssets even if it was not used/needed.
Building the StatefulAssets was an expensive call.
- AssetTradeActivityCheck was only used for printing out statistics and
called on startup causing performance cost.

Optimized version:
- We call build the StatefulAssets only on demand (user activates
view). Method call takes now 22 ms.
- We create a optimized lookup map with a tuple of the data we need
and keep it as local variable.
- We removed AssetTradeActivityCheck.

Thanks to the profiling reporting from:
https://github.com/bisq-network/proposals/issues/199
2020-08-12 16:11:54 -05:00
chimp1984
47c4ed75e9
Replace sound file with smaller more silent one
Converted sound file to a 10 second mono noise with lower volume.
Tested with max possible sound volume and it was hardly audible.
Tested a binary built with it and I could not observe the network
degradation issues.
File is not 800 kb instead of 42 MB.
2020-08-12 11:25:53 -05:00
Devin Bileck
414ee053ee
Update seednodes
As part of the Tor V3 upgrade, this PR adds 2 new V3 seednodes, and will
start the process to retire older V2 seednodes.

The V2 seednodes will continue operating for 2-3 months during the
retirement phase-out period, after which time we can filter it out from
the network for clients who have not upgraded if necessary.
2020-08-11 17:03:47 -07:00
cd2357
cdc6242779
Update core/src/main/resources/i18n/displayStrings.properties
Co-authored-by: wiz <j@wiz.biz>
2020-08-09 20:13:37 +02:00
wiz
3a5c3fb3f3
Update all Pricenodes with new Tor V3 onions
Pending merge of #4315 and rough consensus to proceed with migration plan in bisq-network/projects#35

wizpriceje6q5tdrxkyiazsgu7irquiqjy2dptezqhrtu7l2qelqktid (@wiz)
emzypricpidesmyqg2hc6dkwitqzaxrqnpkdg3ae2wef5znncu2ambqd (@Emzy)
devinpndvdwll4wiqcyq5e7itezmarg7rzicrvf6brzkwxdm374kmmyd (@devinbileck)
aprcndeiwdrkbf4fq7iozxbd27dl72oeo76n7zmjwdi4z34agdrnheyd (@mrosseel)
ro7nv73awqs3ga2qtqeqawrjpbxwarsazznszvr6whv7tes5ehffopid (@alexej996)
2020-08-10 02:09:19 +09:00
cd2357
ef5b80440c
Update exchange rate info in About view
Update field describing the source of the shown exchange rates,
indicating that the Bisq Price Index is used.
2020-08-09 15:28:09 +02:00
chimp1984
67687d611a
Revert usage of caffeinate on OSX
It seems caffeinate is not preventing that Bisq gets throttled resources
once the OS switches to hibernate.
See:
https://github.com/bisq-network/bisq/issues/4300#issuecomment-670997004
2020-08-08 21:41:07 -05:00
cd2357
584e516fc4
Rename timestamp field
Rename timestamp field which implied it represents an epoch value in
seconds, but the way it was used to build a Date object showed that it
actually expected a millis value.
2020-08-08 21:14:23 +02:00
cd2357
f73f4174dd
Rename method
Rename method to remove reference to the BA provider.
2020-08-08 21:04:17 +02:00
cd2357
2a4c11cb35
Remove unused methods
Removed getters for the BA and CMC timestamps, both of which are not
used anymore.
2020-08-08 21:02:57 +02:00
cd2357
189431ed7e
Correctly map lastRequest timestamp
The lastRequest timestamp is changed to show the last request to a
pricenode.

The previous approach of using the "last provider request timestamp"
does not make sense in the new setup. Each currency rate is based on
rates from several providers, each with their own "request timestamps".
In addition, the pricenode returns the timestamp each rate was
calculated. On top of that comes the timestamp when the Bisq node
queries the pricenode.

Since what is most relevant for the Bisq node is the "freshness" of a
specific rate, the timestamp most indicative of that is the moment when
the pricenode is queried.
2020-08-08 21:00:45 +02:00
cd2357
b8a76b0e92
Update top-right bar references to price source
Update the displayed text, as well as the tooltip, of the price box in
the top right bar. It now indicates that the price data is provided by
Bisq pricenodes (for for fiat, as well as for alts).
2020-08-08 19:59:34 +02:00
Christoph Atteneder
2f06a94171
Update bitcoinj checkpoints for v1.3.7 2020-08-02 14:30:31 +02:00
Christoph Atteneder
53702a796c
Update bitcoinj checkpoints for v1.3.7 2020-08-02 10:44:24 +02:00
wiz
780f425738
Remove pricenode gztmprecgqjq64zh.onion operated by @wiz 2020-08-01 21:41:52 +02:00
Christoph Atteneder
f66c2404f7
Merge pull request #4392 from wiz/remove-pricenode-gztmprecgqjq64zh
Remove pricenode gztmprecgqjq64zh.onion operated by @wiz
2020-08-01 21:41:37 +02:00
wiz
3be3fe11d1
Remove pricenode gztmprecgqjq64zh.onion operated by @wiz 2020-08-01 22:49:32 +09:00
wiz
b222046fd6
Tweak popup text and trade rules for USPMO payment method
Co-Authored-By: Steve Jain <mfiver@gmail.com>
2020-08-01 11:11:51 +02:00
wiz
2a73e7b4ce
Tweak popup text and trade rules for USPMO payment method
Co-Authored-By: Steve Jain <mfiver@gmail.com>
2020-08-01 04:24:21 +09:00
Christoph Atteneder
dfc5eb0459
Update translations for v1.3.7 2020-07-30 10:21:12 +02:00
Christoph Atteneder
66d3589910
Merge pull request #4383 from jmacxx/fix_low_bsq_offer
Maintain floor amount of 5.46 BSQ to prevent dust errors
2020-07-29 11:00:35 +02:00
Christoph Atteneder
d9eb1d8435
Merge pull request #4373 from QuantumRipple/local-node-ip
Change IP for local node connection to Loopback address
2020-07-29 10:53:52 +02:00
jmacxx
2d5ab2a8d7
Maintain floor amount of 5.46 BSQ to prevent dust errors
When an offer is made using BSQ for trade fee, the BSQ amount
is burnt by doing a send-to-self.  However if the BSQ change
is below the bitcoin dust limit this causes an error.  We
fix this by maintaining a floor amount of 5.46 BSQ.

Fixes #4372
2020-07-28 09:50:54 -05:00
chimp1984
5e49de85c7
Add input validation 2020-07-27 22:09:39 -05:00
chimp1984
78da1df9de
Add trade date 2020-07-27 15:09:03 -05:00
Christoph Atteneder
34f26b1bb4
Merge pull request #4379 from jmacxx/fix_popups
Warn that seeds are not a data backup
2020-07-27 20:36:18 +02:00
jmacxx
bbc328b70c
Warn that seeds are not a data backup
Display a mandatory warning when the seed backup/restore
screen is shown.  The warning informs the user that a data
directory backup is necessary to restore the full state of
bisq, not just the wallet seed words.

Fixes #4375
2020-07-27 09:17:20 -05:00
chimp1984
43e4809d81
Add basic support for validation for XMR transfer with tx key
Main part missing is the XMR proof service request processing. I did not
get the service compiled yet, so could not test response data and error
conditions.

Further it is missing a "news badge" and popup to guide the user to the
new feature.

Only basic dev tested so far.

Anyone welcome to pick the project up from here as I might not have
time soon to continue.
2020-07-26 18:55:07 -05:00
QuantumRipple
a5cca0ee1e
Change IP for local node connection to Loopback address
If the local Bitcoin full node is bound to only listen on the loopback interface (127.0.0.1), attempting to open a socket to `InetAddress.getLocalHost()` - the return of which is variable but usually NOT 127.0.0.1 - will not work. Changing to `InetAddress.getLoopbackAddress()` resolves this.
2020-07-23 18:39:41 -05:00
sqrrm
e1fcbfac18
Merge pull request #4357 from ripcurlx/update-data-stores-for-v1.3.6
Update of data stores for v1.3.6
2020-07-08 15:43:05 +02:00
wiz
f18e7d711a
Add V3 seednode sn2bisq 2020-07-08 01:15:46 +09:00
Christoph Atteneder
a25680ffa2
Update translations for v1.3.6 2020-07-07 15:57:38 +02:00
Christoph Atteneder
3b49acdf12
Update bitcoinj checkpoints 2020-07-07 15:37:00 +02:00
sqrrm
a8e4b51709
Fix taker use all BSQ for fee payment
Issue: if a taker used exactly all BSQ from the BSQ inputs to pay the
trading fee, there was no BSQ change in the takeOfferFeeTx. It was
assumed that the second output was the reservedForTrade output, but in
the case of missing BSQ change it was the first output.

Fix: added a check to make sure the value of the inputs to the deposit
tx match the expected inputAmount.

Added a check that if there is no BSQ outputs in the bsqTradingFeeTx a
change output is added of value 1 satoshi more than the BSQ input value.
This ensures that the second output is always the reservedForTrade
output. It also ensures that the BSQ is burnt, even in the very unlikely
case that the amount of BSQ burnt is larger than the reservedForTrade
amount.
2020-07-06 18:36:30 +02:00
Christoph Atteneder
cfc3252f7b
Merge pull request #4347 from sqrrm/deposit-improvements
Deposit improvements
2020-07-03 21:20:27 +02:00
Christoph Atteneder
ad374bd6ec
Improve layout to prevent truncation in most common use-cases 2020-07-03 19:08:00 +02:00
sqrrm
4e7283cc2c
Remove unused argument 2020-07-03 18:14:10 +02:00
sqrrm
22814d15f8
Publish own witness received as trade message 2020-07-03 18:14:10 +02:00
sqrrm
44c71bd704
Add TraderSignedWitnessMessage 2020-07-03 18:14:10 +02:00
sqrrm
6cd395c227
Change signAccountAgeWitness signature
Return the signed witness when signed by a trader
2020-07-03 18:14:10 +02:00
sqrrm
9a8622c410
Fix codacy comments 2020-07-03 17:35:54 +02:00
sqrrm
fabd592938
Merge remote-tracking branch 'origin/master' into HEAD 2020-07-03 16:58:13 +02:00
sqrrm
ac2f37f968
Merge pull request #4345 from jmacxx/fix_offer_fee_changed
Create order using the same tx fee specified at funding
2020-07-03 13:20:18 +02:00
Christoph Atteneder
a0ec617063
Merge pull request #4350 from m52go/zelle-update
Improve zelle payment account info text
2020-07-02 14:12:43 +02:00
Christoph Atteneder
5edb0d2eb8
Merge pull request #4349 from m52go/account-limits-update
Improve account limits popup text
2020-07-02 14:12:18 +02:00
m52go
ba5496205f
Improve account limits popup text 2020-07-01 11:47:18 -04:00
m52go
ef96fd3be8
Improve zelle payment account info text 2020-07-01 10:21:16 -04:00
sqrrm
44bdce7b5c
Merge pull request #4342 from wiz/update-mempool-explorer-urls
Update Bitcoin explorer URLs and Tor V3 onions for wiz and emzy
2020-07-01 15:53:20 +02:00
sqrrm
79f05bcfa3
Merge pull request #4320 from devinbileck/add-v3-seednode
Add V3 seednode devinv3r
2020-07-01 15:48:30 +02:00
sqrrm
2417cf2f61
Merge pull request #4313 from ncstdc/patch-1
Change "Move funds to Bisq wallet" to "Keep funds in Bisq wallet"
2020-07-01 12:10:05 +02:00
sqrrm
2a8c25e33a
Fix deposit column layout 2020-06-30 19:04:26 +02:00
sqrrm
97f76069f3
Update security deposit info text at offer creation 2020-06-30 18:09:17 +02:00
sqrrm
106c656993
Use same security deposit for buyer and seller 2020-06-30 18:01:50 +02:00
jmacxx
f3fa5ad3a1
Create order using the same tx fee specified at funding
This fixes an issue whereby updates from the fee API were causing
Insufficient Funds exception. Since the wallet is funded with a
specific amount (deposit+trade fee+txFee), that same amount has
to be used when the user confirms offer creation (which could be
some time later).

Fixes #4227
Fixes #4278
Fixes #4336
Fixes #4327
2020-06-29 13:43:06 -05:00
sqrrm
5b94a895aa
Move locktime definition to Restrictions 2020-06-29 20:01:47 +02:00
sqrrm
3121f6f2fe
Add deposit column to OfferBookView 2020-06-29 19:09:50 +02:00
wiz
8dbb01c04f
Update Bitcoin explorer URLs and Tor V3 onions for wiz and emzy 2020-06-29 00:02:50 +09:00
Devin Bileck
3b424fde28
Merge branch 'master' of https://github.com/bisq-network/bisq into add-v3-seednode
 Conflicts:
	core/src/main/resources/btc_mainnet.seednodes
2020-06-26 03:46:24 -07:00
sqrrm
a54eeeabcc
Merge pull request #4329 from ghubstan/6-getoffers
Add rpc method 'getoffers'
2020-06-25 20:41:34 +02:00
sqrrm
79f0dacc24
Merge pull request #4324 from ghubstan/5A-print-addressinfo-as-table
Return protos from funding address methods
2020-06-25 19:44:24 +02:00
sqrrm
ca98654725
Merge pull request #4304 from ghubstan/2-getaddressbalance
Add rpc method 'getaddressbalance'
2020-06-25 19:41:21 +02:00
Christoph Atteneder
d810387b41
Merge pull request #4305 from sqrrm/sign-same-name
Sign same name
2020-06-25 14:07:24 +02:00
Christoph Atteneder
38f6af26ee
Merge pull request #4294 from sqrrm/add-multiple-fee-receivers
Add multiple fee receivers
2020-06-25 13:23:53 +02:00
Christoph Atteneder
e50c7a6132
Add equals check to prevent resetting of newly set Filter 2020-06-25 12:40:49 +02:00
sqrrm
1c9299a2e5
Merge pull request #4295 from ghubstan/rename-core-wallet-service
Rename CoreWalletService -> CoreWalletsService
2020-06-25 11:01:31 +02:00
ghubstan
51d82b1dff
Fix offer list filter bug due to direction flip
Respect the direction parmeter;  do not give it meaning it does not
have.  If the user passes a 'buy' parameter, return buy offers.  Do
not misinterpret the param's intent.  The direction parameter's value
does not imply "buy=I'm a buyer, show me sell offers" or
"sell=I'm a seller, show me buy offers".

I got mixed up by looking at the UI.  If I want to sell BTC, I click
the SELL tab to view buy offers (maker as buyer).  If I want to buy
BTC, I click the BUY tab to view sell offers (maker as seller).

This change also fixes an offer list sorting bug.

The commit is in response to a requested changes in PR 4329:
https://github.com/bisq-network/bisq/pull/4329#pullrequestreview-436033502
2020-06-23 17:15:39 -03:00
Stephan Oeste
e9562b0d9b
Add V3 seednode sn3emzy
As part of the Tor V3 upgrade, and the effort to increase the number of
Bisq seednodes from 8 to 12, this PR adds a new V3 seednode.
2020-06-23 19:07:06 +02:00
ghubstan
e1fddfacf8
Remove duplication in wallets availability checks
This change adds a new 'verifyWalletsAreAvailable' method to the client,
which eliminates this duplicated statement:
    throw new IllegalStateException("wallet is not yet available");

The commit is in response to a requested change in PR 4312:
https://github.com/bisq-network/bisq/pull/4312#pullrequestreview-435659314
2020-06-23 13:11:36 -03:00
ghubstan
61285a7602
Do not change case of input params in client
This commit is for a change requested in PR 4308:
https://github.com/bisq-network/bisq/pull/4308#pullrequestreview-435055483

  ".toUpperCase() seems misplaced here. It would soon get repetive.
  Whether the underlying logic differentiates between capitalizations
  is a low-level implementation detail and would do better at the
  lowest practical level."
2020-06-22 15:08:46 -03:00
ghubstan
4778976b6b
Fix comments 2020-06-20 20:24:49 -03:00
ghubstan
88cb90e209
Add rpc method 'getoffers'
The new method returns current buy or sell offers for a fiat ccy.

These changes need refactoring and polishing before merging, but they're
committed in this state to be safe (don't lose work).  Changes include:

* New core.grpc classes
    CoreOffersService
    GrpcOffersService
    model.OfferInfo

* CoreApi -- The new CoreOffersService is injected into CoreApi and
  the old getOffers() and placeOffer() impls were moved into the
  new CoreOffersService.  The getOffers implementation was re-done.
  Other changes are just rearranging location of core method calls.

* GrpcServer -- The new GrpcOffersService replaced the old
  GetOffersService and PlaceOfferService.

* grpc.proto -- The old GetOffers and PlaceOffer services were combined
  into a single Offers service, and the PlaceOffer rpc was renamed
  as CreateOffer.  These are the only substantive changes; the rest
  is just rearranging location of the service defs in the file.
  Also created a lighterweight OfferInfo proto message wrapper to
  be passed between server & client (client has no access to core's
  Offer and OfferPayload).

* OfferInfo -- A new wrapper around the OfferInfo proto message.

* CliMain -- The new GetOffers service stub was added.
  Some (maybe too much) number and ccy formatting logic was
  copied & modified from core.  Some tedius string formatting
  was added too (needs to be tidied up).

* License comments were also copied to several classes, and I
  made a mistake in reverting changes to the wrong file.

TODO add unit tests
2020-06-20 19:56:28 -03:00
ghubstan
41f1add76b
Remove try catch block
Remove the recently added gRPC StatusRuntimeException wrapping
logic because we want unexpected Exceptions to bubble up for now,
until CorePaymentAccountsService.java throws specific
IllegalStateExceptions with user friendly error messages.
(See CoreWalletsService.java for example.)
2020-06-20 10:24:14 -03:00
ghubstan
d6ea0ea236
Re-add license comment
The previous revert was a mistake.  It applied to
GrpcPaymentAccountsService, not CorePaymentAccountsService.
2020-06-20 10:21:57 -03:00
ghubstan
7c073c65f5
Revert "Add license comment"
This reverts commit bfcc693f69.

This change was reverted because we want unexpected Exceptions
to bubble up for now, until CorePaymentAccountsService.java
throws specific IllegalStateExceptions with user friendly
error messages.  (See CoreWalletsService.java for example.)
2020-06-20 10:14:36 -03:00
ghubstan
d06807b0e5
Wrap Exception from core in gRPC StatusRuntimeException 2020-06-20 10:10:39 -03:00
ghubstan
bfcc693f69
Add license comment 2020-06-20 10:03:10 -03:00
ghubstan
855ac0f250
Add license comment 2020-06-20 10:02:04 -03:00
ghubstan
37fb60672f
Add license comment
This is not in scope of current PR, but easy enough to review.
2020-06-20 09:59:06 -03:00
ghubstan
331f488057
Return protos from funding address methods
The 'getaddressbalance' and 'getfundingaddresses' methods now send
new AddressBalanceInfo proto messages instead of a formatted String
to the client.  The AddressBalanceInfo message contains addressString,
balance, and # of confirmations (transaction confidence) fields.

Changes include:
* A new AddressBalanceInfo proto message
* A wrapper class for the new AddressBalanceInfo proto
* New 'getaddressbalance' and 'getfundingaddresses' signatures in server
* AddressBalanceInfo display logic in client
* Removal of balance formatting logic in server
* Refactoring of balance formatting logic in client
2020-06-19 20:00:28 -03:00
ghubstan
1930411e61
Rmove blank line 2020-06-18 12:55:31 -03:00
ghubstan
b0e278f32e
Refactor getFundingAddresses to use memoization
Also reordered some import statements according to Bisq style rules.
2020-06-18 12:52:29 -03:00
Dominykas Mostauskis
c5134e14c2
Replace Tuple3 with memoization 2020-06-18 15:57:26 +02:00
Devin Bileck
5712de6b67
Add V3 seednode devinv3r
As part of the Tor V3 upgrade, and the effort to increase the number of
Bisq seednodes from 8 to 12, this PR adds a new V3 seednode.
2020-06-17 22:45:55 -07:00
ncstdc
9d327dc0d0
Change wording
Move funds to Bisq wallet > Keep funds in Bisq wallet
2020-06-16 11:32:41 -05:00
ghubstan
258d1801d2
Factor duplicate unlocked wallet checks into new method
Response to comment in PR 4299:
https://github.com/bisq-network/bisq/pull/4299#discussion_r440769032

This PR should be reviewed/merged after PR 4309.
https://github.com/bisq-network/bisq/pull/4309
2020-06-16 12:48:41 -03:00
ghubstan
bac3ed5697
Call core wallets service methods from CoreApi
This change is a refactoring of the gRPC Wallets service
for the purpose of making CoreApi the entry point to
all core implementations.  These changes should have been
made in PR 4295.
See https://github.com/bisq-network/bisq/pull/4295

The gRPC Wallet proto def name was changed to Wallets because
this service manages BSQ and BTC wallets, and GrpcWalletService
was changed to GrpcWalletsService for the same reason.

This PR should be reviewed/merged after PR 4308.
See https://github.com/bisq-network/bisq/pull/4308

This PR's branch was created from the PR 4308 branch.
2020-06-15 16:43:26 -03:00
ghubstan
a7542e98bf
Add rpc method 'createpaymentacct'
This addresses task 4 in issue 4257.
    https://github.com/bisq-network/bisq/issues/4257

This PR should be reviewed/merged after PR 4304.
    https://github.com/bisq-network/bisq/pull/4304

This new gRPC PaymentAccounts service method creates a dummy
PerfectMoney payment account for the given name, number and fiat
currency code, as part of the required "simplest possible trading
API" (for demo).   An implementation supporting all payment
methods is not in the scope.

Changes specific to the new rpc method implementation follow:

* New createpaymentacct method + help text was added to CliMain.
  Help text formatting was also changed to make room for larger
  method names and argument lists.

* The PaymentAccount proto service def was renamed PaymentAccounts
  to avoid a name collision, and the new rpc CreatePaymentAccount
  was made part of the newly named PaymentAccounts service def.

* New GrpcPaymentAccountsService (gRPC boilerplate) and
  CorePaymentAccountsService (method implementations) classes were
  added.

* The gRPC GetPaymentAccountsService stub was moved from GrpcServer
  to the new GrpcPaymentAccountsService class, and
  GrpcPaymentAccountsService is injected into GrpcServer.

* A new createpaymentacct unit test was added to the bats test
  suite (checks for successful return status code).

Maybe bit out of scope, some small changes were made towards making
sure the entire API is defined in CoreApi, which is used as a
pass-through object to the new CorePaymentAccountsService.  In the
next PR, similar refactoring will be done to make CoreApi the
pass-through object for all of the existing CoreWalletsService
methods.  (CoreWalletsService will be injected into CoreApi.)
In the future, all Grpc*Service implementations will call core
services through CoreApi, for the sake of consistency.
2020-06-15 14:32:14 -03:00
sqrrm
bdb7807131
Sign accounts with same name
If the user has an account that can sign, it signs other accounts with
the same holder name when they are added, or on startup if one of
several accounts with the same name got signer rights.
2020-06-14 20:08:22 +02:00
sqrrm
f02772e3a2
Add getOwnerId to PaymentAccountPayload for owner name comparison 2020-06-14 20:07:41 +02:00
ghubstan
b1228e5ea7
Add rpc method 'getaddressbalance'
This addresses task 2 in issue 4257
	https://github.com/bisq-network/bisq/issues/4257

This new gRPC Wallet service method displays the balance and number
of confimirmations of the most recent transaction for the given BTC
wallet address.

The new method required the usual boilerplate changes to grpc.proto,
CliMain, and GrpcWalletService.

Two unit tests to check error msgs was added to cli/test.sh.
2020-06-14 14:23:47 -03:00
ghubstan
2e415de4ad
Replace duplicate code in getFundingAddresses
Cleaned up the method body and improved the returned string's
formatting.  Also added a line for this method in the CLI help text.
2020-06-14 13:05:37 -03:00
sqrrm
86062d0ba7
Merge pull request #4302 from wiz/update-wiz-seednodes
Add V3 seednodes wizseed3 and wizseed7, retire seednode ef5qnzx6znifo3df
2020-06-14 17:42:03 +02:00
Petr Hejna
1c8b062bf2
Add all available Revolut currencies 2020-06-14 16:47:07 +02:00
sqrrm
6aae5eb4ab
Merge pull request #4283 from jmacxx/restore_wallet_date_empty_feedback
Warn when restoring wallet seedwords without date
2020-06-14 15:08:22 +02:00
wiz
6100dc881d
Add V3 seednodes wizseed3 and wizseed7, retire seednode ef5qnzx6znifo3df
As part of the Tor V3 upgrade, and the effort to increase the number of
Bisq seednodes from 8 to 12, this PR adds 2 new V3 seednodes, and will
start the process to retire the old V2 seednode ef5qnzx6znifo3df.

The ef5qnzx6znifo3df seednode will continue operating for 2-3 months
during the retirement phase-out period, after which time we can filter
it out from the network for clients who have not upgraded if necessary.
2020-06-14 18:29:20 +09:00
ghubstan
85c96764fb
Add rpc method 'getfundingaddresses'
This addresses task #1 in issue https://github.com/bisq-network/bisq/issues/4257.

This new gRPC WalletService method displays the BTC wallet's list of
receiving addresses.  The balance and number of confirmations
for the most recent transaction is displayed to the right of each
address.  Instead of returning a gRPC data structure to the client,
the service method returns a formatted String.

If the BTC wallet has no unused addresses, one will be created and
included in the returned list, and it can be used to fund the wallet.

The new method required injection of the BtcWalletService into CoreWalletsService,
and the usual boilerplate changes to grpc.proto, CliMain, and GrpcWalletService.

Some of the next PRs (for #4257) will require some common functionality within
CoreWalletsService, so these additional changes were included:

  * a private, class level formatSatoshis function
  * a public getNumConfirmationsForMostRecentTransaction method
  * a public getAddressBalance method
  * a private getAddressEntry method

A unit test that verifies a successful return status was added to cli/test.sh.
2020-06-13 19:59:45 -03:00
ghubstan
b1146fdd12
Rename CoreWalletService -> CoreWalletsService
This change fixes the ambiguity in the original class name, which
implied it was a btc wallet service, not a bsq and btc wallets service.
2020-06-12 15:24:01 -03:00
sqrrm
9fcc4da738
Add ReceiverSelectorTest 2020-06-11 20:09:46 +02:00
sqrrm
752abce61e
Weighted payout scheme
Fix some conflicts from an earlier rebase
2020-06-11 19:40:25 +02:00
chimp1984
77362ff642
Add list to filter to set btc fee receiver addresses 2020-06-11 19:00:05 +02:00
sqrrm
7e0c82a791
Merge pull request #4153 from eboukamza/add-blockchain-explorer
Add blockchair mainnet and testnet explorers
2020-06-11 10:53:52 +02:00
Christoph Atteneder
6d7fcc178b
Update bitcoinj checkpoints 2020-06-10 16:26:56 +02:00
wiz
dbc4574ea3
Update IPs and onions for wiz Bitcoin nodes 2020-06-07 17:04:11 +09:00
jmacxx
4c7456e1cb
Warning when restoring wallet seedwords without date
When the user restores a BIP39 wallet from seed words there is
an optional 'wallet date' field.  If the user does not enter that
field the chain scan will be a lengthy process.
Issue a popup message to the user in this case, informing them
that the synch will take a long time and can be reduced by either
specifying the wallet creation date or the date when Bisq introduced
BIP39 seed words.

Fixes #3766
2020-06-04 17:39:24 -05:00
sqrrm
1a62f6b8b8
Merge pull request #4193 from jmacxx/add_paymentmethod_openoffers
Display "Payment Method" column in Open Offers view
2020-06-04 12:32:06 +02:00
sqrrm
ca9665fa3c
Sign unsigned keys
Legacy arbitrator can sign unsigned signed witness signer pubkeys
To sign, from legacy arbitrator support, ctrl+O
2020-06-03 15:44:04 +02:00
sqrrm
752eb49b4a
Log unique unsigned signer pubkeys 2020-06-01 15:46:25 +02:00
sqrrm
0dc769bf9b
Arbitrator signing of AccountAgeWitness with known pubkey
Improve debug logging. Lower level from warning to info
Fix broken test
Add example code to clean out unnecessary SignedWitnesses
2020-05-31 15:08:41 +02:00
sqrrm
7bd5969dcf
Refactor accountagewitnessservice log helpers
Better filter for root signedwitnesses

Add debug keyboard shortcuts:
- ctrl+shift+L -> logSignedWitnesses
- ctrl+shift+S -> logSigners
2020-05-31 15:08:41 +02:00
sqrrm
8bf0f3350c
Test dummy account age witness signing
Add orphaned witness log
2020-05-31 15:08:41 +02:00
sqrrm
fba329de9a
Arbitrator sign single account age witness 2020-05-31 15:08:41 +02:00
sqrrm
bc3e12288d
Merge pull request #4250 from dmos62/bugfixes-related-to-switch-statements
Bugfixes related to switch statements
2020-05-26 12:55:35 +02:00
sqrrm
481ae230e7
Merge pull request #4260 from jmacxx/fix_withdraw_trade
Fix trade withdraw to external wallet step 4
2020-05-25 16:20:41 +02:00
sqrrm
799d48e74a
Merge pull request #4256 from jmacxx/fix_trade_fees_export
Display correct trade and tx fees in CSV export
2020-05-25 15:46:53 +02:00
sqrrm
8bffcd62be
Merge pull request #4229 from petrhejna/1387-add-memo-field
Add memo field to withdrawal transaction
2020-05-19 17:05:46 +02:00
Chris Beams
2e33c2c87a
Merge pull request #4214 from ghubstan/rpc-wallet-protection
Add rpc wallet protection endpoints
2020-05-18 14:18:05 +02:00
Chris Beams
d53cc38fde
Wrap comments at 90 chars
Per https://github.com/bisq-network/style/issues/5
2020-05-18 14:08:35 +02:00
Petr Hejna
fbefb9db8e
Better working for memo text 2020-05-15 23:16:18 +02:00
Petr Hejna
e27df8f16a
Remove unnecesary protobuf Transaction (memo is alreay in bitcoinj Transaction object) 2020-05-15 23:16:18 +02:00
Petr Hejna
8d5f42f122
Add memo field to withdrawal transaction
- "Memo" field is modeled as property of the new object Transaction which is stored in persitant storage.
- Transaction object is modeled in a way that allows extension in the furure for more persisted attributes.
2020-05-15 23:16:17 +02:00
jmacxx
ea8657e8e0
Fix trade withdraw to external wallet step 4
The routine `cleanUpAddressEntries` in TradeManager was prematurely
releasing funds associated with trades when they reach the last
step of the process (Step 4, Withdraw to External Wallet).
Usually, with a single trade active this would not be an issue
because `cleanUpAddressEntries` is called after the withdrawal,
but if you have more than one trade at Step 4 then the first
withdrawal would go though, but all the others would fail with
an error box "Missing x.xxx BTC" (the trade proceeds or deposit
amount).  Alternatively, if you restart the bisq app with a
trade in Step 4, the same cleanup will occur and the attempt
to withdraw to external wallet will fail.
The change here considers any trade held by the TradeManager to
be in use and therefore will not have their associated address
entries freed up.  After Step 4 has passed, the trade is no
longer held by the TradeManager, and so cleanUpAddressEntries
will at that point free up the address.
2020-05-15 12:07:59 -05:00
jmacxx
d516ba4a59
Display payment method column in Open Offers view
Adjust widths of existing columns to fit in a column for payment method.
Fixes #3902
Fixes #4125
2020-05-15 09:06:48 -05:00
ghubstan
9178ad7a31
Fix unlockwallet timeout override bug
The CoreWalletService should never be running more than one wallet lock
TimerTask at any given time, and the wallet should lock at the correct time
after a user overrides a prior timeout value.

The CoreWalletService now cancels any existing lock TimerTask thread
before creating a new one, to prevent the wallet from re-locking at
unexpected times.

This change prevents error conditions created in scenarios similar to
the following:

  (1)  User unlocks wallet for 60s
  (2)  User overrides unlock timeout by calling unlockwallet "pwd" 600s
  (3)  After 60s, the 1st, uncanceled lock timeout expires, and wallet is
       locked 4 minutes too soon.
2020-05-13 12:30:39 -03:00
jmacxx
f2f519ada6
Display correct trade and tx fees in CSV export
When exporting trade history to CSV, users would expect to see
their own transaction and trade fees listed.  Maker fees are
stored on the Offer, Taker fees are stored on the Trade object.
The code was not properly checking whether the user was the
Offer Maker or Taker, and as such the report was always displaying
the Taker information for Tx and Trade fee.  Therefore any trades
where the user was Maker showed the wrong fees.

The column title `Maker Fee` is incorrect and misleading since
the user doing the export is not necessarily the Maker.  We
rename this column to `Trade Fee` to indicate that it is the fee
the user paid for trading regardless of Maker/Taker status.

Fixes #4207
2020-05-12 15:17:10 -05:00
sqrrm
c07988faf3
Merge pull request #4159 from stejbac/remove-unused-PersistableEnvelope-types
Remove PersistableNetworkPayloadList & TradeStatisticsList
2020-05-11 14:52:04 +02:00
Dominykas Mostauskis
482d09e8ad
Check if these *_MIN_AMOUNTs don't exceed 200k BSQ
Manfred [0] pointed out that COMPENSATION_REQUEST_MIN_AMOUNT and
REIMBURSEMENT_MIN_AMOUNT should be checked for not exceeding 200k BSQ
too.

[0] 4ec6bac658..fb76fd6548 (r420249962)
2020-05-10 15:01:32 +02:00
dmos62
a381cb2a4b
Fix forgotten break in switch statement #2
Without the break statement, the execution would continue through the subsequent case clauses until it encountered a break, executing `checkArgument` calls meant for `REIMBURSEMENT_MAX_AMOUNT`. More specifically, the bug would cause a failed check in the case where `inputValueAsCoin.value <= 200000000` is false.
2020-05-10 15:01:28 +02:00
dmos62
58db561d10
Fix forgotten break in switch statement #1
This omission is currently not disruptive, since the next case clause only contains a break.
2020-05-10 15:01:23 +02:00
ghubstan
a79ae57ef0
Cache aesKey in unlockwallet, clear it in lockwallet
There is no need to decrypt and re-encrypt wallet files in the unlock
and lock wallet methods.  The temporary aesKey saved in the unlock
method will used for operations on an encrypted wallet.

There is also no need to cache a tempKeyCrypterScrypt;  this class
level variable was removed.
2020-05-07 14:21:51 -03:00
ghubstan
24248d4367
Backup wallets after each encrypt/decrypt operation
This is consistent with :desktop's PasswordView#onApplyPassword.
2020-05-06 15:40:15 -03:00
ghubstan
4262f29462
Cache temp key and crypter scrypt in unlockwallet
Cache the aesKey instead of the password in unlock wallet method,
avoiding extra overhead of deriving it from the temp password in the
lock method.

The KeyCrypterScrypt used in the unlock method must also be cached for
use in the manual lock method.  Creating a new KeyCrypterScrypt instance
in the manual lock method would have a different random salt value,
invalidating the password used in the unlock method.
2020-05-06 15:20:41 -03:00
ghubstan
fbb025adb1
Factor out two small duplcated code blocks 2020-05-06 12:30:59 -03:00
sqrrm
246d5ee37a
Merge pull request #4238 from bisq-network/revert-4212-bugfix-and-typofix
Revert "Bugfix and typofix"
2020-05-06 10:49:05 +02:00
sqrrm
f720764d6b
Merge pull request #4232 from cbeams/rename-rocket-chat-role
Rename "Rocket Chat Admin" role to "Keybase Admin"
2020-05-05 19:04:56 +02:00
sqrrm
3f3ee0a096
Revert "Bugfix and typofix" 2020-05-05 18:08:00 +02:00
sqrrm
d29385f295
Merge pull request #4213 from danielabrozzoni/improve_dust_limit_messaging
Improve dust limit error messaging
2020-05-05 17:33:12 +02:00
sqrrm
5e9bbfc3ad
Merge pull request #4212 from dmos62/bugfix-and-typofix
Bugfix and typofix
2020-05-05 17:18:55 +02:00
Chris Beams
9abe4aad95
Rename "Rocket Chat Admin" role to "Keybase Admin"
Per https://github.com/bisq-network/roles/issues/79#issuecomment-618483481

Note that the ROCKET_CHAT_ADMIN enum label has not been renamed for
the backward compatibility reasons discussed in BondedRoleType Javadoc.

See also bisq-network/roles#60.
2020-05-04 09:22:57 +02:00
ghubstan
f5a4ca51a8
Add missing return statement in CoreWalletService#setWalletPassword
Without bugfix, method would try to encrypt the wallet using using the
old password argument immediately after encrypting the wallet with
a new password.
2020-05-03 15:09:23 -03:00
ghubstan
3ef7286465
Return void vs Tuple2 from CoreWalletService#unlockWallet
Also remove unused StatusApi class.
2020-05-03 14:29:32 -03:00
ghubstan
ec2ee45e58
Return void vs Tuple2 from CoreWalletService#lockWallet
And delete unused StatusApi enum.
2020-05-03 14:25:19 -03:00
Chris Beams
ab17b67229
Remove obsolete try/catch block in #setWalletPassword 2020-05-03 18:54:01 +02:00
ghubstan
feafd0c983
Return void vs Tuple2 from CoreWalletService#removeWalletPassword
Like the change in commits 163061a and 9164579, removeWalletPassword
now throws an IllegalStateException with an appropriate message if
the wallet password cannot be removed.

Also deletes unused StatusApi enums.
2020-05-03 13:51:56 -03:00
ghubstan
916457963f
Return void vs Tuple2 from CoreWalletService#setWalletPassword
Like the change in commit 163061a, setWalletPassword now throws an
IllegalStateException with an appropriate message if the wallet password
cannot be set.

Also deletes unused StatusApi enums.
2020-05-03 13:42:14 -03:00
Chris Beams
163061ac75
Return long vs Tuple2 from CoreWalletService#getAvailableBalance
And throw an IllegalStateException with an appropriate message if the
wallet is not available or still locked.

This change also eliminates the NullPointerException that would
sometimes be thrown when calling #getAvailableBalance after the wallet
has become available but before the balance has become available.
2020-05-03 16:15:49 +02:00
Chris Beams
c7a6c87bd1
Refactor grpc wallet service
Previously, each wallet-related method was implemented with its own grpc
service. There is no need to do this, as a grpc service may declare
multiple rpc methods. This commit refactors everything wallet-related
into a single GrpcWalletService and also extracts a CoreWalletService
from CoreApi in order to avoid the latter becoming overly large.
Ideally, there would be no need for an abstraction in bisq.grpc called
CoreWalletService; we would ideally use such a service implemented in
bisq.core. The closest we have is WalletsManager, but it is not designed
to be used the way we are using it here in the grpc context. Rather than
making changes directly to core (which can be very risky), we will
rather make them here in this layer, designing exactly the "core wallet
service" we need, and can then later see about folding it into the
actual core.
2020-05-03 15:46:41 +02:00
ghubstan
2a9d1f6d34
Improve gRPC error handling
This change removes non-idiomatic gRPC *Reply proto message fields.
The client should not receive success/fail values from server methods
with a void return type, nor an optional error_message from any server
method.  This change improves error handling by wrapping an appropriate
gRPC Status with a meaningful error description in a StatusRuntimeException,
and placing it in the server's response StreamObserver.  User error
messages are mapped to general purpose gRPC Status codes in a new ApiStatus
enum class.  (Maybe ApiStatus should be renamed to CoreApiStatus.)
2020-05-01 17:29:14 -03:00
Steven Barclay
9dce7947c2
Fix proof-of-burn signing for password protected wallets
Add a missing bsqWalletService.isEncrypted() check and optional AES key
argument to the signMessage(..) call in ProofOfBurnService, analogous to
the BitcoinJ call to sign with an EC key in MyBlindVoteListService.

This fixes #3836.
2020-05-01 15:16:46 +08:00
ghubstan
c5fcafb5f6
Renamed tempWalletPassword -> tempLockWalletPassword
This @Nullable class level variable's name needs to specifically
describe the use case.
2020-04-30 11:57:59 -03:00
ghubstan
de50692daa
Add rpc wallet protection endpoints
Implemented lockwallet, unlockwallet, removewalletpassword, and
setwalletpassword methods with basic error handling.

Also added basic error handling to existing getbalance method,
and removed unused BalancePresentation from CoreAPI.

TODO:  update help text
2020-04-29 19:25:23 -03:00
Daniela Brozzoni
192c832708
Improve dust limit error messaging
Specify dust limit unit ('satoshi') when displaying amount below
dust error, as specified in issue #3741
2020-04-29 21:57:13 +02:00
dmos62
fb76fd6548
Fix forgotten break in switch statement
Without the break statement, the execution would continue through the subsequent case clauses until it encountered a break, executing `checkArgument` calls meant for `REIMBURSEMENT_MAX_AMOUNT`. More specifically, the bug would cause a failed check in the case where `inputValueAsCoin.value <= 200000000` is false.
2020-04-29 21:20:59 +02:00
dmos62
4ec6bac658
Fix forgotten break in switch statement
This omission is currently not disruptive, since the next case clause only contains a break. Also converted a few `return false` to breaks, to align with the rest of the switch statement.
2020-04-29 21:19:29 +02:00
Christoph Atteneder
d9fe059e42
Merge branch 'master' of github.com:bisq-network/bisq into update-data-stores-for-v1.3.3
# Conflicts:
#	p2p/src/main/resources/AccountAgeWitnessStore_BTC_MAINNET
#	p2p/src/main/resources/DaoStateStore_BTC_MAINNET
#	p2p/src/main/resources/SignedWitnessStore_BTC_MAINNET
#	p2p/src/main/resources/TradeStatistics2Store_BTC_MAINNET
2020-04-29 16:35:44 +02:00
Chris Beams
4277e62135
Merge pull request #4199 from cbeams/refactor-rpc-server
Refactor rpc server implementation
2020-04-29 16:23:42 +02:00
Chris Beams
e03c46106b
Merge pull request #4189 from ghubstan/simple-rpc-auth
Implement simple password-based gRPC authentication
2020-04-29 16:17:04 +02:00
Christoph Atteneder
7e8de25e4e
Update bitcoinJ checkpoints for v1.3.3 2020-04-29 15:58:48 +02:00
Christoph Atteneder
5fd05cf660
Merge pull request #4206 from sqrrm/permutation-fix
Permutation fix
2020-04-29 15:56:45 +02:00
chimp1984
77015fea17
Add resync from resources button
We add a second button (displayed as first) to the preferences UI for
resync from latest resources. We add a warning to the resync from
genesis as it takes very long time and causes heavy network load for
seeds.
The resync button at the stateMonitor does now a resync from resources,
not from genesis.
We add handling of the UnconfirmedBsqChangeOutputList file as well.
In Filemanager we add a check if file exists.
2020-04-28 15:18:11 -05:00
Christoph Atteneder
91ce44ad96
Merge pull request #4102 from stejbac/tidy-persistable-envelope-inheritance
Tidy PersistableEnvelope inheritance
2020-04-28 16:22:41 +02:00
chimp1984
54e280c78d
Add optimized permutation algo
WIP, needs more tests, comments, clean up....
2020-04-28 00:40:41 -05:00
Chris Beams
3badf299e3
Add 'apiPort' configuration option 2020-04-27 19:49:10 +02:00
Chris Beams
82f1b66818
Refine GrpcServer log output 2020-04-27 19:49:10 +02:00
Chris Beams
a33e030e04
Rename BisqGrpcServer => GrpcServer 2020-04-27 19:49:10 +02:00
Chris Beams
2f7d0f6320
Use var declarations where appropriate 2020-04-27 19:49:09 +02:00
Chris Beams
1f8839e3ac
Make gRPC service classes non-static
So they can easily access the enclosing BisqGrpcServer#coreApi field.
2020-04-27 19:49:09 +02:00
Chris Beams
edbc81c5b4
Rename gRPC service classes from *{Impl=>Service} 2020-04-27 19:49:09 +02:00
Chris Beams
376d11dd1e
Sort static inner classes at bottom 2020-04-27 19:49:09 +02:00
Chris Beams
a52be594cb
Eliminate static fields in BisqGrpcServer 2020-04-27 19:49:09 +02:00
Chris Beams
f2028f2cef
Remove section comments from BisqGrpcServer 2020-04-27 19:49:08 +02:00
Chris Beams
01580ae36a
Remove StopServer rpc method
There is no actual requirement for this method, so removing it. It also
helps improve the implementation by removing the need for the static
'instance' field.
2020-04-27 19:49:08 +02:00
Chris Beams
20f563ae17
Reduce PasswordAuthInterceptor visibility to package-private
And remove unused @Slf4j lombok annotation
2020-04-25 13:32:40 +02:00
Chris Beams
653856f79b
Refactor 'auth*' naming to 'password'
To increase simplicity and make the implementation more
intention-revealing.
2020-04-25 13:28:10 +02:00
Chris Beams
e84123c20a
Refactor auth infrastructure naming 2020-04-25 09:52:50 +02:00
Devin Bileck
98c9664121
Add BTC node qxjrxmhyqp5vy5hj.onion
This is a newly deployed instance intended on replacing one of emzy's
nodes in an attempt to reduce the number of nodes under the control of a
single contributor.
2020-04-23 11:18:07 -07:00
Chris Beams
1a133f4b67
Use a single auth token vs username:password
There is actually no use case for both username and password forming the
authentication token. This change simplifies the arrangement such that a
single token is passed.

--rpcUser and --rpcPassword are no longer used and are replaced by
--apiToken on both cli and daemon sides.
2020-04-23 11:32:19 +02:00
Chris Beams
ca0658229b
Rename AuthenticationInterceptor => TokenAuthInterceptor 2020-04-23 11:21:52 +02:00
Chris Beams
bc88080df1
Simplify implementation of authenticate method 2020-04-23 10:20:28 +02:00
Chris Beams
864bd9a21a
Wrap method parameters according to convention 2020-04-23 10:09:06 +02:00
Chris Beams
6490e97df2
Do not declare local variables as final
Per https://github.com/bisq-network/style/issues/11
2020-04-23 10:03:36 +02:00
Chris Beams
3fba97cefc
Favor final fields declared one per line
Final fields should be favored wherever possible to advertise and
enforce immutability. Also as a matter of style, favor declaring fields
one per line instead of multiple on the same line. This style guideline
is not consistent throughout the codebase, but is favored because it
makes diffs / patches cleaner and is the more widely accepted style
througout most modern Java codebases.
2020-04-23 10:01:23 +02:00
Chris Beams
506e12da46
Inject Config directly into BisqGrpcServer
There is no need or benefit to injecting Config into CoreApi for the
purpose of accessing it indirectly through BisqGrpcServer.
2020-04-23 09:50:08 +02:00
ghubstan
fe9e57babb
Implement simple cleartext gRPC authentication
* Renamed CliCommand to RpcCommand, differentiating it from cmd
   string token(s)

 * Added new CliConfig, based on :common Config

 * Injected Config into CoreApi to make bisq.properties and cmd line
   args available to server

 * Added cleartext username:password BisqCallCredentials to :cli, and
   an AuthenticationInterceptor to :core (server)

 * Moved :daemon resources folder to expected location under src/main

 * Duplicated CompositeOptionSet, ConfigException and BisqException
   in :cli because they are not visible from :common.  (TODO refactor?)
   CompositeOptionSet will be used to let command line parameters
   override params set in config file.

 * Removed outdated references to :cli in a couple of comments in
   :common Config

 * gRPC parameters & command names are lowercase to mimic bitcoind/rpc

TBD

 * Decide what rpc auth param names to use, to differentiate them from
   bitcoind rpc user/passord param names
2020-04-22 18:16:01 -03:00
Christoph Atteneder
590f16d945
Merge pull request #4174 from devinbileck/update-btc-node
Update hostname and IP address of BTC node lva54pnbq2nsmjyr.onion
2020-04-20 11:34:50 +02:00
jmacxx
f49445ef56
Display the BSQ amount correctly in issuance log message
Fixes #3709.  The issuance log message displayed the issued BSQ
with 2 extra zeros (i.e. sats value).  This was because BSQ is
represented internally within the application as sats, so it has to
be converted by `MathUtils.scaleDownByPowerOf10(amount, 2)`
whenever displayed to the user.
2020-04-16 21:04:21 -05:00
Devin Bileck
0d6f7c3d2e
Update hostname and IP address of BTC node lva54pnbq2nsmjyr.onion
I deployed a new instance and as a result have a new IP address. Also,
while I was at it I added it to my bisq.services domain.
2020-04-15 15:47:05 -07:00
sqrrm
26f30b6ec4
Add second donation address as valid 2020-04-15 21:30:50 +02:00
Christoph Atteneder
cfc4705058
Update translations for v1.3.2 2020-04-14 18:08:27 +02:00
ghubstan
be09682435
Replace mock arg with SEPA PaymentMethod instance
Test AccountAgeWitnessServiceTest > testArbitratorSignWitness failed
in full gradle build, but passed when run as a single test:

	./gradlew :core:cleanTest :core:test \
		--tests "bisq.core.account.witness.AccountAgeWitnessServiceTest"

This test also passed when run in the IDE.

Solved by not passing a mocked PaymentMethod.SEPA argument into the
test's service.getTraderPaymentAccounts() method, where mock paymentId
field was null when running full build's test suites.

Fix for #4158
2020-04-13 11:46:35 +02:00
Christoph Atteneder
e4ae28e052
Merge pull request #4161 from ghubstan/fix-4158
Replace mock arg with SEPA PaymentMethod instance
2020-04-13 11:46:01 +02:00
sqrrm
6fc087c72c
Add option to allow faulty delay payout tx
Add more logging during unfail process
2020-04-13 11:38:15 +02:00
sqrrm
016a552836
Allow completion of trades with amount mismatch delayed tx 2020-04-13 11:38:08 +02:00
sqrrm
efee2e43c4
Init unfailed trade when moved to pending trades 2020-04-13 11:38:00 +02:00
sqrrm
e739f9465f
Don't unfail if deposit or delayedpayout txs are missing 2020-04-13 11:37:54 +02:00
sqrrm
c889fbdb8d
Reattach addresses when unfailing trade 2020-04-13 11:37:46 +02:00
sqrrm
77835b95b0
Add shortcut to move failed trade to pending trades 2020-04-13 11:32:54 +02:00
Christoph Atteneder
2a040f4687
Merge pull request #4157 from sqrrm/unfail-with-reattach
Unfail with reattach
2020-04-13 11:32:24 +02:00
sqrrm
790db8c731
Add option to allow faulty delay payout tx
Add more logging during unfail process
2020-04-12 16:12:43 +02:00
sqrrm
be3158427e
Allow completion of trades with amount mismatch delayed tx 2020-04-12 13:03:09 +02:00
ghubstan
fc458e7a7d
Replace mock arg with SEPA PaymentMethod instance
Test AccountAgeWitnessServiceTest > testArbitratorSignWitness failed
in full gradle build, but passed when run as a single test:

	./gradlew :core:cleanTest :core:test \
		--tests "bisq.core.account.witness.AccountAgeWitnessServiceTest"

This test also passed when run in the IDE.

Solved by not passing a mocked PaymentMethod.SEPA argument into the
test's service.getTraderPaymentAccounts() method, where mock paymentId
field was null when running full build's test suites.

Fix for #4158
2020-04-11 14:02:22 -03:00
sqrrm
f6b7762d26
Init unfailed trade when moved to pending trades 2020-04-11 18:02:18 +02:00
Steven Barclay
e5ed365239
Remove PersistableNetworkPayloadList & TradeStatisticsList
The former class is dead code, together with its store service, as they
were only referenced from CorePersistenceProtoResolver::fromProto, the
binding logic and from AppendOnlyDataStoreService by orphaned migration
code. However, migration from the old persisted data was completed long
ago and the store file is no longer being read or written from anywhere
in the codebase.

Also remove the associated PersistableEnvelope proto message type, along
with the TradeStatisticsList message type. The latter is long deprecated
and has no corresponding Java class implementing PersistableEnvelope, so
removing it won't change behaviour (outside the exception message thrown
when attempting to resolve it).
2020-04-11 15:07:16 +08:00
Christoph Atteneder
edc4df1826
Merge pull request #4099 from jmacxx/fix_getsupport_traderchat
Replace the Get Support button with Open Trader Chat until trade period is over
2020-04-10 19:53:38 +02:00
sqrrm
486f254773
Don't unfail if deposit or delayedpayout txs are missing 2020-04-10 16:42:02 +02:00
sqrrm
817819dc51
Reattach addresses when unfailing trade 2020-04-10 16:42:02 +02:00
sqrrm
bd8e30c708
Add shortcut to move failed trade to pending trades 2020-04-10 16:42:02 +02:00
Christoph Atteneder
34734c6fe4
Merge pull request #4122 from stejbac/make-UserThread-runAfter-thread-safe
Make UserThread::run* methods thread safe
2020-04-10 15:55:03 +02:00
sqrrm
062dc6ef76
Merge pull request #4053 from freimair/too-long-mempool-chain
Limit number of unconfirmed offers
2020-04-10 15:23:29 +02:00
sqrrm
09141eba92
Add signed witness filter (#4124)
* Add signed witness filter

- Add a filter to pubkeys used in AccountAgeWitness signing
- Fix inverted arbitrator signing of initial account age witnesses from
disputes
- Add test to verify that signed witness filter works
- Add test to verify that the arbitrator signing was fixed

* Fix codacy complaints

* Prevent NullPointerException during toggle group initialization

* Add scrollbar to filter window

* Format test class

Co-authored-by: Christoph Atteneder <christoph.atteneder@gmail.com>
2020-04-10 15:14:01 +02:00
Elias Boukamza
963d836d05
Add blockchair mainnet and testnet explorers 2020-04-09 18:56:40 +02:00
Christoph Atteneder
4b826eb2a9
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.3.1
# Conflicts:
#	build.gradle
#	desktop/package/linux/Dockerfile
#	desktop/package/linux/package.sh
#	desktop/package/linux/release.sh
#	desktop/package/macosx/create_app.sh
#	desktop/package/macosx/finalize.sh
#	desktop/package/macosx/insert_snapshot_version.sh
#	desktop/package/windows/package.bat
#	desktop/package/windows/release.bat
#	relay/src/main/resources/version.txt
2020-04-08 23:03:19 +02:00
chimp1984
79e4572f64
Fix issues when buyer has dao deactivated 2020-04-08 21:52:30 +02:00
chimp1984
495b9b58b3
Fix inverted check, add more error logs 2020-04-08 21:52:07 +02:00
chimp1984
005a87b553
Fix issue with tx connected output being null
The moment we are validating the tx is not committed and therefore the
connected tx output is not wired up and thus null.

Refactor and consolidate the validation code to the static class and
improve error handling.
2020-04-08 21:51:52 +02:00
chimp1984
526bd0091a
Fix issues when buyer has dao deactivated 2020-04-08 13:29:04 -05:00
chimp1984
fd04909c79
Fix inverted check, add more error logs 2020-04-08 12:24:37 -05:00
chimp1984
38dcb27140
Fix issue with tx connected output being null
The moment we are validating the tx is not committed and therefore the
connected tx output is not wired up and thus null.

Refactor and consolidate the validation code to the static class and
improve error handling.
2020-04-08 12:10:06 -05:00
Christoph Atteneder
6ae9608966
Remove duplicate restart/connection information 2020-04-08 14:10:59 +02:00
sqrrm
97b1a10ae8
Fix value of delayedpayouttx for ranged trades 2020-04-08 14:05:44 +02:00
chimp1984
1c5fc600f4
Add check for donation address at pending trades 2020-04-08 14:05:30 +02:00
chimp1984
96e42954c9
Add more checks for delayed payout tx
Merge Conflict in TradeWalletService
2020-04-08 14:05:18 +02:00
chimp1984
500ccfbbaf
Rename class 2020-04-08 14:03:05 +02:00
chimp1984
efe04c668c
Add DonationAddressValidation static class 2020-04-08 14:02:53 +02:00
chimp1984
3a3f69aafa
Rename class 2020-04-08 14:02:42 +02:00
chimp1984
c18c55f6b0
Add BuyerVerifiesDonationAddress task
Buyer was not verifying if the donation address is either the default
DAO param address or the recent one changed by DAO voting. We do not
support past DAO param addresses to avoid that past addresses receive
funds.
2020-04-08 14:00:48 +02:00
sqrrm
0e6c4239b5
Fix value of delayedpayouttx for ranged trades 2020-04-08 11:22:36 +02:00
chimp1984
4f28205478
Add check for donation address at pending trades 2020-04-07 23:23:58 -05:00
chimp1984
8cf6d42309
Add more checks for delayed payout tx 2020-04-07 23:04:57 -05:00
chimp1984
99f542bc4b
Rename class 2020-04-07 22:16:32 -05:00
chimp1984
856863ee70
Add DonationAddressValidation static class 2020-04-07 22:16:02 -05:00
chimp1984
8a604ea60c
Rename class 2020-04-07 22:13:24 -05:00
Christoph Atteneder
9a09c3daa1
Merge pull request #4134 from chimp1984/add-donation-address-verification-to-buyer
Add BuyerVerifiesDonationAddress task
2020-04-08 01:37:15 +02:00
Christoph Atteneder
538e6fc906
Update data stores for v1.3.0 2020-04-08 01:00:17 +02:00
Christoph Atteneder
d05e9f74b0
Update data stores for v1.3.0 2020-04-07 21:47:58 +02:00
chimp1984
956cb65a6c
Add BuyerVerifiesDonationAddress task
Buyer was not verifying if the donation address is either the default
DAO param address or the recent one changed by DAO voting. We do not
support past DAO param addresses to avoid that past addresses receive
funds.
2020-04-07 13:15:25 -05:00
Steven Barclay
a71f1e7e3f
Make UserThread::runAfter* methods thread safe
The runAfter* methods delegate to UITimer::run(Later|Periodically) in
the case of the desktop application. These use the JavaFX TimeLine API
(via bisq.common.reactfx.FXTimer) to schedule future events. However,
this API isn't thread safe and isn't meant to be called outside the FX
application thread. This causes occasional misfirings and out-of-order
scheduling when UserThread::runAfter is called outside the user thread.

Make the UITimer::run* methods safe to call from any thread by checking
we are in the application thread and delegating to UserThread::execute
otherwise. This also improves consistency between the contracts of the
runAfter* and execute methods. As the former has many call sites, this
is safer than trying to track down all the non-thread-safe uses.

(The Timer used in the headless app already appears to be thread-safe.)

This fixes #4055 (Bisq sometimes fails to prompt user for password to
unlock wallet), caused by out-of-order scheduling of the execute and
runAfter tasks in the WalletConfig.onSetupCompleted anonymous class
method in bisq.core.btc.setup.WalletsSetup.initialize.

Also prevent an exception caused by non-thread-safe calls into JavaFX
during the shutdown of OpenOfferManager, which was uncovered by the
above, by adding a missing UserThread::execute call.
2020-04-06 13:52:33 +08:00
jmacxx
0139a51b57
Replace the Get Support with Open Trader Chat until trade period is over
Showing an `Open Trader Chat` button until the trade period is over will
reduce the number of unnecessary support tickets and encourage
trader-to-trader dialogue.  If the trade timer expires without
completing the button changes (as before) to open a mediation ticket.

Implementation of this feature requires the button in TradeStepView to
notify its parent TradeSubView which in turn notify its parent
PendingTradesView that trader chat is to be opened.  Basically a
callback interface is passed two levels down the GUI hierarchy.

Fixes #3801
2020-04-05 04:27:02 -05:00
sqrrm
c54a5acbb0
Merge pull request #4094 from jmacxx/fix_dust_trading
Prevent dust outputs from being created during the trade process
2020-04-03 18:30:10 +02:00
sqrrm
d0a8890c09
Merge pull request #4093 from jmacxx/fix_dust_wallet
Prevent dust outputs from being created during withdraw from wallet
2020-04-03 15:56:05 +02:00
Christoph Atteneder
0a22f46ca4
Merge pull request #4112 from freimair/input_parsing
Add parsing to pricenode cmdline inputs
2020-04-02 16:07:52 +02:00
Florian Reimair
57157c7e4f
Report HS version to pricenode (#4027)
* Report HS version to pricenode

In order to evaluate progress on https://github.com/bisq-network/projects/issues/23,
the Bisq app reports its hiddenservice version.

This change is going to be undone as soon as we do not need the
info anymore.

* Added hsversion scraper script

* Added installer/uninstaller

* Cleanup

* Fix unit name
2020-04-02 16:06:00 +02:00
Christoph Atteneder
2b39662861
Merge pull request #4113 from wiz/add-wiz-v3-seednode
Replace a @wiz v2 seednode with a new v3 seednode
2020-04-02 16:04:01 +02:00
wiz
3775788a3f
Remove a @wiz bitcoin node to reduce total count to 16 nodes 2020-04-02 22:08:51 +09:00
wiz
8b8feae4c9
Replace a @wiz v2 seednode with a new v3 seednode 2020-04-02 21:49:05 +09:00
Florian Reimair
84be0da768
Add parsing to pricenode cmdline inputs 2020-04-02 11:08:17 +02:00
Christoph Atteneder
a96bfd431d
Merge pull request #4060 from ghubstan/avoid-standby-mode
Improve AvoidStandyModeService
2020-04-01 11:21:32 +02:00
sqrrm
55048dc4a3
Add vwap bsq price (#4098)
* Remove unused code

* Add VWAP calculation for USD/BSQ price

* Remove unused argument
2020-03-31 16:34:14 +02:00
Christoph Atteneder
73788e406f
Merge pull request #4106 from robkaandorp/add-onion-address-for-btcnode
Add onion address for @robkaandorp's btcnode
2020-03-31 15:27:20 +02:00