Skip to content

Commit 07ffdca

Browse files
Merge pull request #273 from clearmatics/develop
Sigloi: v0.5
2 parents 7a0251b + 13d0171 commit 07ffdca

234 files changed

Lines changed: 5770 additions & 3902 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 76 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
---
2-
31
#
42
# Clang-tidy configuration for Zeth
53
# This file follows the YAML syntax, see: https://yaml.org/spec/
@@ -27,7 +25,43 @@
2725
# flexible. We consider this negligible compared to the benefits of
2826
# manipulating variables that are explicitly typed.
2927
#
30-
Checks: >
28+
# -modernize-use-trailing-return-type,
29+
# -modernize-return-braced-init-list,
30+
# These are removed since they conflict with the current code style.
31+
#
32+
# -modernize-pass-by-value
33+
# -modernize-deprecated-headers
34+
# -modernize-use-default-member-init
35+
# -readability-redundant-member-init
36+
# -bugprone-exception-escape
37+
# These conflict with the current code style, or would require larger
38+
# changes. May wish to review in the future.
39+
#
40+
# -readability-magic-numbers
41+
# Disabled for now as it picks up some constants which don't necessarily need
42+
# their own variables (for some trivial multiplication and masking) and some
43+
# test data. May wish to review in the future.
44+
#
45+
# -readability-implicit-bool-conversion
46+
# We use implicit bool conversion for specifying many constants in terms of
47+
# `0` and `1`. (TODO: it may be a good idea to enable this to fix implicit
48+
# conversion in conditions).
49+
#
50+
# -readability-named-parameter,
51+
# We occasionally omit the name of a parameter in a function definition if the
52+
# parameter is unused, and avoid a compiler warning. This check complains
53+
# in these cases.
54+
#
55+
# -readability-identifier-naming
56+
# TODO: Retry this (attempts to customize this to our standards failed under
57+
# clang-tidy-10 - see CheckOptions below).
58+
#
59+
# -misc-non-private-member-variables-in-classes,
60+
# TODO: Public member variables are often used in our code, and in
61+
# dependencies. There is a good argument for not exposing these. Decide on a
62+
# policy and update this comment.
63+
64+
Checks:
3165
-*,
3266
bugprone-*,
3367
llvm-*,
@@ -38,30 +72,45 @@ Checks: >
3872
readability-*,
3973
-modernize-avoid-c-arrays,
4074
-modernize-use-bool-literals,
41-
-modernize-use-auto
75+
-modernize-use-auto,
76+
-modernize-use-trailing-return-type,
77+
-readability-magic-numbers,
78+
-readability-implicit-bool-conversion,
79+
-modernize-return-braced-init-list,
80+
-readability-named-parameter,
81+
-modernize-pass-by-value,
82+
-modernize-use-default-member-init,
83+
-bugprone-exception-escape,
84+
-misc-non-private-member-variables-in-classes,
85+
-readability-redundant-member-init,
86+
-modernize-deprecated-headers,
87+
-readability-identifier-naming,
88+
89+
WarningsAsErrors:
90+
'*'
4291

4392
HeaderFilterRegex: 'libzeth/*.(h|hpp|cpp)'
4493

45-
CheckOptions:
46-
- key: readability-identifier-naming.MacroDefinitionCase
47-
value: UPPER_CASE
48-
- key: readability-identifier-naming.StaticConstantCase
49-
value: UPPER_CASE
50-
- key: readability-identifier-naming.ConstantParameterCase
51-
value: lower_case
52-
- key: readability-identifier-naming.FunctionCase
53-
value: lower_case
54-
- key: readability-identifier-naming.VariableCase
55-
value: lower_case
56-
- key: readability-identifier-naming.ClassCase
57-
value: lower_case
58-
- key: readability-identifier-naming.ClassMemberCase
59-
value: lower_case
60-
- key: readability-identifier-naming.NamespaceCase
61-
value: lower_case
62-
- key: readability-identifier-naming.TemplateParameterCase
63-
value: CamelCase
64-
- key: readability-identifier-naming.TemplateParameterSuffix
65-
value: T
66-
- key: readability-implicit-bool-conversion.AllowIntegerConditions
67-
value: '1'
94+
# CheckOptions:
95+
# - key: readability-identifier-naming.MacroDefinitionCase
96+
# value: UPPER_CASE
97+
# - key: readability-identifier-naming.StaticConstantCase
98+
# value: UPPER_CASE
99+
# - key: readability-identifier-naming.ConstantParameterCase
100+
# value: lower_case
101+
# - key: readability-identifier-naming.FunctionCase
102+
# value: lower_case
103+
# - key: readability-identifier-naming.VariableCase
104+
# value: lower_case
105+
# - key: readability-identifier-naming.ClassCase
106+
# value: lower_case
107+
# - key: readability-identifier-naming.ClassMemberCase
108+
# value: lower_case
109+
# - key: readability-identifier-naming.NamespaceCase
110+
# value: lower_case
111+
# - key: readability-identifier-naming.TemplateParameterCase
112+
# value: CamelCase
113+
# - key: readability-identifier-naming.TemplateParameterSuffix
114+
# value: T
115+
# - key: readability-implicit-bool-conversion.AllowIntegerConditions
116+
# value: '1'

