Skip to content

EIP-3855: PUSH0 instruction #145

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

OlivierBBB
Copy link
Collaborator

No description provided.

@OlivierBBB OlivierBBB added hardfork shanghai EIP's for the Shanghai hardfork London to Prague London to Pectra arithmetization labels Apr 2, 2025
@OlivierBBB OlivierBBB added this to the London to Prague milestone Apr 2, 2025
@OlivierBBB OlivierBBB self-assigned this Apr 2, 2025
Copy link

cla-assistant bot commented Apr 2, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
Copy link

cla-assistant bot commented Apr 2, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@OlivierBBB OlivierBBB changed the title Arithmetization: EIP-3855: PUSH0 instruction EIP-3855 Arithmetization: PUSH0 instruction Apr 2, 2025
@OlivierBBB OlivierBBB linked an issue Apr 2, 2025 that may be closed by this pull request
4 tasks
Copy link
Contributor

@lorenzogentile404 lorenzogentile404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

\saNote{}
Implicitly of course $\cmc_{i} \cdot \peekContext_{i + 1} = \cmc_{i}$ (\trash);
\item[\underline{Setting the gas cost:}]
we impose that $\gasCost_{i} = \decStaticGas_{i}$;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do you manage the fact that cost of PUSH0 is 2, while the one of PUSH1-32 is 3? Other than that, LGTM.

Copy link
Collaborator Author

@OlivierBBB OlivierBBB Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static gas is obtained via lookup to the instruction decoder. It is enough that the instruction decoder know the gas cost of PUSH0.

Copy link
Contributor

@letypequividelespoubelles letypequividelespoubelles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@letypequividelespoubelles
Copy link
Contributor

letypequividelespoubelles commented Apr 3, 2025

@OlivierBBB I would add comment in the ROM module that PUSH0is treated differently, and is not a subcase of IS_PUSH_INST as it doesn't raise the PUSH flag in inst decoder. Other than that, LGTM

@OlivierBBB
Copy link
Collaborator Author

I'll add that @letypequividelespoubelles

@OlivierBBB
Copy link
Collaborator Author

I addressed #145 (comment) @letypequividelespoubelles

@OlivierBBB OlivierBBB mentioned this pull request Apr 7, 2025
4 tasks
@OlivierBBB OlivierBBB changed the title EIP-3855 Arithmetization: PUSH0 instruction EIP-3855: PUSH0 instruction Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arithmetization hardfork shanghai EIP's for the Shanghai hardfork London to Prague London to Pectra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EIP-3855: PUSH0 instruction
3 participants