Add is-aggregator configuration flag#368
Merged
tcoratger merged 2 commits intoleanEthereum:mainfrom Feb 6, 2026
Merged
Conversation
Introduces a new --is-aggregator command-line parameter that enables aggregator mode for consensus nodes. When enabled, the node performs attestation aggregation operations and advertises this capability in its ENR. Changes: - Add is_aggregator field to NodeConfig with default value False - Add IS_AGGREGATOR ENR key constant for peer discovery - Add is_aggregator property to ENR class for reading aggregator flag - Add is_aggregator field to NetworkService for ENR advertisement - Add --is-aggregator CLI argument with help text - Thread flag through initialization paths (genesis and checkpoint sync) - Add logging when aggregator mode is enabled Usage: python -m lean_spec --genesis config.yaml --is-aggregator The flag defaults to False, maintaining backward compatibility with existing deployments. When True, the node's ENR will include the is_aggregator key, allowing peers to discover aggregator nodes.
Updates the is_aggregator helper function to use the actual node configuration instead of always returning False. The flag now flows from NodeConfig -> SyncService -> aggregation logic. Changes: - Add is_aggregator field to SyncService (defaults to False) - Pass is_aggregator from NodeConfig to SyncService initialization - Update is_aggregator() helper to accept node_is_aggregator parameter - Update call site in SyncService to pass the configuration flag - Improve documentation explaining aggregator role requirements The helper now returns True only when: 1. The validator is active (validator_id is not None) 2. The node operator has enabled aggregator mode (--is-aggregator flag) This completes the integration of the is-aggregator configuration, allowing nodes to actually perform aggregation when the flag is set.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new
--is-aggregatorcommand-line parameter that enables aggregator mode for consensus nodes. When enabled, the node performs attestation aggregation operations and advertises this capability in its ENR for peer discovery.Changes
is_aggregatorfield with default valueFalseIS_AGGREGATORconstant for ENR key-value pairsis_aggregatorproperty to read aggregator flag from ENR recordsis_aggregatorfield for ENR advertisement--is-aggregatorargument with help textUsage
Implementation Details
Configuration Flow
The flag flows through the entire initialization chain:
ENR Advertisement
is_aggregator=True, the node's ENR includes theis_aggregatorkey0x00= false,0x01= trueENR.is_aggregatorpropertyBackward Compatibility
False, maintaining existing behaviorTest plan
--is-aggregatorflagNext Steps
Future work to complete aggregator functionality:
is_aggregatorkey in the record