You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found by @czarcas7ic , just capturing DM;s into an issue. Long simulation runs will currently fail due to errors in the Authz simulation code. All simulation runs in the SDK were only tested with usage of a single denom. As we test many denoms, we have surfaced this error.
Suggested Design
The bug is due to the terrible API design of the sdk.Coins object and its comparison definitions.
Authz SimulateGrantExec does
if sendAuth.SpendLimit.IsAllLTE(coins) {
but it actually needs to be
if sendAuth.SpendLimit.IsAllLTE(coins) && coins.DenomsSubsetOf(sendAuth.SpendLimit)
because what happens if you select a coin thats not in the spendlimit denoms. (One would sanely expect the old code to work, alas the API) Maybe fixed in the future if the bikeshed around better API's converges: cosmos/cosmos-sdk#11223
For now we should fix this in our SDK fork.
Acceptance Criteria
Long simulation runs no longer fail due to Authz simulation bug
The text was updated successfully, but these errors were encountered:
Background
Found by @czarcas7ic , just capturing DM;s into an issue. Long simulation runs will currently fail due to errors in the Authz simulation code. All simulation runs in the SDK were only tested with usage of a single denom. As we test many denoms, we have surfaced this error.
Suggested Design
The bug is due to the terrible API design of the sdk.Coins object and its comparison definitions.
Authz
SimulateGrantExec
doesbut it actually needs to be
because what happens if you select a coin thats not in the spendlimit denoms. (One would sanely expect the old code to work, alas the API) Maybe fixed in the future if the bikeshed around better API's converges: cosmos/cosmos-sdk#11223
For now we should fix this in our SDK fork.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: