-
Notifications
You must be signed in to change notification settings - Fork 1k
Add extensible compression support for RPC requests #6084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@fubhy
fubhy
force-pushed
the
feature/extensible-rpc-compression
branch
3 times, most recently
from
July 22, 2025 18:02
a2eba9c
to
4917aef
Compare
@DaMandal0rian
DaMandal0rian
requested review from
DaMandal0rian,
leoyvens and
isum
July 22, 2025 18:04
@fubhy
fubhy
force-pushed
the
feature/extensible-rpc-compression
branch
3 times, most recently
from
July 22, 2025 19:40
4fb2574
to
b8939aa
Compare
- Replace boolean compression_enabled with Compression enum (None, Gzip) - Support per-provider compression configuration via "compression" field - Add placeholders for future compression methods (Brotli, Deflate) - Update transport layer to handle compression enum with match statement - Add comprehensive unit tests for compression configuration parsing - Update example configuration and documentation Configuration examples: compression = "gzip" # Enable gzip compression compression = "none" # Disable compression (default) Addresses issue #5671 with future-extensible design. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
@fubhy
fubhy
force-pushed
the
feature/extensible-rpc-compression
branch
from
August 26, 2025 11:01
8dc6615
to
acb0979
Compare
- Add missing Compression parameter to all Transport::new_rpc test calls - Import Compression type in config tests module - Ensures all tests compile and pass with the new compression parameter 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
When reqwest gzip feature is enabled globally, Client::default() enables automatic gzip compression which removes content-length headers from responses. ArweaveClient needs content-length to check file sizes, so explicitly disable gzip for Arweave requests. Fixes test: polling_monitor::ipfs_service::test::arweave_get 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
@lutter This is also building now ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements extensible compression support for Graph Node's outgoing JSON-RPC requests to upstream providers, addressing issue #5671. The implementation uses an enum-based design that makes it easy to add new compression methods in the future without breaking existing configurations.
Key Changes
compression_enabled
field withCompression
enum (None
,Gzip
)Configuration Format
Enable gzip compression:
Disable compression (default):
Implementation Details
Compression
enum innode/src/config.rs
with serde supportTransport::new_rpc()
to handle compression enum with match statementFuture Extensions
Adding new compression methods requires only:
#[serde(rename = "brotli")] Brotli
Compression::Brotli => client_builder.brotli(true)
Test plan
🤖 Generated with Claude Code