mirror of
https://github.com/status-im/research.git
synced 2025-02-09 21:54:06 +00:00
Converted a skip into an assert
This commit is contained in:
parent
0bce596370
commit
5c84d06a59
@ -156,9 +156,7 @@ def check_column_proof(data, proof, deg_lt, checks, modulus):
|
|||||||
# There are `subdeg` of these.
|
# There are `subdeg` of these.
|
||||||
xs = [x for x in range(modulus) if pow(x, subdeg, modulus) == check_row]
|
xs = [x for x in range(modulus) if pow(x, subdeg, modulus) == check_row]
|
||||||
print('Taking columns from data:', [(x, data[x]) for x in xs])
|
print('Taking columns from data:', [(x, data[x]) for x in xs])
|
||||||
if len(xs) != subdeg:
|
assert len(xs) == subdeg
|
||||||
print('Row inadmissible; does not have %d roots' % subdeg)
|
|
||||||
continue
|
|
||||||
# Interpolate a degree subdeg-1 polynomial from the above
|
# Interpolate a degree subdeg-1 polynomial from the above
|
||||||
row_poly = lagrange_interp(xs, [data[x] for x in xs], modulus)
|
row_poly = lagrange_interp(xs, [data[x] for x in xs], modulus)
|
||||||
print('Eval', eval_poly_at(row_poly, check_col, modulus))
|
print('Eval', eval_poly_at(row_poly, check_col, modulus))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user