Bitcoin
Can a committed and public transaction be in the same block?

By assigning a higher commission rate to the second transaction, both transactions will be treated as one “package” by a rational transaction selection algorithm and will almost certainly be mined from the same block. However, there is actually no way to prevent a miner from mining only the first transaction and not the second.