Skip to content

Add note about aggregate key in SyncCommittee #4185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions specs/altair/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ class SyncAggregate(Container):

#### `SyncCommittee`

*Note:* The `aggregate_pubkey` field is computed but is not currently used in the specifications. Typically, sync committee signatures are verified by summing up the public keys of the subset of committee members that signed to obtain their aggregate public key. Notably, this key is different from `aggregate_pubkey`, as it only represents a subset of the committee. The `aggregate_pubkey` field can be used in the following optimization: If more than half of the sync committee members have signed, their aggregate public key can be derived more efficiently by subtracting the keys of the missing members from `aggregate_pubkey`.

```python
class SyncCommittee(Container):
pubkeys: Vector[BLSPubkey, SYNC_COMMITTEE_SIZE]
Expand Down
5 changes: 5 additions & 0 deletions specs/altair/light-client/sync-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ def validate_light_client_update(store: LightClientStore,
assert bls.FastAggregateVerify(participant_pubkeys, signing_root, sync_aggregate.sync_committee_signature)
```

*Note:* `bls.FastAggregateVerify` internally computes an aggregate public key by summing individual keys from `participant_pubkeys`. There are two potential optimizations:

1. If `len(participant_pubkeys) > sync_committee.pubkeys - len(participant_pubkeys)`, computing the aggregate public key can be more efficient by subtracting the non-participating keys from `sync_committee.aggregate_pubkey` instead of summing the participants.
2. Assuming the same sync committee members participate across sequential slots, one can optimize further by caching the aggregate public key from the previous slot(s) and incrementally updating it (by adding and subtracting individual keys) for the next slot, where we consider two slots with the same sync committee.

### `apply_light_client_update`

```python
Expand Down