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

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flashbots/anymone のほかの issue

flashbots/anymone の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。