.cppcheck.suppressions

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Errors and Warnings to Suppress
2+
useStlAlgorithm:*
3+
4+
// This raises some false positives, and inline suppressions seem not to work
5+
unusedFunction:*

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
build/
2+
Dockerfile*
3+
client/env
4+
mpc/env

.github/workflows/main.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,31 @@ env:
1111
jobs:
1212

1313
check-contracts:
14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Check Contracts
18-
run: CI_USE_DOCKER=1 scripts/ci contracts_check
18+
run: CI_USE_DOCKER=1 scripts/ci check_contracts
1919

20-
check-pyclient:
21-
runs-on: ubuntu-18.04
20+
check-client:
21+
runs-on: ubuntu-20.04
2222
steps:
2323
- uses: actions/checkout@v1
2424
with:
2525
submodules: recursive
2626
- name: Execute
27-
run: CI_USE_DOCKER=1 scripts/ci pyclient_check
27+
run: CI_USE_DOCKER=1 scripts/ci check_client
2828

29-
build-macos-debug:
29+
# test-client:
30+
# runs-on: ubuntu-18.04
31+
# steps:
32+
# - uses: actions/checkout@v1
33+
# with:
34+
# submodules: recursive
35+
# - name: Execute
36+
# run: CI_USE_DOCKER=1 scripts/ci test_client
37+
38+
build-macos:
3039
runs-on: macos-10.15
3140
strategy:
3241
matrix:
@@ -41,7 +50,7 @@ jobs:
4150
run: CI_CONFIG=${{ matrix.config }} scripts/ci build
4251

4352
build-linux:
44-
runs-on: ubuntu-18.04
53+
runs-on: ubuntu-20.04
4554
strategy:
4655
matrix:
4756
config: [ Debug, Release ]
@@ -53,10 +62,19 @@ jobs:
5362
run: CI_CHECK_FORMAT=1 CI_USE_DOCKER=1 CI_CONFIG=${{ matrix.config }} scripts/ci build
5463

5564
build-linux-pghr13:
56-
runs-on: ubuntu-18.04
65+
runs-on: ubuntu-20.04
5766
steps:
5867
- uses: actions/checkout@v1
5968
with:
6069
submodules: recursive
6170
- name: Execute
6271
run: CI_USE_DOCKER=1 CI_CONFIG=Release CI_ZKSNARK=PGHR13 scripts/ci build
72+
73+
check-cpp-linux:
74+
runs-on: ubuntu-20.04
75+
steps:
76+
- uses: actions/checkout@v1
77+
with:
78+
submodules: recursive
79+
- name: Execute
80+
run: CI_CHECK_FORMAT=1 CI_USE_DOCKER=1 scripts/ci check_cpp

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/notestore/
66

77
# Ignore the output of the trusted setup (ie: Proving and Verifying key)
8-
/trusted_setup/
8+
/zeth_setup/
99

1010
# Ignore the content of the debug folder
1111
debug/*json
@@ -14,9 +14,9 @@ debug/*json
1414
/zeth_contracts/node_modules/*
1515

1616
# Ignore client env and build directories
17-
/client/api/*_pb2.py
18-
/client/api/*_pb2_grpc.py
19-
/client/api/*_pb2.pyi
17+
/client/zeth/api/*_pb2.py
18+
/client/zeth/api/*_pb2_grpc.py
19+
/client/zeth/api/*_pb2.pyi
2020

2121
# Ignore test files
2222
/_test_contrib_*/

0 commit comments

Comments
 (0)