It looks like we might enforce it in multiple places:
|
if evm.message.depth + Uint(1) > STACK_DEPTH_LIMIT: |
|
evm.gas_left += gas |
|
push(evm.stack, U256(0)) |
|
return |
And later:
|
if message.depth > STACK_DEPTH_LIMIT: |
|
raise StackDepthLimitError("Stack depth limit reached") |
One of these (interpreter.py) might be better suited as an assertion to catch bugs.
It looks like we might enforce it in multiple places:
execution-specs/src/ethereum/cancun/vm/instructions/system.py
Lines 292 to 295 in 6e65228
And later:
execution-specs/src/ethereum/cancun/vm/interpreter.py
Lines 227 to 228 in 6e65228
One of these (
interpreter.py) might be better suited as an assertion to catch bugs.