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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ MARKDOWN_FILES = $(CURDIR)/README.md \
lint: pyspec
@$(MDFORMAT_VENV) --number --wrap=80 $(MARKDOWN_FILES)
@$(CODESPELL_VENV) . --skip "./.git,$(VENV),$(PYSPEC_DIR)/.mypy_cache" -I .codespell-whitelist
@$(PYTHON_VENV) -m isort --quiet $(CURDIR)/tests
@$(PYTHON_VENV) -m black --quiet $(CURDIR)/tests
@$(PYTHON_VENV) -m isort --quiet $(CURDIR)/tests $(CURDIR)/pysetup
@$(PYTHON_VENV) -m black --quiet $(CURDIR)/tests $(CURDIR)/pysetup
@$(PYTHON_VENV) -m pylint --rcfile $(PYLINT_CONFIG) $(PYLINT_SCOPE)
@$(PYTHON_VENV) -m mypy --config-file $(MYPY_CONFIG) $(MYPY_SCOPE)

Expand Down
30 changes: 15 additions & 15 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Definitions in context.py
PHASE0 = 'phase0'
ALTAIR = 'altair'
BELLATRIX = 'bellatrix'
CAPELLA = 'capella'
DENEB = 'deneb'
ELECTRA = 'electra'
FULU = 'fulu'
EIP6800 = 'eip6800'
EIP7441 = 'eip7441'
EIP7732 = 'eip7732'
EIP7805 = 'eip7805'
PHASE0 = "phase0"
ALTAIR = "altair"
BELLATRIX = "bellatrix"
CAPELLA = "capella"
DENEB = "deneb"
ELECTRA = "electra"
FULU = "fulu"
EIP6800 = "eip6800"
EIP7441 = "eip7441"
EIP7732 = "eip7732"
EIP7805 = "eip7805"


# The helper functions that are used when defining constants
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = """
def ceillog2(x: int) -> uint64:
if x < 1:
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
Expand All @@ -24,10 +24,10 @@ 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 = '''
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = """
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
return bls.AggregatePKs(pubkeys)
'''
"""
Loading