Skip to content

refact(ethexe): remove kv db writings in processor#5052

Merged
grishasobol merged 29 commits intomasterfrom
gsobol/ethexe/processor
Feb 5, 2026
Merged

refact(ethexe): remove kv db writings in processor#5052
grishasobol merged 29 commits intomasterfrom
gsobol/ethexe/processor

Conversation

@grishasobol
Copy link
Copy Markdown
Member

No description provided.

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Dec 23, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  ethexe/processor/src/host/api/lazy_pages.rs  62% smaller
  ethexe/compute/src/lib.rs  62% smaller
  ethexe/processor/src/host/api/sandbox.rs  61% smaller
  ethexe/processor/src/host/api/database.rs  49% smaller
  ethexe/processor/src/handling/events.rs  41% smaller
  ethexe/service/src/tests/utils/env.rs  39% smaller
  ethexe/compute/src/codes.rs  36% smaller
  ethexe/rpc/src/tests.rs  29% smaller
  ethexe/compute/src/tests.rs  29% smaller
  ethexe/processor/src/tests.rs  24% smaller
  ethexe/cli/src/params/rpc.rs  20% smaller
  ethexe/processor/src/lib.rs  19% smaller
  ethexe/processor/src/handling/overlaid.rs  19% smaller
  ethexe/runtime/common/src/transitions.rs  17% smaller
  ethexe/rpc/src/lib.rs  15% smaller
  ethexe/rpc/src/apis/program.rs  14% smaller
  ethexe/compute/src/compute.rs  12% smaller
  ethexe/db/src/database.rs  12% smaller
  ethexe/processor/src/host/mod.rs  12% smaller
  ethexe/runtime/common/src/lib.rs  12% smaller
  ethexe/runtime/common/src/journal.rs  12% smaller
  ethexe/runtime/common/src/state.rs  12% smaller
  ethexe/service/src/tests/mod.rs  9% smaller
  ethexe/processor/src/handling/mod.rs  8% smaller
  ethexe/network/src/db_sync/responses.rs  7% smaller
  ethexe/processor/src/host/api/allocator.rs  5% smaller
  Cargo.lock Unsupported file format
  ethexe/cli/src/params/node.rs  0% smaller
  ethexe/db/Cargo.toml Unsupported file format
  ethexe/ethereum/Cargo.toml Unsupported file format
  ethexe/processor/Cargo.toml Unsupported file format
  ethexe/processor/src/common.rs  0% smaller
  ethexe/processor/src/handling/run.rs Unsupported file format
  ethexe/processor/src/host/api/logging.rs  0% smaller
  ethexe/processor/src/host/api/mod.rs  0% smaller
  ethexe/processor/src/host/runtime.rs  0% smaller
  ethexe/processor/src/host/threads.rs  0% smaller
  ethexe/service/src/fast_sync.rs Unsupported file format
  ethexe/service/src/lib.rs Unsupported file format
  gsigner/src/schemes/secp256k1/signature.rs  0% smaller

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @grishasobol, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant architectural refactoring to the ethexe processor, aiming to decouple its core logic from direct database write operations. By shifting the responsibility of data persistence to the caller and introducing a CASDatabase abstraction, the changes improve modularity, testability, and maintainability of the system. The processor now focuses solely on computation and returns comprehensive data structures, allowing for more flexible integration with various storage backends.

Highlights

  • Processor Decoupling from Database Writes: The core change involves refactoring the ethexe processor to remove direct database write operations from its internal logic. Instead, the processor now returns data structures (like ProcessedCodeInfo for code processing and FinalizedBlockTransitions for program execution) that the caller is responsible for persisting to the database.
  • Introduction of CASDatabase Trait: A new CASDatabase trait has been introduced to abstract content-addressable storage interactions. The Database struct now delegates its Storage trait implementation to an internal CASDatabase instance, enhancing flexibility and testability.
  • Refactored Processor API: The Processor API has been significantly updated. process_upload_code is now process_code and returns detailed ProcessedCodeInfo. process_announce is now process_programs and accepts an ExecutableData struct, centralizing all necessary execution context.
  • Runtime Host API Updates: The WASM runtime host functions (ext_database_read_by_hash_version_1, ext_database_write_version_1) now interact with dyn CASDatabase trait objects, further abstracting the storage layer from the runtime environment.
  • RPC Configuration Simplification: The RPC layer's ProgramApi now directly receives a Processor instance and specific configuration parameters (gas_limit_multiplier, chunk_size), removing the need for a separate RunnerConfig struct.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@grishasobol grishasobol changed the title refact(ethexe): remove db writes in processor refact(ethexe): remove kv db writes in processor Dec 23, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and well-executed refactoring to remove database write operations from the ethexe-processor crate. This change successfully transforms the processor into a pure computation engine, which is a commendable architectural improvement that enhances separation of concerns, testability, and overall code clarity. The introduction of ExecutableData and ExecutableDataForReply structs provides a cleaner API for the processor. The execution loop refactoring using the RunContext trait is also a solid design choice. While the changes are extensive, they are consistent and thoughtfully implemented. The comment regarding the large number of commented-out tests in ethexe/db/src/database.rs is valid and should be addressed before merging.

Comment thread ethexe/db/src/database.rs Outdated
@grishasobol grishasobol changed the title refact(ethexe): remove kv db writes in processor refact(ethexe): remove kv db writings in processor Dec 23, 2025
@grishasobol grishasobol marked this pull request as ready for review December 23, 2025 17:45
@grishasobol grishasobol self-assigned this Dec 23, 2025
@grishasobol grishasobol added A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR labels Dec 23, 2025
@grishasobol grishasobol force-pushed the gsobol/ethexe/processor branch from 5df7ce0 to 7f7cf81 Compare January 29, 2026 15:00
Comment thread ethexe/service/src/tests/mod.rs Outdated
Comment thread ethexe/processor/src/host/mod.rs Outdated
@grishasobol grishasobol merged commit f548c91 into master Feb 5, 2026
63 of 64 checks passed
@grishasobol grishasobol deleted the gsobol/ethexe/processor branch February 5, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants