Skip to content

docs: Create Node Pruning ADR#2107

Merged
Manav-Aggarwal merged 7 commits intofeature/exec_apifrom
manav/node-pruning-adr
Mar 26, 2025
Merged

docs: Create Node Pruning ADR#2107
Manav-Aggarwal merged 7 commits intofeature/exec_apifrom
manav/node-pruning-adr

Conversation

@Manav-Aggarwal
Copy link
Member

Overview

Closes #2093

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Manav-Aggarwal Manav-Aggarwal changed the base branch from main to feature/exec_api March 22, 2025 19:30
@RollkitBot RollkitBot requested review from a team, MSevey, tuxcanfly and yarikbratashchuk and removed request for a team March 22, 2025 19:30
@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://rollkit.github.io/rollkit/pr-preview/pr-2107/

Built to branch gh-pages at 2025-03-25 12:28 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.24%. Comparing base (2262207) to head (50c0d68).
Report is 24 commits behind head on feature/exec_api.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           feature/exec_api    #2107      +/-   ##
====================================================
+ Coverage             24.11%   24.24%   +0.12%     
====================================================
  Files                    52       51       -1     
  Lines                  8231     7475     -756     
====================================================
- Hits                   1985     1812     -173     
+ Misses                 6089     5496     -593     
- Partials                157      167      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

love this!! do we have control over go-header storage as well?

@Manav-Aggarwal
Copy link
Member Author

love this!! do we have control over go-header storage as well?

Yes, so headers are also stored in the store.go as part of BlockData. For the store in the sync service for header and data, all the contents retrieved from it are part of headerCache and dataCache respectively already so it's safe to delete the contents of the sync service store. Created an issue for it: #2111

Also, added a note describing the above in this ADR.

@auricom
Copy link
Contributor

auricom commented Mar 24, 2025

Overall the external volume support would help the node operators, allowing better uptime and reduce the infra bill 🙌 excited to have read this ADR

a few remarks:

  • Having the user setting an int for MaxBlocksPerVolume may result to not optimal disk usage, as block size can change during chain lifecycle we could have some volume being heavier than others. Finding the optimal value may require some trials & errors meaning downloading blocks from genesis multiple times. Instead, a targetMaxVolumeSize would be easier to operate with. The Volume Registry would calculate the max block height for current volume based on current block size and (targetMaxVolumeSize - currentVolumeSize), adjusting every xx blocks. Does it makes sense ?

  • AutoCreateVolumes feature is great. I'd say we let the user provide the VolumesDirectory path and the app would look for any empty subfolder matching a pattern. And we document that node operator must system mount their different devices on this VolumesDirectory so that the app is forced to use a subfolder that follows the node operator disk management logic.

  • As query volume statistics will be built overtime, we may want to flag our volumes to create a multi-tiered archive system (e.g. slow flag for volume 1 (on a hdd) and fast flag for volume 2 (on a ssd) so that we can optimize overall latency

I assumed 1 system level device (e.g. 2 SSDs in RAID 0, or a single 22TB HDD) can host 1 to n volumes.

@Manav-Aggarwal
Copy link
Member Author

Add note on how to migrate existing nodes via some CLI

@Manav-Aggarwal Manav-Aggarwal force-pushed the manav/node-pruning-adr branch from f2e1377 to 8794967 Compare March 25, 2025 12:28
@Manav-Aggarwal
Copy link
Member Author

Manav-Aggarwal commented Mar 25, 2025

Overall the external volume support would help the node operators, allowing better uptime and reduce the infra bill 🙌 excited to have read this ADR

a few remarks:

  • Having the user setting an int for MaxBlocksPerVolume may result to not optimal disk usage, as block size can change during chain lifecycle we could have some volume being heavier than others. Finding the optimal value may require some trials & errors meaning downloading blocks from genesis multiple times. Instead, a targetMaxVolumeSize would be easier to operate with. The Volume Registry would calculate the max block height for current volume based on current block size and (targetMaxVolumeSize - currentVolumeSize), adjusting every xx blocks. Does it makes sense ?
  • AutoCreateVolumes feature is great. I'd say we let the user provide the VolumesDirectory path and the app would look for any empty subfolder matching a pattern. And we document that node operator must system mount their different devices on this VolumesDirectory so that the app is forced to use a subfolder that follows the node operator disk management logic.
  • As query volume statistics will be built overtime, we may want to flag our volumes to create a multi-tiered archive system (e.g. slow flag for volume 1 (on a hdd) and fast flag for volume 2 (on a ssd) so that we can optimize overall latency

I assumed 1 system level device (e.g. 2 SSDs in RAID 0, or a single 22TB HDD) can host 1 to n volumes.

Thank you so much for the feedback! I've incorporated it, please feel free to re-review 🙏

@Manav-Aggarwal Manav-Aggarwal merged commit a312168 into feature/exec_api Mar 26, 2025
24 of 26 checks passed
@Manav-Aggarwal Manav-Aggarwal deleted the manav/node-pruning-adr branch March 26, 2025 10:57
@github-project-automation github-project-automation bot moved this to Done in Evolve Mar 26, 2025
@tac0turtle tac0turtle removed this from Evolve Apr 24, 2025
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.

[EPIC]: Node Pruning

4 participants