Skip to content

Commit 19a562d

Browse files
authored
Merge pull request #416 from shutter-network/dev/crypto_tests
Create json tests for crypto consensus testing
2 parents 3dc72d8 + 4f6c49d commit 19a562d

File tree

8 files changed

+771
-8
lines changed

8 files changed

+771
-8
lines changed

.circleci/rolling-shutter.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
path: ~/src
88
- restore_cache:
99
keys:
10-
- rs-generate-v18-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
10+
- rs-generate-v19-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
1111
- install-asdf
1212
- run:
1313
name: "Install asdf plugins"
@@ -33,7 +33,7 @@ jobs:
3333
find ./docs -name '*.md' -delete
3434
- run: make generate
3535
- save_cache:
36-
key: rs-generate-v18-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
36+
key: rs-generate-v19-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
3737
paths:
3838
- "~/go/pkg/mod"
3939
- "~/.cache/go-build"
@@ -51,10 +51,10 @@ jobs:
5151
path: ~/src
5252
- restore_cache:
5353
keys:
54-
- go-mod-v7-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
54+
- go-mod-v8-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
5555
- run: go get -d ./...
5656
- save_cache:
57-
key: go-mod-v7-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
57+
key: go-mod-v8-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
5858
paths:
5959
- ~/go/pkg/
6060
- restore_cache:
@@ -90,7 +90,7 @@ jobs:
9090
- store_test_results:
9191
path: report
9292
- save_cache:
93-
key: rs-build-<< parameters.go-version >>-v4-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
93+
key: rs-build-<< parameters.go-version >>-v5-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
9494
paths:
9595
- "~/.cache/go-build"
9696

@@ -200,7 +200,7 @@ jobs:
200200
- run: |
201201
make lint-changes
202202
- save_cache:
203-
key: rs-lint-v13-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
203+
key: rs-lint-v14-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
204204
paths:
205205
- "~/.cache/go-build"
206206
- "~/.cache/golangci-lint"

rolling-shutter/cmd/cryptocmd/cryptocmd.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ var (
2020
epochIDFlag string
2121
sigmaFlag string
2222
threshold uint64
23+
filename string
2324
)
2425

2526
func Cmd() *cobra.Command {
2627
cmd := &cobra.Command{
2728
Use: "crypto",
2829
Short: "CLI tool to access crypto functions",
2930
Long: `This command provides utility functions to manually encrypt messages with an eon
30-
key, decrypt them with a decryption key, and check that a decryption key is correct.`,
31+
key, decrypt them with a decryption key, and check that a decryption key is correct. It also hosts
32+
a tool to generate and run crypto tests in a JSON formatted collection.`,
3133
}
3234
cmd.AddCommand(encryptCmd())
3335
cmd.AddCommand(decryptCmd())
3436
cmd.AddCommand(verifyKeyCmd())
3537
cmd.AddCommand(aggregateCmd())
38+
cmd.AddCommand(GenerateTestdata())
39+
cmd.AddCommand(RunJSONTests())
3640
return cmd
3741
}
3842

0 commit comments

Comments
 (0)