-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Eip 214: new STATICCALL opcode #922
Conversation
…make future modifications less error prone
@@ -137,4 +137,9 @@ String validateTransactionChanges(BlockStore blockStore, Block curBlock, Transac | |||
* EIP211: https://github.com/ethereum/EIPs/pull/211 | |||
*/ | |||
boolean eip211(); | |||
|
|||
/** | |||
* EIP211: https://github.com/ethereum/EIPs/pull/214 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls, fix typo in EIP number
Call, | ||
|
||
/** | ||
* Indicates that the opcode has value parameter (3rd on stack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like description does not relate to flag semantics, doesn't it?
@@ -974,6 +980,7 @@ else if (oldValue != null && newValue.isZero()) { | |||
case LOG3: | |||
case LOG4: { | |||
|
|||
if (program.isStaticCall()) throw new Program.StaticCallModificationException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOG0
is not affected by the spec, thus, it should be excepted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already affected: https://github.com/ethereum/EIPs/pull/214/files
@@ -687,7 +707,32 @@ public int asInt() { | |||
} | |||
} | |||
|
|||
; | |||
public enum CallFlags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe defined a method for each flag check in OpCode
? Just to replace op.getCallFlags().contains(CallFlags.Stateless)
with something like op.isStateless()
and increase code readability
@@ -1288,6 +1302,10 @@ else if (oldValue != null && newValue.isZero()) { | |||
} | |||
} | |||
|
|||
private void checkStatic(Program program) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed that one. This method is not used. do we need to keep it?
Relates to #923 |
Implementation of ethereum/EIPs#214