Export api from the transaction pool to query ready transaction by tag #3705
Labels
I5-enhancement
An additional feature request.
I10-unconfirmed
Issue might be valid, but it's not yet known.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
In subspace, we have fraud proof extrinsic that are expensive to validate compared to other normal extrinsic. Fraud proof is attached with a
provide
tag and a priority so that fraud proof with the same tag and lower priority will be rejected if there is already a fraud proof with a higher priority in the transaction pool.However, this only happens after the incoming fraud proof is validated, while we know the tag and priority of a fraud proof before it is validated, we would like to use the tag to query if the transaction pool already contains another fraud proof with the same tag and higher priority, if so we can drop the incoming fraud proof directly without validating it to save some resource.
Request
Similar to the
ready_by_hash
, export an APIready_by_tag
from the transaction pool to get ready transaction by tagSolution
The required changes are also similar to the
ready_by_hash
implementation:ValidatedPool
BasePool
ReadyTransactions
Are you willing to help with this request?
Yes!
The text was updated successfully, but these errors were encountered: