Add comments on implementation, remove unnecessary intermediary method

This commit is contained in:
Daniel Sanchez Quiros 2024-02-06 16:25:52 +01:00
parent 3732f3eb74
commit f518ee04a6
1 changed files with 8 additions and 17 deletions

View File

@ -30,30 +30,21 @@ class DAVerifier:
pass
@staticmethod
def _verify_aggregated_column_commitment(
def _verify_column(
column: bytearray,
column_commitment: Commitment,
aggregated_column_commitment: Commitment,
aggregated_column_proof: Proof,
column_hash: bytearray,
# this is temporary and should be removed
index: int
) -> bool:
pass
@staticmethod
def _verify_column(
column: bytearray,
aggregated_column_commitment: Commitment,
aggregated_column_proof: Proof,
index: int
) -> bool:
# TODO: Use a proper hashing scheme
# 1. compute commitment for column
# 2. If computed column commitment != column commitment, fail
# 3. compute column hash
column_hash: bytearray = bytearray(hash(column))
return DAVerifier._verify_aggregated_column_commitment(
aggregated_column_commitment,
aggregated_column_proof,
column_hash,
index
)
# 4. Check proof with commitment and proof over the aggregated column commitment
pass
@staticmethod
def _verify_chunk(chunk: bytearray, commitment: Commitment, proof: Proof) -> bool: