-
Notifications
You must be signed in to change notification settings - Fork 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
VM - Jump table #3116
VM - Jump table #3116
Conversation
@Jim8y could you help me to fill the rest of the opcodes, with this change we can versioning the vm in |
Already being done in #3100 |
Is not the same, this is upgradeable, we can have one jumpTable per fork |
then a bref explaination of how it work please, kinda weird to me. |
Ethereum works like that, basically, you have an array of 255 functions, each method is the logic of the opcode, this is stored in a class for example Then during the VM creation, you send the jump table that you want to use, so is easy to versioning each opcode, also, you avoid a big switch, because with the opcode, you know exactly the method that you must execute. Reference: https://github.com/ethereum/go-ethereum/blob/master/core/vm/jump_table.go |
how do we know when to use the new method when to use the old one? VM can not get access to the height |
This is handle by |
Let me refactor, because currently we need to do it without a new class, we have problems with |
@AnnaShaleva please join the dicussion here |
Close #2987