Skip to content

Commit 31f69b8

Browse files
authored
Refactor kzg_4844 generator (#4300)
1 parent 118a2bd commit 31f69b8

File tree

2 files changed

+488
-473
lines changed

2 files changed

+488
-473
lines changed

tests/core/pyspec/eth2spec/test/utils/kzg_tests.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from hashlib import sha256
2-
31
from eth_utils import (
42
encode_hex,
53
int_to_big_endian,
@@ -14,15 +12,6 @@
1412
###############################################################################
1513

1614

17-
def expect_exception(func, *args):
18-
try:
19-
func(*args)
20-
except Exception:
21-
pass
22-
else:
23-
raise Exception("should have raised exception")
24-
25-
2615
def bls_add_one(x):
2716
"""
2817
Adds "one" (actually bls.G1()) to a compressed group element.
@@ -31,15 +20,6 @@ def bls_add_one(x):
3120
return bls.G1_to_bytes48(bls.add(bls.bytes48_to_G1(x), bls.G1()))
3221

3322

34-
def hash(x):
35-
return sha256(x).digest()
36-
37-
38-
def make_id(*args):
39-
values_str = "_".join(str(arg) for arg in args)
40-
return hash(bytes(values_str, "utf-8"))[:8].hex()
41-
42-
4323
def field_element_bytes(x: int):
4424
assert x < spec.BLS_MODULUS
4525
return int.to_bytes(x, 32, spec.KZG_ENDIANNESS)
@@ -204,7 +184,3 @@ def evaluate_blob_at(blob, z):
204184
CELL_INVALID_TOO_FEW_BYTES,
205185
CELL_INVALID_TOO_MANY_BYTES,
206186
]
207-
208-
# Cells & Proofs
209-
210-
VALID_CELLS_AND_PROOFS = [] # Saved in case02_compute_cells_and_kzg_proofs

0 commit comments

Comments
 (0)