-
Notifications
You must be signed in to change notification settings - Fork 898
imp(core/vm): custom opcodes definition #2837
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
Conversation
WalkthroughThe changes introduce enhancements to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EVMInterpreter
participant EVM
participant Memory
User->>EVMInterpreter: Call EVM()
EVMInterpreter->>EVM: Retrieve EVM instance
EVMInterpreter->>User: Return EVM instance
User->>EVMInterpreter: Call Config()
EVMInterpreter->>User: Return Config settings
User->>EVMInterpreter: Call ReadOnly()
EVMInterpreter->>User: Return read-only status
User->>EVMInterpreter: Call ReturnData()
EVMInterpreter->>User: Return last CALL return data
User->>EVMInterpreter: Call SetReturnData(data)
EVMInterpreter->>User: Set return data for next operations
User->>Memory: Call GasCost(newMemSize)
Memory->>User: Return gas cost for memory expansion
Tip New featuresWalkthrough comment now includes:
Notes:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- CHANGELOG.md (2 hunks)
- x/evm/core/vm/common.go (1 hunks)
- x/evm/core/vm/interface.go (1 hunks)
- x/evm/core/vm/interpreter.go (1 hunks)
- x/evm/core/vm/memory.go (1 hunks)
Additional context used
Markdownlint
CHANGELOG.md
49-49: Expected: 120; Actual: 136
Line length(MD013, line-length)
Additional comments not posted (6)
x/evm/core/vm/interpreter.go (5)
97-100
: Review: MethodEVM()
inEVMInterpreter
The
EVM()
method correctly returns theEVM
instance associated with the interpreter. This method is straightforward and appears to be implemented correctly, providing essential access to the EVM instance for further operations.
102-105
: Review: MethodConfig()
inEVMInterpreter
The
Config()
method properly returns the configuration of the interpreter. This method is crucial for accessing the configuration settings, which might be needed for various operations and checks within the EVM context.
107-110
: Review: MethodReadOnly()
inEVMInterpreter
The
ReadOnly()
method effectively checks if the interpreter is in read-only mode. This is important for ensuring that no state-modifying operations are performed when the interpreter is expected to operate in a read-only state.
112-115
: Review: MethodReturnData()
inEVMInterpreter
The
ReturnData()
method retrieves the return data from the last executed CALL. This functionality is essential for operations that need to reuse or inspect the return data from previous calls.
117-120
: Review: MethodSetReturnData(data []byte)
inEVMInterpreter
The
SetReturnData(data []byte)
method allows setting the return data for the last CALL. This method is crucial for scenarios where the return data needs to be manipulated or set based on custom logic within the EVM operations.CHANGELOG.md (1)
49-49
: Ensure accurate and concise changelog entry for custom Opcodes.The changelog entry at line 49 introduces support for custom Opcodes in the
Interpreter
interface and its public functions. This is a significant change as it enhances the flexibility and functionality of the EVM within the Evmos project. It's crucial to ensure that this entry is clear, concise, and accurately reflects the changes made. The entry should also include any potential impacts or benefits this change brings to the users or developers of the system.Tools
Markdownlint
49-49: Expected: 120; Actual: 136
Line length(MD013, line-length)
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.
LGTM! Great work @fedekunze!
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.
LGTM!
https://github.com/Mergifyio backport rama/release-v20 |
✅ Backports have been created
|
* imp(core/vm): custom opcodes definition * changelog (cherry picked from commit 2ffe83e)
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.
I have...
Unreleased
section inCHANGELOG.md
Summary by CodeRabbit
New Features
Bug Fixes