Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Benchmark drop_assets of TrappistDropAssets #113

Closed
bernardoaraujor opened this issue Jan 16, 2023 · 3 comments · Fixed by #165
Closed

Benchmark drop_assets of TrappistDropAssets #113

bernardoaraujor opened this issue Jan 16, 2023 · 3 comments · Fixed by #165
Assignees
Labels
enhancement New feature or request

Comments

@bernardoaraujor
Copy link
Contributor

follow up to #109

Motivation

drop_assets of TrappistDropAssets currently returns weight 0 to the Executor, which is innacurate.

it does a few storage checks (which are not weightless), then it calls drop_assets implementation of pallet-xcm (which is also still unbenchmarked and returns 0)
ref:

so we need to benchmark everything inside for asset in multi_assets { ... } and add that to whatever pallet-xcm's drop_assets returns.

// TODO: put real weight of execution up until this point here
let mut weight = 0;
if !trap.is_empty() {
weight += XcmPallet::drop_assets(origin, trap.into());
}

@bernardoaraujor bernardoaraujor added the enhancement New feature or request label Jan 16, 2023
@stiiifff stiiifff added this to the Trappist M1 / XCM v2 milestone Jan 25, 2023
@stiiifff
Copy link
Contributor

@pawanbisht62 Any ETA ?

@pawanbisht62
Copy link
Contributor

Hi @stiiifff, as of now I'm working on bridges-task-force. I guess I won't be able to complete this next week either.

@pawanbisht62
Copy link
Contributor

We cannot benchmark this as it is. We have to benchmark it in the pallet where TrappistDropAssets will be used.

Reason:

  1. FRAME benchmarking only works for pallets.
  2. TrappistDropAssets type is generic. So it cannot be generically benchmarked since the results depend on the concrete generic types

So can we close or hold this one for now?

cc: @stiiifff @bernardoaraujor

@stiiifff stiiifff assigned kalaninja and unassigned pawanbisht62 Apr 20, 2023
stiiifff pushed a commit that referenced this issue May 12, 2023
* [#113] Benchmark `drop_assets()` of `TrappistDropAssets`

* fix arithmetic

* rename `pallet-benchmark` to `trappist_runtime_benchmarks`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants