Commit graph

11142 commits

Author SHA1 Message Date
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
cd2357
34ff2d6a15
OfferBook: Show min-max range for amount and volume
The OfferBook tables now show the amount and the volume as min-max range, where appropriate.

For the offers that have no range defined, the single values are shown.

Fixes #3129
2020-05-02 16:09:56 +02:00
jmacxx
7350735606
Fix QR code display of offer funding amount
When creating an offer the small QR code displayed for funding
was off by an amount that represent the mining fees.  This was due
to the QR code being displayed simultaneously with the wallet
calulating the fee.

We fix the issue by listening to the data model `missingCoin`
value of the offer object, and updating the QR code image
appropriately.

Fixes #3666
Fixes #4194
2020-05-01 23:17:36 -05: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
cd2357
12dec2c321
BondsView: Fix sorting of numeric columns
The table in the BondsView uses string sorting by default. This results in unexpected behavior when sorting non-string columns.

This commit adds custom comparators to the numeric columns to address that.

Fixes #3231
2020-05-01 20:32:37 +02:00
Chris Beams
bb2484ab3e
Merge pull request #4209 from ghubstan/migrate-rpc-test-to-bats
Migrate expect based rpc test suite to bats
2020-05-01 11:52:15 +02:00
Chris Beams
765da55daa
Polish cli test suite documentation 2020-05-01 11:48:59 +02:00
Chris Beams
b88f1bf84f
Polish whitespace
Per https://github.com/bisq-network/style/issues/10
2020-05-01 11:11:50 +02: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
sqrrm
59df38194e
Merge pull request #4218 from bisq-network/release/v1.3.4
Release/v1.3.4
2020-04-30 20:19:25 +02: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
Christoph Atteneder
9acb764d6a
Add missing SNAPSHOT version 2020-04-30 16:38:04 +02:00
Christoph Atteneder
23432308a2
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.3.4
# 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
#	p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java
#	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
#	relay/src/main/resources/version.txt
2020-04-30 16:36:51 +02:00
Christoph Atteneder
80914edf74
Set log level warn for master 2020-04-30 16:31:50 +02:00
Christoph Atteneder
0faff472d8
Revert to SNAPSHOT version 2020-04-30 16:30:28 +02:00
ghubstan
ca68d0567f
Add wallet protection methods to printHelp(opts) 2020-04-30 11:21:04 -03:00
ghubstan
2096275722
Handle unlockwallet parameter errors 2020-04-30 11:00:22 -03:00
sqrrm
88a93ca0bb
Merge pull request #4217 from ripcurlx/expired-debug-logging
Reject expired data and log with debug level
2020-04-30 13:43:11 +02:00
Christoph Atteneder
0903b18e13
Make initial logging also debug level
Should be set to warn level again with next release v1.3.5
2020-04-30 13:35:23 +02:00