-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Run integrity_test
in externalities
#13726
Comments
Note: There are cases were we explicitly want to run something outside of externalities. |
I don't see any problem in using |
So you mean that reading storage in weight annotations is fine? Or how does your comment relate to mine? |
I mean reading storage for the weight needs to be done with a lot of caution to not open a DDOS door. The linked weight looks wrong as the weight should not depend on the number of digests. |
In fact in our project, we are using a storage to config the max weight.. Though you may not agree our practice that using a storage to config the weight, we are using substrate not for public using, in fact just in some corner case. So I agree this may have a hidden danger for DDOS, but I think we know what we are doing for now. Anyway, even we do not consider about the weight, I think for the |
You can always create externalities in the |
@ggwpez oh thanks, but in fact our panic appears from transaction-payment pallet 🤣🤣🤣 |
We should probably run all of then inside externalities. In the past I was concerned about unintended consequences, but it just annoyed us again in: paritytech/polkadot#6957
Since there a parameter type was configured to be
storage
instead ofconst
, so it would fail outside externalities.The text was updated successfully, but these errors were encountered: