Skip to content
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

Feat: support compression in HTTP clients #2282

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Feb 5, 2025

Content

This PR includes the Accept-Encoding: gzip, deflate header for requests sent by the signer node and the Mithril client library, allowing the aggregator to respond with compressed data.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #2286

@dlachaume dlachaume self-assigned this Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Test Results

    4 files  ± 0     56 suites  ±0   21m 7s ⏱️ + 10m 17s
1 596 tests + 6  1 596 ✅ + 6  0 💤 ±0  0 ❌ ±0 
1 900 runs  +12  1 900 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit d3228da. ± Comparison against base commit 7635d4e.

♻️ This comment has been updated with latest results.

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

mithril-client/src/aggregator_client.rs Outdated Show resolved Hide resolved
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch 3 times, most recently from e541382 to 306fd4d Compare February 6, 2025 11:12
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 6, 2025 11:20 — with GitHub Actions Inactive
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

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

LGTM.

I think that the reqwest features should also be enabled in mithril-aggregator and mithril-relay.

mithril-client/Cargo.toml Outdated Show resolved Hide resolved
mithril-signer/src/services/aggregator_client.rs Outdated Show resolved Hide resolved
mithril-client/src/aggregator_client.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

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

LGTM
just a suggestion

mithril-client/src/aggregator_client.rs Outdated Show resolved Hide resolved
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 306fd4d to 473876e Compare February 6, 2025 15:58
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 6, 2025 16:07 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 473876e to 1686182 Compare February 6, 2025 16:31
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 6, 2025 16:39 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 1686182 to aecb205 Compare February 6, 2025 16:45
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 6, 2025 16:53 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 7, 2025 07:18 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 62db4a8 to 920bacd Compare February 7, 2025 08:10
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 7, 2025 08:19 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 7, 2025 08:37 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 099d745 to abb715e Compare February 7, 2025 08:40
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 7, 2025 08:48 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from abb715e to 9db9430 Compare February 7, 2025 08:48
@dlachaume dlachaume changed the title Feat: add Accept-Encoding HTTP header for signer and client requests Feat: support compression in HTTP clients Feb 7, 2025
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

…ency since the wasm library doesn't require `enable-http-compression`
* mithril-aggregator from `0.7.0` to `0.7.1`
* mithril-client-wasm from `0.8.0` to `0.8.1`
* mithril-client from `0.11.0` to `0.11.1`
* mithril-relay from `0.1.33` to `0.1.34`
* mithril-signer from `0.2.227` to `0.2.228`
* [js] mithril-client-wasm from `0.8.0` to `0.8.1`
@dlachaume dlachaume force-pushed the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch from 9db9430 to d3228da Compare February 7, 2025 09:03
@dlachaume dlachaume temporarily deployed to testing-sanchonet February 7, 2025 09:14 — with GitHub Actions Inactive
@dlachaume dlachaume merged commit 52f97d4 into main Feb 7, 2025
37 of 41 checks passed
@dlachaume dlachaume deleted the dlachaume/add-accept-encoding-header-in-signer-and-client-requests branch February 7, 2025 09:46
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.

Support aggregator response compression in HTTP clients
4 participants