I am trying to understand how errors, specially custom-errors, are being handled when Ethereum transactions are reverted.
From what I know, both successful and reverted transactions are mined into the blocks, and both also emit transaction receipts which are stored forever on the blockchain. These reverted transaction receipts don't store any information associated with the failure reason.
How does Etherscan, or the other block explorers, deduce the revert reason?
Do they simulate the transactions using a node, e.g.,