Skip to content

feat: pruning#332

Merged
julienrbrt merged 7 commits intomainfrom
pierrick/prunning
Feb 17, 2026
Merged

feat: pruning#332
julienrbrt merged 7 commits intomainfrom
pierrick/prunning

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.

@pthmas pthmas force-pushed the pierrick/prunning branch from b3cd390 to 9e7777d Compare February 4, 2026 09:59
Copilot AI and others added 3 commits February 17, 2026 12:56
…ndency (#345)

* Initial plan

* Implement pruning config mapping and remove sonic dependency

- Rename clearConflictingViperKeys to mapCosmosPruningToEvNode
- Map cosmos-sdk pruning keys to ev-node format with proper value conversion
- Add comprehensive tests for pruning mapping function
- Remove sonic installation from all Dockerfiles

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

* Fix comment clarity in mapCosmosPruningToEvNode

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

* Simplify logic and add test for override behavior

- Simplify switch statement logic in mapCosmosPruningToEvNode
- Add test case for verifying cosmos settings override existing evnode settings

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

* Remove redundant empty string case in switch statement

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

* Address PR review feedback on pruning mapping

- Change unknown pruning values to default to "disabled" instead of "all"
- Convert cosmos-sdk pruning-interval from blocks to time duration
- Add evnode.node.block_time to tests and use DefaultConfig for realistic testing
- Update all test expectations to match the block-to-duration conversion

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

* Address PR review: use SDK flag constants and map unknown to metadata

- Change default case to map unknown pruning values to "metadata" instead of "disabled"
- Use cosmos-sdk server flag constants (FlagPruning, FlagPruningKeepRecent, FlagPruningInterval) instead of hardcoded strings
- Update imports across server package to use qualified sdkserver import to avoid name collision
- Update all tests to use the SDK flag constants
- Update test expectations for unknown value mapping to metadata

Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: julienrbrt <29894366+julienrbrt@users.noreply.github.com>
@julienrbrt julienrbrt marked this pull request as ready for review February 17, 2026 16:21
@julienrbrt julienrbrt requested a review from a team as a code owner February 17, 2026 16:21
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

utACK

@julienrbrt julienrbrt merged commit 41c0f47 into main Feb 17, 2026
18 checks passed
@julienrbrt julienrbrt deleted the pierrick/prunning branch February 17, 2026 17:05
@julienrbrt julienrbrt mentioned this pull request Feb 18, 2026
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.

3 participants

Comments