implement quotas and refund transaction fees
This MR implements a way to link an account to an identity in order to use identity's quotas of free transactions to refund fees in on_idle
.
See https://forum.duniter.org/t/implementation-des-quotas/11543 for whole discussion.
TODO
-
automatically link the account of a newly created identity -
choose whether quotas should be decoupled from identity pallet -
find better names for coupling types and traits -
replace hardcoded RELOAD_RATE
andMAX_QUOTAS
by parameters -
test quotas reloading behavior (easier with parametric reload rate and max quotas) -
test hooks when identity status change -
propagate changes brought to gdev to other runtimes -
get new_owner_key and link_identity tests working (see forum) -
rebase on !182 (merged) to have well defined treasury initial value add error message when the identity is not eligible to be refunded (add 'Disabled' state ?)discuss return type of quotas functions (result or infallible)discuss ifIdtyData
should really be a runtime type
Benchmark and opti
-
rebase on !185 (merged) to get benchmarks from other pallets fixed -
use benchmark weight in estimation of batch refund -
benchmark calls(will go in separate MR) - (optimization) avoid calling treasury account_id
Documentation (to do on duniter website)
- document user calls to link / unlink identity to an account
- document global quotas behavior in a friendly manner (user doc goes to duniter.org website)
Edited by Hugo Trentesaux