From ea85aa72beac8f853732bfb340c386e721c27102 Mon Sep 17 00:00:00 2001 From: fradamt <104826920+fradamt@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:16:49 +0100 Subject: [PATCH 1/5] fix typo --- specs/bellatrix/p2p-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/bellatrix/p2p-interface.md b/specs/bellatrix/p2p-interface.md index e33d0ca510..617f6f1fc7 100644 --- a/specs/bellatrix/p2p-interface.md +++ b/specs/bellatrix/p2p-interface.md @@ -168,7 +168,7 @@ Similar to the discussion about the maximum gossip size increase, the `ExecutionPayload` type can cause `BeaconBlock`s to exceed the 1 MiB bounds put in place during Phase 0. -As with the gossip limit, 10 MiB is selected because this is firmly below any +As with the gossip limit, 10 MiB is selected because this is firmly above any valid block sizes in the range of gas limits expected in the medium term. As with both gossip and req/rsp maximum values, type-specific limits should From 2297c09b7e457a13f7b2261a28cb45777be82f83 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 16 Feb 2024 09:26:13 +0800 Subject: [PATCH 2/5] Remove `higher_churn_limit_to_lower__without_block` --- .../test/deneb/transition/test_transition.py | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/deneb/transition/test_transition.py b/tests/core/pyspec/eth2spec/test/deneb/transition/test_transition.py index 04a419c131..b26cf6866a 100644 --- a/tests/core/pyspec/eth2spec/test/deneb/transition/test_transition.py +++ b/tests/core/pyspec/eth2spec/test/deneb/transition/test_transition.py @@ -74,39 +74,3 @@ def test_higher_churn_limit_to_lower(state, fork_epoch, spec, post_spec, pre_tag churn_limit_1 = post_spec.get_validator_activation_churn_limit(state) assert churn_limit_1 == post_spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT assert churn_limit_1 < churn_limit_0 - - -@with_fork_metas([ForkMeta(pre_fork_name=pre, post_fork_name=post, fork_epoch=2) - for pre, post in AFTER_DENEB_PRE_POST_FORKS]) -@with_presets([MINIMAL], reason="churn limit update needs enough validators") -def test_higher_churn_limit_to_lower__without_block(state, fork_epoch, spec, post_spec, pre_tag, post_tag): - """ - Test if churn limit goes from high to low due to EIP-7514. - """ - # Create high churn limit - mock_activations = post_spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT * spec.config.CHURN_LIMIT_QUOTIENT - mock_activated_validators(spec, state, mock_activations) - - transition_until_fork(spec, state, fork_epoch) - - churn_limit_0 = spec.get_validator_churn_limit(state) - assert churn_limit_0 > post_spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT - - # check pre state - assert spec.get_current_epoch(state) < fork_epoch - - yield "pre", state - - # irregular state transition to handle fork - # set with_block=False here - state, _ = do_fork(state, spec, post_spec, fork_epoch, with_block=False) - - # check post state - assert spec.get_current_epoch(state) == fork_epoch - - yield "blocks", [] - yield "post", state - - churn_limit_1 = post_spec.get_validator_activation_churn_limit(state) - assert churn_limit_1 == post_spec.config.MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT - assert churn_limit_1 < churn_limit_0 From 3e2650811e9e454cb80ab18b6e8618595e9ae14d Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 16 Feb 2024 13:39:46 +0600 Subject: [PATCH 3/5] Introduce UINT64_MAX_SQRT --- specs/phase0/beacon-chain.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/phase0/beacon-chain.md b/specs/phase0/beacon-chain.md index 572f46246c..f5ac401e96 100644 --- a/specs/phase0/beacon-chain.md +++ b/specs/phase0/beacon-chain.md @@ -179,6 +179,7 @@ The following values are (non-configurable) constants used throughout the specif | Name | Value | | - | - | | `UINT64_MAX` | `uint64(2**64 - 1)` | +| `UINT64_MAX_SQRT` | `uint64(4294967295)` | | `GENESIS_SLOT` | `Slot(0)` | | `GENESIS_EPOCH` | `Epoch(0)` | | `FAR_FUTURE_EPOCH` | `Epoch(2**64 - 1)` | @@ -601,7 +602,7 @@ def integer_squareroot(n: uint64) -> uint64: Return the largest integer ``x`` such that ``x**2 <= n``. """ if n == UINT64_MAX: - return uint64(4294967295) + return UINT64_MAX_SQRT x = n y = (x + 1) // 2 while y < x: From 7a20cae75ec9762183bc9fb9524d20435390381f Mon Sep 17 00:00:00 2001 From: danny Date: Mon, 11 Mar 2024 12:10:44 -0600 Subject: [PATCH 4/5] tiny formatting in deneb p2p --- specs/deneb/p2p-interface.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/deneb/p2p-interface.md b/specs/deneb/p2p-interface.md index 8527034389..745757e570 100644 --- a/specs/deneb/p2p-interface.md +++ b/specs/deneb/p2p-interface.md @@ -183,7 +183,7 @@ The following validations MUST pass before forwarding the `blob_sidecar` on the - _[REJECT]_ The current finalized_checkpoint is an ancestor of the sidecar's block -- i.e. `get_checkpoint_block(store, block_header.parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root`. - _[REJECT]_ The sidecar's inclusion proof is valid as verified by `verify_blob_sidecar_inclusion_proof(blob_sidecar)`. - _[REJECT]_ The sidecar's blob is valid as verified by `verify_blob_kzg_proof(blob_sidecar.blob, blob_sidecar.kzg_commitment, blob_sidecar.kzg_proof)`. -- _[IGNORE]_ The sidecar is the first sidecar for the tuple (block_header.slot, block_header.proposer_index, blob_sidecar.index) with valid header signature, sidecar inclusion proof, and kzg proof. +- _[IGNORE]_ The sidecar is the first sidecar for the tuple `(block_header.slot, block_header.proposer_index, blob_sidecar.index)` with valid header signature, sidecar inclusion proof, and kzg proof. - _[REJECT]_ The sidecar is proposed by the expected `proposer_index` for the block's slot in the context of the current shuffling (defined by `block_header.parent_root`/`block_header.slot`). If the `proposer_index` cannot immediately be verified against the expected shuffling, the sidecar MAY be queued for later processing while proposers for the block's branch are calculated -- in such a case _do not_ `REJECT`, instead `IGNORE` this message. From 8bf7ddf1bdcd00ab08b96171a41d3174c42a475c Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Wed, 13 Mar 2024 21:24:30 +0800 Subject: [PATCH 5/5] bump version to v1.4.0 --- tests/core/pyspec/eth2spec/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/pyspec/eth2spec/VERSION.txt b/tests/core/pyspec/eth2spec/VERSION.txt index 6c30ee1dfb..88c5fb891d 100644 --- a/tests/core/pyspec/eth2spec/VERSION.txt +++ b/tests/core/pyspec/eth2spec/VERSION.txt @@ -1 +1 @@ -1.4.0-beta.7 +1.4.0