Skip to content

Commit

Permalink
Merge pull request #122 from gballet/fix-r
Browse files Browse the repository at this point in the history
verkle_trie: r calculation matches the spec
  • Loading branch information
dankrad authored Jul 23, 2021
2 parents 7e49f90 + 70983e2 commit 247013f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions verkle_trie/verkle_trie.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def make_kzg_multiproof(Cs, fs, indices, ys, display_times=True):
"""

# Step 1: Construct g(X) polynomial in evaluation form
r = hash_to_int([hash(C) for C in Cs] + indices + ys) % MODULUS
r = hash_to_int([hash(C) for C in Cs] + ys + [kzg_utils.DOMAIN[i] for i in indices]) % MODULUS

log_time_if_eligible(" Hashed to r", 30, display_times)

Expand Down Expand Up @@ -426,7 +426,7 @@ def check_kzg_multiproof(Cs, indices, ys, proof, display_times=True):
sigma = blst.P1(sigma_serialized)

# Step 1
r = hash_to_int([hash(C) for C in Cs] + indices + ys)
r = hash_to_int([hash(C) for C in Cs] + ys + [kzg_utils.DOMAIN[i] for i in indices]) % MODULUS

log_time_if_eligible(" Computed r hash", 30, display_times)

Expand Down

0 comments on commit 247013f

Please sign in to comment.