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

Kintsugi🍵 release #2705

Merged
merged 73 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
aa91788
Yield the `pre` state for this test type before making blocks
ralexstokes Oct 15, 2021
d0379cf
Merge pull request #2672 from ralexstokes/fix-altair-transition-tests
ralexstokes Oct 15, 2021
c5b169b
fix issue with mutation in test generation
djrtwo Oct 15, 2021
6852c5a
Merge pull request #2673 from ethereum/fix-test
protolambda Oct 15, 2021
7e080c1
update remerkleable
protolambda Oct 15, 2021
cd5cf60
Clarify `get_pow_block` block-not-found case
hwwhww Oct 18, 2021
ec516a7
Update `ssz_generic` test format README
ralexstokes Oct 18, 2021
afb62ee
Add pytest CLI option `--fork` so that we can just run with specific …
hwwhww Oct 18, 2021
2f6e817
Set CI job for each fork
hwwhww Oct 18, 2021
140596f
Merge pull request #2674 from ethereum/update-remerkleable
hwwhww Oct 18, 2021
4f36378
Disable some too-slow mainnet preset fork choice tests
hwwhww Oct 18, 2021
190ef9f
call notify_forkchoice_updated with finalized_block_hash == 0x00..00 …
djrtwo Oct 18, 2021
3bfdc91
ad TBH_ACTIVATION_EPOCH
djrtwo Oct 18, 2021
d5be6b5
remove prepare_payload in favor of a unification with notify_forkchoi…
djrtwo Oct 19, 2021
ba582b3
Fix setup.py parser and rename `TBH_ACTIVATION_EPOCH` -> `TERMINAL_BL…
hwwhww Oct 19, 2021
34335e0
Remove `prepare_payload` leftover
hwwhww Oct 19, 2021
cebf3ed
Merge pull request #2681 from ethereum/pre-finalized-forkchoice
mkalinin Oct 19, 2021
294b60a
pr feedback
djrtwo Oct 19, 2021
8023edc
cleanup some copy relatedto removal of prepare_payload
djrtwo Oct 19, 2021
def46dd
Merge pull request #2682 from ethereum/TBH-epoch
djrtwo Oct 19, 2021
4bf88ba
Merge pull request #2683 from ethereum/remove-prepare-payload
djrtwo Oct 19, 2021
c08a8c9
Merge pull request #2678 from ethereum/run-specific-fork
djrtwo Oct 19, 2021
65d56dc
Merge pull request #2679 from ethereum/ci-in-forks
djrtwo Oct 19, 2021
e787da3
Apply suggestions from code review
djrtwo Oct 19, 2021
8a27a7c
remove union type for eecution-payload txs
djrtwo Oct 19, 2021
c6af7b3
add merge execution values to preset yaml files
djrtwo Oct 19, 2021
a20f6f7
Merge pull request #2684 from ethereum/merge-txs
djrtwo Oct 20, 2021
edb5a02
remove extraneous p2p condition
djrtwo Oct 20, 2021
cb513aa
--fork cli option: fix the case of unset directory path + validate fo…
hwwhww Oct 21, 2021
966d34b
Merge pull request #2687 from ethereum/remove-p2p
djrtwo Oct 21, 2021
405f2e2
Update tests/core/pyspec/eth2spec/test/conftest.py
hwwhww Oct 21, 2021
a89b55d
Merge pull request #2688 from ethereum/fork-cli-fix
hwwhww Oct 21, 2021
3148401
Add `test_invalid_previous_source_root` and fix `test_invalid_current…
hwwhww Oct 26, 2021
5b9652b
Merge branch 'dev' into get_pow_block-not-found
hwwhww Oct 26, 2021
71d3159
Fix typo
hwwhww Oct 26, 2021
62504d9
Update `pow_chain` to dict and reuse it instead of calling `get_pow_b…
hwwhww Oct 26, 2021
3e320da
fix gossip and tx size limits for the merge
djrtwo Oct 20, 2021
dae5b87
increase TX sizes to account for very high gas limits
djrtwo Oct 21, 2021
bda07e1
remove extraneous gossip condition
djrtwo Oct 26, 2021
4879383
Merge pull request #2694 from ethereum/reuse-pow-chain
mkalinin Oct 27, 2021
43a659a
Update tests/formats/ssz_generic/README.md
ralexstokes Oct 27, 2021
d58b1c5
bump up MAX_CHUNK_SIZE at the merge as well
djrtwo Oct 27, 2021
4f49c63
Merge pull request #2695 from ethereum/new-test-case
djrtwo Oct 27, 2021
79bf348
Merge branch 'dev' into get_pow_block-not-found
hwwhww Oct 28, 2021
6016347
PR feedback from @mkalinin
hwwhww Oct 28, 2021
8ecbffa
Minor comment fix
hwwhww Oct 28, 2021
0eff6e0
Merge pull request #2677 from ethereum/ralexstokes-patch-1
ralexstokes Oct 28, 2021
d0bcf29
Fix typo
hwwhww Oct 28, 2021
b50c33e
Merge pull request #2696 from ethereum/typo-fix
djrtwo Oct 28, 2021
2fc0564
Merge pull request #2686 from ethereum/tx-limits
djrtwo Oct 28, 2021
78040ac
update penalty params for Merge
djrtwo Oct 29, 2021
6d1be4a
Merge pull request #2676 from ethereum/get_pow_block-not-found
djrtwo Oct 29, 2021
4da53e6
Apply suggestions from code review
djrtwo Oct 29, 2021
43da796
Update setup.py
ralexstokes Oct 31, 2021
7f35777
Merge pull request #2701 from ethereum/ralexstokes-patch-1
djrtwo Oct 31, 2021
fe8d6ed
Apply suggestions from code review
djrtwo Oct 31, 2021
d5f5f8b
add modified in merge
djrtwo Oct 31, 2021
77fe450
Merge pull request #2698 from ethereum/merge-penalties
djrtwo Oct 31, 2021
3ba3915
Set execution params to presets and add builder checks.
hwwhww Nov 1, 2021
dce6b09
State that validator must consider only fully validated blocks
mkalinin Nov 1, 2021
52a97ab
remove gas validations from CL
djrtwo Oct 29, 2021
879bd2f
remove etra gas constants and p2p validations
djrtwo Oct 31, 2021
7e3ccb7
remove block_number validation from CL
djrtwo Nov 1, 2021
a8076eb
Merge pull request #2699 from ethereum/remove-gas-validations
djrtwo Nov 1, 2021
16cabb2
Note the Proof-of-Custody for execution in validator.md
mkalinin Nov 1, 2021
7d411a2
Merge pull request #2703 from mkalinin/attest-after-execution
mkalinin Nov 1, 2021
7a5eec3
Merge pull request #2704 from ethereum/disable-too-slow-fork-choice-t…
djrtwo Nov 1, 2021
e09a749
Revert `custom_type_dep_constants_verification` change
hwwhww Nov 2, 2021
79d005e
Merge pull request #2702 from ethereum/merge-preset
ralexstokes Nov 2, 2021
948d476
Polish TBH handling functionality
mkalinin Nov 2, 2021
88345d2
Merge pull request #2707 from mkalinin/polish-tbh-handling
djrtwo Nov 2, 2021
1361078
bump VERSION.txt to 1.1.4
djrtwo Nov 2, 2021
a45ee9b
Merge pull request #2708 from ethereum/bump-version
djrtwo Nov 2, 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
40 changes: 36 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
name: Install pyspec requirements
command: make install_test
- save_pyspec_cached_venv
test:
test-phase0:
docker:
- image: circleci/python:3.8
working_directory: ~/specs-repo
Expand All @@ -100,7 +100,33 @@ jobs:
- restore_pyspec_cached_venv
- run:
name: Run py-tests
command: make citest
command: make citest fork=phase0
- store_test_results:
path: tests/core/pyspec/test-reports
test-altair:
docker:
- image: circleci/python:3.8
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=altair
- store_test_results:
path: tests/core/pyspec/test-reports
test-merge:
docker:
- image: circleci/python:3.8
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=merge
- store_test_results:
path: tests/core/pyspec/test-reports
table_of_contents:
Expand Down Expand Up @@ -208,14 +234,20 @@ workflows:
- install_pyspec_test:
requires:
- checkout_specs
- test:
- test-phase0:
requires:
- install_pyspec_test
- test-altair:
requires:
- install_pyspec_test
- test-merge:
requires:
- install_pyspec_test
- table_of_contents
- codespell
- lint:
requires:
- test
- install_pyspec_test
# NOTE: Since phase 0 has been launched, we disabled the deposit contract tests.
# - install_deposit_contract_web3_tester:
# requires:
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,15 @@ find_test: pyspec
python3 -m pytest -k=$(K) --disable-bls --cov=eth2spec.phase0.minimal --cov=eth2spec.altair.minimal --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec

citest: pyspec
mkdir -p tests/core/pyspec/test-reports/eth2spec; . venv/bin/activate; cd $(PY_SPEC_DIR); \
mkdir -p tests/core/pyspec/test-reports/eth2spec;
ifdef fork
. venv/bin/activate; cd $(PY_SPEC_DIR); \
python3 -m pytest -n 4 --bls-type=milagro --fork=$(fork) --junitxml=eth2spec/test_results.xml eth2spec
else
. venv/bin/activate; cd $(PY_SPEC_DIR); \
python3 -m pytest -n 4 --bls-type=milagro --junitxml=eth2spec/test_results.xml eth2spec
endif


open_cov:
((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) &
Expand Down
4 changes: 3 additions & 1 deletion configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ PRESET_BASE: 'mainnet'
# ---------------------------------------------------------------
# TBD, 2**256-2**10 is a placeholder
TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638912
# By default, don't use this param
# By default, don't use these params
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615



# Genesis
Expand Down
4 changes: 3 additions & 1 deletion configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ PRESET_BASE: 'minimal'
# ---------------------------------------------------------------
# TBD, 2**256-2**10 is a placeholder
TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638912
# By default, don't use this param
# By default, don't use these params
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615



# Genesis
Expand Down
20 changes: 19 additions & 1 deletion presets/mainnet/merge.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Mainnet preset - The Merge

# No presets here.
# Updated penalty values
# ---------------------------------------------------------------
# 2**24 (= 16,777,216)
INACTIVITY_PENALTY_QUOTIENT_MERGE: 16777216
# 2**5 (= 32)
MIN_SLASHING_PENALTY_QUOTIENT_MERGE: 32
# 3
PROPORTIONAL_SLASHING_MULTIPLIER_MERGE: 3

# Execution
# ---------------------------------------------------------------
# 2**30 (= 1,073,741,824)
MAX_BYTES_PER_TRANSACTION: 1073741824
# 2**20 (= 1,048,576)
MAX_TRANSACTIONS_PER_PAYLOAD: 1048576
# 2**8 (= 256)
BYTES_PER_LOGS_BLOOM: 256
# 2**5 (= 32)
MAX_EXTRA_DATA_BYTES: 32
20 changes: 19 additions & 1 deletion presets/minimal/merge.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Minimal preset - The Merge

# No presets here.
# Updated penalty values
# ---------------------------------------------------------------
# 2**24 (= 16,777,216)
INACTIVITY_PENALTY_QUOTIENT_MERGE: 16777216
# 2**5 (= 32)
MIN_SLASHING_PENALTY_QUOTIENT_MERGE: 32
# 3
PROPORTIONAL_SLASHING_MULTIPLIER_MERGE: 3

# Execution
# ---------------------------------------------------------------
# 2**30 (= 1,073,741,824)
MAX_BYTES_PER_TRANSACTION: 1073741824
# 2**20 (= 1,048,576)
MAX_TRANSACTIONS_PER_PAYLOAD: 1048576
# 2**8 (= 256)
BYTES_PER_LOGS_BLOOM: 256
# 2**5 (= 32)
MAX_EXTRA_DATA_BYTES: 32
24 changes: 10 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def imports(cls, preset_name: str):
return super().imports(preset_name) + f'''
from typing import Protocol
from eth2spec.altair import {preset_name} as altair
from eth2spec.utils.ssz.ssz_typing import Bytes20, ByteList, ByteVector, uint256, Union
from eth2spec.utils.ssz.ssz_typing import Bytes8, Bytes20, ByteList, ByteVector, uint256
'''

@classmethod
Expand All @@ -510,7 +510,7 @@ def sundry_functions(cls) -> str:
ExecutionState = Any


def get_pow_block(hash: Bytes32) -> PowBlock:
def get_pow_block(hash: Bytes32) -> Optional[PowBlock]:
return PowBlock(block_hash=hash, parent_hash=Bytes32(), total_difficulty=uint256(0), difficulty=uint256(0))


Expand All @@ -527,16 +527,12 @@ class NoopExecutionEngine(ExecutionEngine):
def execute_payload(self: ExecutionEngine, execution_payload: ExecutionPayload) -> bool:
return True

def notify_forkchoice_updated(self: ExecutionEngine, head_block_hash: Hash32, finalized_block_hash: Hash32) -> None:
def notify_forkchoice_updated(self: ExecutionEngine,
head_block_hash: Hash32,
finalized_block_hash: Hash32,
payload_attributes: Optional[PayloadAttributes]) -> None:
pass

def prepare_payload(self: ExecutionEngine,
parent_hash: Hash32,
timestamp: uint64,
random: Bytes32,
feeRecipient: ExecutionAddress) -> PayloadId:
raise NotImplementedError("no default block production")

def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> ExecutionPayload:
raise NotImplementedError("no default block production")

Expand All @@ -547,7 +543,7 @@ def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> ExecutionPayloa
@classmethod
def hardcoded_custom_type_dep_constants(cls) -> str:
constants = {
'MAX_BYTES_PER_OPAQUE_TRANSACTION': 'uint64(2**20)',
'MAX_BYTES_PER_TRANSACTION': 'uint64(2**30)',
}
return {**super().hardcoded_custom_type_dep_constants(), **constants}

Expand Down Expand Up @@ -603,7 +599,7 @@ def format_protocol(protocol_name: str, protocol_def: ProtocolDefinition) -> str

# Access global dict of config vars for runtime configurables
for name in spec_object.config_vars.keys():
functions_spec = functions_spec.replace(name, 'config.' + name)
functions_spec = re.sub(r"\b%s\b" % name, 'config.' + name, functions_spec)

def format_config_var(name: str, vardef: VariableDefinition) -> str:
if vardef.type_name is None:
Expand Down Expand Up @@ -683,7 +679,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', 'Bytes20', 'Bytes32', 'Bytes48', 'Bytes96', 'Bitlist', 'Bitvector',
'Bytes1', 'Bytes4', 'Bytes8', 'Bytes20', 'Bytes32', 'Bytes48', 'Bytes96', 'Bitlist', 'Bitvector',
'uint8', 'uint16', 'uint32', 'uint64', 'uint128', 'uint256',
'bytes', 'byte', 'ByteList', 'ByteVector',
'Dict', 'dict', 'field', 'ceillog2', 'floorlog2', 'Set',
Expand Down Expand Up @@ -1021,7 +1017,7 @@ def run(self):
"py_ecc==5.2.0",
"milagro_bls_binding==1.6.3",
"dataclasses==0.6",
"remerkleable==0.1.22",
"remerkleable==0.1.24",
RUAMEL_YAML_VERSION,
"lru-dict==1.1.6",
MARKO_VERSION,
Expand Down
Loading