feat: Add RocksDB snapshot download RPC API with streaming support#5213
feat: Add RocksDB snapshot download RPC API with streaming support#5213
Conversation
- Introduce snapshot RPC API with manifest, chunk, and completion messages - Implement snapshot service creating RocksDB checkpoints and zstd-compressed tar archives - Limit concurrent downloads and clean up stale snapshots automatically - Add CLI example for snapshot download verification - Add config flags for enabling snapshot RPC and related parameters
Changed Files
|
Summary of ChangesHello, 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 significantly enhances the node's capabilities by introducing a robust and secure RPC API for downloading RocksDB snapshots. This feature allows clients to efficiently retrieve a consistent state of the database, which is crucial for node synchronization, recovery, or data analysis. The implementation includes streaming support for large datasets, configurable parameters for performance and resource management, and built-in authentication to protect access to sensitive snapshot data. Highlights
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 introduces a valuable feature for downloading RocksDB snapshots via a streaming RPC API. While the implementation is generally well-structured, includes a detailed CLI example, and handles authentication and concurrency control correctly, a medium-severity security vulnerability has been identified: sensitive snapshots are insecurely stored in the system's temporary directory, which could lead to local information disclosure of the entire node database. Furthermore, a critical issue in the cleanup logic and a potential consistency issue regarding the hashing algorithm used require attention.
Conflicts: Cargo.lock ethexe/rpc/Cargo.toml utils/gear-workspace-hack/Cargo.toml
Resolves #5177
@gear-tech/dev