For earlier blocks, if I hash the raw data of the first transaction in the block, I get back exactly the transaction hash. However, for recent blocks, this seems no longer work. Can someone give a reference for what's changed?
For example, for block
750480, the hash of the first transaction is
3dc939a1eab70f45e346efb20c9891bcf1ae8958d4e3b648547075ec3374029b, and running
getrawtransaction on it gives
020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff310390730b04419102632f466f756e6472792055534120506f6f6c202364726f70676f6c642f1f0790e64d4f010000000000ffffffff0247dd5a25000000001976a9145e9b23809261178723055968d134a947f47e799f88ac0000000000000000266a24aa21a9edb983f21b5f1e13865e7d52cf9f670a895b98a06b2c86f6d03a54bc2be7e4e8a70120000000000000000000000000000000000000000000000000000000000000000000000000, but hashing it we get
The BIP144 describes the new format with segwit, but there are extra stuff after the lock time that the document doesn't describe.
UPDATE: This post seems suggesting that segwit part need to be removed before hashing. So I tried hashing the part up to the lock time, but the result still doesn't match.