forked from vyperlang/vyper
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[WIP] Implementation of EOF static relative jumps and functions #1
Draft
harkal
wants to merge
82
commits into
master
Choose a base branch
from
feature/eof-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
24bb63a
add RJUMP and RJUMPI instructions and create a new EVM version to rep…
harkal ce4b8ba
get_opcode() utility function to get the opcode for a mnemonic
harkal 6105ac6
implement RJUMP
harkal 646c5be
properly output RJUMP enabled opcode formating
harkal 708e2ae
refactor symbol to be before RJUMP for consistency
harkal f107f98
if supported emmit RJUMPI
harkal a825150
fix pc progression for RJUMP RJUMPI
harkal 0ee6d69
emit RJUMP for if and repeat
harkal 7e60551
assert for very lange offsets
harkal 1bae653
enable RJUMP ineffiecient optimization
harkal 54a2da0
update evm version and proper checking
harkal 9d13915
add CALLF, RETF, JUMPF definitions
harkal a42ef86
fix tests
harkal ca268d2
rename EOF evm version to shanghai
harkal 4c66254
add RJUMPV
harkal d4febb0
add output for new opcodes
harkal 67b2c03
add CALLF emission and JUMPF CALLF handling
harkal 66202cc
add validate_eof.py cli util
harkal 9c39727
update EOFv1 validation script
harkal bb37644
track proper size
harkal fa5df33
validate code
harkal bbaa63e
EOFv1 enabled emits retf
harkal c703e20
refactor EOF_ENABLED to EOFv1_ENABLED
harkal 190261d
generate callf
harkal e4ec072
disable return rewrites and only handle gotos that are not simple jumps
harkal 3314262
skip JUMPDESTs when EOFv1
harkal 930b8ca
exit_to wip
harkal 7af3215
goto wip
harkal 540c764
fix ident
harkal 4911ab9
eofv1 header output wip
harkal 78d4c87
file should be handled higher
harkal 8ad038d
eof handling code
harkal 40641a8
function to get opcode's immediate size
harkal 282af9d
eof reader class
harkal 18c17c4
fix naming
harkal c2cfe42
validator
harkal bc86be0
create reverse mapping from opcode to mnemonic
harkal 2b8bea9
read code sections and validate wip
harkal f335a7c
use class members
harkal 742b19e
update cli verification tool to use vyper
harkal 8114b8a
remove size
harkal caca9b3
use eof constants
harkal 6ec3d51
remove double size
harkal e50a8d5
remove JUMPF and PC for eof
harkal 949ea14
convert callf offsets to function ids
harkal 9a4da0a
compute and emit code section sizes
harkal 951d8cc
update type section
harkal aa0f24b
disable code validation for now
harkal 92964fb
emit types
harkal e04ac07
wip
harkal 8e293f0
remove decorateEOFHeader
harkal 69e10da
append headers at bytecode start for deploy and runtime
harkal 0fd53d1
proper size for deploy code
harkal 9abb708
handle consecutive eofv1 containers
harkal d3ce4a6
eofv1 disassemble debuging support
harkal 282a88f
temp
harkal 3feaba2
print separators
harkal 09e7237
remove unused return value
harkal 75660a9
output update
harkal f5c34c1
fix return opcodes
harkal 8f133dd
convert revert jump to function call
harkal 1af9d01
enable code validation
harkal fb431f6
add ending new lines
harkal b0050fd
runnable
harkal e9b11c7
properly order functions breaks
harkal af1f1f6
fix revert call
harkal 1817f42
remove return pc from stack
harkal fb2d62d
pop arg buffer address on retf
harkal 2f77eac
outout 1 input for all functions exept main
harkal 4332d3f
refactoring, add eof enable parameter, proper output
harkal 1c30bc5
default to paris
harkal e46ce90
add in old parameter for tests
harkal 61202e3
fix legacy case
harkal b08330b
update readme
harkal 511df2b
more detail in the exception
harkal 51ce2d8
assert push size gt 0
harkal 5ee0a46
update shanghai to cancun
harkal 63ccde9
shanghai -> cancun
harkal e7f0671
get opcode metadata helper
harkal ee1a62a
calculate_max_stack_height() implementation
harkal a96f172
append proper max stack heights to eof header
harkal 6935351
leftout import
harkal 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
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 |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
"berlin": 3, | ||
"paris": 4, | ||
"shanghai": 5, | ||
"cancun": 6, | ||
|
||
# ETC Forks | ||
"atlantis": 0, | ||
|
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.
shanghai
is not needed anymore I think, as we are introducing it in this PR.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.
What is the proper way to handle this here? Should I skip shanghai completely? I was worried it might cause problems somewhere else. For example the --evm-version parameter will not accept it anymore (not that it changes anything). If other forks are missing I guess it's totally ok to remove it.
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.
@charles-cooper I think mentioned it's fine if we don't have all forks defined here.