Commit Graph

13641 Commits

Author SHA1 Message Date
ghubstan
5de910a03d
Add unit test dependencies to daemon subproject 2020-12-19 15:40:27 -03:00
ghubstan
b307593c82
Make CallRateMeteringInterceptor configurable via json
This adds a GrpcServiceRateMeteringConfig class that can read and
write rate metering interceptor config files, and configure
a gRPC rate metering service interceptor at startup.

This seems excessive, but we need to be able to test and tune
method rate metering without having to change hard coded, default
interceptor rate meters.
2020-12-19 15:32:40 -03:00
ghubstan
a5ed17e43f
Add license comment, stop & toString methods, and make isRunning transient 2020-12-19 13:14:06 -03:00
chimp1984
af9f2a9643
In case a reset of the dao state was triggered we delete
now all dao store files and request a shut down of the app.

After a restart the resource files are used. This avoids cases where a resync from
genesis got triggered (observed on seed nodes, not on desktop apps).

Seed nodes and headless apps get shut down automatically.
In case of the desktop app we show a warn popup with shutdown
button and no close button, so we enforce a shutdown to avoid
complications in case the user would continue.
2020-12-18 20:29:47 -05:00
sqrrm
e2c8e4dff6
Merge pull request #4965 from ripcurlx/update-data-stores-for-v1.5.2
[v1.5.2] Update data stores for v1.5.2
2020-12-18 23:09:04 +01:00
Christoph Atteneder
7c0d02ad09
Make it easier to translate trade roles 2020-12-18 20:48:42 +01:00
sqrrm
b04a56e543
Merge pull request #4969 from ripcurlx/improve-translations-in-trade-details
Make it easier to translate trade roles
2020-12-18 19:06:49 +01:00
Christoph Atteneder
9a54ccc077
Make it easier to translate trade roles 2020-12-18 17:06:56 +01:00
Christoph Atteneder
400a713a41
Fix private notification style issue in dark mode 2020-12-18 15:57:07 +01:00
Christoph Atteneder
7fcb857fd3
Use sign state icon selector for payment account cell factory 2020-12-18 11:57:05 +01:00
Christoph Atteneder
4736bb806a
Limit badge display to two digits
Supporting three digits in this UI element wouldn't
work properly in all our use cases
2020-12-18 10:51:39 +01:00
Christoph Atteneder
626aac69a8
Remove wrong error log 2020-12-18 10:01:33 +01:00
ghubstan
89e2187878
Change long to int, tidy up error msg 2020-12-17 14:12:04 -03:00
ghubstan
2148a4d958
Prevent excessive api calls
This change provides a gRPC CallRateMeteringInterceptor to help protect
the server and network against being overloaded by CLI scripting mistakes.

An interceptor instance can be configured on a gRPC service to set
individual method call rate limits on one or more of the the service's
methods. For example, the GrpcOffersService could be configured with
this interceptor to set the createoffer rate limit to 5/hour, and
the takeoffer call rate limit could be set to 20/day.  Whenever a
call rate limit is exceeded, the gRPC call is aborted and the client
recieves a "rate limit exceeded" error.

Below is a simple example showing how to set rate limits for one method
in GrpcVersionService.

    final ServerInterceptor[] interceptors() {
        return new ServerInterceptor[]{
                new CallRateMeteringInterceptor(new HashMap<>() {{
                    put("getVersion", new GrpcCallRateMeter(2, SECONDS));
                }})
        };
    }

It specifies a CLI can execute getversion 2 times / second.

This is not a throttling mechansim, there is no blocking nor locking
to slow call rates.  When call rates are exceeded, calls are
simply aborted.
2020-12-17 12:33:45 -03:00
Christoph Atteneder
6384753332
Update data stores for v1.5.2 2020-12-17 15:48:05 +01:00
Christoph Atteneder
2ba15a97ac
Update bitcoinj checkpoints for v1.5.2 2020-12-17 15:47:36 +01:00
jmacxx
a49cb24e09
review fix: try..catch around all parseCoin() 2020-12-17 15:33:26 +01:00
jmacxx
9cb9ed20e4
Privacy improvements for manual payout
Redesign the UI
Add import/export of payout settings
Add ability to import from mediation ticket
Mediator does not need private key
User can sign using own wallet or private key
Validation of input fields
Calculate the tx fee based on inputs
Display of the generated txid & hex so it can be checked
2020-12-17 15:33:21 +01:00
Christoph Atteneder
ceecb404d2
Merge pull request #4899 from jmacxx/4061_privacy_improvement
Privacy improvements for manual payout
2020-12-17 15:32:44 +01:00
Christoph Atteneder
a3824f8151
Merge pull request #4961 from m52go/remove-btcnode-ip
Remove m52go btc node ip
2020-12-17 10:01:52 +01:00
jmacxx
e888be3192
review fix: try..catch around all parseCoin() 2020-12-16 22:15:16 -06:00
sqrrm
113bb4f7f2
Merge pull request #4963 from chimp1984/fix-case-if-no-data-store-service-is-available
Call completeHandler if services in store services is empty.
2020-12-17 00:55:26 +01:00
chimp1984
f270b9c6fa
Call completeHandler if services in store services is empty.
If oen starts with --daoActivated=false there is no service
set up in one of the data store services so it never calls
the result handler and the app never starts up.
2020-12-16 22:25:06 +01:00
chimp1984
4c575098b7
Call completeHandler if services in store services is empty.
If oen starts with --daoActivated=false there is no service
set up in one of the data store services so it never calls
the result handler and the app never starts up.
2020-12-16 16:21:10 -05:00
Christoph Atteneder
c5c93b213d
Merge pull request #4962 from oscarguindzberg/bloomFilterFix2
Use bitcoinj 0.15.8.bisq.13 (commit dcf8af0)
2020-12-16 21:45:49 +01:00
ghubstan
fa9ffa1fb2
Put arguments on separate lines 2020-12-16 15:35:12 -03:00
m52go
b94d06c33f
Remove m52go btc node ip 2020-12-16 19:30:56 +01:00
ghubstan
2572e8641d
Create grpc interceptor pkg, move auth interceptor into it 2020-12-16 15:30:40 -03:00
Oscar Guindzberg
a161376da3
Use bitcoinj 0.15.8.bisq.13 (commit dcf8af0) 2020-12-16 14:57:41 -03:00
m52go
4e4cb42f6a
Remove m52go btc node ip 2020-12-16 12:50:46 -05:00
ghubstan
f7c1103848
Rename gRPC exception handler class 2020-12-16 14:42:23 -03:00
ghubstan
c60605f75c
Fix class level comment 2020-12-16 14:26:12 -03:00
ghubstan
1cd47fd0aa
Merge branch 'master' into 09-refactor-grpc-error-handling 2020-12-16 13:45:29 -03:00
ghubstan
e6c6d3b8d3
Add new CoreApiExceptionHandler to gRPC services
This change reduces gRPC service error handling duplication by moving
it into a @Singleton encapsulating everything needed to wrap
an expected or unexpected core api exception into a gRPC
StatusRuntimeException before sending it to the client.  It also
fixes some boilerpate classes were gRPC error handling was missing.
2020-12-16 13:34:21 -03:00
chimp1984
83e620d462
Fix missing param in test 2020-12-16 10:08:55 -05:00
chimp1984
0cd32fa6e5
Add null check (for tests) and fix missing param for test class.
Fix test with price display.
2020-12-16 15:42:30 +01:00
chimp1984
169f46d753
Set bsq30DayAveragePrice only at activate as its expensive
call and does not change frequently and is only used for
informational purpose as % display.
2020-12-16 15:42:24 +01:00
chimp1984
14e5eefab4
Add check to not devide by 0
Cleanups
2020-12-16 15:42:18 +01:00
chimp1984
dd34bc6810
Add price deviation in % to BSQ using 30 day average 2020-12-16 15:42:11 +01:00
chimp1984
67fd7ea010
Show also % price deviation for fixed price and
sort according to it
Allow sorting at show all. This helps to spot
good offers with negative % over the whole market.
2020-12-16 15:42:02 +01:00
sqrrm
86d81762f6
Merge pull request #4949 from chimp1984/show-pricedeviation-for-fixed-price-offers
Show price deviation in % for fixed price offers and BSQ
2020-12-16 15:30:14 +01:00
chimp1984
1049b7da77
Remove delay for publishing
This version is intended to be deployed to a power user to actually
try it out live as testing it with real conditions is very difficult.
2020-12-16 09:04:36 -05:00
chimp1984
24f53e0c01
Add flush method.
Call flush at openOfferManager shutdown.
Remove unused method.

Force broadcaster to send out immediately, otherwise we could
have a 2 sec delay until the bundled messages sent out.
2020-12-16 09:01:12 -05:00
chimp1984
8e71575afd
Add else case for check for offer is in source list and deActivate state
Invert the if branch so the normal case is first
Add comment
2020-12-16 08:24:48 -05:00
Christoph Atteneder
ac6102c4e0
Update translations for v1.5.2 2020-12-16 14:22:11 +01:00
Christoph Atteneder
a6bee1116a
Bump version number for v1.5.2 2020-12-16 14:19:41 +01:00
Christoph Atteneder
0789180bb0
Merge pull request #4957 from sqrrm/sign-single-account
Sign single account
2020-12-16 14:07:34 +01:00
sqrrm
4cdd94ac28
Merge pull request #4955 from chimp1984/cache-frequent-method-calls
Cache results of isFiatCurrency and isCryptoCurrency
2020-12-16 12:11:58 +01:00
sqrrm
25328167de
Merge pull request #4958 from chimp1984/disable-tx-broadcast-if-connected-to-local-node
Do not use tx broadcast to mempool nodes if a local btc nodes is used
2020-12-16 12:10:19 +01:00
chimp1984
bb3dbf3d78
Add null check (for tests) and fix missing param for test class.
Fix test with price display.
2020-12-15 23:29:53 -05:00