forked from ethereum/consensus-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen_kzg_trusted_setups.py
More file actions
43 lines (38 loc) · 972 Bytes
/
gen_kzg_trusted_setups.py
File metadata and controls
43 lines (38 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
from pathlib import Path
from eth2spec.utils.kzg import (
dump_kzg_trusted_setup_files,
)
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"--secret",
dest="secret",
type=int,
required=True,
help='the secret of trusted setup',
)
parser.add_argument(
"--g1-length",
dest="g1_length",
type=int,
required=True,
help='the length of G1 trusted setup',
)
parser.add_argument(
"--g2-length",
dest="g2_length",
type=int,
required=True,
help='the length of G2 trusted setup',
)
parser.add_argument(
"-o",
"--output-dir",
dest="output_dir",
required=True,
help='the output directory',
)
args = parser.parse_args()
dump_kzg_trusted_setup_files(args.secret, args.g1_length, args.g2_length, args.output_dir)