Skip to content

Conversation

@eddyashton
Copy link
Member

This has a bunch of knock-on effects. The related diffs may not all be strictly required, I've lost track, but they lead to a cleaner API (for things like "create a new node" in the Python infra) and I think for backporting purposes they all land together.

@eddyashton eddyashton requested a review from a team as a code owner November 6, 2025 14:43
Copilot AI review requested due to automatic review settings November 6, 2025 14:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the network interface configuration system and adds opt-in feature gating for snapshot-serving endpoints to prevent public DoS attacks. The changes introduce a new FILE_SERVING_RPC_INTERFACE with FileAccess feature enabled by default, and modify the test infrastructure to use a more fluent API pattern for configuring nodes.

Key changes:

  • Introduces opt-in feature gating for endpoints, specifically for file access/snapshot serving
  • Refactors RPCInterface.from_args() to apply_args() and adds HostSpec.with_args() for better composability
  • Adds a dedicated file-serving interface to all nodes by default with FileAccess feature enabled
  • Moves snapshot-serving handlers from node_frontend.h to new file_serving_handlers.h file

Reviewed Changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/infra/interfaces.py Refactors interface configuration with apply_args() and with_args() methods, adds FILE_SERVING_RPC_INTERFACE
tests/infra/e2e_args.py Simplifies nodes() function to use HostSpec.with_args()
tests/infra/node.py Improves interface lookup with error handling
tests/infra/network.py Updates create_node() to accept optional host parameter
tests/e2e_operations.py Updates snapshot access tests to use FILE_SERVING_RPC_INTERFACE
src/node/rpc/file_serving_handlers.h New file containing extracted snapshot-serving handlers with feature gating
src/node/rpc/frontend.h Adds feature checking logic for endpoints
src/endpoints/endpoint.cpp Adds require_optin_feature() method
include/ccf/endpoint.h Defines OptInFeatures and adds required_optin_features field
doc/host_config_schema/cchost_config.json Documents enabled_optin_features configuration option
Comments suppressed due to low confidence (1)

tests/infra/basicperf.py:213

  • Call to function nodes with too few arguments; should be no fewer than 2.
    hosts = args.nodes or infra.e2e_args.nodes(1)

@eddyashton eddyashton added the run-long-test Run Long Test job label Nov 6, 2025
@eddyashton eddyashton changed the title Introduce opt-in FileAccess feature as requirement for calling /snapshot endpoints Disable snapshot read endpoints by-default, require a per-interface opt-in to enable new OperatorFeature Nov 12, 2025
@eddyashton eddyashton enabled auto-merge (squash) November 13, 2025 16:53
@eddyashton eddyashton merged commit bef80da into microsoft:main Nov 13, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-long-test Run Long Test job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants