I need to execute some list of signed extrinsics in order, but because of the randomness that can exist in the transaction pool I have no way to actually ensure that they will execute in the proper order, another option would be to wait until one is included in a block and then send the next one, but this takes way to much time.
Is there a way to create a pallet extrinsic that has a batch of already signed extrinsics for a different pallet. And then have this batched extrinsic dispatch the list of signed extrinsics to the proper pallet all inside the execution of the batched extrinsic?
This would ensure the order of execution of this signed transactions. What would be the best approach for this??
Some_Pallet
to store all extrinsics (ordered by an index). Once that storage hits a target length your pallet goes ahead and execute all extrinsics (or you can create another extrinsic to do that), something like what thepallet-scheduler
does. Another approach would be adding timestamp to the equation here, but then you'd need to tweak the transaction pool logic.