Penalize peers whose fetched data column sidecars fail the chain checks

Đang mở
#815 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
47/100
Loại issue
Lỗi
Độ 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
backend, networking

Hướng nghiên cứu

Start with crates/net/p2p/src/beacon/column_checks.rs and the two response handlers in crates/net/p2p/src/req_resp/handlers.rs named in the issue. Trace how check verdicts reach those handlers, then read the existing peer reporting or suspicion and backoff paths. Done means a forged column from a by-root response reports its serving peer, with a test asserting that result.

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

Mô tả

The problem. A DataColumnsByRoot or DataColumnsByRange answer goes through column_checks::check_and_forward (crates/net/p2p/src/beacon/column_checks.rs:322), which takes no PeerId. Both response handlers know the peer and drop it at the call:

  • handle_data_column_sidecars_range_response (crates/net/p2p/src/req_resp/handlers.rs:2466, call at :2505);
  • handle_data_column_sidecars_response (handlers.rs:2530, call at :2567).

A fetched sidecar can be refused on KZG proofs, inclusion proof, header signature, proposer or shape. Such a sidecar is counted in lean_data_columns_rejected_total and nothing else. The peer that served it is not scored, disconnected or deprioritized. Column lookups pick peers at random on retry, so a peer serving forged columns stays as likely to be asked again as any other.

The cost today. Each forged column costs the node CPU. lambdaclass/ethlambda#754 verifies a block's columns in KZG sub-batches of at most 16 and re-checks a failed batch column by column. One forged column per sub-batch then costs about 64 ms of CPU per 16 columns at 9 blobs, against about 51 ms for checking them one at a time as main did. Both figures are computed from measured single-thread batch timings. That is bounded, but nothing stops it repeating.

Why it is out of #754's scope. The gap predates the PR: main's per-sidecar checks did not penalize the sender either. #754 changes how the checks are paid for, not what happens to the source.

What a fix would look like.

  • Carry the source of a check_and_forward call into the group's verdicts: a peer for req/resp answers, and gossip, parked replay or this node's own for the rest.
  • On a Reject outcome from a peer's answer (not an Ignore, and not a parked replay, whose original sender is long gone), report that peer. That could mean a disconnect, or the same suspicion and backoff range sync applies to peers that serve bad data, so it is not asked again for a while.
  • A test can feed a forged column through a fake by-root answer and assert the peer is reported.

Related. lambdaclass/ethlambda#803 (open) holds a refused sidecar against its sender for the rest of that one by-root lookup, so the lookup stops asking that peer. It does not score the peer or carry over to later lookups.

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.