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.5.0-alpha.3 #3786

Merged
merged 117 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
3cebedb
Spec draft for the verge
gballet Jan 26, 2023
832a799
Update specs/verge/beacon-chain.md
gballet Jan 26, 2023
8fc37ca
fix some typos
gballet Jan 27, 2023
698650c
add a comment to pinpoint the new, verge-related fields
gballet Feb 9, 2023
3b362c6
Use Optional[Bytes32] instead of Union[Null, Bytes32] for value diffs
gballet Feb 10, 2023
d0c7bbc
rebase and move to _features
gballet Feb 19, 2023
567e62f
Style feedback
gballet Mar 9, 2023
a5c955f
feedback from ACDC
gballet Mar 9, 2023
509fbb2
style: remove confusing underscore
gballet Mar 10, 2023
d8c486b
Rename DepositReceipt to DepositRequest
mkalinin May 7, 2024
cd0f8a1
Change duplicate cell id test to use 65 cell ids
jtraglia May 7, 2024
0891be2
Change cell -> cells
jtraglia May 7, 2024
99ccfe0
Add electra version of AggregateAndProof
jtraglia May 7, 2024
0da03ab
Update TOC
jtraglia May 7, 2024
8aed037
Change "new" to "modified"
jtraglia May 7, 2024
f3d0a0e
Move containers to validator.md
jtraglia May 8, 2024
93c043a
Revert moving IndexedAttestation
jtraglia May 8, 2024
812ac2c
Merge pull request #3759 from jtraglia/ext-aggregate-and-proof
hwwhww May 8, 2024
b9befda
Update p2p-interface.md
nisdas May 9, 2024
8f73a47
Update p2p-interface.md
nisdas May 9, 2024
5f48840
Merge pull request #3760 from nisdas/patch-5
hwwhww May 12, 2024
e5813bd
Merge pull request #3758 from jtraglia/improve-dup-cell-test
asn-d6 May 14, 2024
fdeff74
EIP-7594: Add a missing check and a missing test vector (#3765)
asn-d6 May 14, 2024
d295813
EIP-7594: add custody settings config (#3766)
Savid May 15, 2024
8bf6068
EIP-7549: Append new `committee_bits` field to end of `Attestation`
etan-status May 16, 2024
74be5b2
Electra: Properly Calculate Proposer Probabilities
ethDreamer May 16, 2024
222e980
Fix lint
mkalinin May 16, 2024
32b441d
Fix lint 2
mkalinin May 16, 2024
0f5f155
fix typo (#3771)
hwwhww May 17, 2024
f7bb8aa
EIP-7594 - Update ENR record
nalepae May 17, 2024
64b93c9
Fix table.
nalepae May 17, 2024
c685a65
Fix broken links for new-feature.md
terencechain May 20, 2024
eb380c1
Remove Deneb from all phases
terencechain May 20, 2024
f968d62
Merge pull request #3774 from terencechain/rm-deneb-all-phases
hwwhww May 21, 2024
1292bd9
move to EL consolidations
fradamt Apr 18, 2024
204b39d
ensure that target has execution credentials
fradamt Apr 18, 2024
74eaf57
add consolidations_root where needed
fradamt Apr 18, 2024
8a6ca1c
fix consolidation churn limit check
fradamt Apr 18, 2024
e030f2c
Small fixes
fradamt Apr 18, 2024
901a249
fix typo
fradamt Apr 18, 2024
c492d61
adjust consolidations tests for EL consolidations
fradamt Apr 18, 2024
17c5148
add tests for remaining failure cases
fradamt Apr 19, 2024
7c4b32a
renaming consolidations to consolidation_requests
fradamt May 21, 2024
dc2a2bd
minor fixes, doctoc
fradamt May 21, 2024
5998e74
typos. electra tests passing
fradamt May 21, 2024
c17f22f
add missing decorators
fradamt May 21, 2024
6b69368
Revert "minor fixes, doctoc"
fradamt May 21, 2024
f0ef76a
minor fixes
fradamt May 21, 2024
1970b56
add consolidation_requests_root to get_execution_payload_header test …
fradamt May 22, 2024
6a731e9
fix lint
fradamt May 22, 2024
96db63e
doctoc
fradamt May 22, 2024
69ee35d
handle top-ups to exiting/exited validators
fradamt May 22, 2024
836bc43
Merge pull request #3773 from terencechain/fix-new-feature-link
ralexstokes May 22, 2024
1d02110
Update compute_el_header_block_hash for EIP-7685
jtraglia May 23, 2024
d46e4aa
Split long line into two
jtraglia May 23, 2024
12cab5a
Make request type a bytes type
jtraglia May 23, 2024
5c13f5c
fix depth+extension serialization type
gballet May 27, 2024
7fbbb25
rebase on top of deneb
gballet May 27, 2024
0fd49c1
fix spelling error
gballet May 27, 2024
071f0a3
Merge pull request #3769 from ethDreamer/fix_compute_proposer_index
hwwhww May 28, 2024
fd246d8
Merge branch 'dev' into pr3230
hwwhww May 28, 2024
744ae2e
Add EIP-6800 linter checks.
hwwhww May 28, 2024
8737e69
use execution_witness_root in header
gballet May 28, 2024
50972f9
Merge pull request #3230 from gballet/gballet/add-proof-verge
hwwhww May 28, 2024
85adbfb
Switch spec to MAX_EFFECTIVE_BALANCE_ELECTRA
mkalinin May 31, 2024
ffebf88
Fix testgen and test format
hwwhww May 31, 2024
79d67ba
minor refactor
hwwhww May 31, 2024
9b15abc
Append "_bytes" to modified RLP functions
jtraglia May 31, 2024
eb0cdc7
Update tests
mkalinin May 31, 2024
a0a2324
Fix lint
mkalinin May 31, 2024
3fd125f
Applied suggestions by @hwwhww
mkalinin Jun 3, 2024
143b9e6
Switch the order of `process_deposit_receipt` and `process_execution_…
hwwhww Jun 3, 2024
0de1252
Merge pull request #3775 from fradamt/EL-consolidations
hwwhww Jun 4, 2024
4223bc0
Merge branch 'dev' into pr3776
hwwhww Jun 4, 2024
12d95da
Merge branch 'dev' into pr3757
hwwhww Jun 4, 2024
5efd6e1
Merge pull request #3776 from fradamt/top-ups-exited
hwwhww Jun 5, 2024
3644f36
Merge pull request #3757 from mkalinin/receipt-to-request
hwwhww Jun 5, 2024
d0ad73b
Use /bin/bash to fix `./build_run_docker_tests.sh: 13: Syntax error: …
prestonvanloon Jun 5, 2024
2e6c593
Rename ExecutionLayerWithdrawalRequest->WithdrawalRequest
prestonvanloon Jun 5, 2024
5910aee
Rename ExecutionLayerConsolidationRequest->ConsolidationRequest
prestonvanloon Jun 5, 2024
5dec87f
Update TOC
prestonvanloon Jun 5, 2024
ac105f4
update polynomial-commitments-sampling.md -- fix shift_polynomialcoeff
b-wagn Jun 6, 2024
76e2d52
Merge pull request #3792 from b-wagn/patch-1
asn-d6 Jun 6, 2024
99dfc9a
Update file names
hwwhww Jun 7, 2024
e53c10e
Merge pull request #3791 from prestonvanloon/rename-executionlayer-objs
hwwhww Jun 10, 2024
12f0e7c
Merge branch 'dev' into pr3778
hwwhww Jun 10, 2024
5633417
Merge pull request #3790 from prestonvanloon/fix-docker-script
hwwhww Jun 10, 2024
0298370
Fix rlp_bytes methods
jtraglia Jun 10, 2024
83cb494
Rename receipt to request
jtraglia Jun 10, 2024
5ace424
`recover_cells_and_kzg_proofs` & matrix refactor (#3788)
jtraglia Jun 11, 2024
d137553
Rename CellID to CellIndex
jtraglia Jun 11, 2024
c5e9c3c
Add public methods section in KZG spec (#3795)
b-wagn Jun 11, 2024
7b7ada7
Merge pull request #3797 from jtraglia/rename-cellid-to-cellindex
asn-d6 Jun 11, 2024
10bac07
Remove compute_cells method
asn-d6 Jun 11, 2024
93dfcda
Remove compute_cells from list of public methods
jtraglia Jun 11, 2024
973f9cd
Merge pull request #3796 from jtraglia/remove-compute-cells
asn-d6 Jun 11, 2024
6efab19
chore: Refactor cell recovery code (#3781)
kevaundray Jun 11, 2024
d4b6c0c
Adds CI to generate test vectors (#3793)
parithosh Jun 11, 2024
a24837b
Merge pull request #3778 from jtraglia/electra-block-hash
hwwhww Jun 12, 2024
43d96cf
Merge pull request #3772 from nalepae/patch-3
hwwhww Jun 12, 2024
cead0f3
Merge pull request #3768 from etan-status/at-stability
hwwhww Jun 13, 2024
1c675ae
Update polynomial-commitments-sampling.md - Fix dead link
b-wagn Jun 13, 2024
77eac20
Update specs/_features/eip7594/polynomial-commitments-sampling.md
b-wagn Jun 13, 2024
2ed8db2
Merge pull request #3801 from b-wagn/patch-2
hwwhww Jun 13, 2024
490c89a
bump version to `1.5.0-alpha.3`
hwwhww Jun 13, 2024
031b191
Merge pull request #3802 from ethereum/bump-version
hwwhww Jun 13, 2024
aa65fd7
Apply suggestion from @hwwhww
mkalinin Jun 14, 2024
718aadf
Fix tests and remove duplicate `_WITHDRAWAL_PREFIX` definition
hwwhww Jun 14, 2024
ca64850
Merge pull request #3783 from mkalinin/electra-maxeb-preset
hwwhww Jun 14, 2024
fc62e59
extend test for eip7594
b-wagn Jun 14, 2024
7095e14
extend test for coset_fft
b-wagn Jun 14, 2024
2aeddf2
remove trailing whitespaces
b-wagn Jun 14, 2024
210fcfb
Merge pull request #3804 from b-wagn/fft-test-extension
asn-d6 Jun 14, 2024
ae654d2
fix typo
hwwhww Jun 14, 2024
7064b1a
Merge pull request #3805 from ethereum/fix-testgen
hwwhww Jun 14, 2024
483a286
Remove `assert len(missing_cell_indices) != 0` check
hwwhww Jun 14, 2024
00b7468
Merge pull request #3806 from ethereum/construct_vanishing_polynomial…
hwwhww Jun 14, 2024
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
78 changes: 78 additions & 0 deletions .github/workflows/generate_vectors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run test vector generation

defaults:
run:
shell: zsh {0}

on:
workflow_dispatch:
inputs:
ref:
description: The branch, tag or SHA to checkout and build from
default: dev
type: string
required: true

jobs:
generate-tests:
runs-on: [self-hosted-ghr-custom, size-chungus-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'ethereum/consensus-specs'
path: 'consensus-specs'
ref: ${{ inputs.source_ref }}
- name: Checkout consensus-spec-tests repository
uses: actions/checkout@v4
with:
repository: 'ethereum/consensus-spec-tests'
path: 'consensus-spec-tests'
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: ''
- name: Clean up Spec Repository
run: |
cd consensus-specs
make clean
- name: Install dependencies and generate pyspec
run: |
cd consensus-specs
make install_test
make -B pyspec
- name: Generate tests
run: |
cd consensus-specs
make -j 16 generate_tests 2>&1 | tee ../consensustestgen.log
cp -r presets/ ../consensus-spec-tests/presets
cp -r configs/ ../consensus-spec-tests/configs
find . -type d -empty -delete
- name: Archive configurations
run: |
cd consensus-spec-tests
tar -czvf general.tar.gz tests/general
tar -czvf minimal.tar.gz tests/minimal
tar -czvf mainnet.tar.gz tests/mainnet
- name: Upload general.tar.gz
uses: actions/upload-artifact@v4
with:
name: General Test Configuration
path: consensus-spec-tests/general.tar.gz
- name: Upload minimal.tar.gz
uses: actions/upload-artifact@v4
with:
name: Minimal Test Configuration
path: consensus-spec-tests/minimal.tar.gz
- name: Upload mainnet.tar.gz
uses: actions/upload-artifact@v4
with:
name: Mainnet Test Configuration
path: consensus-spec-tests/mainnet.tar.gz
- name: Upload consensustestgen
uses: actions/upload-artifact@v4
with:
name: consensustestgen.log
path: consensustestgen.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tests/core/pyspec/eth2spec/deneb/
tests/core/pyspec/eth2spec/electra/
tests/core/pyspec/eth2spec/whisk/
tests/core/pyspec/eth2spec/eip7594/
tests/core/pyspec/eth2spec/eip6800/

# coverage reports
.htmlcov
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MARKDOWN_FILES = $(wildcard $(SPEC_DIR)/*/*.md) \
$(wildcard $(SPEC_DIR)/_features/*/*/*.md) \
$(wildcard $(SSZ_DIR)/*.md)

ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra whisk
ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra whisk eip6800
# The parameters for commands. Use `foreach` to avoid listing specs again.
COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), --cov=eth2spec.$S.$(TEST_PRESET_TYPE))
PYLINT_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES), ./eth2spec/$S)
Expand Down
3 changes: 3 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ NUMBER_OF_COLUMNS: 128
MAX_CELLS_IN_EXTENDED_MATRIX: 768
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384
SAMPLES_PER_SLOT: 8
CUSTODY_REQUIREMENT: 1
TARGET_NUMBER_OF_PEERS: 70

# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)
Expand Down
3 changes: 3 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ NUMBER_OF_COLUMNS: 128
MAX_CELLS_IN_EXTENDED_MATRIX: 768
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384
SAMPLES_PER_SLOT: 8
CUSTODY_REQUIREMENT: 1
TARGET_NUMBER_OF_PEERS: 70

# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 # 2**6 * 10**9 (= 64,000,000,000)
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/new-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ You can refer to the previous fork's `fork.md` file.
### 5. Make it executable
- 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/constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/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.
- Update `PREVIOUS_FORK_OF` setting in both [`test/helpers/constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/constants.py) and [`pysetup/md_doc_paths.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/md_doc_paths.py).
- Update `PREVIOUS_FORK_OF` setting in both [`test/helpers/constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/test/helpers/constants.py) and [`pysetup/md_doc_paths.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/md_doc_paths.py).
- NOTE: since these two modules (the pyspec itself and the spec builder tool) must be separate, the fork sequence setting has to be defined again.

## B: Make it executable for pytest and test generator
Expand Down
12 changes: 12 additions & 0 deletions presets/mainnet/eip6800.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Mainnet preset - EIP6800

# Misc
# ---------------------------------------------------------------
# `uint64(2**16)` (= 65,536)
MAX_STEMS: 65536
# `uint64(33)`
MAX_COMMITMENTS_PER_STEM: 33
# `uint64(2**8)` (= 256)
VERKLE_WIDTH: 256
# `uint64(2**3)` (= 8)
IPA_PROOF_DEPTH: 8
6 changes: 3 additions & 3 deletions presets/mainnet/electra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
# `uint64(2**3)` (= 8)
MAX_ATTESTATIONS_ELECTRA: 8
# `uint64(2**0)` (= 1)
MAX_CONSOLIDATIONS: 1
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1

# Execution
# ---------------------------------------------------------------
# 2**13 (= 8192) receipts
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 8192
# 2**13 (= 8192) deposit requests
MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 8192
# 2**4 (= 16) withdrawal requests
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16

Expand Down
12 changes: 12 additions & 0 deletions presets/minimal/eip6800.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Minimal preset - EIP6800

# Execution
# ---------------------------------------------------------------
# `uint64(2**16)` (= 65,536)
MAX_STEMS: 65536
# `uint64(33)`
MAX_COMMITMENTS_PER_STEM: 33
# `uint64(2**8)` (= 256)
VERKLE_WIDTH: 256
# `uint64(2**3)` (= 8)
IPA_PROOF_DEPTH: 8
4 changes: 2 additions & 2 deletions presets/minimal/electra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
# `uint64(2**3)` (= 8)
MAX_ATTESTATIONS_ELECTRA: 8
# `uint64(2**0)` (= 1)
MAX_CONSOLIDATIONS: 1
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1

# Execution
# ---------------------------------------------------------------
# [customized]
MAX_DEPOSIT_RECEIPTS_PER_PAYLOAD: 4
MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 4
# [customized] 2**1 (= 2) withdrawal requests
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 2

Expand Down
2 changes: 1 addition & 1 deletion pysetup/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
DENEB = 'deneb'
ELECTRA = 'electra'
EIP7594 = 'eip7594'
EIP6800 = 'eip6800'
WHISK = 'whisk'



# The helper functions that are used when defining constants
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
def ceillog2(x: int) -> uint64:
Expand Down
2 changes: 1 addition & 1 deletion pysetup/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def combine_dicts(old_dict: Dict[str, T], new_dict: Dict[str, T]) -> Dict[str, T

ignored_dependencies = [
'bit', 'boolean', 'Vector', 'List', 'Container', 'BLSPubkey', 'BLSSignature',
'Bytes1', 'Bytes4', 'Bytes8', 'Bytes20', 'Bytes32', 'Bytes48', 'Bytes96', 'Bitlist', 'Bitvector',
'Bytes1', 'Bytes4', 'Bytes8', 'Bytes20', 'Bytes31', 'Bytes32', 'Bytes48', 'Bytes96', 'Bitlist', 'Bitvector',
'uint8', 'uint16', 'uint32', 'uint64', 'uint128', 'uint256',
'bytes', 'byte', 'ByteList', 'ByteVector',
'Dict', 'dict', 'field', 'ceillog2', 'floorlog2', 'Set',
Expand Down
2 changes: 2 additions & 0 deletions pysetup/md_doc_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ELECTRA,
WHISK,
EIP7594,
EIP6800,
)


Expand All @@ -21,6 +22,7 @@
ELECTRA: DENEB,
WHISK: CAPELLA,
EIP7594: DENEB,
EIP6800: DENEB,
}

ALL_FORKS = list(PREVIOUS_FORK_OF.keys())
Expand Down
3 changes: 2 additions & 1 deletion pysetup/spec_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
from .electra import ElectraSpecBuilder
from .whisk import WhiskSpecBuilder
from .eip7594 import EIP7594SpecBuilder
from .eip6800 import EIP6800SpecBuilder


spec_builders = {
builder.fork: builder
for builder in (
Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder,
ElectraSpecBuilder, WhiskSpecBuilder, EIP7594SpecBuilder,
ElectraSpecBuilder, WhiskSpecBuilder, EIP7594SpecBuilder, EIP6800SpecBuilder,
)
}
21 changes: 21 additions & 0 deletions pysetup/spec_builders/eip6800.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from typing import Dict

from .base import BaseSpecBuilder
from ..constants import EIP6800


class EIP6800SpecBuilder(BaseSpecBuilder):
fork: str = EIP6800

@classmethod
def imports(cls, preset_name: str):
return f'''
from eth2spec.deneb import {preset_name} as deneb
from eth2spec.utils.ssz.ssz_typing import Bytes31
'''

@classmethod
def hardcoded_custom_type_dep_constants(cls, spec_object) -> str:
return {
'MAX_STEMS': spec_object.preset_vars['MAX_STEMS'].value,
}
2 changes: 1 addition & 1 deletion scripts/build_run_docker_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash

# Run 'consensus-specs' tests from a docker container instance.
# *Be sure to launch Docker before running this script.*
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ def get_spec(file_name: Path, preset: Dict[str, str], config: Dict[str, str], pr
elif source.startswith("class"):
class_name, parent_class = _get_class_info_from_source(source)
# check consistency with spec
assert class_name == current_name
try:
assert class_name == current_name
except Exception:
print('class_name', class_name)
print('current_name', current_name)
raise

if parent_class:
assert parent_class == "Container"
# NOTE: trim whitespace from spec
Expand Down
Loading