Skip to content
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

Rename sync_committee_aggregate > sync_aggregate #2796

Merged
merged 1 commit into from
Jan 13, 2022
Merged
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
10 changes: 5 additions & 5 deletions specs/altair/sync-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class LightClientUpdate(Container):
finalized_header: BeaconBlockHeader
finality_branch: Vector[Bytes32, floorlog2(FINALIZED_ROOT_INDEX)]
# Sync committee aggregate signature
sync_committee_aggregate: SyncAggregate
sync_aggregate: SyncAggregate
# Fork version for the aggregate signature
fork_version: Version
```
Expand Down Expand Up @@ -187,8 +187,8 @@ def validate_light_client_update(store: LightClientStore,
index=get_subtree_index(NEXT_SYNC_COMMITTEE_INDEX),
root=active_header.state_root,
)
sync_aggregate = update.sync_committee_aggregate

sync_aggregate = update.sync_aggregate

# Verify sync committee has sufficient participants
assert sum(sync_aggregate.sync_committee_bits) >= MIN_SYNC_COMMITTEE_PARTICIPANTS
Expand Down Expand Up @@ -225,12 +225,12 @@ def process_light_client_update(store: LightClientStore,
genesis_validators_root: Root) -> None:
validate_light_client_update(store, update, current_slot, genesis_validators_root)

sync_committee_bits = update.sync_committee_aggregate.sync_committee_bits
sync_committee_bits = update.sync_aggregate.sync_committee_bits

# Update the best update in case we have to force-update to it if the timeout elapses
if (
store.best_valid_update is None
or sum(sync_committee_bits) > sum(store.best_valid_update.sync_committee_aggregate.sync_committee_bits)
or sum(sync_committee_bits) > sum(store.best_valid_update.sync_aggregate.sync_committee_bits)
):
store.best_valid_update = update

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_process_light_client_update_not_timeout(spec, state):
block_header.slot,
committee,
)
sync_committee_aggregate = spec.SyncAggregate(
sync_aggregate = spec.SyncAggregate(
sync_committee_bits=sync_committee_bits,
sync_committee_signature=sync_committee_signature,
)
Expand All @@ -76,7 +76,7 @@ def test_process_light_client_update_not_timeout(spec, state):
next_sync_committee_branch=next_sync_committee_branch,
finalized_header=finality_header,
finality_branch=finality_branch,
sync_committee_aggregate=sync_committee_aggregate,
sync_aggregate=sync_aggregate,
fork_version=state.fork.current_version,
)

Expand Down Expand Up @@ -123,7 +123,7 @@ def test_process_light_client_update_timeout(spec, state):
committee,
block_root=spec.Root(block_header.hash_tree_root()),
)
sync_committee_aggregate = spec.SyncAggregate(
sync_aggregate = spec.SyncAggregate(
sync_committee_bits=sync_committee_bits,
sync_committee_signature=sync_committee_signature,
)
Expand All @@ -140,7 +140,7 @@ def test_process_light_client_update_timeout(spec, state):
next_sync_committee_branch=next_sync_committee_branch,
finalized_header=finality_header,
finality_branch=finality_branch,
sync_committee_aggregate=sync_committee_aggregate,
sync_aggregate=sync_aggregate,
fork_version=state.fork.current_version,
)

Expand Down Expand Up @@ -201,7 +201,7 @@ def test_process_light_client_update_finality_updated(spec, state):
committee,
block_root=spec.Root(block_header.hash_tree_root()),
)
sync_committee_aggregate = spec.SyncAggregate(
sync_aggregate = spec.SyncAggregate(
sync_committee_bits=sync_committee_bits,
sync_committee_signature=sync_committee_signature,
)
Expand All @@ -212,7 +212,7 @@ def test_process_light_client_update_finality_updated(spec, state):
next_sync_committee_branch=next_sync_committee_branch,
finalized_header=finalized_block_header,
finality_branch=finality_branch,
sync_committee_aggregate=sync_committee_aggregate,
sync_aggregate=sync_aggregate,
fork_version=state.fork.current_version,
)

Expand Down