-
Notifications
You must be signed in to change notification settings - Fork 790
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
Fix homestead [WIP] #125
Merged
Merged
Fix homestead [WIP] #125
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e592ce4
fix bug when a zero-value call creates a new account (homestead)
cdetrio b83a928
signextend removes two stack items
cdetrio 9edd6eb
fix for stack overflow tests
cdetrio 49f6301
fix SIGNEXTEND
cdetrio a90b936
fix when CALL should OOG before executing
cdetrio 9e9cc01
yet another SIGNEXTEND fix
cdetrio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
exports.ERROR = { | ||
OUT_OF_GAS: 'out of gas', | ||
STACK_UNDERFLOW: 'stack underflow', | ||
STACK_OVERFLOW: 'stack overflow', | ||
INVALID_JUMP: 'invalid JUMP', | ||
INVALID_OPCODE: 'invalid opcode' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ const codes = { | |
0x08: ['ADDMOD', 8, 3, 1, false], | ||
0x09: ['MULMOD', 8, 3, 1, false], | ||
0x0a: ['EXP', 10, 2, 1, false], | ||
0x0b: ['SIGNEXTEND', 5, 1, 1, false], | ||
0x0b: ['SIGNEXTEND', 5, 2, 1, false], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you review the rest of the opcodes? Others might have bugs :) |
||
|
||
// 0x10 range - bit ops | ||
0x10: ['LT', 3, 2, 1, false], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Shouldn't this be within a
if (homestead)
check?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.
I think the rule that a 0-value call creates a new account (and pays the new account gas fee) was there in frontier.
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.
Right, the commit log was a bit misleading. It fixes a bug when there wasn't sufficient gas left.