validator: test the client with a large number of validator keys
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- performance, testing
调研方向
Start by reading secret_key_for in test_state and the MockBeaconNode setup, then look at the duty path in crates/validator/src/preferences.rs, the commit path in slashing_protection/file.rs, and the registration batching in registration.rs. The scale harness should run a few epochs at 1,000 and 10,000 keys and record per-slot duty time, slashing-protection write time, and the registration send size. Done means those numbers are reported for both key counts. The issue does not settle whether any code should change.
由索引模型根据 Issue 内容生成。
描述
The validator client has only been run with a handful of keys. Nothing measures what it costs per slot, per epoch or at startup with thousands of them, which is where several of its designs would show it first.
This came up in the review of #707: PreferencesService takes its sent lock once per proposer duty instead of once per poll (crates/validator/src/preferences.rs). That is harmless at the few proposals an epoch holds, but it is one example of a per-key cost nobody has measured.
What grows with the number of keys
These are read from the code, not measured:
- Startup.
ValidatorStore::loaddecrypts the keystores one after another (keys/store.rs). With EIP-2335's default scrypt parameters each one takes a noticeable fraction of a second, so 10,000 keys could take a long time before the first duty. - Slashing protection. Each
commitre-renders the whole interchange file with every key's record, then writes it durably: a temporary file, an fsync, a rename and a directory fsync (slashing_protection/file.rswrite). A slot's attestations are batched into one commit, so the commit itself is one per slot rather than one per key. Its size still grows with the number of keys, and it sits in front of every attestation signature.time_slashing_protection_writealready records how long it takes. - Builder registrations (fulu and earlier, with
--builder-proposals).- The first epoch signs one BLS signature per key on the blocking pool, 64 per chunk.
- Every epoch then sends every registration in batches of 500.
- A per-slot keymanager change waits behind that send. Against a slow node, that is at most 12 s per 500 validators (
registration.rsmodule doc).
- Epoch refresh.
validator_indicesPOSTs every loaded pubkey every epoch, andprepare_beacon_proposersends one entry per resolved key. - Per-slot duties. Attestations, aggregation selection and sync committee messages are signed for every key with a duty in the slot.
Proposal
- A scale test or benchmark. It would drive the services against
MockBeaconNodewith, for example, 1,000 and 10,000 keys over a few epochs.- The keys would use the small-integer secrets from
test_state::secret_key_for, so no keystore has to be decrypted. - It would measure the duty path's time per slot, the slashing-protection write time, the registration send's length and memory.
- The keys would use the small-integer secrets from
- A separate startup measurement with real scrypt keystores.
- A devnet run with a large key set behind one validator client, to see the same costs against a real beacon node.
- Decide from the numbers whether anything needs changing first: parallel keystore decryption, or an incremental slashing-protection store in place of rewriting the whole file every commit.
- 主要语言
- Rust
- 星标
- 86
- 派生
- 34
- 平均合并
- 9 天 20 小时
- 30 天内合并 PR
- 77
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lambdaclass/ethlambda 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
lambdaclass/ethlambda#850 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
lambdaclass/ethlambda#777 · 1 个 reaction ·
维护者通常 6 天内回复
-
Run all gossip validation tests可能重新可做 @dicethedev 于 9 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
lambdaclass/ethlambda#725 · 2 条评论 ·
维护者通常 6 天内回复
-
Handle malformed DB data可能重新可做 @dicethedev 于 115 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
lambdaclass/ethlambda#529 · 4 条评论 ·
维护者通常 6 天内回复
-
Document architectural choices可能重新可做 @dicethedev 于 115 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
lambdaclass/ethlambda#521 · 2 条评论 ·
维护者通常 6 天内回复
查看 lambdaclass/ethlambda 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
antithesishq/bombadil#473 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
libracoder/kiri#669 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 5 天内回复
-
autofixer: follow-up
难度 2/5 1-3 小时 新手友好度 75/100
tursodatabase/turso#12217 ·
维护者通常 1 天内回复
-
Declare the CMS schema library in the optional recipients extra可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:python in-progress
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复