Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
validator:
- codec
- erasure
- traces
- stf/accumulate
- stf/assurances
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- [Codec](./codec/README.md)

## Erasure Coding

- [Erasure Coding](./erasure/README.md)

## State Transition Functions

We offer two types of test vectors:
Expand Down
2 changes: 1 addition & 1 deletion codec/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def convert(spec_name):
print(f"\n[Converting codec ({spec_name})]")
spec.set_spec(spec_name)
for filename in glob.glob(f"{spec_name}/*.bin"):
print("Converting ", filename)
print("* Converting ", filename)
basename = os.path.splitext(os.path.basename(filename))[0]
basename = re.sub(r'_\d+$', '', basename)
class_type = dump_classes[basename]
Expand Down
1 change: 1 addition & 0 deletions erasure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Erasure Coding Test Vectors
21 changes: 21 additions & 0 deletions erasure/convert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python3

import os
import sys
from jam_types import Struct, ByteSequence
from jam_types import class_name as n

script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(script_dir, '../lib')))
from bin_to_json import convert_group # noqa: E402

os.chdir(script_dir)

class ErasureTestVector(Struct):
type_mapping = [
("data", n(ByteSequence)),
("shards", "Vec<ByteSequence>"),
]

for spec_name in ["tiny", "full"]:
convert_group("erasure", spec_name, ErasureTestVector)
Binary file added erasure/full/ec-100.bin
Binary file not shown.
Loading