Transaction spanning multiple blocks

Hello, and thank you for all the effort you put into the Rosetta API project!

We are wondering if a scenario with transactions spanning multiple blocks (that do not have all their balance-changing operations in a single block) is in the spirit of the Rosetta API.

Example A:

Block 42:
   Transaction 0xABBA
       Operation 1: -50 tokens for Alice, as Transfer
       Operation 2: -1 token for Alice, as Fee

Block 43:
    Transaction 0xABBA
        Operation 3: +50 tokens for Bob, as Transfer

Example B:

Block 52:
    Transaction 0xFADE
        Operation 1: -100 tokens for Alice, as Smart Contract call
        Operation 2: -3 tokens for Alice, as Fee

Block 53:
    Transaction 0xFADE
        Operation 3: +100 tokens for FooContract

Block 54:
    Transaction 0xFADE
        Operation 4: +1 tokens for Alice, as FeeRefund

Is this way of splitting the balance-changing operations acceptable for a Rosetta API implementation?

Thank you!

:wave: @Andrei!

We’ve seen a few blockchains run into this problem (usually when there is a transaction that spans multiple blocks across different shards). In your blockchain, does it make sense to somehow connect transactions across multiple blocks using info in Transaction.Metadata (just brainstorming)?

The model you’ve laid out here makes sense to me as long as a transaction execution failure in a later block does not somehow invalidate operations in earlier blocks. Maybe you can elaborate on this failure case?

On another note, the existing automated Construction API testing tooling (i.e. check:construction) would probably error as soon as it saw the first transaction hash matching the broadcast (which wouldn’t necessarily contain all the expected ops). But this is more of a shortcoming of the tool and unrelated to the modeling.