Skip to content

feat!(ethexe): change announce hash calculation; append min program exec balance for injected txs#5249

Merged
grishasobol merged 10 commits intomasterfrom
gsobol/ethexe/announce-hash
Mar 26, 2026
Merged

feat!(ethexe): change announce hash calculation; append min program exec balance for injected txs#5249
grishasobol merged 10 commits intomasterfrom
gsobol/ethexe/announce-hash

Conversation

@grishasobol
Copy link
Copy Markdown
Member

No description provided.

@grishasobol grishasobol self-assigned this Mar 25, 2026
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com bot commented Mar 25, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  ethexe/db/src/database.rs  40% smaller
  ethexe/db/src/migrations/v1.rs  24% smaller
  ethexe/common/src/db.rs  19% smaller
  ethexe/consensus/src/validator/tx_pool.rs  16% smaller
  ethexe/common/src/primitives.rs  3% smaller
  ethexe/common/src/gear.rs  0% smaller
  ethexe/consensus/src/announces.rs  0% smaller
  ethexe/consensus/src/tx_validation.rs  0% smaller
  ethexe/db/src/migrations/init.rs  0% smaller
  ethexe/db/src/migrations/migration.rs  0% smaller
  ethexe/db/src/migrations/mod.rs Unsupported file format
  ethexe/db/src/migrations/v2.rs  0% smaller

@grishasobol grishasobol added the A0-pleasereview PR is ready to be reviewed by the team label Mar 25, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 refines core components of the ethexe system by updating the Announce hash calculation to incorporate injected transactions, thereby enhancing data integrity. It also introduces a crucial validation step for injected transactions, ensuring that recipient programs maintain a minimum executable balance. Furthermore, a new database migration streamlines the storage of Announce data, moving it to a more efficient key-value store. Finally, the block processing logic has been slightly reordered to improve the sequence of operations.

Highlights

  • Announce Hashing: The calculation of Announce hashes now explicitly includes injected transactions, ensuring their impact on the hash.
  • Injected Transaction Balance Check: A new minimum executable balance requirement has been introduced for programs to receive injected transactions, preventing issues with underfunded contracts.
  • Database Migration: A new database migration (v2) was added to transition Announce data storage from the Content-Addressable Storage (CAS) to the Key-Value (KV) store for improved data management.
  • Block Processing Order: The order of operations within Processor::process_block was adjusted to handle injected transactions and events before processing scheduled tasks.
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.

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.

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 database migration (v2) to move Announce data from content-addressable storage to a key-value store, updating storage keys and adding a new migration script. It also implements a new validation rule for injected transactions, requiring a minimum executable balance for destination programs, and updates the transaction pool to handle this status. The Announce::to_hash method was refactored for specific field hashing, and the Processor::process_block logic was reordered and clarified. Feedback suggests improving the clarity of the MIN_EXECUTABLE_BALANCE_FOR_INJECTED_MESSAGES constant's multiplier and addressing the brittleness of a hardcoded prefix in the new migration to enhance robustness.

Copy link
Copy Markdown
Member

@ecol-master ecol-master left a comment

Choose a reason for hiding this comment

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

I think, we do not should make announce hash only on top of tx_hash, we also need to hash the signature (and maybe address)

@grishasobol grishasobol merged commit cf5ce50 into master Mar 26, 2026
33 checks passed
@grishasobol grishasobol deleted the gsobol/ethexe/announce-hash branch March 26, 2026 15:03
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants