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: add compression support to metrics and RPC servers #4906

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Oct 16, 2024

Summary of changes

Part of #4903

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #4903

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

src/rpc/mod.rs Outdated
@@ -485,6 +486,13 @@ where
svc_builder,
keystore,
} = per_conn.clone();
let http_middleware = tower::ServiceBuilder::new()
// This does not compile yet, a fix has been made in https://github.com/paritytech/jsonrpsee/pull/1475
// .layer(CompressionLayer::new())
Copy link
Contributor Author

@hanabi1224 hanabi1224 Oct 16, 2024

Choose a reason for hiding this comment

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

I can uncomment this line in a subsequent PR once a new version of jsonrpsee is released.

@hanabi1224 hanabi1224 marked this pull request as ready for review October 16, 2024 15:09
@hanabi1224 hanabi1224 requested a review from a team as a code owner October 16, 2024 15:09
@hanabi1224 hanabi1224 requested review from lemmih and elmattic and removed request for a team October 16, 2024 15:09
@@ -184,7 +184,8 @@ tokio = { version = "1", features = ['full'] }
tokio-stream = { version = "0.1", features = ["fs", "io-util"] }
tokio-util = { version = "0.7", features = ["compat", "io-util"] }
toml = "0.8"
tower = { version = "0.5", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

downgrade tower to align with jsonrpsee

Copy link
Member

Choose a reason for hiding this comment

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

@hanabi1224 Should we put a comment here so that people avoid updating (and a similar one in the jsonrpsee so that people update it when needed).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LesnyRumcajs Now It does not compile if tower and jsonrpsee versions don't match

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LesnyRumcajs Now It does not compile if tower and jsonrpsee versions don't match

@hanabi1224 hanabi1224 added this pull request to the merge queue Oct 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2024
@hanabi1224 hanabi1224 added this pull request to the merge queue Oct 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2024
@hanabi1224 hanabi1224 added this pull request to the merge queue Oct 17, 2024
Merged via the queue into main with commit efca75f Oct 17, 2024
34 checks passed
@hanabi1224 hanabi1224 deleted the hm/http-server-compression branch October 17, 2024 08:33
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.

Add compression support to Forest RPC server
4 participants