Commit graph

11110 commits

Author SHA1 Message Date
sqrrm
4a6dd93393
Merge pull request #4246 from wiz/increase-bsq-explorer-tmpfs-size
Increase BSQ explorer TMPFS allocation to 2GB for growing datastore
2020-05-25 15:19:45 +02:00
sqrrm
23083840b1
Merge pull request #4239 from cd2357/add-link-to-contributors-docu-commit-msg-checks
Extend CONTRIBUTING.md with info on IDEA settings
2020-05-25 14:59:52 +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
7f05f379ab
Remove unused import
This should have been done in commit c7a6c87b.
2020-05-18 14:11:50 +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
sqrrm
2bd4f1a709
Merge pull request #4258 from jmacxx/fix_stale_qrcode_display
Prevent transient negative missingCoin amount sent to QRCode display
2020-05-16 12:52:55 +02:00
Petr Hejna
5352d9b44e
Fix lcode style 2020-05-15 23:17:46 +02:00
Petr Hejna
fbefb9db8e
Better working for memo text 2020-05-15 23:16:18 +02:00
Petr Hejna
335290e464
Revert uneedech whilechars changes 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
69e46b7025
Prevent transient negative missingCoin amount sent to QRCode display
In bisq-network/bisq/pull/4223 a fix was made to the QRCode display
of amount needed to fund an offer.  This accidentally introduced a
bug whereby if the user overpaid the funding, then the QRCode would
throw an error `Coin must be positive`.  This is due to a race
condition in OfferDataModel which was setting a property first
to a negative amount before checking if it was negative and if so
then setting it to zero.  The fix here is to check for negative
before setting the property so that any listeners do not get an
event (negative) followed by another event (zero).
2020-05-14 20:24:17 -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
sqrrm
5e5d7d1577
Merge pull request #4225 from cd2357/show-min-max-orderbook
OfferBook: Show min-max range for amount and volume
2020-05-12 12:54:55 +02:00
sqrrm
6d108ead2f
Merge pull request #4182 from jmacxx/fix_issue_2798
Editing an offer should not allow the BTC amount to be changed
2020-05-11 15:45:22 +02:00
sqrrm
d51c4c82e0
Merge pull request #4178 from jmacxx/fix_issue_3871
When accepting an offer do not round the BTC amount outside range
2020-05-11 15:18:47 +02:00
sqrrm
c07988faf3
Merge pull request #4159 from stejbac/remove-unused-PersistableEnvelope-types
Remove PersistableNetworkPayloadList & TradeStatisticsList
2020-05-11 14:52:04 +02:00
wiz
cd2d867c11
Increase BSQ explorer TMPFS allocation to 2GB for growing datastore 2020-05-09 12:30:15 +09: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
cd2357
d3a9ce9620
Extend CONTRIBUTING.md with info on IDEA settings
Add a link to a StackOverflow answer showing how to configure IDEA to
automatically check and enforce the format of the commit message.

More specifically, the 50-character limit for the commit title and
72-character limit for the commit body.
2020-05-06 19:19:15 +02: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
b1f593a2d7
Merge pull request #4235 from cd2357/improve-fee-estimation
Switch to more accurate fee estimation endpoint
2020-05-05 19:04:14 +02:00
sqrrm
3f3ee0a096
Revert "Bugfix and typofix" 2020-05-05 18:08:00 +02:00
sqrrm
55c5ac02fc
Merge pull request #4226 from petrhejna/doc-peerbloomfilters
Add mention `peerbloomfilters=1` attibute
2020-05-05 17:46:57 +02:00
Chris Beams
86fcecc5d0
Review and polish migration to mempool.space API
- Polish whitespace and newlines; wrap comments at 90 chars

 - Use package-private vs protected visibility when exposing
   BitcoinFeeRateProvider constants for testing

 - Document that 'maxBlocks' is dead code, but do not remove it yet, as
   it would disrupt the process of getting this fix out quickly because
   it would require operators to change the way they start their
   pricenodes.
2020-05-05 17:38:32 +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
cd2357
e18f0406af
Switch to more accurate fee estimation endpoint
The API endpoint for fee estimations has been changed to one that delivers more accurate fee estimations.

This is a temporary solution, until a more decentralized approach is found.

Fixes projects/issues/27
2020-05-05 17:11:54 +02:00
sqrrm
a731957aa7
Merge pull request #4223 from jmacxx/fix_stale_qrcode_display
Fix QR code display of offer funding amount
2020-05-05 16:48:55 +02:00
sqrrm
daa6351bbd
Merge pull request #4221 from stejbac/fix-proof-of-burn-signing-for-encrypted-wallets
Fix proof-of-burn signing for password protected wallets
2020-05-05 16:48:40 +02:00
sqrrm
cdad01a5c0
Merge pull request #4222 from cd2357/fix-sorting-bondsview
BondsView: Fix sorting of numeric columns
2020-05-05 15:57:47 +02:00
ghubstan
9b156b86dd
Remove unlockwallet timeout variable initializer
This variable no longer needs to be initialized to avoid a compiler error.
2020-05-04 15:19:18 -03:00
Chris Beams
d48f9eb6f0
Tighten up error handling
This commit factors out a run() method in CliMain that either returns
(void) or throws an exception. This eliminates the need to call
System.exit in so many places as were previously. Indeed, now there is
only one place where System.exit is called.

It also removes the duplication of printing "Error: ..." to stderr when
something goes wrong by doing this once in the global catch clause in
the main method.
2020-05-04 13:58:46 +02:00
Chris Beams
b0e5da8e2e
Refactor setwalletpassword handling to eliminate duplication 2020-05-04 12:22:13 +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
6334c5478c
Generalize gRPC exception message cleanup 2020-05-03 15:47:26 +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
Petr Hejna
4810e35e96
Add mention of peerbloomfilters=1 attibute
`peerbloomfilters` needs to be set in order to be able to synchronize with local regtest bitcoind
2020-05-02 16:48:50 +02:00