beacon: raise the custody group count for attached validators (fulu validator custody)
Les mainteneurs répondent en général sous 6 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- rust
- Domaine
- distributed-systems, networking
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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)
validator_custody_requirementandbalance_per_additional_custody_groupare parsed intoConfigand then dropped.first_config_differencedestructures both as_, and nothing else reads them.
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/bin/ethlambda/src/main.rs#L1884-L1890- The custody set is computed once at startup, in
wire_params, from the CLI value, and kept for the life of the process.
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/bin/ethlambda/src/beacon.rs#L211-L220 - The node does not record which validators are attached.
beacon_committee_subscriptionsparsesvalidator_indexbut never reads it, andprepare_beacon_proposerkeeps the indices only as keys of the fee-recipient map.
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/crates/net/rpc/src/beacon/validator.rs#L285-L299
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/crates/net/rpc/src/beacon/validator.rs#L348-L358 - MetaData v3 always answers
custody_group_count = CUSTODY_REQUIREMENT, even when--custody-group-countis set higher. The ENR'scgcdoes carry the flag's value, so the two disagree on any node started with a non-default count.
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/crates/net/p2p/src/beacon/handler.rs#L124-L148 GET /eth/v1/node/identityreportsseq_number,attnetsandsyncnetsundermetadata, but notcustody_group_count.AdvertisedMetaDatahas no field for it.
https://github.com/lambdaclass/ethlambda/blob/0ea6e214930dcfc44422e5e4eb9a2866d32f1fec/crates/net/rpc/src/beacon/node.rs#L117-L130
What the spec asks for (fulu validator.md)
- Advertise the higher count in MetaData
custody_group_countand in the ENR'scgc. - 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_slotin 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
- 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. - Once per epoch, compute
get_validators_custody_requirementand take the larger of the flag, that requirement, and the persisted highest count. Store the highest count in the data directory. - Make the custody set changeable at runtime. Today it is fixed in
BeaconWireand 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. - When the count changes, bump the MetaData
seq_numberand the ENR. The ENR has the same known gap as the fork digest: ethrex'sDiscoveryServercannot replace the record it serves at runtime, socgcwould stay at its startup value until a restart. - Make MetaData v3 report the real count, and add
custody_group_countto/eth/v1/node/identity. - After an increase, keep
earliest_available_slothonest until backfill completes.
Steps 5 and 1 are small and independent, so they could land first.
- Langage dominant
- Rust
- Étoiles
- 86
- Forks
- 34
- Merge moyen
- 9 j 20 h
- PR mergées (30 j)
- 77
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lambdaclass/ethlambda
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
lambdaclass/ethlambda#850 ·
Les mainteneurs répondent en général sous 6 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
lambdaclass/ethlambda#777 · 1 réaction ·
Les mainteneurs répondent en général sous 6 jours
-
Run all gossip validation testsPeut-être à nouveau libre @dicethedev l’a pris il y a 9 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
lambdaclass/ethlambda#725 · 2 commentaires ·
Les mainteneurs répondent en général sous 6 jours
-
Handle malformed DB dataPeut-être à nouveau libre @dicethedev l’a pris il y a 115 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
lambdaclass/ethlambda#529 · 4 commentaires ·
Les mainteneurs répondent en général sous 6 jours
-
Document architectural choicesPeut-être à nouveau libre @dicethedev l’a pris il y a 115 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
lambdaclass/ethlambda#521 · 2 commentaires ·
Les mainteneurs répondent en général sous 6 jours
Toutes les issues de lambdaclass/ethlambda
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
bytecodealliance/wrpc#1785 ·
Les mainteneurs répondent en général sous 1 jour
-
2 advisory ignore entries no longer match anything (`quick-xml` already patched in `Cargo.lock`)Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
longbridge/nsh#2758 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
antithesishq/bombadil#473 ·
Les mainteneurs répondent en général sous 2 jours
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
libracoder/kiri#669 ·
Les mainteneurs répondent en général sous 1 jour