[bisq-network/bisq] Define gRPC api call rate constraints (#5103)
Stan
notifications at github.com
Mon Jan 25 18:01:48 CET 2021
@ghubstan commented on this pull request.
> + new CallRateMeteringInterceptor(new HashMap<>() {{
+ put("getBalances", new GrpcCallRateMeter(1, SECONDS));
+ put("getAddressBalance", new GrpcCallRateMeter(1, SECONDS));
+ put("getFundingAddresses", new GrpcCallRateMeter(1, SECONDS));
+ put("getUnusedBsqAddress", new GrpcCallRateMeter(1, SECONDS));
+ put("sendBsq", new GrpcCallRateMeter(1, MINUTES));
+ put("sendBtc", new GrpcCallRateMeter(1, MINUTES));
+ put("getTxFeeRate", new GrpcCallRateMeter(1, SECONDS));
+ put("setTxFeeRatePreference", new GrpcCallRateMeter(1, SECONDS));
+ put("unsetTxFeeRatePreference", new GrpcCallRateMeter(1, SECONDS));
+ put("getTransaction", new GrpcCallRateMeter(1, SECONDS));
+
+ // Trying to set or remove a wallet password several times before the 1st attempt has time to
+ // persist the change to disk may corrupt the wallet, so allow only 1 attempt per 5 seconds.
+ put("setWalletPassword", new GrpcCallRateMeter(1, SECONDS, 5));
+ put("removeWalletPassword", new GrpcCallRateMeter(1, SECONDS, 5));
Maybe. I was advised to set it to 1/sec, but bumped it to 5/sec for the reason you give here. Let's see what others have to say after they take a look at this.
--
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/5103#discussion_r563884791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210125/3d95a049/attachment.htm>
More information about the bisq-github
mailing list