⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@pthmas
Copy link
Contributor

@pthmas pthmas commented Feb 2, 2026

Overview

  • Adds height-based pruning of ev-abci execution artifacts:
    • Extends the ev-abci store with a PruneExecMeta API to delete per-height execution metadata (e.g. block responses, block IDs) up to a target height.
    • Implements the shared ExecMetaPruner interface in the ev-abci adapter so it can be driven by ev-node’s pruning hook.
    • Uses the same prune target as ev-node’s block store (capped by the DA-included height), keeping ABCI execution metadata aligned with ev-node’s pruning window.

Design notes

  • Pruning is best-effort and runs synchronously from the ev-node executor; failures surface as errors in the caller but do not change ev-abci’s external API.
  • Nodes that do not enable ev-node pruning or do not wire the ExecMetaPruner hook see no behavior change.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @pthmas, 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 new feature to implement height-based pruning for ev-abci execution metadata. The primary goal is to manage storage by systematically removing old block responses and IDs, ensuring that the ev-abci store remains synchronized with ev-node's pruning window. This change enhances efficiency and maintains data consistency across the system.

Highlights

  • Height-based Pruning: Introduced height-based pruning for ev-abci execution artifacts, allowing deletion of per-height execution metadata like block responses and block IDs.
  • ExecMetaPruner Interface: The ev-abci adapter now implements the shared ExecMetaPruner interface, enabling it to be driven by ev-node’s pruning hook.
  • Pruning Alignment: The pruning target for ev-abci execution metadata is aligned with ev-node’s block store, capped by the DA-included height, ensuring consistency.
  • Idempotent Pruning: The pruning mechanism is designed to be idempotent, tracking the last pruned height to avoid redundant operations and allow incremental pruning.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

Copy link
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 pruning mechanism for ev-abci execution artifacts, which is a valuable addition for managing storage. The implementation is straightforward, adding a PruneExecMeta method to the adapter and a corresponding Prune method to the store.

My review focuses on two main points. First, in pkg/store/store.go, the Prune function can be made more efficient and atomic by using batch database operations instead of individual deletes in a loop. This is important for performance and data consistency. Second, the new test in pkg/store/store_test.go uses a fragile method for generating keys from heights; it should be updated to use strconv for consistency with the production code and to ensure correctness for all height values.

Comment on lines +34 to +38
heightKey := ds.NewKey("/abci/bid").ChildString(string(rune(h + '0')))
require.NoError(t, db.Put(ctx, heightKey, []byte("bid")))

respKey := ds.NewKey("/abci/br").ChildString(string(rune(h + '0')))
require.NoError(t, db.Put(ctx, respKey, []byte("br")))
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The key generation in this test uses string(rune(h + '0')) to convert the height h to a string. This is fragile as it only works for single-digit heights (0-9). The production code uses strconv.FormatUint, which is more robust. To make the test more reliable and align with the production code, you should use strconv.Itoa(h) for key generation. This applies to all key constructions in this test function.

Suggested change
heightKey := ds.NewKey("/abci/bid").ChildString(string(rune(h + '0')))
require.NoError(t, db.Put(ctx, heightKey, []byte("bid")))
respKey := ds.NewKey("/abci/br").ChildString(string(rune(h + '0')))
require.NoError(t, db.Put(ctx, respKey, []byte("br")))
heightKey := ds.NewKey("/abci/bid").ChildString(strconv.Itoa(h))
require.NoError(t, db.Put(ctx, heightKey, []byte("bid")))
respKey := ds.NewKey("/abci/br").ChildString(strconv.Itoa(h))
require.NoError(t, db.Put(ctx, respKey, []byte("br")))

@pthmas pthmas force-pushed the pierrick/prunning branch from b3cd390 to 9e7777d Compare February 4, 2026 09:59
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