Commit Graph

11196 Commits

Author SHA1 Message Date
Christoph Atteneder
d35ab9f9fa
Merge pull request #4192 from devinbileck/add-btc-node-qxjrxmhyqp5vy5hj
Add BTC node qxjrxmhyqp5vy5hj.onion
2020-04-27 14:44:10 +02:00
Florian Reimair
1b2c6c90c0
Reduce log output for price nodes
In case a price feed has an error, a stacktrace dumped in the logs
for each incoming getAllMarketPrice request. In detail, there is one
line of log stating that there is a getAllMarketPrice request, one
line of log stating that there is an error and around 150 lines of
stracktrace.
This fills up the logs quite fast, around 7.5G per day which is
unnecessary.
This commit only outputs the stacktrace in debug log configuration.
2020-04-27 09:56:21 +02:00
ghubstan
cfb7e32e70
Remove note to self 2020-04-26 16:54:10 -03:00
Chris Beams
312ef30b70
Revert marking password as required in JOpt parser
This is a partial reversion of the earlier commit. Marking the password
option as required at the parser level made it impossible to run
./bisq-cli without options or arguments and get the help text. This is a
useful thing to do, and not worth creating a bad user experience to get
the free required option error handling and error messaging.
2020-04-26 21:44:03 +02:00
Chris Beams
a6a8702084
Touch up help output
Stop attempting to align Option and Method description columns with one
another. It's a moving target as we add options and method names, and
this help output format will probably change in the future anyway.
2020-04-26 21:29:29 +02:00
Chris Beams
f5803492bd
Add comment explaining exception message mangling 2020-04-26 21:27:24 +02:00
Chris Beams
f4b4f5ad89
Update cli/test.sh instructions
Don't instruct the user to create a fresh data directory every time, as
this takes quite a bit longer to initialize the wallet than running
against the same data directory repeatedly. Just be clear that the
requirement is an unencrypted wallet with 0 BTC balance.
2020-04-26 21:10:25 +02:00
Chris Beams
5fa7939ec4
Set --password as a required option in JOpt parser 2020-04-26 21:05:22 +02:00
Chris Beams
822e6813f8
Touch up test descriptions and parameter naming 2020-04-26 21:04:06 +02:00
Chris Beams
a3f9faf7ab
Move cli-test.sh => cli/test.sh
- Ensure script runs from root directory regardless of where it is
   invoked from

 - Touch up documentation and whitespace
2020-04-26 20:46:52 +02:00
Chris Beams
ceaf20a161
Clean up whitespace in cli-test.sh 2020-04-26 20:35:09 +02:00
Chris Beams
510e84d30a
Add expect-based cli test suite
Co-authored-by: ghubstan <36207203+ghubstan@users.noreply.github.com>
2020-04-26 20:30:58 +02:00
Chris Beams
b7fda8de5e
Declare channel outside try/catch
No StatusRuntimeException can be thrown from this code, so it is not
necessary to include in the try block.
2020-04-26 19:38:06 +02:00
Chris Beams
0a2aac00d3
Shutdown channel using a JVM shutdown hook
Versus needing to manage calling custom shutdown method in all the right
places.
2020-04-26 19:35:48 +02:00
Chris Beams
e10e29a211
Handle OptionException immediately 2020-04-26 19:32:14 +02:00
ghubstan
dee5e4cf7e
Revert 16c2efc
No need to strip quotes from password.  The problem was a bug
in my expect/tcl script's quote escape syntax.
2020-04-26 10:29:01 -03:00
ghubstan
56f2923ade
Remove redundant text from console err msg
The client was displaying
	Error: UNAUTHENTICATED: incorrect 'password' rpc header value
from the StatusRuntimeException message.

Strip "UNAUTHENTICATED: " from the exception message string before
printing it.
2020-04-25 18:16:23 -03:00
ghubstan
16c2efc8e1
Allow double-quoted multiword apiPassword
Strip double quotes from :cli --password arg before it is passed
to server.  Otherwise, a correct "password" will fail authentication.
2020-04-25 17:52:54 -03:00
jmacxx
8475a5be09
Fix an issue whereby the unread chat message count was not cleared properly
The trader chat view can be opened either by clicking on the chat icon
of a trade in the list, or clicking on "OPEN TRADER CHAT" button for the
currently displayed trade.  In the latter case, the count of new messages
displayed on the chat icon was not cleared even though trader chat
was shown.  The solution is to move the scope of the routine that
updates trader chat message count from within the table cell handler
to the PendingTradesView class so that it can be called whenever
onChat() is invoked (i.e. when the Trader Chat screen is shown).

Clicking on the trader chat icon of a trade that is not selected
should select that row in the trade list. It does not. This causes
confusion as it gives misleading cues as to which trader you are
communicating with.
Issue a call to select the row of the button when clicked.
Fixes #4172
2020-04-25 09:00:26 -05:00
Chris Beams
d923d07781
Fix typo in help output 2020-04-25 13:34:32 +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
42e9bb1433
Refine help output 2020-04-25 11:31:19 +02:00
Chris Beams
c1931d2fb2
Use 'method' vs 'command' naming 2020-04-25 11:27:19 +02:00
Chris Beams
7bf854c86e
Improve error handling
Fail fast if the specified command is unknown
2020-04-25 11:22:01 +02:00
Chris Beams
c6e5670fbd
Print nested exception error message on connect failure 2020-04-25 10:42:53 +02:00
Chris Beams
b67ad6cd74
Print help text when no command is specified 2020-04-25 10:25:54 +02:00
Chris Beams
423b2ad4ae
Handle OptionException gracefully
When e.g. a given option is not recognized, print a clean error message
and exit 1 as opposed to printing a stack trace.
2020-04-25 10:10:27 +02:00
Chris Beams
0b338bbbea
Rename/repackage bisq.cli.{app.Bisq=>CliMain} 2020-04-25 09:59:22 +02:00
Chris Beams
d19581a089
Reduce AuthHeaderCallCredentials visibility to package-private 2020-04-25 09:55:32 +02:00
Chris Beams
e84123c20a
Refactor auth infrastructure naming 2020-04-25 09:52:50 +02:00
Chris Beams
3fe7848c4e
Use var declarations where appropriate 2020-04-25 08:17:22 +02:00
Chris Beams
04defcb66d
Update comments and console output 2020-04-25 08:17:19 +02:00
Chris Beams
31aed4b082
Simplify implementation to a single main class 2020-04-25 08:16:38 +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
24c245c2ea
Polish BisqCallCredentials style
See https://github.com/bisq-network/style/issues/12
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
7551cdc73a
Editing an offer should not allow the BTC amount to be changed
When editing an offer to adjust the price the fiat amount is
recalculated to reflect the new price.  The BTC amount should
not change.  Due to a bug, sometimes the BTC amounts were
changed due to a recalculation from the fiat amount.
This PR Fixes 2798 by disabling a call to recalculate BTC and
min BTC amounts when editing.
2020-04-18 23:21:21 -05:00
jmacxx
223a1d3a6c
When accepting an offer do not round the BTC amount outside range
Fixes 3871.  The BTC amount of an offer was being adjusted up in
certain cases due to a rounding calculation from the fiat value
and price.  This would prevent some offers from being taken.

There's an existing check to ensure that the amount is not adjusted
below the minimum, here we add a check to ensure that the amount
is not adjusted higher than the maximum defined in the offer.
2020-04-17 22:05:30 -05:00
Christoph Atteneder
4fd8be6b68
Merge pull request #4177 from jmacxx/fix_issue_3709
Display the BSQ amount correctly in issuance log message
2020-04-17 16:45:48 +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
sqrrm
2db90cf132
Merge pull request #4175 from bisq-network/release/v1.3.2
Release/v1.3.2
2020-04-16 16:41:37 +02:00