Consider two transactions, A and B. A is valid given the state of the blockchain as of the last block. B is currently invalid, but becomes valid once A takes effect. A and B are from the same caller and their nonces are sequential - eg A has nonce 4 and B has nonce 5.
For examples of this, consider two smart contract calls where B depends on the effects of A to function.
My understanding is that if both transactions end up on the same block, this block will be valid, because when tx B is processed , tx A will already have happened.
My question is - in practice (ie with current miner implementations) - will both transactions be included on the same block? Assume the gas price is high on both.
I could see it both ways - a miner might not include transactions that are invalid as of the state of the last block. But I could also see them trying to include them all, and the nonces give a hint as to the ordering and validity.