Unable to properly benchmark pallet_bounties
when ED is 0
#7009
Labels
I2-bug
The node fails to follow expected behavior.
I10-unconfirmed
Issue might be valid, but it's not yet known.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
We cannot properly benchmark
pallet_bounties
in the LAOS runtime, as all the following benchmarks fail:Upon investigation, we believe this issue may affect all runtimes where the existential deposit is set to 0, as is our case. This issue in LAOS outlines the root cause of this behavior, but I’ve included the relevant details below for easier tracking.
Concretely, this function is used in benchmarks to fund the treasury account.
If
ED
is 0, so isT::Currency::minimum_balance()
, resulting in the treasury's balance being initialized to 0 before benchmarks that require treasury funding.As a result, there is no budget available for bounties in the benchmark suite. Consequently, these lines remain unreachable, preventing bounties from getting the Funded status. While not all the failing benchmarks depend directly on the Funded status, they do rely on a flow where the bounty has successfully progressed through that stage, hence the failure.
Steps to reproduce
Set a runtime using
pallet_treasury
+pallet_bounties
asSpendFunds
where the existential deposit is 0 and try to benchmarkpallet_bounties
. LAOS is affected by this issue, so it may be used as reference as wellThe text was updated successfully, but these errors were encountered: