Queued pipe payloads can be silently dropped at stage time after passing the send-time size check
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
- 54/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, distributed-systems
Hướng nghiên cứu
Start with pipe.rs send-time size checks, runtime.rs outbox staging, and the protocol session stage() implementations in panetiere.rs, panetiere_scheduled.rs, adcnet.rs, and noop.rs. Read config.rs and scheduler_core.rs to trace the Scheduled Panetiere limit mismatch. Reproduce both queued-frame cases, then verify accepted payloads are delivered or produce a clear failure signal.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Pipe::send checks payload size once, when the payload is queued, and returns Ok(()) (pipe.rs:176-193). The frame then waits in the node-wide outbox until a round's participation draw takes it in sync_client_round and hands it to the client session's stage() (runtime.rs:1576-1588). Each protocol's session checks size again there, against its own limit. If that second check fails, the frame is thrown away: it isn't put back in the outbox, and the sender is never told. Two cases trigger this.
Case 1: Message size shrinks in a config update while a frame is queued
- The node runs a config where the smallest
message_sizeacross runnable subnets is, say, 1024. - A pipe sends a 1000-byte payload.
check_size_againstpasses and the frame is queued. - The frame waits in the outbox for one or more rounds, either because no subnet was drawn yet or because other frames are ahead of it.
- A new config lowers
message_sizeto 512.apply_configreplaces the worker, because the protocol config is part ofsubnet_sig. The outbox is not re-checked. - The new worker's
sync_client_roundpops the frame and callsstage(), which drops it.
This affects every protocol, each in its own way:
- Panetiere:
stage()logs an error and drops the frame (panetiere.rs:2013-2023). - Scheduled Panetiere:
reserve_messagereturns an error, andstage()discards it withlet _ =(panetiere_scheduled.rs:835), so nothing is logged. - ADCNet:
contributefails, which is only logged at debug level, and the payload is lost (adcnet.rs:1075,adcnet.rs:1104). - Noop:
begin_roundreturns nothing for an oversized payload (noop.rs:47-51).
Case 2: The send-time and stage-time limits disagree (Scheduled Panetiere)
The pipe checks against ProtocolConfig::message_size(), which is message_size for Scheduled Panetiere (config.rs:238). The session checks against vector_bytes.min(u16::MAX) (panetiere_scheduled.rs:793). validate_structure rejects message_size > u16::MAX and vector_bytes == 0, but it does not require message_size <= vector_bytes (scheduler_core.rs:247-262).
With message_size = 1024 and vector_bytes = 512, any payload between about 513 and 1024 bytes passes the send check. It is then dropped every time, without a log line.
Expected
A payload that send accepts is either delivered, or the sender is clearly told it failed. Nothing is dropped silently.
Possible fixes
- Case 2: require
message_size <= vector_bytesinvalidate_structure, or haveProtocolConfig::message_size()return the effective limit for Scheduled Panetiere. - Case 1: re-check the outbox in
apply_configand drop oversized frames with a warning or an event. Or havestage()return a result, sosync_client_roundcan log the drop and report it. - In both cases, log the dropped frame in Scheduled Panetiere's
stage()instead of discarding the error.
- Ngôn ngữ chính
- Rust
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flashbots/anymone
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Documentation of Anymone's governance committeeCó thể làm lại được @ameba23 đã nhận 43 ngày trước và không có pull request nào đang mở. Đang mởdocumentation
Tất cả issue của flashbots/anymone
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-telemetry/weaver#1917 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug host P3 web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jphacks/kz_2613#589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation pkg:sdk project
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
priority middle
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
KATO-Hiro/AtCoderClans#13029 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RustCrypto/formats#2544 ·
Maintainer thường phản hồi trong vòng 1 ngày