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

Add IS_STATIC opcode #2975

Merged
merged 1 commit into from Sep 13, 2020
Merged

Add IS_STATIC opcode #2975

merged 1 commit into from Sep 13, 2020

Conversation

vbuterin
Copy link
Contributor

Add a IS_STATIC (0x4A) opcode that pushes 1 if the current context is static (ie. the execution is in a STATICCALL or a descendant thereof, so state-changing operations are not possible), and 0 if it is not.

Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.
Comment on lines +12 to +16
## Simple Summary

Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.

## Abstract
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Simple Summary
Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.
## Abstract
## Simple Summary
Adds an opcode to detect if the current call context is limited to read-only operations.
## Abstract
Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.

The current simple summary feels more like an abstract due to the level of detail it goes into and how it basically mirrors the specification.

Copy link
Contributor

Choose a reason for hiding this comment

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

It simply does not make sense to have both.

Copy link
Contributor

Choose a reason for hiding this comment

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

The purpose of the simple summary is to give a one sentence overview of what this EIP is. You can imagine it showing up in some places as a sub-title or inline description. Think "email subject line". Abstract's purpose is to describe the specification in human readable terms, with perhaps some of the minor details and edge cases left out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great explanation, thank.

@MicahZoltu MicahZoltu merged commit 306eec6 into master Sep 13, 2020
@MicahZoltu MicahZoltu deleted the vbuterin-patch-2 branch September 13, 2020 06:21
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
Add a `IS_STATIC (0x4A)` opcode that pushes `1` if the current context is static (ie. the execution is in a `STATICCALL` or a descendant thereof, so state-changing operations are not possible), and `0` if it is not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants