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

release v1.1.0-beta.3 #2561

Merged
merged 159 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
42eae81
WIP. Rework on_block tests
hwwhww Jun 15, 2021
fb2465d
Rework `on_block` unit tests
hwwhww Jun 18, 2021
2445fe5
Add new test cases
hwwhww Jun 18, 2021
7a9ae57
Minor formatting. `True` -> `true`, `False` -> `false`
hwwhww Jun 18, 2021
83598af
Add `test_new_justified_is_later_than_store_justified` and fix test
hwwhww Jun 18, 2021
88be6cd
Apply Danny's suggestions from code review
hwwhww Jun 22, 2021
69a645a
Apply PR feedback
hwwhww Jun 22, 2021
f55afef
Move more tests from unittests to testgen tests
hwwhww Jun 22, 2021
29a93f6
Move more unit tests to test vectors
hwwhww Jun 25, 2021
27763bd
clean up
hwwhww Jun 29, 2021
63ca480
Add condition check in `on_tick` to ensure that `store.justified_chec…
hwwhww Jul 14, 2021
cc3690c
Add unit tests to test the new condition.
hwwhww Jul 14, 2021
3b34f16
add base merge p2p spec
djrtwo Jul 22, 2021
bc93676
global selection of shard proposers
protolambda Jun 17, 2021
4b25239
builders make blobs, proposers make blocks
protolambda Jun 18, 2021
9e10f58
update networking spec
protolambda Jun 18, 2021
b3d5858
update data fee payment, todo
protolambda Jun 18, 2021
2a105f4
fix toc
protolambda Jun 18, 2021
5726cb9
aggregate builder and proposer for simplified typing and optimized ve…
protolambda Jun 20, 2021
5034e2d
update shard spec wording + fix shard slashings
protolambda Jun 21, 2021
b25afc8
update networking spec with aggregate proposer/builder types, update …
protolambda Jun 21, 2021
f791fe7
implement review suggestions
protolambda Jun 23, 2021
a7f58ef
fix comment + handle missing pending headers
protolambda Jul 14, 2021
35df4b2
rephrase context enum for blocks_by requests
djrtwo Jul 23, 2021
1a966d1
work in progress new sharding fee mechanism
protolambda Jul 26, 2021
9a1a30c
Rebase Merge spec with London
mkalinin Jul 26, 2021
789e10e
Update toc
mkalinin Jul 26, 2021
756eb90
consider per-slot sample target adjustment, to avoid racing and order…
protolambda Jul 26, 2021
d47d2f9
shard fees: implement review suggestions from @nashatyrev
protolambda Jul 27, 2021
0daaafb
fix union value retrieval, thanks @terencechain
protolambda Jul 28, 2021
c311712
Apply suggestions from code review
mkalinin Jul 30, 2021
5d5a9e3
Rename GAS_LIMIT_DIVISOR to GAS_LIMIT_DENOMINATOR
mkalinin Jul 30, 2021
d58ffc7
Add genesis settings section
mkalinin Jul 30, 2021
f1982d4
Replace underflow check with respective comment
mkalinin Jul 30, 2021
ab78339
fix variable name of summary field
protolambda Jul 30, 2021
add5810
remove unused pending attestation fields
protolambda Jul 30, 2021
2d17c8c
move back INITIAL_ACTIVE_SHARDS to preset, avoid changing mainnet config
protolambda Jul 30, 2021
91968de
update sharding presets
protolambda Jul 30, 2021
322f072
sharding: remove outdated comment, timely shard attesters are marked …
protolambda Jul 31, 2021
b262854
Rename the `eth2_*` functions to `eth_`
hwwhww Aug 3, 2021
d8d0686
Add tests for the Altair BLS helpers
hwwhww Aug 3, 2021
424f838
Update specs/sharding/beacon-chain.md
protolambda Aug 4, 2021
43a1617
Ensure that the given PKs are valid PKs + fix typos
hwwhww Aug 4, 2021
69205a2
Merge pull request #2536 from ethereum/eth2-bls-to-eth
ralexstokes Aug 4, 2021
fc3e651
samples -> samples_length
protolambda Aug 4, 2021
2ff143c
Add test for exited validators during inactivity leak
ralexstokes Aug 4, 2021
a8383be
Apply suggestions from code review
hwwhww Aug 5, 2021
56c9213
Merge branch 'dev' into altair-bls-tests
hwwhww Aug 5, 2021
3b86bd3
Rename eth2_* to eth_*
hwwhww Aug 5, 2021
93af122
PR feedback from @ralexstokes and add single pubkey aggregate tests
hwwhww Aug 5, 2021
6f56e33
Update tests/core/pyspec/eth2spec/test/altair/epoch_processing/test_p…
ralexstokes Aug 5, 2021
170d7dc
Update tests/core/pyspec/eth2spec/test/altair/epoch_processing/test_p…
ralexstokes Aug 5, 2021
ad4445f
Apply PR feedback from Danny and clean up the BLS test format docs
hwwhww Aug 6, 2021
94e7d13
Merge pull request #2539 from ethereum/altair-bls-tests
hwwhww Aug 6, 2021
b184fa2
Merge pull request #2542 from ralexstokes/add-inactivity-updates-test…
djrtwo Aug 6, 2021
600f55b
add basic execution-layer p2p beacon_block validations
djrtwo Aug 9, 2021
ef71a4a
Polishing as per code review
mkalinin Aug 10, 2021
d005fee
sharding p2p code review fixes
protolambda Aug 10, 2021
da893c1
update p2p shard blob/header/tx propagation windows
protolambda Aug 10, 2021
c5b958e
Merge pull request #2486 from ethereum/shard-building
djrtwo Aug 10, 2021
08210fe
Merge pull request #2531 from ethereum/merge-p2p
djrtwo Aug 10, 2021
c404cd1
Merge pull request #2533 from mkalinin/rebase-with-london
djrtwo Aug 10, 2021
68db644
Rename DataCommitment.length field to samples_count and fix degree_pr…
Nashatyrev Aug 4, 2021
dd58c70
Merge pull request #2540 from Nashatyrev/fix/datacommitment-length
protolambda Aug 11, 2021
301157c
Change base_fee_per_gas type to Bytes32
mkalinin Aug 13, 2021
e3cad13
Make base_fee_per_gas little-endian
mkalinin Aug 16, 2021
958ad9a
Merge pull request #2550 from mkalinin/base-fee-type-to-bytes32
protolambda Aug 16, 2021
471cc87
remove print statements
ralexstokes Aug 16, 2021
3a9dcba
Merge pull request #2487 from ethereum/on-block-tests
hwwhww Aug 17, 2021
6ffc735
Merge branch 'dev' into fix-store-justified-checkpoint
hwwhww Aug 17, 2021
a542fd3
modify README for consensus-specs renaming
djrtwo Aug 18, 2021
817d2ee
Refactor sync committee tests so rewards are verified for all test cases
ralexstokes Aug 16, 2021
5a17fa6
group test files into subdirectory
ralexstokes Aug 17, 2021
5a918db
Add test count to test gen diagnostics
ralexstokes Aug 18, 2021
f6aa54b
Merge pull request #2554 from ralexstokes/refactor-sync-committee-tests
djrtwo Aug 18, 2021
4c1156d
rename eth1 and eth2 throughout specs and readme where reasonable
djrtwo Aug 18, 2021
3be3643
Rename `eth2.0-spec-tests` to `consensus-spec-tests`
hwwhww Aug 19, 2021
215188c
Merge pull request #2557 from ethereum/consensus-spec-tests
djrtwo Aug 19, 2021
7f70a77
fix validator state during deposit randomization
ralexstokes Aug 18, 2021
b809d86
add test for `process_inactivity_updates` for randomized state
ralexstokes Aug 18, 2021
911a416
spelling
djrtwo Aug 19, 2021
70d4ddf
Merge pull request #2556 from ralexstokes/add-randomized-testing-for-…
ralexstokes Aug 19, 2021
59d8ee3
Update some "1.0" "2.0" wording
hwwhww Aug 19, 2021
2061266
More fixes
hwwhww Aug 19, 2021
a3953a1
minor format
djrtwo Aug 19, 2021
cdf1914
Extend randomized block tests to all phases
ralexstokes Aug 19, 2021
eadefa2
WIP: broad-spectrum randomized block tests
ralexstokes Aug 19, 2021
2c632c0
Merge pull request #2555 from ethereum/great-renaming
djrtwo Aug 20, 2021
f30e7c8
Merge pull request #2559 from ralexstokes/update-full-random-tests-to…
djrtwo Aug 20, 2021
29c7184
bump VERSION.txt to 1.1.0-beta.3
djrtwo Aug 20, 2021
a0cf12b
Merge pull request #2562 from ethereum/bump-version
djrtwo Aug 20, 2021
00df808
expose functionality to make random block
ralexstokes Aug 20, 2021
4420d13
add helper to check existence of many validator types
ralexstokes Aug 20, 2021
619e828
Progress on block test gen
ralexstokes Aug 20, 2021
92aabcd
add randomized block tests to test generator
ralexstokes Aug 21, 2021
5094193
formatting
ralexstokes Aug 21, 2021
6da2c7a
ensure all validators in randomized test are active
ralexstokes Aug 21, 2021
86643d8
adjust some helper code for randomized environment
ralexstokes Aug 22, 2021
7bc2f95
skip validators when building a random block if they are slashed
ralexstokes Aug 22, 2021
fde71cb
add warnings if empty block
ralexstokes Aug 22, 2021
9e6a51e
update fn name for test id
ralexstokes Aug 22, 2021
b17ada2
only target phase 0 and altair for now
ralexstokes Aug 22, 2021
513f57f
formatting
ralexstokes Aug 22, 2021
820affd
extend validator set so randomized helpers have more room for operation
ralexstokes Aug 22, 2021
270814e
fix bug with `_epochs_until_leak` helper
ralexstokes Aug 22, 2021
993997a
ensure no leak on "normal" transitions
ralexstokes Aug 22, 2021
f76a29c
patch state to not be leaking at start
ralexstokes Aug 22, 2021
ce471b7
code org
ralexstokes Aug 22, 2021
0c401a3
filter for exit eligibility in helper
ralexstokes Aug 22, 2021
253f927
fix randomness seed across randomized test
ralexstokes Aug 22, 2021
2db01ba
use fixed seed for block randomization
ralexstokes Aug 22, 2021
fe1b996
Fix typos in sharding.md
ericsson49 Aug 23, 2021
43a6bec
make doctoc happy
ericsson49 Aug 23, 2021
838c263
Apply suggestions from code review
hwwhww Aug 23, 2021
8335849
Merge pull request #2563 from ericsson49/ericsson49/fix_typos_in_shar…
hwwhww Aug 23, 2021
15a6c48
Merge pull request #2518 from ethereum/fix-store-justified-checkpoint
hwwhww Aug 23, 2021
96c05ad
Fix typing problem: `is_merge_block` accepts `BeaconBlockBody` as a s…
ericsson49 Aug 23, 2021
cfd6136
Merge pull request #2564 from ericsson49/ericsson49/fix_merge_on_block
hwwhww Aug 23, 2021
3355227
Fix typos in `get_shard_proposer_index`: `beacon_state` vs `state`
ericsson49 Aug 23, 2021
34d42b6
Fix typo in `get_start_shard`
ericsson49 Aug 23, 2021
361d97c
fix bug with proposer search
ralexstokes Aug 23, 2021
6316c7d
ensure at least 1 attester slashing
ralexstokes Aug 23, 2021
1642388
add multiple blocks to each test
ralexstokes Aug 23, 2021
dfef7fc
Merge pull request #2565 from ericsson49/ericsson49/fix_typos_in_shar…
djrtwo Aug 23, 2021
20e3934
do not exit validators who are already exited
ralexstokes Aug 23, 2021
31d4624
file re-org to re-use for later forks
ralexstokes Aug 23, 2021
ff6863e
fix bug with deposit generation code
ralexstokes Aug 23, 2021
7b9d70f
allow test customization (for future forks)
ralexstokes Aug 23, 2021
58c6f33
ensure at least one proposer slashing
ralexstokes Aug 23, 2021
cc04da8
add randomized block tests for altair
ralexstokes Aug 23, 2021
d037c66
lint fix
ralexstokes Aug 23, 2021
505bdba
fix imports
ralexstokes Aug 23, 2021
c27e4d1
move to code-gen under new test generator
ralexstokes Aug 24, 2021
d1f3ec5
ensure at least 1 operation when making random block
ralexstokes Aug 24, 2021
8e5a34c
adjust helper to account for additional slashings
ralexstokes Aug 24, 2021
8a32bef
update skipped test count when test already exists
ralexstokes Aug 24, 2021
933c132
lint updates
ralexstokes Aug 24, 2021
f7c0dc3
skip running heavy randomized tests in CI
ralexstokes Aug 24, 2021
33c9612
fix bug with random sync aggregate helper
ralexstokes Aug 24, 2021
7874e8d
clean up unnecessary comment
ralexstokes Aug 24, 2021
02bc654
extend Makefile
ralexstokes Aug 24, 2021
cb9e4c9
Merge pull request #2567 from ralexstokes/fix-test-gen-counter
djrtwo Aug 25, 2021
4d4f4e8
be specific about which slot we want a sync committee root for
ralexstokes Aug 25, 2021
e72edf0
consolidate call to `max` into `randrange`
ralexstokes Aug 25, 2021
e575b22
clarify readme
ralexstokes Aug 25, 2021
81971a8
update readme for pytest
ralexstokes Aug 25, 2021
0da1fe9
clarify how the random block generator works
ralexstokes Aug 25, 2021
a6f8870
update makefile to use correct python version
ralexstokes Aug 25, 2021
14518d4
update name of utility module to be more specific
ralexstokes Aug 25, 2021
377797f
code layout change
ralexstokes Aug 25, 2021
961953a
update parameter name
ralexstokes Aug 25, 2021
047ff5b
unify visibility on names for doc purposes
ralexstokes Aug 25, 2021
e2dc9f9
update generation of randomized scenarios for more variability
ralexstokes Aug 25, 2021
c206a27
update docs via PR feedback
ralexstokes Aug 25, 2021
5b0d262
apply pr feedback on randrange
ralexstokes Aug 25, 2021
4b3022a
Update tests/generators/random/generate.py
ralexstokes Aug 25, 2021
874ea80
use more precise name for altair block randomizer and re-gen tests
ralexstokes Aug 26, 2021
a890d04
Merge branch 'add-broad-spectrum-spec-tests' of https://github.com/ra…
ralexstokes Aug 26, 2021
17fece5
Merge pull request #2560 from ralexstokes/add-broad-spectrum-spec-tests
djrtwo Aug 26, 2021
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: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build/
output/
dist/

eth2.0-spec-tests/
consensus-spec-tests/

.pytest_cache
.mypy_cache
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TEST_GENERATORS_DIR = ./tests/generators
PY_SPEC_DIR = $(TEST_LIBS_DIR)/pyspec
ETH2SPEC_MODULE_DIR = $(PY_SPEC_DIR)/eth2spec
TEST_REPORT_DIR = $(PY_SPEC_DIR)/test-reports
TEST_VECTOR_DIR = ../eth2.0-spec-tests/tests
TEST_VECTOR_DIR = ../consensus-spec-tests/tests
GENERATOR_DIR = ./tests/generators
SOLIDITY_DEPOSIT_CONTRACT_DIR = ./solidity_deposit_contract
SOLIDITY_DEPOSIT_CONTRACT_SOURCE = ${SOLIDITY_DEPOSIT_CONTRACT_DIR}/deposit_contract.sol
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Ethereum 2.0 Specifications
# Ethereum Proof-of-Stake Consensus Specifications

[![Join the chat at https://discord.gg/qGpsxSA](https://img.shields.io/badge/chat-on%20discord-blue.svg)](https://discord.gg/qGpsxSA) [![Join the chat at https://gitter.im/ethereum/sharding](https://badges.gitter.im/ethereum/sharding.svg)](https://gitter.im/ethereum/sharding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

To learn more about sharding and Ethereum 2.0 (Serenity), see the [sharding FAQ](https://eth.wiki/sharding/Sharding-FAQs) and the [research compendium](https://notes.ethereum.org/s/H1PGqDhpm).
To learn more about proof-of-stake and sharding, see the [PoS FAQ](https://eth.wiki/en/concepts/proof-of-stake-faqs), [sharding FAQ](https://eth.wiki/sharding/Sharding-FAQs) and the [research compendium](https://notes.ethereum.org/s/H1PGqDhpm).

This repository hosts the current Eth2 specifications. Discussions about design rationale and proposed changes can be brought up and discussed as issues. Solidified, agreed-upon changes to the spec can be made through pull requests.
This repository hosts the current Ethereum proof-of-stake specifications. Discussions about design rationale and proposed changes can be brought up and discussed as issues. Solidified, agreed-upon changes to the spec can be made through pull requests.


## Specs

[![GitHub release](https://img.shields.io/github/v/release/ethereum/eth2.0-specs)](https://github.com/ethereum/eth2.0-specs/releases/) [![PyPI version](https://badge.fury.io/py/eth2spec.svg)](https://badge.fury.io/py/eth2spec)

Core specifications for Eth2 clients can be found in [specs](specs/). These are divided into features.
Core specifications for Ethereum proof-of-stake clients can be found in [specs](specs/). These are divided into features.
Features are researched and developed in parallel, and then consolidated into sequential upgrades when ready.

The current features are:
Expand Down Expand Up @@ -73,13 +73,12 @@ Sharding follows the merge, and is divided into three parts:

Additional specifications and standards outside of requisite client functionality can be found in the following repos:

* [Eth2 APIs](https://github.com/ethereum/eth2.0-apis)
* [Eth2 Metrics](https://github.com/ethereum/eth2.0-metrics/)
* [Interop Standards in Eth2 PM](https://github.com/ethereum/eth2.0-pm/tree/master/interop)
* [Beacon APIs](https://github.com/ethereum/beacon-apis)
* [Beacon Metrics](https://github.com/ethereum/beacon-metrics/)

## Design goals

The following are the broad design goals for Ethereum 2.0:
The following are the broad design goals for the Ethereum proof-of-stake consensus specifications:
* to minimize complexity, even at the cost of some losses in efficiency
* to remain live through major network partitions and when very large portions of nodes go offline
* to select all components such that they are either quantum secure or can be easily swapped out for quantum secure counterparts when available
Expand All @@ -97,3 +96,7 @@ The following are the broad design goals for Ethereum 2.0:
Documentation on the different components used during spec writing can be found here:
* [YAML Test Generators](tests/generators/README.md)
* [Executable Python Spec, with Py-tests](tests/core/pyspec/README.md)

## Consensus spec tests

Conformance tests built from the executable python spec are available in the [Ethereum Proof-of-Stake Consensus Spec Tests](https://github.com/ethereum/consensus-spec-tests) repo. Compressed tarballs are available in [releases](https://github.com/ethereum/consensus-spec-tests/releases).
20 changes: 11 additions & 9 deletions presets/mainnet/sharding.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# Mainnet preset - Sharding

# Beacon-chain
# ---------------------------------------------------------------
# Misc
# ---------------------------------------------------------------
# 2**10 (= 1,024)
MAX_SHARDS: 1024
# 2**6 = 64
# 2**6 (= 64)
INITIAL_ACTIVE_SHARDS: 64
# 2**3 (= 8)
GASPRICE_ADJUSTMENT_COEFFICIENT: 8
SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8
# 2**4 (= 16)
MAX_SHARD_PROPOSER_SLASHINGS: 16

# Shard block configs
# ---------------------------------------------------------------
#
MAX_SHARD_HEADERS_PER_SHARD: 4
# 2**8 (= 256)
SHARD_STATE_MEMORY_SLOTS: 256
# 2**40 (= 1,099,511,627,776)
BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776

# Shard blob samples
# ---------------------------------------------------------------
# 2**11 (= 2,048)
MAX_SAMPLES_PER_BLOCK: 2048
# 2**10 (= 1,1024)
Expand All @@ -25,6 +27,6 @@ TARGET_SAMPLES_PER_BLOCK: 1024
# Gwei values
# ---------------------------------------------------------------
# 2**33 (= 8,589,934,592) Gwei
MAX_GASPRICE: 8589934592
MAX_SAMPLE_PRICE: 8589934592
# 2**3 (= 8) Gwei
MIN_GASPRICE: 8
MIN_SAMPLE_PRICE: 8
17 changes: 10 additions & 7 deletions presets/minimal/sharding.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# Minimal preset - Sharding

# Beacon-chain
# Misc
# ---------------------------------------------------------------
# Misc
# [customized] reduced for testing
MAX_SHARDS: 8
# [customized] reduced for testing
INITIAL_ACTIVE_SHARDS: 2
# 2**3 (= 8)
GASPRICE_ADJUSTMENT_COEFFICIENT: 8
SAMPLE_PRICE_ADJUSTMENT_COEFFICIENT: 8
# [customized] reduced for testing
MAX_SHARD_PROPOSER_SLASHINGS: 4

# Shard block configs
# ---------------------------------------------------------------
#
MAX_SHARD_HEADERS_PER_SHARD: 4
# 2**8 (= 256)
SHARD_STATE_MEMORY_SLOTS: 256
# 2**40 (= 1,099,511,627,776)
BLOB_BUILDER_REGISTRY_LIMIT: 1099511627776

# Shard blob samples
# ---------------------------------------------------------------
# 2**11 (= 2,048)
MAX_SAMPLES_PER_BLOCK: 2048
# 2**10 (= 1,1024)
Expand All @@ -25,6 +28,6 @@ TARGET_SAMPLES_PER_BLOCK: 1024
# Gwei values
# ---------------------------------------------------------------
# 2**33 (= 8,589,934,592) Gwei
MAX_GASPRICE: 8589934592
MAX_SAMPLE_PRICE: 8589934592
# 2**3 (= 8) Gwei
MIN_GASPRICE: 8
MIN_SAMPLE_PRICE: 8
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def floorlog2(x: int) -> uint64:


OPTIMIZED_BLS_AGGREGATE_PUBKEYS = '''
def eth2_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
return bls.AggregatePKs(pubkeys)
'''

Expand Down Expand Up @@ -480,8 +480,8 @@ def hardcoded_ssz_dep_constants(cls) -> Dict[str, str]:

@classmethod
def implement_optimizations(cls, functions: Dict[str, str]) -> Dict[str, str]:
if "eth2_aggregate_pubkeys" in functions:
functions["eth2_aggregate_pubkeys"] = OPTIMIZED_BLS_AGGREGATE_PUBKEYS.strip()
if "eth_aggregate_pubkeys" in functions:
functions["eth_aggregate_pubkeys"] = OPTIMIZED_BLS_AGGREGATE_PUBKEYS.strip()
return super().implement_optimizations(functions)

#
Expand Down
6 changes: 3 additions & 3 deletions specs/altair/beacon-chain.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Altair Beacon chain changes
# Altair -- The Beacon Chain

## Table of contents

Expand Down Expand Up @@ -287,7 +287,7 @@ def get_next_sync_committee(state: BeaconState) -> SyncCommittee:
"""
indices = get_next_sync_committee_indices(state)
pubkeys = [state.validators[index].pubkey for index in indices]
aggregate_pubkey = eth2_aggregate_pubkeys(pubkeys)
aggregate_pubkey = eth_aggregate_pubkeys(pubkeys)
return SyncCommittee(pubkeys=pubkeys, aggregate_pubkey=aggregate_pubkey)
```

