Closed hackfisher closed 3 years ago
Inherent and Unsigned Transaction are both verified by ensure_none?
As far as I understand it, Inherent is a special unsigned transaction. Therefore, you must ensure ensure_none()
.
For inherent, you can add extra InherentData
validation by using check_inherent()
.
For general unsigned transaction, checked by validate_unsigned()
.
Does Unsigned Transaction require extra validation for those calls use ensure_none?
Sometimes it is necessary.
With extra validation examples:
No extra validation examples:
Just as the timestamp pallet from substrate, which validates the timestamp must be updated only once in the block.
Refer:
The dvm dynamic fee might be better to do the same check to avoid corner cases of including multiple such note_min_gas_price_target
, one from block producer, others might from tx pool, ordered and included by block producer by accident.
Any update? @AsceticBear
Waiting for the next DVM update
others might from tx pool, ordered and included by block producer by accident.
It is not possible to be include by block producer if it uses transaction pool
Inherent does not pass through the transaction pool, so it will not be checked out of NoUnsignedValidator by validate_unsigned, but the Unsigned Extrinsic sent by users outside the block producer will be checked out of the transaction pool and will be checked out of NoUnsignedValidator
Multiple inherent inclusion is fixing by https://github.com/darwinia-network/darwinia-common/pull/817
[x] For inherent call, the weight might need to be DispatchClass::Mandatory, refer timestamp pallet.
[x] Inherent and Unsigned Transaction are both verified by
ensure_none
? Does Unsigned Transaction require extra validation for those calls useensure_none
?