[bisq-network/bisq] Fix request amount bounds in ReimbursementValidator (#5077)

Steven Barclay notifications at github.com
Mon Jan 11 22:41:18 CET 2021


<!-- 
- make yourself familiar with the CONTRIBUTING.md if you have not already (https://github.com/bisq-network/bisq/blob/master/CONTRIBUTING.md)
- make sure you follow our [coding style guidelines][https://github.com/bisq-network/style/issues)
- pick a descriptive title
- provide some meaningful PR description below
- create the PR
- in case you receive a "Change request" and/or a NACK, please react within 30 days. If not, we will close your PR and it can not be up for compensation.
- After addressing the change request, __please re-request a review!__ Otherwise we might miss your PR as we tend to only look at pull requests tagged with a "review required".
-->

Use `ReimbursementConsensus.get[Min|Max]ReimbursementRequestAmount` in place of `CompensationConsensus.get[Min|Max]CompensationRequestAmount`, which was erroneously copied (it appears) from the very similar `CompensationValidator` class.

This ensures the correct upper bound (currently 80,000 BSQ, starting at 10,000 BSQ and doubled in cycles 12, 13 & 14 as part of https://github.com/bisq-network/proposals/issues/203) is placed on reimbursement requests, instead of the erroneous 100,000 BSQ upper bound for compensation requests.

--

This touches the DAO packages and potentially affects consensus. I don't believe any reimbursement requests exceeding the intended limit for each given cycle were actually made, so this shouldn't invalidate past vote cycles or BSQ issuance.

Converting DaoStateStore to text, filtering and manually copying out the relevant values (so there could be mistakes), I found 30 reimbursement requests in total, as follows:

| Block height of request | BSQ Amount |
| --- | --- |
| 600609 | 434.60 |
| 601624 | 143.00 |
| 603238 | 30.00 |
| 623401 | 476.00 |
| 625775 | 892.00 |
| 628607 | 921.00 |
| 630997 | 1950.00 |
| 636176 | 428.00 |
| 639551 | 1411.99 |
| 640347 | 29200.00 |
| 640347 | 27933.67 |
| 640741 | 34141.70 |
| 643632 | 1379.97 |
| 645119 | 9850.60 |
| 645233 | 97.53 |
| 645272 | 10371.00 |
| 649445 | 50217.66 |
| 649680 | 16069.22 |
| 650086 | 21407.20 |
| 652676 | 21267.15 |
| 653608 | 206.00 |
| 654003 | 364.00 |
| 654850 | 1586.74 |
| 654859 | 27934.70 |
| 658129 | 1586.74 |
| 659360 | 19629.90 |
| 663715 | 61875.30 |
| 663903 | 852.80 |
| 664138 | 25580.70 |
| 664138 | 25580.70 |

The first eight requests are before the parameter changes in Cycle 14 activated (height 637267), so every reimbursement request after that should have had an 80,000 BSQ limit anyway.

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix request amount bounds in ReimbursementValidator

-- File Changes --

    M core/src/main/java/bisq/core/dao/governance/proposal/reimbursement/ReimbursementValidator.java (13)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/5077.patch
https://github.com/bisq-network/bisq/pull/5077.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/5077
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210111/5696a0b1/attachment.htm>


More information about the bisq-github mailing list