Is it possible to create chained transactions?

Does Cardano node supports processing of chained transactions?
E.g. we have an output [O1], and want to create a transaction [TX1] using [O1] as an input and creating new output [O2] and then, until [TX1] is confirmed in the network create [TX2] using [O2] as an input and creating new output [O3].

  1. Is Cardano node capable of handling this chain [TX1, TX2] properly? It has to lookup [O2] in mempool in order to verify TX2 is valid.
  2. Is it possible at all that [TX1, TX2] get into one block? Does the current block validation protocol allows that at all?
2 Likes

+1, I’m also interested in this feature

Hi!
if you wont get answer maybe also worth to submit this question on https://cardano.stackexchange.com/

1 Like

Yes, it’s possible. You can know the transaction id before you submit it. You also know the transaction indexes as it’s just the order you supplied them. I did a testnet run of this recently and was able to fully-saturate the mempool with chained transactions. You don’t see any drops because I’m adding to it immediately so it’s re-filled.
Screenshot from 2021-06-08 15-37-35

As to whether they make it into the same block, that’s not deterministic, but they do seem to stay in the proper order.

4 Likes

That’s great, thanks! BTW, what do you mean exactly by “non-deterministic”? I guess in UTXO confirmed transactions stay deterministic anyway in terms of order, inputs, outputs.

Also, do you submit transaction via PAB?