-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Unsigned transactions not validated during Executive::apply_extrinsic
#3091
Comments
Not sure how this can be confirmed but:
either way: if a transaction can avoid going through (on a minor note that it would great if we document when executive calls are made by the client; tracking them due to api gluing with [pre/post]fixes is a bit hard and can cause such issues.) |
Every transaction that goes into the pool indeed goes through |
Okay then re-thinking out-load here: Every inherent need to be submitted (for the first time) to some node and that node will for sure run it through Unless if since we are explicitly talking about inherent then it is not needed? I don't know the detailed definition of an inherent and what level of security/trust it should carry. |
I keep coming back to this question: what should go through
I can come up with some arguments myself and convince myself that the above, which is based on the code, is correct, but would be nice if we can discuss:
Finally, also looking at #3102 (cc @gavofyork) I see that
|
Seems about right.
Indeed
The pool can re-validate transactions at any point in time and drop the ones that became stale or are no longer valid (due to balance or nonce change). Block production and block execution does not call |
@tomusdrw this needs re-visiting with the new transaction The issue of not using |
It is confirmed, unless someone proves to me that |
It seems that while you can't propagate incorrect unsigned transaction cause it won't be accepted to the pool you can still craft a block with bullshit and it's going to be processed just fine.
We should add a call to
validate_unsigned
in case we detect the extrinsic is unsigned transaction inapply_extrinsic
and check that it returnsTransactionValidity::Valid
.Alternatively the
UnsignedValidator
should have two different methods, where one is called duringvalidate_transaction
and second duringapply_extrinsic
phase. For convenience we can have a default implementation for the latter to just check forTransactionValidity::Valid
.The text was updated successfully, but these errors were encountered: