I understand that a smart contract can be complied into an EVM bytecode and deployed on the blockchain in a block having a specified height and a transaction hash. But when the state of the block changes, how does the blockchain record this change, when a transaction has been issued to interact with that smart contract to change its state (e.g. the value of a variable)?