Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.5.0-alpha.6 #3920

Merged
merged 80 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
fcd905c
Update sync-protocol.md
dapplion Jun 25, 2024
355a9a3
Introducing ExecutionPayloadEnvelope
lucassaldanha Aug 9, 2024
ed9b061
Comments
lucassaldanha Aug 9, 2024
23a669d
Get rid of compute_state_by_epoch_processing_to
mkalinin Aug 9, 2024
f26c9be
Removing EL requests from ExecutionPayload
lucassaldanha Aug 11, 2024
f9ac902
Updated light-client block -> header function
lucassaldanha Aug 11, 2024
e26a3e0
New execution payload global index
lucassaldanha Aug 11, 2024
9a2e088
requests_root
lucassaldanha Aug 12, 2024
858402f
Updated with requests on block body
lucassaldanha Aug 13, 2024
794b942
Undo execution_payload gsync change
lucassaldanha Aug 13, 2024
5c88de8
Remove requests in execution_payload from full-node lightclient spec
lucassaldanha Aug 13, 2024
6669675
Test updates
lucassaldanha Aug 13, 2024
4185c00
Fork fix and tests
lucassaldanha Aug 13, 2024
a378e8d
Update correlation penalty computation
mkalinin Aug 13, 2024
fa78e0d
PR comments
lucassaldanha Aug 13, 2024
c22105d
updating readme and dependencies
parithosh Aug 13, 2024
bb4c5d1
Update docker/README.md
parithosh Aug 13, 2024
e3ec53f
Fix lint
lucassaldanha Aug 13, 2024
4051ea8
Fix toc
mkalinin Aug 14, 2024
3527a9b
Cleaning unchanged ExecutionPayload
lucassaldanha Aug 14, 2024
b84316d
PR Comments
lucassaldanha Aug 16, 2024
98dd188
Rename requests to execution_requests
lucassaldanha Aug 16, 2024
fc3640f
Require the builder is active and non-slashed
potuz Aug 19, 2024
7d0a8c6
EIP-7732: Modify `ExecutionPayloadEnvelopeByRoot`
StefanBratanov Aug 20, 2024
679cb60
Add to table of contents
StefanBratanov Aug 20, 2024
edf0dde
change to new
StefanBratanov Aug 20, 2024
24aecf5
Update specs/_features/eip7732/p2p-interface.md
StefanBratanov Aug 20, 2024
ba99f8b
Update specs/_features/eip7732/p2p-interface.md
StefanBratanov Aug 20, 2024
4c9be89
Randomize validator index in partial withdrawal test
ensi321 Aug 21, 2024
ad91a83
Update python to 3.12.4 (#3880)
parithosh Aug 21, 2024
dc1892e
Updated NewPayloadRequest
lucassaldanha Aug 22, 2024
8e90dd0
address comment
ensi321 Aug 22, 2024
f600728
Fix the install_pyspec_test CI check
jtraglia Aug 22, 2024
a9a1d9a
Try no restore/save cache
jtraglia Aug 22, 2024
92a801a
Only disable restore_pyspec_cached_venv
jtraglia Aug 22, 2024
4850a28
Remove line to pull new py_arkworks wheel
jtraglia Aug 22, 2024
562798d
Update cache version and add back line
jtraglia Aug 22, 2024
ca04b1e
Merge pull request #3894 from jtraglia/fix-install_pyspec_test
hwwhww Aug 22, 2024
b8ca7cc
PR comments
lucassaldanha Aug 22, 2024
33a8e19
Merge branch 'ethereum:dev' into update-readme-deps
parithosh Aug 23, 2024
725f963
Add blank lines to fix linter
jtraglia Aug 26, 2024
d4f27af
Fix some EIP-7732 typos
terencechain Aug 27, 2024
7259a6c
Merge pull request #3878 from mkalinin/remove-compute_state_by_epoch_…
hwwhww Aug 28, 2024
423bb4d
Merge pull request #3902 from terencechain/fix-eip7732-typos
hwwhww Aug 28, 2024
a5990f9
EIP-7594: PeerDAS explicit csc integer size (#3897)
barnabasbusa Aug 28, 2024
c763163
harmonize `process_withdrawals` spec with #3761
ralexstokes Aug 28, 2024
daf1002
Merge pull request #3892 from ensi321/dev
hwwhww Aug 29, 2024
534cb06
Merge pull request #3879 from ethpandaops/update-readme-deps
hwwhww Aug 29, 2024
0dd76d3
Merge pull request #3905 from ralexstokes/harmonize-electra-withdrawals
hwwhww Aug 29, 2024
a95195b
Merge pull request #3890 from StefanBratanov/eip_7732_modify
hwwhww Aug 29, 2024
405fcd1
Merge pull request #3888 from potuz/fix_header_slot_validation
hwwhww Aug 29, 2024
2b4d94a
Merge pull request #3816 from ethereum/dapplion-patch-2
hwwhww Aug 30, 2024
78cc0a6
Change csc types to uint64
pawanjay176 Aug 30, 2024
6938dcc
simplify name of helper `get_validator_max_effective_balance`
ralexstokes Aug 30, 2024
e445cdf
Merge branch 'dev' into 3865
lucassaldanha Sep 1, 2024
38baa57
Rename ExecutionLayerRequests to ExecutionRequests
lucassaldanha Sep 1, 2024
31225f1
Temp fix for linter on eip-7732 beacon chain spec
lucassaldanha Sep 2, 2024
aa3b140
Merge pull request #3909 from ralexstokes/rename-get-max-eb-helper
hwwhww Sep 2, 2024
88a7657
Update csc description
jtraglia Sep 3, 2024
5111cbf
Merge pull request #3908 from pawanjay176/csc-u64
hwwhww Sep 3, 2024
abf382a
Fix 7732
potuz Sep 4, 2024
0740189
Delete g2_lincomb in poly-commits-sampling spec (#3913)
jtraglia Sep 5, 2024
6c3868c
Merge pull request #3882 from mkalinin/correlation-penalty-fix
ralexstokes Sep 5, 2024
beff03d
Updated verify_and_notify_new_payload and notify_new_payload
lucassaldanha Sep 5, 2024
c8dd790
Fix linter
lucassaldanha Sep 5, 2024
622ccd1
Updated ElectraSpecBuilder (NoopExecutionEngine#notify_new_payload)
lucassaldanha Sep 5, 2024
1702f88
Minor fixes
ensi321 Sep 6, 2024
adc5edd
Merge pull request #3914 from ensi321/dev
hwwhww Sep 10, 2024
15a5b68
Remove unnecessary signing domain for consolidations
ralexstokes Sep 10, 2024
6ebdeb2
Merge pull request #3875 from lucassaldanha/3865
ralexstokes Sep 12, 2024
cffd218
Merge pull request #3915 from ralexstokes/cleanup-signed-consolidation
hwwhww Sep 13, 2024
7cacee6
Add cronjob for test vector generation (#3922)
parithosh Sep 16, 2024
ea90d6f
Fix test vector generators to work with Python 3.12
jtraglia Sep 17, 2024
36da776
Update url
jtraglia Sep 17, 2024
666b63a
Remove stale comment on latest_execution_payload_header in Electra (#…
nflaig Sep 18, 2024
c8ba4d2
Merge pull request #3927 from ethereum/fix-testgen-action
hwwhww Sep 18, 2024
cb99c5f
Ensure EL block hash is updated when beacon parent root is overridden…
etan-status Sep 18, 2024
e12b9ab
EIP-7732: Refactor Beacon chain state transition function (#3898)
StefanBratanov Sep 18, 2024
dbc746f
bump to 1.5.0-alpha.6 (#3921)
jtraglia Sep 18, 2024
d14fb52
Fix yield statement in test_get_custody_columns (#3931)
jtraglia Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ commands:
description: "Restore the cache with pyspec keys"
steps:
- restore_cached_venv:
venv_name: v24-pyspec
venv_name: v25-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
save_pyspec_cached_venv:
description: Save a venv into a cache with pyspec keys"
steps:
- save_cached_venv:
venv_name: v24-pyspec
venv_name: v25-pyspec
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}
venv_path: ./venv
restore_deposit_contract_tester_cached_venv:
Expand All @@ -60,7 +60,7 @@ commands:
jobs:
checkout_specs:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
# Restore git repo at point close to target branch/revision, to speed up checkout
Expand All @@ -80,7 +80,7 @@ jobs:
- ~/specs-repo
install_pyspec_test:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -92,7 +92,7 @@ jobs:
- save_pyspec_cached_venv
test-phase0:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -105,7 +105,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-altair:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -118,7 +118,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-bellatrix:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -131,7 +131,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-capella:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -144,7 +144,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-deneb:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -157,7 +157,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-electra:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -170,7 +170,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-whisk:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -183,7 +183,7 @@ jobs:
path: tests/core/pyspec/test-reports
test-eip7594:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -205,7 +205,7 @@ jobs:
command: sudo npm install -g doctoc@2.2.0 && make check_toc
codespell:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- checkout
Expand All @@ -214,7 +214,7 @@ jobs:
command: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell
lint:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
- /nix
install_deposit_contract_web3_tester:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand All @@ -282,7 +282,7 @@ jobs:
- save_deposit_contract_tester_cached_venv
test_deposit_contract_web3_tests:
docker:
- image: circleci/python:3.9
- image: cimg/python:3.12.4
working_directory: ~/specs-repo
steps:
- restore_cache:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_vectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12.4'
cache: ''
- name: Clean up Spec Repository
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12.4'
cache: ''
- name: Check codespell
run: make codespell
Expand All @@ -55,10 +55,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust for dependencies
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12.4'
cache: ''
- name: Install pyspec requirements
run: make install_test
Expand All @@ -76,10 +78,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust for dependencies
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12.4'
cache: ''
- name: set TEST_PRESET_TYPE
if: github.event.inputs.test_preset_type != ''
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,19 @@ Documentation on the different components used during spec writing can be found
## Consensus spec tests

Conformance tests built from the executable python spec are available in the [Ethereum Proof-of-Stake Consensus Spec Tests](https://github.com/ethereum/consensus-spec-tests) repo. Compressed tarballs are available in [releases](https://github.com/ethereum/consensus-spec-tests/releases).


## Installation and Usage
The consensus-specs repo can be used by running the tests locally or inside a docker container.

To run the tests locally:
- Clone the repository with `git clone https://github.com/ethereum/consensus-specs.git`
- Switch to the directory `cd consensus-specs`
- Install the dependencies with: `make install_test && make preinstallation && make pyspec`
- Run the tests with `make citest`

To run the tests inside a docker container:
- Switch to the directory with `cd scripts`
- Run the script `./build_run_docker_tests.sh`
- Find the results in a folder called `./testResults`
- Find more ways to customize the script with `./build_run_docker_tests.sh --h`
3 changes: 3 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ CUSTODY_REQUIREMENT: 4
# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000 # 2**8 * 10**9 (= 256,000,000,000)

# EIP7732
MAX_REQUEST_PAYLOADS: 128
3 changes: 3 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,6 @@ CUSTODY_REQUIREMENT: 4
# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 # 2**6 * 10**9 (= 64,000,000,000)
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)

# EIP7732
MAX_REQUEST_PAYLOADS: 128
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rename the build stage from 'base' to 'builder' for clarification and code readability
FROM python:3.11.0-slim-bullseye as builder
FROM python:3.12.4-slim-bullseye as builder

ENV DEBIAN_FRONTEND=noninteractive \
WORKDIR=/consensus-specs \
Expand Down
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Ideally manual running of docker containers is for advanced users, we recommend
The `scripts/build_run_docker_tests.sh` script will cover most usecases. The script allows the user to configure the fork(altair/bellatrix/capella..), `$IMAGE_NAME` (specifies the container to use), preset type (mainnet/minimal), and test all forks flags. Ideally, this is the main way that users interact with the spec tests instead of running it locally with varying versions of dependencies.

E.g:
- `./build_run_test.sh --p mainnet` will run the mainnet preset tests
- `./build_run_test.sh --a` will run all the tests across all the forks
- `./build_run_test.sh --f deneb` will only run deneb tests
- `./build_run_docker_tests.sh --p mainnet` will run the mainnet preset tests
- `./build_run_docker_tests.sh --a` will run all the tests across all the forks
- `./build_run_docker_tests.sh --f deneb` will only run deneb tests

Results are always placed in a folder called `./testResults`. The results are `.xml` files and contain the fork they represent and the date/time they were run at.
38 changes: 38 additions & 0 deletions pysetup/spec_builders/electra.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,41 @@ def hardcoded_ssz_dep_constants(cls) -> Dict[str, str]:
'CURRENT_SYNC_COMMITTEE_GINDEX_ELECTRA': 'GeneralizedIndex(86)',
'NEXT_SYNC_COMMITTEE_GINDEX_ELECTRA': 'GeneralizedIndex(87)',
}


@classmethod
def execution_engine_cls(cls) -> str:
return """
class NoopExecutionEngine(ExecutionEngine):

def notify_new_payload(self: ExecutionEngine,
execution_payload: ExecutionPayload,
execution_requests: ExecutionRequests,
parent_beacon_block_root: Root) -> bool:
return True

def notify_forkchoice_updated(self: ExecutionEngine,
head_block_hash: Hash32,
safe_block_hash: Hash32,
finalized_block_hash: Hash32,
payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]:
pass

def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse:
# pylint: disable=unused-argument
raise NotImplementedError("no default block production")

def is_valid_block_hash(self: ExecutionEngine,
execution_payload: ExecutionPayload,
parent_beacon_block_root: Root) -> bool:
return True

def is_valid_versioned_hashes(self: ExecutionEngine, new_payload_request: NewPayloadRequest) -> bool:
return True

def verify_and_notify_new_payload(self: ExecutionEngine,
new_payload_request: NewPayloadRequest) -> bool:
return True


EXECUTION_ENGINE = NoopExecutionEngine()"""
8 changes: 4 additions & 4 deletions requirements_preinstallation.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip>=23.1.2
wheel>=0.40.0
setuptools>=68.0.0
pylint>=3.0.0
pip>=24.0.0
wheel>=0.44.0
setuptools>=72.0.0
pylint>=3.2.0
2 changes: 1 addition & 1 deletion scripts/build_run_docker_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# Set variables
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "whisk")
ALL_EXECUTABLE_SPECS=("phase0" "altair" "bellatrix" "capella" "deneb" "electra" "whisk" "eip7594")
TEST_PRESET_TYPE=minimal
FORK_TO_TEST=phase0
WORKDIR="//consensus-specs//tests//core//pyspec"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def run(self):
install_requires=[
"eth-utils>=2.0.0,<3",
"eth-typing>=3.2.0,<4.0.0",
"pycryptodome==3.15.0",
"pycryptodome>=3.19.1",
"py_ecc==6.0.0",
"milagro_bls_binding==1.9.0",
"remerkleable==0.1.28",
Expand Down
4 changes: 2 additions & 2 deletions specs/_features/eip7594/das-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The following values are (non-configurable) constants used throughout the specif

| Name | Value | Description |
| - | - | - |
| `DATA_COLUMN_SIDECAR_SUBNET_COUNT` | `128` | The number of data column sidecar subnets used in the gossipsub protocol |
| `DATA_COLUMN_SIDECAR_SUBNET_COUNT` | `uint64(128)` | The number of data column sidecar subnets used in the gossipsub protocol |

### Custody setting

Expand Down Expand Up @@ -222,7 +222,7 @@ def get_data_column_sidecars(signed_block: SignedBeaconBlock,

Each node downloads and custodies a minimum of `CUSTODY_REQUIREMENT` subnets per slot. The particular subnets that the node is required to custody are selected pseudo-randomly (more on this below).

A node *may* choose to custody and serve more than the minimum honesty requirement. Such a node explicitly advertises a number greater than `CUSTODY_REQUIREMENT` via the peer discovery mechanism -- for example, in their ENR (e.g. `custody_subnet_count: 4` if the node custodies `4` subnets each slot) -- up to a `DATA_COLUMN_SIDECAR_SUBNET_COUNT` (i.e. a super-full node).
A node *may* choose to custody and serve more than the minimum honesty requirement. Such a node explicitly advertises a number greater than `CUSTODY_REQUIREMENT` through the peer discovery mechanism, specifically by setting a higher value in the `custody_subnet_count` field within its ENR. This value can be increased up to `DATA_COLUMN_SIDECAR_SUBNET_COUNT`, indicating a super-full node.

A node stores the custodied columns for the duration of the pruning period and responds to peer requests for samples on those columns.

Expand Down
6 changes: 3 additions & 3 deletions specs/_features/eip7594/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ The `MetaData` stored locally by clients is updated with an additional field to
seq_number: uint64
attnets: Bitvector[ATTESTATION_SUBNET_COUNT]
syncnets: Bitvector[SYNC_COMMITTEE_SUBNET_COUNT]
custody_subnet_count: uint64
custody_subnet_count: uint64 # csc
)
```

Where

- `seq_number`, `attnets`, and `syncnets` have the same meaning defined in the Altair document.
- `custody_subnet_count` represents the node's custody subnet count. Clients MAY reject ENRs with a value less than `CUSTODY_REQUIREMENT`.
- `custody_subnet_count` represents the node's custody subnet count. Clients MAY reject peers with a value less than `CUSTODY_REQUIREMENT`.

### The gossip domain: gossipsub

Expand Down Expand Up @@ -324,4 +324,4 @@ A new field is added to the ENR under the key `csc` to facilitate custody data c

| Key | Value |
|--------|------------------------------------------|
| `csc` | Custody subnet count, big endian integer |
| `csc` | Custody subnet count, `uint64` big endian integer with no leading zero bytes (`0` is encoded as empty byte string) |
24 changes: 0 additions & 24 deletions specs/_features/eip7594/polynomial-commitments-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
- [BLS12-381 helpers](#bls12-381-helpers)
- [`cell_to_coset_evals`](#cell_to_coset_evals)
- [`coset_evals_to_cell`](#coset_evals_to_cell)
- [Linear combinations](#linear-combinations)
- [`g2_lincomb`](#g2_lincomb)
- [FFTs](#ffts)
- [`_fft_field`](#_fft_field)
- [`fft_field`](#fft_field)
Expand Down Expand Up @@ -125,28 +123,6 @@ def coset_evals_to_cell(coset_evals: CosetEvals) -> Cell:
return Cell(cell)
```

### Linear combinations

#### `g2_lincomb`

```python
def g2_lincomb(points: Sequence[G2Point], scalars: Sequence[BLSFieldElement]) -> Bytes96:
"""
BLS multiscalar multiplication in G2. This can be naively implemented using double-and-add.
"""
assert len(points) == len(scalars)

if len(points) == 0:
return bls.G2_to_bytes96(bls.Z2())

points_g2 = []
for point in points:
points_g2.append(bls.bytes96_to_G2(point))

result = bls.multi_exp(points_g2, scalars)
return Bytes96(bls.G2_to_bytes96(result))
```

### FFTs

#### `_fft_field`
Expand Down
Loading