Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken pallet_nomination_pools benchmark after existential deposit change #914

Open
HCastano opened this issue Jun 26, 2024 · 0 comments
Open
Labels

Comments

@HCastano
Copy link
Collaborator

HCastano commented Jun 26, 2024

In #901 we changed the existential deposit from 10_000 units to 1 unit. After doing
this however the pallet_nomination_pool pallet's bond_extra_transfer benchmark
started failing:

Error: Input("Benchmark pallet_nomination_pools::bond_extra_transfer failed: Funds are unavailable")

It looks like by changing the ED we changed the value of the depositor_min_bond() which
is used by the benchmark.

pub fn depositor_min_bond() -> BalanceOf<T> {
    T::Staking::minimum_nominator_bond()
        .max(MinCreateBond::<T>::get())
        .max(MinJoinBond::<T>::get())
        .max(T::Currency::minimum_balance())
}

I have been able to work around the issue by:

  1. Returning the ED to the old value
  2. Adding the following to the dev chainspec
"nominationPools": {
    "minCreateBond": 10_000 * DOLLARS,
    "minJoinBond": 5 * DOLLARS,
},

Note that the minCreateBond value is equal to the old ED, and so is equivalent to
workaround (1).

Another thing to note here is that when the benches do run they give this warning:

2024-06-26 12:16:22 pool 1 has incorrect ED frozen that can result from change in ED. Expected  = 10000000000,  Actual = 0

Ideally we find the true cause of why this is failing and we can have some "reasonble"
values for both the ED the minCreateBond.

@HCastano HCastano added the Bug label Jun 26, 2024
HCastano added a commit that referenced this issue Jun 26, 2024
These broke after the ED changes from #901. I haven't been able to solve this in a satisfactory way,
so in order to keep the `v0.2.0` release pipeline moving I suggest we ignore this for now and
investigate later.

See #914 for more details.
HCastano added a commit that referenced this issue Jun 26, 2024
These broke after the ED changes from #901. I haven't been able to solve this in a satisfactory way,
so in order to keep the `v0.2.0` release pipeline moving I suggest we ignore this for now and
investigate later.

See #914 for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant