[bisq-network/bisq] Fix call rate metering interceptor bug (#5250)

Stan notifications at github.com
Sun Feb 28 02:12:26 CET 2021


The gRPC interceptor was not using the correct method/ratemeter map key, and failing to find a rate meter for the server call.

- Fix the rate meter key lookup bug.

- Disable almost all strict, default call rate meters in tests.
  Made an adjustment to the test harness' scaffold setup so rate meter testing or disabling config file is always picked up by bob and alice daemons (not arb daemons because there is no dao-setup for that node).

- Set arbitration daemon's `registerDisputeAgent` rate = 10/second. 
  To not interfere with the test harness.  (There is no pre-existing arb node appDataDir before that daemon starts.)

TODO:  Adjust api bats test and simulation and scripts to interceptor bug fix.

PR https://github.com/bisq-network/bisq/pull/5249 has to be reviewed/merged before this one.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/5250

-- Commit Summary --

  * Display buyer's cost in api's gettrade output
  * Merge branch 'master' into 01-show-cost-in-trade-output
  * Use the logger of the gRPC service throwing an exception
  * Permit some gRPC excptions to be logged only as warning
  * Log 'trade not found' a warning instead of full stack trace
  * Fix test bug
  * Clean up call rate meter config file in test teardown
  * Fix test bug
  * Fix call rate metering interceptor bug
  * Make test call rate = default call rate
  * No need to wait, default+test call rate > 2x / second

-- File Changes --

    M apitest/scripts/trade-simulation-utils.sh (12)
    M apitest/src/test/java/bisq/apitest/ApiTestCase.java (48)
    M apitest/src/test/java/bisq/apitest/method/CallRateMeteringInterceptorTest.java (41)
    M apitest/src/test/java/bisq/apitest/method/MethodTest.java (3)
    M apitest/src/test/java/bisq/apitest/scenario/StartupTest.java (12)
    M cli/src/main/java/bisq/cli/ColumnHeaderConstants.java (10)
    M cli/src/main/java/bisq/cli/TradeFormat.java (33)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcDisputeAgentsService.java (8)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcExceptionHandler.java (18)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcGetTradeStatisticsService.java (5)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcHelpService.java (2)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (12)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java (12)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcPriceService.java (2)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcShutdownService.java (2)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java (16)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcVersionService.java (2)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java (28)
    M daemon/src/main/java/bisq/daemon/grpc/interceptor/CallRateMeteringInterceptor.java (17)
    M daemon/src/test/java/bisq/daemon/grpc/interceptor/GrpcServiceRateMeteringConfigTest.java (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5250.patch
https://github.com/bisq-network/bisq/pull/5250.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5250
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210227/1913aa86/attachment.htm>


More information about the bisq-github mailing list