drop is_valid_merkle_path

This commit is contained in:
dapplion 2023-10-30 10:33:49 +02:00
parent 0e4737eba2
commit c680212183
1 changed files with 0 additions and 14 deletions

View File

@ -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`