4

I've been having the problem of transactions not being imported at the same block in a local network. When submitting one transaction from three nodes in a local network at the same time, those transactions only get imported across three blocks. I've ensured that the transactions have not excluded the transaction pool limits, yet at each block, only one transaction gets imported.

A more detailed description of the scenario:

  1. Launch a local network of three nodes with offchain workers that submit an unsigned transaction with maximum priority and different provides tags at each block
  2. One transaction gets taken from the ready pool, other two txs get pruned & revalidated (even though the network is idling)
  3. On the next block, two transactions from the next node get imported, the other four (two from the previous block, two from this block) stay in the pool, get revalidated
  4. Repeat

Could it be an issue of Aura (all three nodes are validators), an issue of priority, an issue of unsigned transactions, or something else? Are there any restrictions on how many transactions (given that they satisfy the limits) can be imported in a block? Thanks!

2
  • Are you getting any InvalidTransaction::ExhaustsResources, or InvalidTransaction::Stale or similar in your logs?
    – Bruno
    Jul 19, 2022 at 23:51
  • Nope, I'm not getting those errors. It seems that those transactions undergo a normal process of revalidation - they are pruned from the block & then reprocessed in the next block (one by one). Jul 20, 2022 at 7:35

1 Answer 1

3

The solution was much simpler than I imagined. In my ValidateUnsigned, I added a check to restrict the transactions from TransactionSource::External, and completely forgot that the transactions that are gossiped get the External transaction source. The solution was to enable debug logs for sc_service, see the error and remove that check.

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.