Skip to content

Remove built-in HTTP/2 server support - #8536

Draft
Eddy Ashton (eddyashton) wants to merge 4 commits into
mainfrom
agents/http2-support-audit-and-removal
Draft

Eddy Ashton (eddyashton) wants to merge 4 commits into
mainfrom
agents/http2-support-audit-and-removal

Conversation

@eddyashton

Copy link
Copy Markdown
Member

Important

This is an exploratory change, not a concrete recommendation. I intend to discuss whether we should remove HTTP/2 support further with the team before taking this forward.

Motivation

CCF's built-in HTTP/2 stack does not provide feature parity with HTTP/1.1, including request forwarding and responses blocked on consensus commit. We also do not currently demonstrate a multiplexing benefit that justifies maintaining a second exposed protocol stack.

This draft makes the possible removal concrete so its compatibility impact and maintenance savings can be evaluated.

Implementation summary

  • Remove the built-in nghttp2-based HTTP/2 server, configuration, and dependencies.
  • Advertise HTTP/1.1 for built-in TLS RPC interfaces while preserving application-provided custom protocols.
  • Remove HTTP/2-specific test infrastructure and restore unconditional coverage of HTTP/1.1 forwarding, commit blocking, request limits, and session consistency.
  • Update current schemas and documentation to describe the remaining built-in protocol support.
  • Retain outbound libcurl HTTP/2 error handling and coverage that verifies HTTP/1.1 ALPN fallback when curl offers HTTP/2.

Safety and compatibility

This is an intentional breaking change for deployments that configure built-in interfaces with app_protocol: "HTTP2", and for clients that require direct HTTP/2 connections to CCF. HTTP/1.1 clients and application-provided custom protocols are preserved.

HTTP/1.1 continues to use the existing TLS configuration and security guarantees. This change does not affect consensus, KV semantics, ledger formats, recovery, or mixed-version ledger compatibility.

Validation:

  • Full 340-target build.
  • openapi_test, node_info_json_test, and http_test.
  • e2e_logging, including forwarding and consensus-commit blocking coverage.
  • CI test-bucket inventory.
  • Formatting, lint, schema, include/dependency, ASCII, shellcheck, release-note, copyright, Python compilation, and whitespace checks.

CCF's HTTP/2 implementation no longer offers the feature parity or measured multiplexing value needed to justify a second exposed protocol stack. Remove the nghttp2 server implementation, configuration, dependencies, and test mode while retaining HTTP/1.1 and custom protocol support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removing the HTTP/2 constants left directly nested ccf and http namespaces, which clang-tidy rejects under modernize-concat-nested-namespaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It intentionally removes a public network protocol and associated configuration across runtime, packaging, and compatibility surfaces, and is explicitly presented as exploratory.

0 open findings

What changed in this PR

Removes CCF’s built-in HTTP/2 server stack, leaving HTTP/1.1 as the built-in RPC protocol while retaining custom protocol support.

Changes:

  • Deletes nghttp2 server implementation, configuration, and dependencies.
  • Updates schemas, documentation, packaging, and release notes.
  • Removes HTTP/2 test infrastructure and restores unconditional HTTP/1.1 coverage.

Custom instructions used: .github/copilot-instructions.md, .github/instructions/reviewing.instructions.md, .github/instructions/changelog.instructions.md.

File Description
tests/​suite/​test_requirements.py Removes the HTTP/2 exclusion helper.
tests/​requirements.txt Drops the httpx HTTP/2 extra.
tests/​partitions_test.py Runs session consistency unconditionally.
tests/​limits.py Always registers HTTP parser limit tests.
tests/​infra/​node.py Removes HTTP/2 client selection.
tests/​infra/​network.py Allows random-node opening without HTTP/2 special handling.
tests/​infra/​interfaces.py Removes HTTP/2 configuration fields.
tests/​infra/​e2e_args.py Removes the --http2 argument and mapping.
tests/​infra/​clients.py Removes HTTP/2 client and response handling.
tests/​e2e_logging.py Makes HTTP/1.1 behavior and forwarding tests unconditional.
tests/​e2e_common_endpoints.py Simplifies request-limit tests for HTTP/1.1.
tests/​docker/​lts_compatibility/​Dockerfile Removes explicit nghttp2 packages.
tests/​client_protocols.py Removes h2spec testing.
tests/​ci-buckets.txt Removes the HTTP/2 logging test.
src/​node/​test/​node_info_json.cpp Retains arbitrary-protocol coverage using CUSTOM.
src/​node/​rpc/​session.h Updates protocol-session documentation.
src/​node/​rpc/​rpc_connection_manager.h Removes HTTP/2 sessions and advertises HTTP/1.1.
src/​node/​rpc/​no_more_sessions.h Removes HTTP/2-specific documentation.
src/​node/​rpc/​http2_session.h Deletes the HTTP/2 RPC session.
src/​node/​rpc/​http_session.h Removes stream and version parameters.
src/​node/​rpc/​http_rpc_context.h Removes HTTP-version construction state.
src/​node/​rpc/​frontend.h Removes the HTTP/2 forwarding rejection.
src/​js/​test/​js.cpp Updates RPC context construction.
src/​http/​test/​http_bench.cpp Updates the request processor interface.
src/​http/​http2_utils.h Deletes nghttp2 utilities.
src/​http/​http2_types.h Deletes HTTP/2 stream types.
src/​http/​http2_parser.h Deletes the HTTP/2 parser.
src/​http/​http2_callbacks.h Deletes nghttp2 callbacks.
src/​http/​http_proc.h Removes HTTP/2 stream IDs from requests.
src/​http/​http_parser.h Updates request processor calls.
src/​http/​http_exceptions.h Removes HTTP/2 stream metadata.
src/​endpoints/​rpc_context_impl.h Removes internal HTTP-version state.
scripts/​setup-ci.sh Removes nghttp2 and h2spec setup.
scripts/​setup-ci-al4.sh Removes Azure Linux nghttp2 and h2spec setup.
include/​ccf/​http_consts.h Removes public HTTP/2 header constants.
include/​ccf/​http_configuration.h Removes HTTP/2 parser settings.
doc/​schemas/​node_openapi.json Removes HTTP/2 configuration properties.
doc/​schemas/​gov/​2024-07-01/​gov.json Documents HTTP/1 and custom protocols.
doc/​schemas/​gov/​2023-06-01-preview/​gov.json Updates preview schema documentation.
doc/​operations/​network.rst Documents HTTP/1.1 and proxy migration.
doc/​host_config_schema/​host_config.json Removes HTTP/2 host settings.
doc/​conf.py Removes the nghttp2 link exclusion.
doc/​build_apps/​example_cpp.rst Removes the HTTP/2 commit-callback limitation.
doc/​architecture/​tls_internals.rst Updates session and ALPN architecture.
CMakeLists.txt Removes nghttp2 linkage and HTTP/2 tests.
cmake/​cpack_versions_pin.cmake Removes the nghttp2 version pin.
cmake/​cpack_settings.cmake Removes the development package dependency.
cmake/​cpack_ccfapp.cmake Removes the runtime package dependency.
CHANGELOG.md Records the breaking removal.
.github/​instructions/​reviewing.instructions.md Removes obsolete nghttp2 review guidance.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

2 participants