Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate where we enforce the call stack limit #1119

Open
SamWilsn opened this issue Feb 11, 2025 · 0 comments
Open

Investigate where we enforce the call stack limit #1119

SamWilsn opened this issue Feb 11, 2025 · 0 comments
Assignees
Labels
A-spec Area: specification C-enhance Category: a request for an improvement E-easy Experience: easy, good for newcomers P-high

Comments

@SamWilsn
Copy link
Contributor

SamWilsn commented Feb 11, 2025

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.

@SamWilsn SamWilsn added this to the Post-Prague Re-factoring milestone Feb 11, 2025
@SamWilsn SamWilsn self-assigned this Feb 11, 2025
@SamWilsn SamWilsn added A-spec Area: specification C-enhance Category: a request for an improvement E-easy Experience: easy, good for newcomers labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spec Area: specification C-enhance Category: a request for an improvement E-easy Experience: easy, good for newcomers P-high
Projects
None yet
Development

No branches or pull requests

1 participant