I'm debugging a substrate based blockchain. I found that at each election this are logged:

...  WARN ThreadId(17) txpool: (offchain call) Error submitting a transaction t
o the pool: Pool(UnknownTransaction(UnknownTransaction::NoUnsignedValidator))    
... ERROR ThreadId(17) staking: 💸 Error in election offchain worker: OffchainE

Seems that something is missing but I can not find where should I look for the problem. If it is related to a misconfiguration or custom code is submitting invalid transaction.

If anyone saw this error before any hint will be helpful.

Thanks very much Regards

1 Answer 1


Take a look at the ocw doc's unsigned transaction part: https://docs.substrate.io/how-to-guides/v3/ocw/transactions/

Because there's no code revealed, so I can just guess you don't implement ValidateUnsigned trait for your Pallet.

The trait and implementation are all in the above doc, try it.

  • The source code is taken from substrate v3.0.0 tag (github.com/paritytech/substrate/blob/v3.0.0/frame/staking/src/…). One followup, which Pallet should implement ValidateUnsigned? the same staking pallet or the transaction is processed in other place? I understand that the offline worker is invoked Ok, but it generated a transaccion and submits it: SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call) .map_err(|_| OffchainElectionError::PoolSubmissionFailed) but I could not follow where the tx is submitted (who receives it). Thanks very much! Commented Jun 15, 2022 at 18:29
  • For Question1: After checking the usage of validate_unsigned, it's mainly used by Applyable which is used to enact a piece of extrinsic information by marshalling and dispatching to a named function call. So I believe the ValidatedUnsiged trait should be implemented in the pallet which will process that transaction. Commented Jun 16, 2022 at 2:52
  • For Question 2: submit_unsigned_transaction, track the call stack, you'll get sp_runtime::offchain::TransactionPool submit_transaction which will Submit transaction.The transaction will end up in the pool and be propagated to others.. The doc link is here: paritytech.github.io/substrate/master/sp_runtime/offchain/… Commented Jun 16, 2022 at 3:50

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.