Can a Transaction Be Partially Executed and Still Consume Gas?
Yes, a transaction that fails (e.g. due to running out of gas or a contract revert) is considered partially executed and still consumes gas. The gas consumed up to the point of failure is paid to the miner or validator for the computational work performed, even though the state changes are reverted.