Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b8e77c5
Add EIP-7002 feature spec
hwwhww May 9, 2023
34693f2
Add basic tests
hwwhww May 9, 2023
5945571
Add eip7002 CI jobs
hwwhww May 10, 2023
7459619
Fix tests
hwwhww May 10, 2023
6e08327
Fix light client tests
hwwhww May 10, 2023
a11cc09
Update `ExecutionLayerExit` fields: replace `validator_index` with `v…
hwwhww May 15, 2023
8ecf89a
Apply PR feedback from @djrtwo and add more tests
hwwhww May 19, 2023
d4483e4
Merge branch 'dev' into eip7002
hwwhww May 19, 2023
b894967
Merge branch 'dev' into eip7002
hwwhww Jun 1, 2023
2a53d48
Remove EIP7002 light client specs
hwwhww Jun 1, 2023
b26c289
Add link to Engine APIs
hwwhww Jun 6, 2023
19edc2d
Merge branch 'dev' into eip7002
hwwhww Jun 13, 2023
59fd2a6
Merge branch 'dev' into eip7002
hwwhww Jun 18, 2023
2f4ce8f
Add more block tests to test mixed operations
hwwhww Jun 18, 2023
e7e2282
Auto manage SpecBuilder prev fork inheritance
dapplion Jun 20, 2023
dba5d99
start with phase0 hardcoded code
dapplion Jun 22, 2023
cc021de
Merge pull request #3436 from dapplion/auto-spec-builder-dependency
hwwhww Jun 26, 2023
f1aabcd
Refactor `setup.py` (#3393)
hwwhww Jun 26, 2023
7b771cc
Merge branch 'dev' into eip7002
hwwhww Jun 26, 2023
995b960
Merge pull request #3403 from ethereum/engine-api-link
djrtwo Jul 7, 2023
2cd967e
Merge pull request #3349 from ethereum/eip7002
djrtwo Jul 7, 2023
3ed0619
Update the equivocating indices in the store
haxxpop Jul 11, 2023
a39abe3
Upgrade `wheel`, `pip`, and `setuptools` with `make install_test` (#3…
hwwhww Jul 14, 2023
4ddaff5
Fix links to curdleproofs.pie repo
jtraglia Jul 15, 2023
86a147a
Link to dev branch instead of master
jtraglia Jul 15, 2023
3f3d412
Unmark validators field as modified
jtraglia Jul 15, 2023
fafd48f
Fix comment
jtraglia Jul 15, 2023
16b1afb
Add punctuation to docstring
jtraglia Jul 15, 2023
858dcca
Add `--fork-list` arg to testgen to filter forks
hwwhww Jul 18, 2023
51e60c1
Add multiple txs cases
hwwhww Jul 18, 2023
350fa16
Use `build_randomized_execution_payload` in random tests. Add mixed t…
hwwhww Jul 18, 2023
d8b023c
Explain more on on_reused_index
haxxpop Jul 18, 2023
79bfdad
Merge pull request #3456 from ethereum/testgen-fork-filter
djrtwo Jul 18, 2023
3ad0a8f
tests/deneb: add more execution payload processing test cases
marioevz Jul 18, 2023
419cbdc
tests/deneb: add small test descriptor
marioevz Jul 18, 2023
0799799
Shuffle txs
hwwhww Jul 19, 2023
ff2840e
Merge pull request #3459 from marioevz/deneb-test-cases-comments
djrtwo Jul 19, 2023
aca1202
Merge pull request #3457 from ethereum/more-deneb-tests
hwwhww Jul 20, 2023
e2cf91d
Merge pull request #3452 from jtraglia/fix-links
hwwhww Jul 24, 2023
726b453
Merge pull request #3446 from ppopth/on-reused-index
djrtwo Jul 24, 2023
01c358c
Rename "data gas" to "blob gas"
hwwhww Jul 25, 2023
52c53a9
Move and rework `include_attestation_from_previous_fork_with_new_rang…
hwwhww Jul 27, 2023
8295416
Update VERSION.txt to 1.4.0-beta.1
djrtwo Jul 27, 2023
5dcfbce
Merge pull request #3461 from ethereum/blob-gas
hwwhww Jul 31, 2023
fba7b8e
Merge pull request #3464 from ethereum/att-transtion
hwwhww Jul 31, 2023
4814305
Merge pull request #3467 from ethereum/version-bump
hwwhww Jul 31, 2023
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
24 changes: 20 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ commands:
steps:
- restore_cached_venv:
venv_name: v24-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
save_pyspec_cached_venv:
description: Save a venv into a cache with pyspec keys"
steps:
- save_cached_venv:
venv_name: v24-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
venv_path: ./venv
restore_deposit_contract_tester_cached_venv:
description: "Restore the venv from cache for the deposit contract tester"
steps:
- restore_cached_venv:
venv_name: v23-deposit-contract-tester
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }}
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }}
save_deposit_contract_tester_cached_venv:
description: "Save the venv to cache for later use of the deposit contract tester"
steps:
- save_cached_venv:
venv_name: v23-deposit-contract-tester
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }}
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }}
venv_path: ./solidity_deposit_contract/web3_tester/venv
jobs:
checkout_specs:
Expand Down Expand Up @@ -168,6 +168,19 @@ jobs:
command: make citest fork=eip6110
- store_test_results:
path: tests/core/pyspec/test-reports
test-eip7002:
docker:
- image: circleci/python:3.9
working_directory: ~/specs-repo
steps:
- restore_cache:
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make citest fork=eip7002
- store_test_results:
path: tests/core/pyspec/test-reports
table_of_contents:
docker:
- image: circleci/node:10.16.3
Expand Down Expand Up @@ -291,6 +304,9 @@ workflows:
- test-eip6110:
requires:
- install_pyspec_test
- test-eip7002:
requires:
- install_pyspec_test
- table_of_contents
- codespell
- lint:
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 @@ -71,7 +71,7 @@ jobs:
needs: [preclear,lint,codespell,table_of_contents]
strategy:
matrix:
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "eip6110"]
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "eip6110", "eip7002"]
steps:
- name: Checkout this repo
uses: actions/checkout@v3.2.0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tests/core/pyspec/eth2spec/bellatrix/
tests/core/pyspec/eth2spec/capella/
tests/core/pyspec/eth2spec/deneb/
tests/core/pyspec/eth2spec/eip6110/
tests/core/pyspec/eth2spec/eip7002/
tests/core/pyspec/eth2spec/whisk/

