Open xlc opened 4 years ago
Thanks, I will look into it 👍
Batch is bit complicated, we may want a partial refund?
Too bad Acala Foundation on Kusama / Polkadot cannot enjoy https://github.com/paritytech/substrate/pull/7661 because our account is multisig / proxy.
Same for Polkascan Foundation's multisig account on Kusama. 😃
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
This feature would actually be quite important when using multisig for the sudo account. A single runtime upgrade executed through the sudo account using pallet-multisig could cost about 5-20 units of native tokens (considering a typical parachain configuration).
This number originates from the dominating term of the formula for transaction fees. This term is LengthToFee
applied to the length of the extrinsic. Most (Polkadot) parachains define LengthToFee
to just be the multiplier 1 unit/100_000. The length of an extrinsic for a runtime upgrade is about the size of the runtime and that is around 1MByte.
See my comment in the PR above:
Unfortunately, I don't think it can be trivially added here.
There is some sensibility to bubbling up "no fee payment" when calling batch or derivative or other utility calls, but I worry that this can become an attack vector.
For example imagine I do:
batch(batch(batch(batch(batch...(free_call)...)))))
I can basically do this arbitrarily to take the whole block, and pay no fee because the bottom call pays no fee, and each batch would bubble up that no fee was paid.
I think best to avoid anything like this for now.
I did not look at the pallet-proxy but at least for the pallet-multisig I would propose not to make the transaction entirely feeless but charge a small fair fee that reflects the space and computation time usage for wrapping the execution. So that for example the PostDispatchInfo
returned by the wrapped call would be transformed into the following PostDispatchInfo
of the operate
extrinsic of pallet-multisig:
{ actual_weight: inner_weight, pays_fees: Yes}
=> { actual_weight: inner_weight + as_multi_complete(...), pays_fees: Yes}
{ actual_weight: _, pays_fees: No}
=> { actual_weight: as_multi_complete(...), pays_fees: Yes}
With #6749, it is possible to mark a success transaction execution to be free. However this is not respected by proxy and multisig.
I think we will want to make proxy/multisig call free if the underlying tx call is free?
cc @shawntabrizi