pontem-network / pontem

🚀 Pontem Parachain node with Move VM onboard.
https://pontem.network
Apache License 2.0
77 stars 43 forks source link

Move VM pallet extrinsics should also take additional weight itself #117

Closed borispovod closed 2 years ago

borispovod commented 2 years ago

We should add additional weight to sp-mvm pallet extrinsics. As we also spend CPU and Memory to initialize VM, etc.

For example, currently extrinsic execute uses dynamic weight only but there's should be a sum of this and sum constant value. That constant value should used as default, if transaction fails for example.

The value of the constant should be empirically chosen for each extrinsic and as starting point it means default 10000. Use runtime-benchmarking for this. Also there's some possibly useful tools: weight-meter and weight-gen.

Also, do not burn fees as it happens now. Move it to treasury.