1

From ValidateUnsigned:

Note that any checks done here are only used for determining the validity of the transaction for the transaction pool. During block execution phase one need to perform the same checks anyway, since this function is not being called.

Which leads me to the question, is writing a SignedExtension any better in code than ValidateUnsigned since both provide the same pre-dispatch and tx validation checks. Maybe SignedExtension is more general but as far as I can see, for unsigned tx, they make no difference.

I also ask this because pallet-im-online uses ValidateUnsigned instead of SignedExtension and I wonder the motivation behind the choice.

4
  • 1
    Take a look at this substrate.stackexchange.com/questions/2179/…
    – AurevoirXavier
    Nov 10, 2022 at 16:10
  • funny i was just reading that lol! Nov 10, 2022 at 16:12
  • @Purple_Turtle can you please update your question to be more specific, or close it if you think the answer above answers your question.
    – Shawn Tabrizi
    Nov 12, 2022 at 21:20
  • I've updated my title and I don't believe the commented link answers my question but does provide a fantastic overview of unsigned TX handling. Nov 12, 2022 at 21:33

1 Answer 1

0

SignedExtension currently can not be used as a replacement for ValidateUnsigned. This has historical reasons, ValidateUnsigned was added before SignedExtension. There is an issue to merge both of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.