Expand Down Expand Up @@ -544,7 +544,7 @@ def process_sync_aggregate(state: BeaconState, sync_aggregate: SyncAggregate) ->
previous_slot = max(state.slot, Slot(1)) - Slot(1)
domain = get_domain(state, DOMAIN_SYNC_COMMITTEE, compute_epoch_at_slot(previous_slot))
signing_root = compute_signing_root(get_block_root_at_slot(state, previous_slot), domain)
assert eth2_fast_aggregate_verify(participant_pubkeys, signing_root, sync_aggregate.sync_committee_signature)
assert eth_fast_aggregate_verify(participant_pubkeys, signing_root, sync_aggregate.sync_committee_signature)

# Compute participant and proposer rewards
total_active_increments = get_total_active_balance(state) // EFFECTIVE_BALANCE_INCREMENT
Expand Down
17 changes: 10 additions & 7 deletions specs/altair/bls.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Altair BLS extensions
# Altair -- BLS extensions

## Table of contents

Expand All @@ -9,8 +9,8 @@
- [Introduction](#introduction)
- [Constants](#constants)
- [Extensions](#extensions)
- [`eth2_aggregate_pubkeys`](#eth2_aggregate_pubkeys)
- [`eth2_fast_aggregate_verify`](#eth2_fast_aggregate_verify)
- [`eth_aggregate_pubkeys`](#eth_aggregate_pubkeys)
- [`eth_fast_aggregate_verify`](#eth_fast_aggregate_verify)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->
Expand All @@ -29,14 +29,14 @@ Knowledge of the [phase 0 specification](../phase0/beacon-chain.md) is assumed,

## Extensions

### `eth2_aggregate_pubkeys`
### `eth_aggregate_pubkeys`

An additional function `AggregatePKs` is defined to extend the
[IETF BLS signature draft standard v4](https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04)
spec referenced in the phase 0 document.

```python
def eth2_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
"""
Return the aggregate public key for the public keys in ``pubkeys``.

Expand All @@ -46,16 +46,19 @@ def eth2_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
Refer to the BLS signature draft standard for more information.
"""
assert len(pubkeys) > 0
# Ensure that the given inputs are valid pubkeys
assert all(bls.KeyValidate(pubkey) for pubkey in pubkeys)

result = copy(pubkeys[0])
for pubkey in pubkeys[1:]:
result += pubkey
return result
```

### `eth2_fast_aggregate_verify`
### `eth_fast_aggregate_verify`

```python
def eth2_fast_aggregate_verify(pubkeys: Sequence[BLSPubkey], message: Bytes32, signature: BLSSignature) -> bool:
def eth_fast_aggregate_verify(pubkeys: Sequence[BLSPubkey], message: Bytes32, signature: BLSSignature) -> bool:
"""
Wrapper to ``bls.FastAggregateVerify`` accepting the ``G2_POINT_AT_INFINITY`` signature when ``pubkeys`` is empty.
"""
Expand Down
4 changes: 2 additions & 2 deletions specs/altair/fork.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Altair fork
# Altair -- Fork Logic

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand All @@ -17,7 +17,7 @@

## Introduction

This document describes the process of the first upgrade of Ethereum 2.0: the Altair hard fork, introducing light client support and other improvements.
This document describes the process of the first upgrade of the beacon chain: the Altair hard fork, introducing light client support and other improvements.

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions specs/altair/p2p-interface.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ethereum Altair networking specification
# Altair -- Networking

This document contains the networking specification for Ethereum 2.0 clients added during the Altair deployment.
This document contains the networking specification for Altair.
This document should be viewed as additive to the [document from Phase 0](../phase0/p2p-interface.md) and will be referred to as the "Phase 0 document" hereafter.
Readers should understand the Phase 0 document and use it as a basis to understand the changes outlined in this document.

Expand Down
8 changes: 4 additions & 4 deletions specs/altair/sync-protocol.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Minimal Light Client
# Altair -- Minimal Light Client

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand Down Expand Up @@ -28,8 +28,8 @@

## Introduction

Eth2 is designed to be light client friendly for constrained environments to
access Eth2 with reasonable safety and liveness.
The beacon chain is designed to be light client friendly for constrained environments to
access Ethereum with reasonable safety and liveness.
Such environments include resource-constrained devices (e.g. phones for trust-minimised wallets)
and metered VMs (e.g. blockchain VMs for cross-chain bridges).

Expand Down Expand Up @@ -184,7 +184,7 @@ def process_light_client_update(store: LightClientStore, update: LightClientUpda
):
# Apply update if (1) 2/3 quorum is reached and (2) we have a finality proof.
# Note that (2) means that the current light client design needs finality.
# It may be changed to re-organizable light client design. See the on-going issue eth2.0-specs#2182.
# It may be changed to re-organizable light client design. See the on-going issue consensus-specs#2182.
apply_light_client_update(store.snapshot, update)
store.valid_updates = set()
elif current_slot > store.snapshot.header.slot + update_timeout:
Expand Down
8 changes: 4 additions & 4 deletions specs/altair/validator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ethereum 2.0 Altair -- Honest Validator
# Altair -- Honest Validator

This is an accompanying document to [Ethereum 2.0 Altair -- The Beacon Chain](./beacon-chain.md), which describes the expected actions of a "validator" participating in the Ethereum 2.0 protocol.
This is an accompanying document to [Altair -- The Beacon Chain](./beacon-chain.md), which describes the expected actions of a "validator" participating in the Ethereum proof-of-stake protocol.

## Table of contents

Expand Down Expand Up @@ -49,8 +49,8 @@ This is an accompanying document to [Ethereum 2.0 Altair -- The Beacon Chain](./

## Introduction

This document represents the expected behavior of an "honest validator" with respect to the Altair upgrade of the Ethereum 2.0 protocol.
It builds on the [previous document for the behavior of an "honest validator" from Phase 0](../phase0/validator.md) of the Ethereum 2.0 protocol.
This document represents the expected behavior of an "honest validator" with respect to the Altair upgrade of the Ethereum proof-of-stake protocol.
It builds on the [previous document for the behavior of an "honest validator" from Phase 0](../phase0/validator.md) of the Ethereum proof-of-stake protocol.
This previous document is referred to below as the "Phase 0 document".

Altair introduces a new type of committee: the sync committee. Sync committees are responsible for signing each block of the canonical chain and there exists an efficient algorithm for light clients to sync the chain using the output of the sync committees.
Expand Down
4 changes: 2 additions & 2 deletions specs/custody_game/beacon-chain.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Custody Game -- Beacon Chain
# Custody Game -- The Beacon Chain

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand Down Expand Up @@ -57,7 +57,7 @@

## Introduction

This document details the beacon chain additions and changes of Ethereum 2.0 to support the shard data custody game,
This document details the beacon chain additions and changes of to support the shard data custody game,
building upon the [Sharding](../sharding/beacon-chain.md) specification.

## Constants
Expand Down
6 changes: 3 additions & 3 deletions specs/custody_game/validator.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ethereum 2.0 Custody Game -- Honest Validator
# Custody Game -- Honest Validator

**Notice**: This document is a work-in-progress for researchers and implementers.
This is an accompanying document to the [Ethereum 2.0 Custody Game](./), which describes the expected actions of a "validator"
participating in the Ethereum 2.0 Custody Game.
This is an accompanying document to the [Custody Game](./), which describes the expected actions of a "validator"
participating in the shard data Custody Game.

## Table of contents

Expand Down
2 changes: 1 addition & 1 deletion specs/das/das-core.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Data Availability Sampling -- Core
# Data Availability Sampling -- Core

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand Down
4 changes: 2 additions & 2 deletions specs/das/fork-choice.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Data Availability Sampling -- Fork Choice
# Data Availability Sampling -- Fork Choice

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand All @@ -17,7 +17,7 @@

## Introduction

This document is the beacon chain fork choice spec for Ethereum 2.0 Data Availability Sampling. The only change that we add from phase 0 is that we add a concept of "data dependencies";
This document is the beacon chain fork choice spec for Data Availability Sampling. The only change that we add from phase 0 is that we add a concept of "data dependencies";
a block is only eligible for consideration in the fork choice after a data availability test has been successfully completed for all dependencies.
The "root" of a shard block for data dependency purposes is considered to be a `DataCommitment` object, which is a pair of a Kate commitment and a length.

Expand Down
2 changes: 1 addition & 1 deletion specs/das/p2p-interface.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Data Availability Sampling -- Network specification
# Data Availability Sampling -- Networking

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand Down
2 changes: 1 addition & 1 deletion specs/das/sampling.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ethereum 2.0 Data Availability Sampling
# Data Availability Sampling -- Sampling

**Notice**: This document is a work-in-progress for researchers and implementers.

Expand Down
Loading