Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- deneb
- electra
- fulu
- eip7441
- eip7732
- eip7805
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
- deneb
- electra
- fulu
- eip7441
- eip7732
- eip7805
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ALL_EXECUTABLE_SPEC_NAMES = \
eip6800 \
eip7441 \
eip7732 \
eip7805
eip7805

# A list of fake targets.
.PHONY: \
Expand All @@ -36,14 +36,14 @@ NORM = $(shell tput sgr0)

# Print target descriptions.
help:
@echo "make $(BOLD)clean$(NORM) -- delete all untracked files"
@echo "make $(BOLD)coverage$(NORM) -- run pyspec tests with coverage"
@echo "make $(BOLD)kzg_setups$(NORM) -- generate trusted setups"
@echo "make $(BOLD)lint$(NORM) -- run the linters"
@echo "make $(BOLD)pyspec$(NORM) -- build python specifications"
@echo "make $(BOLD)reftests$(NORM) -- generate reference tests"
@echo "make $(BOLD)serve_docs$(NORM) -- start a local docs web server"
@echo "make $(BOLD)test$(NORM) -- run pyspec tests"
@echo "make $(BOLD)clean$(NORM) -- delete all untracked files"
@echo "make $(BOLD)coverage$(NORM) -- run pyspec tests with coverage"
@echo "make $(BOLD)kzg_setups$(NORM) -- generate trusted setups"
@echo "make $(BOLD)lint$(NORM) -- run the linters"
@echo "make $(BOLD)pyspec$(NORM) -- build python specifications"
@echo "make $(BOLD)reftests$(NORM) -- generate reference tests"
@echo "make $(BOLD)serve_docs$(NORM) -- start a local docs web server"
@echo "make $(BOLD)test$(NORM) -- run pyspec tests"

###############################################################################
# Virtual Environment
Expand Down
29 changes: 29 additions & 0 deletions specs/_features/eip7805/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Fork choice](#fork-choice)
- [Helpers](#helpers)
- [Modified `Store`](#modified-store)
- [Modified `get_forkchoice_store`](#modified-get_forkchoice_store)
- [New `validate_inclusion_lists`](#new-validate_inclusion_lists)
- [New `get_attester_head`](#new-get_attester_head)
- [Modified `get_proposer_head`](#modified-get_proposer_head)
Expand Down Expand Up @@ -59,6 +60,34 @@ class Store(object):
unsatisfied_inclusion_list_blocks: Set[Root] = field(default_factory=Set)
```

### Modified `get_forkchoice_store`

```python
def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) -> Store:
assert anchor_block.state_root == hash_tree_root(anchor_state)
anchor_root = hash_tree_root(anchor_block)
anchor_epoch = get_current_epoch(anchor_state)
justified_checkpoint = Checkpoint(epoch=anchor_epoch, root=anchor_root)
finalized_checkpoint = Checkpoint(epoch=anchor_epoch, root=anchor_root)
proposer_boost_root = Root()
return Store(
time=uint64(anchor_state.genesis_time + SECONDS_PER_SLOT * anchor_state.slot),
genesis_time=anchor_state.genesis_time,
justified_checkpoint=justified_checkpoint,
finalized_checkpoint=finalized_checkpoint,
unrealized_justified_checkpoint=justified_checkpoint,
unrealized_finalized_checkpoint=finalized_checkpoint,
proposer_boost_root=proposer_boost_root,
equivocating_indices=set(),
blocks={anchor_root: copy(anchor_block)},
block_states={anchor_root: copy(anchor_state)},
checkpoint_states={justified_checkpoint: copy(anchor_state)},
unrealized_justifications={anchor_root: justified_checkpoint},
# [New in EIP-7805]
unsatisfied_inclusion_list_blocks=set(),
)
```

#### New `validate_inclusion_lists`

```python
Expand Down
2 changes: 1 addition & 1 deletion ssz/simple-serialize.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ We first define helper functions:

- `size_of(B)`, where `B` is a basic type: the length, in bytes, of the
serialized form of the basic type.
- `chunk_count(type)`: calculate the amount of leafs for merkleization of the
- `chunk_count(type)`: calculate the amount of leaves for merkleization of the
type.
- all basic types: `1`
- `Bitlist[N]` and `Bitvector[N]`: `(N + 255) // 256` (dividing by chunk size,
Expand Down
3 changes: 2 additions & 1 deletion tests/core/pyspec/eth2spec/test/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
FULU,
# Experimental patches
EIP7732,
EIP7805,
)
# The forks that have light client specs
LIGHT_CLIENT_TESTING_FORKS = [item for item in MAINNET_FORKS if item != PHASE0]
# The forks that output to the test vectors.
TESTGEN_FORKS = (*MAINNET_FORKS, FULU)
TESTGEN_FORKS = (*MAINNET_FORKS, FULU, EIP7732, EIP7805)
# Forks allowed in the test runner `--fork` flag, to fail fast in case of typos
ALLOWED_TEST_RUNNER_FORKS = (*ALL_PHASES, EIP7441)

Expand Down