-
Notifications
You must be signed in to change notification settings - Fork 436
Investigate where we enforce the call stack limit #1119
Copy link
Copy link
Open
Labels
A-spec-specsArea: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)C-featCategory: an improvement or new featureCategory: an improvement or new featureE-easyExperience: easy, good for newcomersExperience: easy, good for newcomersP-highstaleThe Issue/PR has not had any activity for 60 days. PRs will be automatically closed.The Issue/PR has not had any activity for 60 days. PRs will be automatically closed.
Milestone
Description
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
| if evm.message.depth + Uint(1) > STACK_DEPTH_LIMIT: | |
| evm.gas_left += gas | |
| push(evm.stack, U256(0)) | |
| return |
And later:
execution-specs/src/ethereum/cancun/vm/interpreter.py
Lines 227 to 228 in 6e65228
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-spec-specsArea: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)C-featCategory: an improvement or new featureCategory: an improvement or new featureE-easyExperience: easy, good for newcomersExperience: easy, good for newcomersP-highstaleThe Issue/PR has not had any activity for 60 days. PRs will be automatically closed.The Issue/PR has not had any activity for 60 days. PRs will be automatically closed.