Reading the documentation about off-chain workers in Substrate recipes, it is stated that we can generally make three types of transactions to include non-deterministic data from outside the chain into the blockchain. The three types being:
- Signed transactions
- Unsigned transactions
- Unsigned transactions with signed payload
The common feature between the 1st and the 3rd type is that in both cases we can know the identity of the signer. The difference mentioned in the documentation is that the signer will need to pay a fee for the 1st type, but not for the 3rd type.
It is also stated that for the 3rd type we need extra validation logic in order to mitigate any kind of attack on our chain since there are no fees. From my understanding of how signed transactions work is that you can also allow signed transactions with 0 fees using the Pays::No
option as answered here. You can also put more validation logic in this case as well for protecting your chain from any form of attacks.
So my question is, in both cases if we can achieve the same desired result that is knowing the caller, no fees, validation logic, is there still a difference b/w the two types of transactions? Is there a way of knowing which type to use when?