The merkle root is computed from the transaction ids.
Not just transaction ids, all of the parameters below
Coinbase1
ExtraNonce
ExtraNonce2
Coinbase2
Transaction Ids[]
ref:
https://github.com/m0mchil/poclbm/blob/2ae15b77df1d17d2ec2748673ba2e8e0a01891c5/StratumSource.pyj.extranonce2 = self.increment_nonce(j.extranonce2)
coinbase = j.coinbase1 + self.extranonce + j.extranonce2 + j.coinbase2
merkle_root = sha256(sha256(unhexlify(coinbase)).digest()).digest()
for hash_ in j.merkle_branch:
merkle_root = sha256(sha256(merkle_root + unhexlify(hash_)).digest()).digest()
merkle_root_reversed = ''
for word in chunks(merkle_root, 4):
merkle_root_reversed += word[::-1]
merkle_root = hexlify(merkle_root_reversed)