Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b5b6d8a
networking: update committee docs
kamilsa Jan 13, 2026
4867d7d
networking: add committee size configuration
kamilsa Jan 13, 2026
7bcedca
store committee attestations
kamilsa Jan 13, 2026
980b5e8
Add aggregation in 2nd interval
kamilsa Jan 13, 2026
60468af
Committee aggregation
kamilsa Jan 13, 2026
213504a
Rename aggregation committee size to count for clarity
kamilsa Jan 13, 2026
4fac983
Remove committee signatures
kamilsa Jan 14, 2026
f2651d8
Refactor build_block:
kamilsa Jan 14, 2026
cc7548c
Clarify attestation broadcasting and update Devnet reference
kamilsa Jan 14, 2026
cb1a21b
remove adding proposer signatures to gossip_signatures
kamilsa Jan 14, 2026
e398823
Refactor subnet ID computation and rename committee signatures variable
kamilsa Jan 14, 2026
90fc114
Store proposer signature if same subnet
kamilsa Jan 14, 2026
cdae6a4
Update build block with selecting aggregations
kamilsa Jan 14, 2026
b24d3ed
Uncomment on_attestation during on_gossip_aggregation
kamilsa Jan 14, 2026
5c952ff
Update gossipsub topic names to reflect devnet3
kamilsa Jan 14, 2026
8a0c121
Rename aggregation committee to attestation committee and update rela…
kamilsa Jan 15, 2026
cb952f8
Merge remote-tracking branch 'origin/main' into committee-aggregation
kamilsa Jan 15, 2026
9d721bd
refactor: rename committee aggregation topic to aggregated attestation
kamilsa Jan 15, 2026
baddbeb
update validator.md to clarify subnet usage in attestation committees
kamilsa Jan 15, 2026
6556e81
feat: add threshold ratio for committee signature aggregation
kamilsa Jan 16, 2026
3477d6e
feat: replace attestation_subnet_count with attestation_committee_cou…
kamilsa Jan 16, 2026
9174f5b
feat: add committee signature threshold ratio chain config
kamilsa Jan 16, 2026
3115ef5
feat: aggregate on gossip
kamilsa Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions docs/client/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Each node entry contains an ENR. This is an Ethereum Node Record. It includes:
- The node's public key
- Network address
- Port numbers
- Committee assignments (for aggregators)
- Other metadata

In production, dynamic discovery would replace static configuration.
Expand Down Expand Up @@ -62,15 +63,35 @@ Messages are organized by topic. Topic names follow a pattern that includes:

This structure lets clients subscribe to relevant messages and ignore others.

The payload carried in the gossipsub message is the SSZ-encoded,
Snappy-compressed message, which type is identified by the topic:

| Topic Name | Message Type | Encoding |
|------------------------------------------------------------|-----------------------------|--------------|
| /lean/consensus/devnet3/blocks/ssz_snappy | SignedBlockWithAttestation | SSZ + Snappy |
| /lean/consensus/devnet3/attestations/ssz_snappy | SignedAttestation | SSZ + Snappy |
| /lean/consensus/devnet3/attestation_{subnet_id}/ssz_snappy | SignedAttestation | SSZ + Snappy |
| /lean/consensus/devnet3/aggregation/ssz_snappy | SignedAggregatedAttestation | SSZ + Snappy |

### Message Types

Two main message types exist:
Three main message types exist:

* _Blocks_, defined by the `SignedBlockWithAttestation` type, are proposed by
validators and propagated on the block topic. Every node needs to see blocks
quickly.

Blocks are proposed by validators. They propagate on the block topic. Every
node needs to see blocks quickly.
* _Attestations_, defined by the `SignedAttestation` type, come from all
validators. They propagate on the global attestation topic. Additionally,
each committee has its own attestation topic. Validators publish to their
committee's attestation topic and global attestation topic. Non-aggregating
validators subscribe only to the global attestation topic, while aggregators
subscribe to both the global and their committee's attestation topic.

Attestations come from all validators. They propagate on the attestation topic. High volume
but small messages.
* _Committee aggregations_, defined by the `SignedAggregatedAttestation` type,
created by committee aggregators. These combine attestations from committee
members. Aggregations propagate on the aggregation topic to which every
validator subscribes.

### Encoding

Expand Down
43 changes: 33 additions & 10 deletions docs/client/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## Overview

Validators participate in consensus by proposing blocks and producing attestations. This
document describes what honest validators do.
Validators participate in consensus by proposing blocks and producing attestations.
Optionally validators can opt-in to behave as aggregators in a single or multiple
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A validator is assigned to a certain subnet but can they perform an aggregator role in multiple subnets?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I think we may add this possibility in future. But lets start with one subnet per aggregator.

