refactor(block): allow pruning when da disabled#3075
refactor(block): allow pruning when da disabled#3075julienrbrt wants to merge 4 commits intomainfrom
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @julienrbrt's task in 1m 49s —— View job Code Review CompleteI've completed a comprehensive code review of this PR. The changes successfully enable block pruning for nodes without DA configured, which is an important enhancement. Here are my findings: OverviewThis PR refactors the pruning mechanism to allow nodes without Data Availability (DA) configured to prune blocks based on store height alone, while DA-enabled nodes continue to prune only DA-included blocks. The implementation is clean and well-tested. Findings1. CHANGELOG Entry Mismatch
|
| Category | Rating | Notes |
|---|---|---|
| Architecture | ✅ Excellent | Clean abstraction, minimal changes |
| Error Handling | ✅ Good | All edge cases covered |
| Testing | ✅ Excellent | Comprehensive new tests |
| Documentation | ✅ Good | Clear explanation of behavior |
| Security | ✅ Good | No new vulnerabilities |
| Performance | ✅ Good | No regression, potential improvement |
| Code Quality | ✅ Excellent | Idiomatic Go, well-structured |
Recommendations
Must Fix
- Update CHANGELOG.md to describe this PR's changes instead of refactor: store pending block separately #3073
Nice to Have
- Add test case for DA-enabled pruning with DA inclusion height set
- Enhance debug message at
pruner.go:125with additional context about expected timing - Clarify documentation wording about "mode
all" in config.md
Conclusion
This is a well-implemented refactor that successfully enables pruning for DA-disabled nodes while maintaining backward compatibility. The code is clean, well-tested, and properly documented. The only blocking issue is the incorrect CHANGELOG entry.
Approval recommendation: Approve after CHANGELOG fix.
Summary of ChangesHello @julienrbrt, 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 refactors the block pruning logic to enable nodes to prune blocks regardless of whether Data Availability (DA) is configured. Previously, pruning was strictly tied to DA inclusion, which prevented non-DA nodes from managing their storage. The changes introduce a conditional pruning mechanism that adapts based on DA enablement, ensuring efficient disk space management for all node types while maintaining data integrity for DA-enabled setups. Highlights
🧠 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. Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request refactors the pruning mechanism to allow it to function even when the Data Availability (DA) layer is disabled. This is achieved by passing the DA address to the pruner, which then conditionally checks for DA inclusion height before pruning. If DA is disabled (no address provided), pruning proceeds based on the store height. The changes are well-implemented, include thorough tests for both DA-enabled and DA-disabled scenarios, and update the documentation accordingly. My only suggestion is to correct the changelog entry to accurately reflect the changes in this PR.
|
|
||
| ### Changes | ||
|
|
||
| - Store pending blocks separately from executed blocks key. [#3073](https://github.com/evstack/ev-node/pull/3073) |
There was a problem hiding this comment.
This changelog entry appears to be from a different pull request. This PR's changes are about allowing pruning when the DA layer is disabled. Please update the changelog to reflect the correct changes.
| - Store pending blocks separately from executed blocks key. [#3073](https://github.com/evstack/ev-node/pull/3073) | |
| - Allow pruning when the Data Availability (DA) layer is disabled. |
There was a problem hiding this comment.
nope, the changelog is unrelated to this pr (that do not require any)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3075 +/- ##
==========================================
+ Coverage 61.07% 61.12% +0.04%
==========================================
Files 113 113
Lines 11431 11435 +4
==========================================
+ Hits 6982 6990 +8
+ Misses 3669 3657 -12
- Partials 780 788 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Overview
follow-up of #2984 (ref #2984 (comment))