Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

pallet nis: remove benchmarking hack #13759

Merged
merged 3 commits into from
Apr 11, 2023
Merged

pallet nis: remove benchmarking hack #13759

merged 3 commits into from
Apr 11, 2023

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Mar 29, 2023

This reverts #13651 since we merged the proper fix in #13660.
Also changes the rounding mode in one spot, otherwise the kitchensink benches fail as can be seen in the first CI output.

Diener tested the Polkadot benches locally.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Mar 29, 2023
Tested on the kitchensink and in case that
n = 10000000000000000 and d = 12000100600000000000000 it rounds the
Perquintill up (correctly) since 833326347280+47318160/60000503 should round up.
That triggers the path 'amount <= on_hold' in L736.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Mar 30, 2023

Looks like the NearestPrefDown is causing it to round up 833326347280 + 47318160/60000503 in one of the benchmarks. Now using Down to prevent that.

@ggwpez ggwpez requested a review from gavofyork March 30, 2023 14:13
@gavofyork gavofyork merged commit a2f6e05 into master Apr 11, 2023
@gavofyork gavofyork deleted the oty-remove-hack branch April 11, 2023 13:53
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* pallet nis: remove benchmark hack

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* NearestPrefDown -> Down

Tested on the kitchensink and in case that
n = 10000000000000000 and d = 12000100600000000000000 it rounds the
Perquintill up (correctly) since 833326347280+47318160/60000503 should round up.
That triggers the path 'amount <= on_hold' in L736.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
Development

Successfully merging this pull request may close these issues.

4 participants