I think we may consider similar logic to how validators self-assign themselves for sampling of single or multiple columns data in PeerDAS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great! We can update this description to a single committee and modify it later once we introduce multiple subnets aggregator.

committees. This document describes what honest validators do.

## Validator Assignment

Expand All @@ -16,6 +17,32 @@ diversity helps test interoperability.
In production, validator assignment will work differently. The current approach
is temporary for devnet testing.

## Attestation Committees and Subnets

Attestation committee is a group of validators contributing to the common
aggregated attestations. Subnets are network channels dedicated to specific committees.

In the devnet-3 design, however, there is one global subnet for signed
attestations propagation, in addition to publishing into per committee subnets.
This is due to 3SF-mini consensus design, that requires 2/3+ of all
attestations to be observed by any validator to compute safe target correctly.

Note that non-aggregating validators do not need to subscribe to committee
attestation subnets. They only need to subscribe to the global attestation
subnet.

Every validator is assigned to a single committee. Number of committees is
defined in config.yaml. Each committee maps to a subnet ID. Validator's
subnet ID is derived using their validator index modulo number of committees.
This is to simplify debugging and testing. In the future, validator's subnet ID
will be assigned randomly per epoch.

## Aggregator assignment

Some validators are self-assigned as aggregators. Aggregators collect and combine
attestations from other validators in their committee. To become an aggregator,
a validator sets `is_aggregator` flag to true as ENR record field.

## Proposing Blocks

Each slot has exactly one designated proposer. The proposer is determined by
Expand Down Expand Up @@ -52,7 +79,7 @@ receive and validate it.

## Attesting

Every validator attestations in every slot. Attesting happens in the second interval,
Every validator attests in every slot. Attesting happens in the second interval,
after proposals are made.

### What to Attest For
Expand All @@ -78,8 +105,8 @@ compute the head.

### Broadcasting Attestations

Validators sign their attestations and broadcast them. The network uses a single topic
for all attestations. No subnets or committees in the current design.
Validators sign their attestations and broadcast them into the global
attestation topic and its corresponding subnet topic.

## Timing

Expand All @@ -98,11 +125,7 @@ blocks and attestations.
Attestation aggregation combines multiple attestations into one. This saves bandwidth and
block space.

Devnet 0 has no aggregation. Each attestation is separate. Future devnets will add
aggregation.

When aggregation is added, aggregators will collect attestations and combine them.
Aggregated attestations will be broadcast separately.
Devnet-3 introduces signatures aggregation. Aggregators will collect attestations and combine them. Aggregated attestations will be broadcast separately.

## Signature Handling

Expand Down
14 changes: 14 additions & 0 deletions src/lean_spec/subspecs/chain/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
VALIDATOR_REGISTRY_LIMIT: Final = Uint64(2**12)
"""The maximum number of validators that can be in the registry."""

ATTESTATION_COMMITTEE_COUNT: Final = Uint64(1)
"""The number of attestation committees per slot."""

COMMITTEE_SIGNATURE_THRESHOLD_RATIO: Final = 0.9
"""Default ratio of committee signature participation required to trigger aggregation."""


class _ChainConfig(StrictBaseModel):
"""
Expand All @@ -52,11 +58,19 @@ class _ChainConfig(StrictBaseModel):
historical_roots_limit: Uint64
validator_registry_limit: Uint64

# Attestation / Networking
attestation_committee_count: Uint64

# Aggregation behavior
committee_signature_threshold_ratio: float


# The Devnet Chain Configuration.
DEVNET_CONFIG: Final = _ChainConfig(
seconds_per_slot=SECONDS_PER_SLOT,
justification_lookback_slots=JUSTIFICATION_LOOKBACK_SLOTS,
historical_roots_limit=HISTORICAL_ROOTS_LIMIT,
validator_registry_limit=VALIDATOR_REGISTRY_LIMIT,
attestation_committee_count=ATTESTATION_COMMITTEE_COUNT,
committee_signature_threshold_ratio=COMMITTEE_SIGNATURE_THRESHOLD_RATIO,
)
8 changes: 8 additions & 0 deletions src/lean_spec/subspecs/containers/attestation/attestation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from lean_spec.subspecs.ssz import hash_tree_root
from lean_spec.types import Bytes32, Container, Uint64

from ...xmss.aggregation import AggregatedSignatureProof
from ...xmss.containers import Signature
from ..checkpoint import Checkpoint
from .aggregation_bits import AggregationBits
Expand Down Expand Up @@ -107,3 +108,10 @@ def aggregate_by_data(
)
for data, validator_ids in data_to_validator_ids.items()
]

class SignedAggregatedAttestation(Container):
data: AttestationData
"""Combined attestation data similar to the beacon chain format."""

proof: AggregatedSignatureProof
"""Aggregated signature proof covering all participating validators."""
Loading