Give the metrics server its own bind address

Đang mở
#817 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 6 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
53/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
api, backend

Hướng nghiên cứu

Start with the --http-address definition in bin/ethlambda/src/cli.rs:37-38 and start_http_servers in crates/net/rpc/src/lib.rs:118-138; then inspect Options::validate_ports and the RPC documentation. Add the separate metrics bind address with the stated default and address-aware port rule, then update the flag table and trust section in docs/rpc.md. The optional pprof flag is explicitly optional; done means the API and metrics servers can bind separately while existing setups keep working.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem. Both HTTP servers bind the one --http-address. The flag is defined at bin/ethlambda/src/cli.rs:37-38, and start_http_servers binds both servers to it at crates/net/rpc/src/lib.rs:118-138. So an operator whose Prometheus scrapes from another host has to move the API off loopback as well. That API is the one lambdaclass/ethlambda#778's "What the servers trust" section says must not be exposed, since anyone reaching it can:

  • redirect fee recipients;
  • join subnets;
  • trigger payload builds.

The only thing left keeping the two apart is a per-port firewall rule. The metrics server also carries the jemalloc heap-profile endpoints (/debug/pprof/allocs), which a default Linux build serves.

Why it is out of scope. lambdaclass/ethlambda#778 is docs-only. It documents the shared address and does not change the CLI.

Fix. Add --metrics-address, defaulting to --http-address's value so existing setups keep working, and serve metrics_app on it in start_http_servers. Equal ports would then merge only when the two addresses are equal too, and Options::validate_ports would need the same rule. Optionally, put /debug/pprof/* behind an opt-in flag, so a scrape-only exposure does not also serve heap profiles. Update the flag table and the trust section in docs/rpc.md.

Ngôn ngữ chính
Rust
Star
86
Fork
34
Merge trung bình
9 ngày 20 giờ
Pull request đã merge (30 ngày)
77

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lambdaclass/ethlambda

Tất cả issue của lambdaclass/ethlambda

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.