4

I am working on substrate and trying to benchmark my node. I'm sending unsigned extrinsics to the pool and implemented the ValidateUnsigned trait where I add priority, longevity, provide and require tags. The benchmark launches about 100k extrinsics, using the author_submitExtrinsic endpoint. While sending these extrinsics, I check the status of the pool by querying the author_pendingExtrinsics endpoint.

After about 14k transactions have entered the pool, the amount of extrinsics stagnates, with sometimes ~100 extra extrinsics entering. Also looking at the extrinsic data, it looks like even after 4-5 blocks, although transactions are being executed (I see extrinsics being added to blocks in the logs), it seems like no extrinsics have been removed from the pool and I start getting nonce errors (which confirmes that they have been executed but are now being reexecuted?).

What I tried so far:

  • confirming that sending a lower amount of extrinsics (10k) allows them to be processed correctly and that they are removed from the pool
  • replacing my implementation of the ValidateUnsigned yields the same result

1 Answer 1

1

So I can't be 100% sure of the issue, my guess is that my validate_unsigned logic was too heavy, causing the pool to spend too much time validating and preventing it from pruning executed transactions. Reduced the workload on the validate_unsigned and moved most of this heavy logic to pre_dispatch, might not be a perfect solution, if anyone has some better idea would love to hear it !

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.