Skip to content

Add IS_STATIC opcode#2975

Merged
MicahZoltu merged 1 commit into
masterfrom
vbuterin-patch-2
Sep 13, 2020
Merged

Add IS_STATIC opcode#2975
MicahZoltu merged 1 commit into
masterfrom
vbuterin-patch-2

Conversation

@vbuterin

Copy link
Copy Markdown
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 thread EIPS/eip-2970.md
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
Copy Markdown

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
Copy Markdown
Member

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.

@MicahZoltu MicahZoltu Sep 23, 2020

Copy link
Copy Markdown

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
Copy Markdown
Member

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.

3 participants