Skip to content

Commit

Permalink
Update to reflect new changes in #3521
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Oct 18, 2023
1 parent bb58900 commit 594c6d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/trusted-setup-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@ jobs:
with:
python-version: '3.x'

- name: Download minimal preset
run: wget -O minimal.json https://github.com/ethereum/consensus-specs/raw/dev/presets/minimal/trusted_setups/testing_trusted_setups.json
- name: Convert minimal to txt
run: python3 ./scripts/convert_trusted_setup.py --input minimal.json --output minimal.txt
- name: Compare to existing file
run: cmp src/trusted_setup_4.txt minimal.txt

- name: Download mainnet preset
run: wget -O mainnet.json https://github.com/ethereum/consensus-specs/raw/dev/presets/mainnet/trusted_setups/testing_trusted_setups.json
- name: Convert mainnet to txt
run: python3 ./scripts/convert_trusted_setup.py --input mainnet.json --output mainnet.txt
- name: Compare to existing file
run: cmp src/trusted_setup.txt mainnet.txt
- name: Download
run: wget -O trusted_setup.json https://github.com/ethereum/consensus-specs/raw/dev/presets/mainnet/trusted_setups/trusted_setup_4096.json
- name: Convert
run: python3 ./scripts/convert_trusted_setup.py --input trusted_setup.json --output trusted_setup.txt
- name: Compare
run: cmp src/trusted_setup.txt trusted_setup.txt
4 changes: 2 additions & 2 deletions scripts/convert_trusted_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
def convert(ts_json: TextIO, ts_text: TextIO) -> None:
"""Convert trusted setup to text format."""
trusted_setup = json.load(ts_json)
g1_values = trusted_setup["setup_G1_lagrange"]
g2_values = trusted_setup["setup_G2"]
g1_values = trusted_setup["g1_lagrange"]
g2_values = trusted_setup["g2_monomial"]

print(len(g1_values), file=ts_text)
print(len(g2_values), file=ts_text)
Expand Down

0 comments on commit 594c6d7

Please sign in to comment.