I'm trying to understand exactly how gas works. Wondering if it charges based on actual individual CPU instructions (like Assembly-level x86 instruction set architecture level of detail), or if it charges at a higher level such as individual functions or something like that.
The reason I ask is because if it tracked individual instructions to charge for gas, then that tracking is itself an instruction, so it would lead to an infinite recursion of charging. To prevent that, some level of "meta" instructions would need to be ignored. So I'm wondering what level of stuff is ignored, and what is charged, and how it gets charged.