mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-13 11:06:31 +00:00
Fix ToC
This commit is contained in:
parent
4be0b9d6bc
commit
8a70295a84
@ -20,6 +20,7 @@
|
|||||||
- [`BeaconBlockBody`](#beaconblockbody)
|
- [`BeaconBlockBody`](#beaconblockbody)
|
||||||
- [Helper functions](#helper-functions)
|
- [Helper functions](#helper-functions)
|
||||||
- [KZG core](#kzg-core)
|
- [KZG core](#kzg-core)
|
||||||
|
- [`lincomb`](#lincomb)
|
||||||
- [`blob_to_kzg`](#blob_to_kzg)
|
- [`blob_to_kzg`](#blob_to_kzg)
|
||||||
- [`kzg_to_versioned_hash`](#kzg_to_versioned_hash)
|
- [`kzg_to_versioned_hash`](#kzg_to_versioned_hash)
|
||||||
- [Misc](#misc)
|
- [Misc](#misc)
|
||||||
@ -108,7 +109,7 @@ class BeaconBlockBody(Container):
|
|||||||
|
|
||||||
KZG core functions. These are also defined in EIP-4844 execution specs.
|
KZG core functions. These are also defined in EIP-4844 execution specs.
|
||||||
|
|
||||||
#### `blob_to_kzg`
|
#### `lincomb`
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def lincomb(points: List[KZGCommitment], scalars: List[BLSFieldElement]) -> KZGCommitment:
|
def lincomb(points: List[KZGCommitment], scalars: List[BLSFieldElement]) -> KZGCommitment:
|
||||||
@ -119,7 +120,11 @@ def lincomb(points: List[KZGCommitment], scalars: List[BLSFieldElement]) -> KZGC
|
|||||||
for x, a in zip(points, scalars):
|
for x, a in zip(points, scalars):
|
||||||
r = bls.add(r, bls.multiply(x, a))
|
r = bls.add(r, bls.multiply(x, a))
|
||||||
return r
|
return r
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `blob_to_kzg`
|
||||||
|
|
||||||
|
```python
|
||||||
def blob_to_kzg(blob: Blob) -> KZGCommitment:
|
def blob_to_kzg(blob: Blob) -> KZGCommitment:
|
||||||
return lincomb(blob, KZG_SETUP_LAGRANGE)
|
return lincomb(blob, KZG_SETUP_LAGRANGE)
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user