From cd0f8a12012f98a5554edbf2e7fa058cfdec1258 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 13:25:53 -0500 Subject: [PATCH 1/2] Change duplicate cell id test to use 65 cell ids --- tests/generators/kzg_7594/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/generators/kzg_7594/main.py b/tests/generators/kzg_7594/main.py index 9afea6efe..d55609de0 100644 --- a/tests/generators/kzg_7594/main.py +++ b/tests/generators/kzg_7594/main.py @@ -782,7 +782,12 @@ def case05_recover_all_cells(): # Edge case: Duplicate cell_id blob = BLOB_RANDOM_VALID2 cells = spec.compute_cells(blob) - cell_ids = list(range(spec.CELLS_PER_EXT_BLOB // 2)) + # There will be 65 cell, where 64 are unique and 1 is a duplicate. + # Depending on the implementation, 63 & 1 might not fail for the right + # reason. For example, if the implementation assigns cells in an array + # via index, this would result in 63 cells and the test would fail due + # to insufficient cell count, not because of a duplicate cell. + cell_ids = list(range(spec.CELLS_PER_EXT_BLOB // 2 + 1)) partial_cells = [cells[cell_id] for cell_id in cell_ids] # Replace first cell_id with the second cell_id cell_ids[0] = cell_ids[1] From 0891be24f69e880657498882bb56785c2cf52930 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 7 May 2024 13:34:35 -0500 Subject: [PATCH 2/2] Change cell -> cells --- tests/generators/kzg_7594/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/generators/kzg_7594/main.py b/tests/generators/kzg_7594/main.py index d55609de0..a780f289c 100644 --- a/tests/generators/kzg_7594/main.py +++ b/tests/generators/kzg_7594/main.py @@ -782,7 +782,7 @@ def case05_recover_all_cells(): # Edge case: Duplicate cell_id blob = BLOB_RANDOM_VALID2 cells = spec.compute_cells(blob) - # There will be 65 cell, where 64 are unique and 1 is a duplicate. + # There will be 65 cells, where 64 are unique and 1 is a duplicate. # Depending on the implementation, 63 & 1 might not fail for the right # reason. For example, if the implementation assigns cells in an array # via index, this would result in 63 cells and the test would fail due