Clients beyond client_set_max in single-round Panetiere and ADCNet lose their payload without noticing

未关闭
#6 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

Start with the cited client-session handlers and client-set formation points in panetiere.rs and adcnet.rs; compare their behavior with the scheduled variants’ retry handling. Trace how clients receive ClientSet messages and how payloads move through pending and the outbox. Done means excluded or unconfirmed clients learn that delivery failed and retry their payload in a later round, with coverage for both protocols and Panetiere consensus mode.

由索引模型根据 Issue 内容生成。

描述

Summary

In Panetiere and ADCNet (single-round), a client sends its payload once and keeps no copy. If the round is already full, the client is left out of it and the payload is lost. The client gets no signal, so the payload is never put back in the outbox, and the sender's Pipe::send had already returned Ok(()). The scheduled variants don't have this problem: their clients only send after their reservation or bid is confirmed, and they retry if it isn't.

Panetiere (leader mode)

  1. Each relay accepts up to 2× client_set_max clients per round, in arrival order (panetiere.rs:2588-2611).
  2. When the round ends, the leader takes the first client_set_max admitted clients as the official client list for the round and broadcasts it as a ClientSet message (panetiere.rs:2301-2306). The other clients only count toward demand, and the leader logs them at debug level ("clients excluded from the canonical set").
  3. The client session took the payload out of pending when it sent it (panetiere.rs:1830). Its on_inbound only handles SetBatch and ignores ClientSet (panetiere.rs:1989-1994). This is true even though client nodes already receive ClientSet: a non-relay node subscribes to the subnet's broadcast topic (runtime.rs:1313-1317), and handle_inbound passes every incoming message to every session.

Consensus set formation has the same problem: the client reads receipt batches, but only to resend repair fragments, never to re-queue the payload.

ADCNet (single-round)

The leader drops contributions once the round is full (adcnet.rs:1673-1681). In grouped mode, each aggregator does the same at its group's cap (adcnet.rs:1233-1239). Both cases only log at debug level. AdcnetClientSession::on_inbound ignores all messages (adcnet.rs:1109), so the client can't tell its contribution was dropped.

Impact

  • Payloads are lost silently whenever more clients send in a round than the cap allows.
  • Who gets left out depends on arrival order, so it's not random. Clients with the slowest connection to the leader are left out again and again.
  • More generally, neither protocol has any delivery confirmation. Any other reason a round fails to include a client (for example, the client skipping the round because a relay's exchange key is missing, panetiere.rs:1818) also loses the payload silently.

Expected

A client that was left out of a round finds out and retries the payload in a later round, as the scheduled variants already do.

Possible fixes

  • Panetiere: keep the sent payload in the client session until the leader's ClientSet for that round arrives. If the client's id isn't listed, or no ClientSet arrives within a set number of rounds, re-queue the payload. In consensus mode, use the agreed client set in the same way.
  • ADCNet: the leader broadcasts its client set too (AdcnetWire::ClientSet, adcnet.rs:1948). Have the client check it in the same way.
  • Re-queue with some randomness, as Scheduled Panetiere does with its deferred list, so that clients left out together don't all retry in the same round and overflow it again.
主要语言
Rust
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

flashbots/anymone 的其他 Issue

查看 flashbots/anymone 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。