From c680212183e67ff5895e6532861f85b4b4a9d557 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:33:49 +0200 Subject: [PATCH] drop is_valid_merkle_path --- specs/deneb/beacon-chain.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/specs/deneb/beacon-chain.md b/specs/deneb/beacon-chain.md index fde75b0ed..b98ac1259 100644 --- a/specs/deneb/beacon-chain.md +++ b/specs/deneb/beacon-chain.md @@ -25,7 +25,6 @@ - [Helper functions](#helper-functions) - [Misc](#misc) - [`kzg_commitment_to_versioned_hash`](#kzg_commitment_to_versioned_hash) - - [`is_valid_merkle_path`](#is_valid_merkle_path) - [Beacon state accessors](#beacon-state-accessors) - [Modified `get_attestation_participation_flag_indices`](#modified-get_attestation_participation_flag_indices) - [New `get_validator_activation_churn_limit`](#new-get_validator_activation_churn_limit) @@ -188,19 +187,6 @@ def kzg_commitment_to_versioned_hash(kzg_commitment: KZGCommitment) -> Versioned return VERSIONED_HASH_VERSION_KZG + hash(kzg_commitment)[1:] ``` -#### `is_valid_merkle_path` - -```python -def is_valid_merkle_path(leaf: Bytes32, branch: Sequence[Bytes32], gindex: int, root: Root) -> bool: - value = leaf - for i in range(len(branch)): - if (gindex >> i) & 1 == 0: - value = hash(branch[i] + value) - else: - value = hash(value + branch[i]) - return value == root -``` - ### Beacon state accessors #### Modified `get_attestation_participation_flag_indices`