8000 chore: Remove unused code by roninjin10 · Pull Request #1789 · evmts/tevm-monorepo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: Remove unused code #1789

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

Merged
merged 2 commits into from
Jun 7, 2025
Merged

chore: Remove unused code #1789

merged 2 commits into from
Jun 7, 2025

Conversation

roninjin10
Copy link
Collaborator
@roninjin10 roninjin10 commented Jun 7, 2025

Description

Removed individual operation module files in favor of a more centralized approach. This refactoring eliminates the separate files for different operation categories (arithmetic, bitwise, block, comparison, control, crypto, environment, log, memory, misc, stack, storage, system) while maintaining the core Operation type in the package exports.

This change simplifies the codebase structure by consolidating operation definitions, making the code more maintainable and reducing file count. The functionality remains intact as the actual opcode implementations are still available through the opcodes package.

Testing

The changes are structural only and don't affect functionality. All existing tests should continue to pass as the actual operation implementations remain unchanged, only their organization has been modified.

Additional Information

Your ENS/address:

Summary by CodeRabbit

  • Refactor
    • Removed all Ethereum Virtual Machine (EVM) operation modules, including arithmetic, bitwise, block, comparison, control flow, cryptographic, environment, log, memory, miscellaneous, stack, storage, and system operations.
    • Centralized the export to only include the base operation type, with no individual EVM operation exports.

End-users will no longer have access to predefined EVM operation modules or their related functionality.

Copy link
vercel bot commented Jun 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tevm-monorepo-app ✅ Ready (Inspect) Visit Preview Jun 7, 2025 4:59am
2 Skipped Deployments
Name Status Preview Updated (UTC)
tevm-monorepo-tevm ⬜️ Ignored (Inspect) Jun 7, 2025 4:59am
node ⬜️ Skipped (Inspect) Jun 7, 2025 4:59am

@vercel vercel bot temporarily deployed to Preview – node June 7, 2025 04:45 Inactive
Copy link
changeset-bot bot commented Jun 7, 2025

⚠️ No Changeset found

Latest commit: b93242a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor
coderabbitai bot commented Jun 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

All EVM operation modules under src/evm/operations/ have been deleted, including arithmetic, bitwise, block, comparison, control, crypto, environment, log, memory, misc, stack, storage, and system operations. The central package.zig file now only exports the Operation type, removing all grouped re-exports and documentation.

Changes

File(s) Change Summary
src/evm/operations/arithmetic.zig
bitwise.zig
block.zig
comparison.zig
control.zig
crypto.zig
environment.zig
log.zig
memory.zig
misc.zig
stack.zig
storage.zig
system.zig
Deleted all EVM operation modules, removing definitions of arithmetic, bitwise, block, comparison, control, crypto, environment, log, memory, misc, stack, storage, and system operations.
src/evm/operations/package.zig Removed all submodule re-exports and documentation; now only exports the Operation type.

Sequence Diagram(s)

sequenceDiagram
    participant Interpreter
    participant opcodes.zig

    Interpreter->>opcodes.zig: Execute(opcode)
    opcodes.zig-->>Interpreter: Result (handles all opcode logic centrally)
Loading

Possibly related PRs

  • evmts/tevm-monorepo#1677: Refactors opcode execution into a centralized opcodes.zig module, aligning with this PR's removal of individual operation modules.
  • evmts/tevm-monorepo#1774: Implements a comprehensive EVM jump table and opcode execution framework, corresponding directly to the modules removed in this PR.
  • evmts/tevm-monorepo#1707: Removes legacy EVM implementation files including opcode modules and frame-related code, related to this PR's removal of old EVM operation modules.

Poem

The bunnies have swept the fields so clean,
No more modules in sight, not a single routine!
Arithmetic, storage, and stack all hop away,
Centralized opcodes now rule the day.
With a twitch of the nose and a flick of the ear,
The codebase is lighter—spring cleaning is here!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dec8a4c and b93242a.

📒 Files selected for processing (20)
  • src/evm/evm.zig (1 hunks)
  • src/evm/jump_table.zig (4 hunks)
  • src/evm/opcodes/arithmetic.zig (1 hunks)
  • src/evm/opcodes/bitwise.zig (1 hunks)
  • src/evm/opcodes/block.zig (1 hunks)
  • src/evm/opcodes/comparison.zig (1 hunks)
  • src/evm/opcodes/control.zig (1 hunks)
  • src/evm/opcodes/crypto.zig (1 hunks)
  • src/evm/opcodes/environment.zig (1 hunks)
  • src/evm/opcodes/log.zig (1 hunks)
  • src/evm/opcodes/memory.zig (1 hunks)
  • src/evm/opcodes/package.zig (1 hunks)
  • src/evm/opcodes/stack.zig (1 hunks)
  • src/evm/opcodes/storage.zig (1 hunks)
  • src/evm/opcodes/system.zig (1 hunks)
  • src/evm/operation.zig (2 hunks)
  • src/evm/operation_specs.zig (1 hunks)
  • src/evm/operations/package.zig (0 hunks)
  • src/evm/stack_validation.zig (1 hunks)
  • src/evm/vm.zig (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@roninjin10 roninjin10 marked this pull request as ready for review June 7, 2025 04:45
@vercel vercel bot temporarily deployed to Preview – node June 7, 2025 04:51 Inactive
@roninjin10 roninjin10 merged commit 7ec41d1 into main Jun 7, 2025
7 of 9 checks passed
@roninjin10 roninjin10 deleted the 06-06-chore_remove_unused_code branch June 7, 2025 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0