-
Notifications
You must be signed in to change notification settings - Fork 1.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
base: master
Are you sure you want to change the base?
Conversation
a2eba9c to
4917aef
Compare
4fb2574 to
b8939aa
Compare
8dc6615 to
acb0979
Compare
|
@lutter This is also building now ... |
- 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>
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>
8bab643 to
cf7477b
Compare
|
Rebased to latest master (and cleaned up a little) |
|
I just looked at this, and seeing how we do similar things for other providers, why do we use a separate |
|
This pull request hasn't had any activity for the last 90 days. If there's no more activity over the course of the next 14 days, it will automatically be closed. |
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_enabledfield withCompressionenum (None,Gzip)Configuration Format
Enable gzip compression:
Disable compression (default):
Implementation Details
Compressionenum innode/src/config.rswith serde supportTransport::new_rpc()to handle compression enum with match statementFuture Extensions
Adding new compression methods requires only:
#[serde(rename = "brotli")] BrotliCompression::Brotli => client_builder.brotli(true)Test plan
🤖 Generated with Claude Code