beacon: raise the custody group count for attached validators (fulu validator custody)

Đang mở
#848 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 6 ngày

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust

Hướng nghiên cứu

Start with crates/net/rpc/src/beacon/validator.rs to trace validator indices from beacon_committee_subscriptions and prepare_beacon_proposer. Then read bin/ethlambda/src/beacon.rs and the custody paths listed in the issue to see how the startup count is used. Done means attached validators affect the custody count and the count is advertised consistently; the issue describes additional persistence, runtime update, and backfill work.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

ethlambda beacon does not implement fulu validator custody. It custodies and advertises whatever --custody-group-count says (default CUSTODY_REQUIREMENT = 4), regardless of how many validators are attached to it.

Fulu validator.md ("Validator custody") says a node with validators attached custodies get_validators_custody_requirement(state, validator_indices) groups. That is the attached validators' total effective balance divided by BALANCE_PER_ADDITIONAL_CUSTODY_GROUP (32 ETH), with a floor of VALIDATOR_CUSTODY_REQUIREMENT (8) and a cap of NUMBER_OF_CUSTODY_GROUPS (128). A node with 4096 ETH or more attached must therefore be a supernode.

Observed in a kurtosis test enclave: with 128 validators attached, ethlambda logged custody_group_count=4, while Lighthouse in the same network reported 128. A network laid out on the assumption that every validating node stores at least 8 groups is short on column custody wherever ethlambda runs the validators.

What the code does today (at 0ea6e214)

What the spec asks for (fulu validator.md)

  • Advertise the higher count in MetaData custody_group_count and in the ENR's cgc.
  • Adjust it dynamically, without operator input, as the attached validators' effective balances change.
  • On an increase, advertise the new count immediately. Backfill MAY follow. earliest_available_slot in Status v2 should reflect what the node can actually serve, and may move lower as backfill progresses.
  • On a decrease, keep custodying and advertising the previous (highest) count, and persist it across restarts.

Rough scope

  1. Track attached validator indices from validator client calls (beacon_committee_subscriptions, prepare_beacon_proposer), with an expiry so that a detached validator client stops counting.
  2. Once per epoch, compute get_validators_custody_requirement and take the larger of the flag, that requirement, and the persisted highest count. Store the highest count in the data directory.
  3. Make the custody set changeable at runtime. Today it is fixed in BeaconWire and in the chain actor at spawn, and these paths read it: data-column subnet subscriptions, the availability check, req/resp serving, and the engine's custody columns.
  4. When the count changes, bump the MetaData seq_number and the ENR. The ENR has the same known gap as the fork digest: ethrex's DiscoveryServer cannot replace the record it serves at runtime, so cgc would stay at its startup value until a restart.
  5. Make MetaData v3 report the real count, and add custody_group_count to /eth/v1/node/identity.
  6. After an increase, keep earliest_available_slot honest until backfill completes.

Steps 5 and 1 are small and independent, so they could land first.

Ngôn ngữ chính
Rust
Star
86
Fork
34
Merge trung bình
9 ngày 20 giờ
Pull request đã merge (30 ngày)
77

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lambdaclass/ethlambda

Tất cả issue của lambdaclass/ethlambda

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.