Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Centralize retry/backoff configuration on `backon`; inject retries where components give up

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

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust

调研方向

从 crates/app/src/retry.rs 和 crates/core/src/expbackoff.rs 开始,然后跟踪所列出的 scheduler、relay/dial.rs、quic_upgrade.rs、eth1wrap、dkg、recast 和 wire sink 入口点。在决定应如何分层共享策略之前,比较它们的重试和轮询行为。完成的标准是处理重复的配置和手动循环,并且指定的放弃位置会按照预期的截止时间重试。

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

描述

enhancement rust

Summary

backon is already the workspace retry engine and app/src/retry.rs (the Charon app/retry port) is built on it — but the workspace has drifted into at least 5 distinct backoff parameter sets and 4 drive mechanisms:

  • retry.rs defaults (250ms/12s/1.6) — zero call sites (#534 tracks wiring it into the duty callbacks).
  • core::expbackoff fast() (100ms/5s) and default() (1s/120s) — used by scheduler/sse/bootnode, sometimes driven manually via .next() + expect.
  • p2p/src/relay/dial.rs#L104-L126 — a hand-written duplicate of expbackoff::default() (its doc even cites the same Charon config), reimplemented because p2p needs a pollable Duration rather than an async wrapper.
  • quic_upgrade.rs — a third scheme in units of minutes (1→512, doubling).
  • eth1wrap — Alloy's RetryBackoffLayer::new(10, 1000, 100), a fourth policy in a foreign library's units.
  • Fixed-delay loops in dkg/sync (250ms), cli test/peers (for attempt in 0..5, 5s intervals). Same family: dkg busy-polls node signatures on a 100ms ticker, re-locking and cloning the accumulated slot vector every tick (nodesigs.rs#L144-L164), and exchanger.rs#L561 polls with a bare 100ms sleep — both want a Notify/watch signal instead of a poll.

Meanwhile, components that should retry just give up and wait for the next tick: scheduler resolve_duties errors are logged "(retrying next slot)" — a beacon-node blip loses a slot's duty resolution; bcast/recast retries next epoch; the wire-layer store/broadcast sinks log and swallow errors (wire.rs#L739-L746 and siblings) — precisely the points Charon wraps in async-retry.

Proposed change

  • One retry module (the existing app::retry + core::expbackoff, merged or clearly layered) exposing the named policies (fast, default, plus a pollable-Duration helper for poll-based behaviours so relay/dial.rs can delete its copy).
  • Replace the manual .next()/hand-rolled loops with backon's Retryable or the shared pollable helper; express eth1wrap's policy in the same config vocabulary.
  • Inject retries at the give-up sites above (scheduler duty resolution, recast, wire sinks), with per-duty deadlines from the existing DeadlineCalculator plumbing. #534 covers the five Charon duty-callback wrap points; this issue covers the config unification and the remaining sites.
主要语言
Rust
星标
8
派生
6
平均合并
4 天 3 小时
30 天内合并 PR
18

环境准备

从这里开始

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

NethermindEth/pluto 的其他 Issue

查看 NethermindEth/pluto 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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