Skip to content

Commit

Permalink
Merge pull request #3621 from ethereum/dev
Browse files Browse the repository at this point in the history
Release v1.4.0
  • Loading branch information
hwwhww authored Mar 13, 2024
2 parents 2c0fcee + fa5edb7 commit 4afe398
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 40 deletions.
2 changes: 1 addition & 1 deletion specs/bellatrix/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion specs/deneb/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion specs/phase0/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)` |
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/core/pyspec/eth2spec/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0-beta.7
1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4afe398

Please sign in to comment.