# coverage reports
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,15 @@ generate_tests: $(GENERATOR_TARGETS)
pyspec:
python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev

# check the setup tool requirements
preinstallation:
python3 -m venv venv; . venv/bin/activate; \
python3 -m pip install -r requirements_preinstallation.txt

# installs the packages to run pyspec tests
install_test:
python3 -m venv venv; . venv/bin/activate; python3 -m pip install -e .[lint]; python3 -m pip install -e .[test]
install_test: preinstallation
python3 -m venv venv; . venv/bin/activate; \
python3 -m pip install -e .[lint]; python3 -m pip install -e .[test]

# Testing against `minimal` or `mainnet` config by default
test: pyspec
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Features are researched and developed in parallel, and then consolidated into se
Additional specifications and standards outside of requisite client functionality can be found in the following repos:

* [Beacon APIs](https://github.com/ethereum/beacon-apis)
* [Engine APIs](https://github.com/ethereum/execution-apis/tree/main/src/engine)
* [Beacon Metrics](https://github.com/ethereum/beacon-metrics/)

## Design goals
Expand Down
3 changes: 3 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ DENEB_FORK_EPOCH: 18446744073709551615
# EIP6110
EIP6110_FORK_VERSION: 0x05000000 # temporary stub
EIP6110_FORK_EPOCH: 18446744073709551615
# EIP7002
EIP7002_FORK_VERSION: 0x05000000 # temporary stub
EIP7002_FORK_EPOCH: 18446744073709551615
# WHISK
WHISK_FORK_VERSION: 0x06000000 # temporary stub
WHISK_FORK_EPOCH: 18446744073709551615
Expand Down
3 changes: 3 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ DENEB_FORK_EPOCH: 18446744073709551615
# EIP6110
EIP6110_FORK_VERSION: 0x05000001
EIP6110_FORK_EPOCH: 18446744073709551615
# EIP7002
EIP7002_FORK_VERSION: 0x05000001
EIP7002_FORK_EPOCH: 18446744073709551615
# WHISK
WHISK_FORK_VERSION: 0x06000001
WHISK_FORK_EPOCH: 18446744073709551615
Expand Down
14 changes: 7 additions & 7 deletions docs/docs/new-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ For example, if the latest fork is Capella, use `./specs/capella` content as you
### 4. Add `fork.md`
You can refer to the previous fork's `fork.md` file.
### 5. Make it executable
- Update [`constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/test/helpers/constants.py) with the new feature name.
- Update [`setup.py`](https://github.com/ethereum/consensus-specs/blob/dev/setup.py):
- Add a new `SpecBuilder` with the new feature name constant. e.g., `EIP9999SpecBuilder`
- Add the new `SpecBuilder` to `spec_builders` list.
- Add the path of the new markdown files in `finalize_options` function.
- Update Pyspec [`constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/test/helpers/constants.py) with the new feature name.
- Update helpers for [`setup.py`](https://github.com/ethereum/consensus-specs/blob/dev/setup.py) for building the spec:
- Update [`pysetup/constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/constants.py) with the new feature name as Pyspec `constants.py` defined.
- Update [`pysetup/spec_builders/__init__.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/spec_builders/__init__.py). Implement a new `<FEATURE_NAME>SpecBuilder` in `pysetup/spec_builders/<FEATURE_NAME>.py` with the new feature name. e.g., `EIP9999SpecBuilder`. Append it to the `spec_builders` list.
- Update [`pysetup/md_doc_paths.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/md_doc_paths.py): add the path of the new markdown files in `get_md_doc_paths` function if needed.

## B: Make it executable for pytest and test generator

### 1. Add `light-client/*` docs if you updated the content of `BeaconBlock`
### 1. [Optional] Add `light-client/*` docs if you updated the content of `BeaconBlock`
- You can refer to the previous fork's `light-client/*` file.
- Add the path of the new markdown files in `setup.py`'s `finalize_options` function.
- Add the path of the new markdown files in [`pysetup/md_doc_paths.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/md_doc_paths.py)'s `get_md_doc_paths` function.

### 2. Add the mainnet and minimal presets and update the configs
- Add presets: `presets/mainnet/<new-feature-name>.yaml` and `presets/minimal/<new-feature-name>.yaml`
Expand Down
Empty file added pysetup/__init__.py
Empty file.
34 changes: 34 additions & 0 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Definitions in context.py
PHASE0 = 'phase0'
ALTAIR = 'altair'
BELLATRIX = 'bellatrix'
CAPELLA = 'capella'
DENEB = 'deneb'
EIP6110 = 'eip6110'
EIP7002 = 'eip7002'
WHISK = 'whisk'



# The helper functions that are used when defining constants
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
def ceillog2(x: int) -> uint64:
if x < 1:
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
return uint64((x - 1).bit_length())


def floorlog2(x: int) -> uint64:
if x < 1:
raise ValueError(f"floorlog2 accepts only positive values, x={x}")
return uint64(x.bit_length() - 1)
'''


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


ETH2_SPEC_COMMENT_PREFIX = "eth2spec:"
Loading