Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various updates and enhancements #15

Merged
merged 31 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1a3c780
rewrite
dbourdrez Jul 8, 2024
8d030ec
various enhancements, updates, optimizations, serde, and dependency u…
dbourdrez Jul 29, 2024
301f23f
test with dkg and trusted dealer
bytemare Jul 29, 2024
a5ded8b
update-ci
bytemare Jul 30, 2024
f5b849f
update CI
bytemare Jul 30, 2024
e023d90
clean up, optimizations, refactoring
bytemare Aug 9, 2024
8f92a2d
clean up, optimizations, refactoring
bytemare Aug 9, 2024
ee263d3
some refacto and tests
bytemare Aug 16, 2024
1821c6d
add tests, fixes
bytemare Aug 20, 2024
d0dabb1
update licence headers
bytemare Aug 20, 2024
02cb0af
some refactor, simplification, added tests
bytemare Aug 22, 2024
f673885
some refactor and added tests
bytemare Aug 26, 2024
9f09e45
some refactoring and test
bytemare Aug 27, 2024
8873adb
add tests
bytemare Aug 28, 2024
c2b7129
fix tests
bytemare Aug 28, 2024
f145a58
some refactor and add tests
bytemare Aug 30, 2024
59b560e
some refactor and clean up
bytemare Aug 30, 2024
e89a3c6
add tests
bytemare Aug 30, 2024
973cc2f
some refactor and add tests
bytemare Sep 1, 2024
0db81f6
some refacto and added tests
bytemare Sep 2, 2024
df7407e
add tests
bytemare Sep 2, 2024
549391a
add tests
bytemare Sep 3, 2024
683d02c
fix typo
bytemare Sep 3, 2024
768f36f
add tests, comments, documentation
bytemare Sep 11, 2024
d88ad55
various improvements
bytemare Oct 7, 2024
423322f
fix err message in test
bytemare Oct 7, 2024
6fcca60
reuse json group decoder and remove comment
bytemare Oct 7, 2024
a42fbf4
remove unreachable code
bytemare Oct 7, 2024
44be77f
added tests
bytemare Oct 7, 2024
4f1004e
fix new error messages
bytemare Oct 7, 2024
8050e3a
rename groupublickey to verificationkey, add tests
bytemare Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 142 additions & 57 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,142 @@
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
- cyclop
- deadcode
- decorder
#- depguard
- dogsled
- dupl
- dupword
- durationcheck
#- err113
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exhaustruct
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gocheckcompilerdirectives
#- gochecknoglobals
- gochecknoinits
- gochecksumtype
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomodguard
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- ifshort
- grouper
- importas
- inamedparam
- ineffassign
- interfacebloat
- intrange
- ireturn
- lll
- loggercheck
- maintidx
- makezero
#- maligned
- megacheck
- mirror
- misspell
#- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
#- nonamedreturns
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
#- tagliatelle
- tagalign
- tagliatelle
- tenv
- testableexamples
- testifylint
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
- usestdlibvars
#- varnamelen
- wastedassign
- whitespace
#- wrapcheck
- wrapcheck
- wsl
#- exhaustive
#- exhaustivestruct
#- gci
#- gochecknoglobals
#- gochecknoinits
#- gomnd
#- nlreturn
presets:
- bugs
- unused
fast: false
- zerologlint

linters-settings:
cyclop:
max-complexity: 15
skip-tests: true
dupl:
threshold: 100
errcheck:
check-type-assertions: true
check-blank: true
#exclude-functions:
# - io/ioutil.ReadFile
# - io.Copy(*bytes.Buffer)
# - io.Copy(os.Stdout)
funlen:
lines: 100
statements: 50
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/bytemare/frost) # Custom section: groups all imports with the specified Prefix.
skip-generated: true
# Enable custom order of sections.
# If `true`, make the section order the same as the order of `sections`.
# Default: false
custom-order: true
gocognit:
min-complexity: 15
min-complexity: 16
goconst:
min-len: 2
min-occurrences: 2
Expand All @@ -107,6 +147,9 @@ linters-settings:
- opinionated
- performance
- style
disabled-checks:
- unnamedResult
- sloppyReassign
gocyclo:
min-complexity: 15
godox:
Expand All @@ -120,45 +163,80 @@ linters-settings:
simplify: true
goimports:
local-prefixes: github.com/bytemare/frost
gomnd:
settings:
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
gosec:
excludes:
- G115
config:
G602:
frost:
- encodedLength
gosimple:
checks: [ "all" ]
govet:
check-shadowing: true

# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf

# enable or disable analyzers by name
shadow:
strict: true
disable-all: true
enable:
- asmdecl
- assign
- atomic
- atomicalign
disable-all: false
- bools
- buildtag
- cgocall
- composites
- copylocks
- deepequalerrors
- errorsas
- fieldalignment
- findcall
- framepointer
- httpresponse
- ifaceassert
- loopclosure
- lostcancel
- nilfunc
- nilness
- printf
- reflectvaluecompare
- shadow
- shift
- sigchanyzer
- sortslice
- stdmethods
- stringintconv
- structtag
- testinggoroutine
- tests
- unmarshal
- unreachable
- unsafeptr
- unusedresult
- unusedwrite
lll:
line-length: 120
# tab width ('\t') in spaces. Default to 1.
tab-width: 4
maligned:
suggest-new: true
misspell:
locale: US
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
#ignored-functions:
# - 'nist.setMapping'
# - 'big.NewInt'
# - 'hash2curve.HashToFieldXMD'
nlreturn:
block-size: 2
prealloc:
simple: false
for-loops: true
unused:
check-exported: false
whitespace:
multi-if: false
multi-func: false
Expand All @@ -179,18 +257,23 @@ issues:
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- "should have a package comment, unless it's in another file for this package"
#exclude:
#- "should have a package comment, unless it's in another file for this package"
#- "do not define dynamic errors, use wrapped static errors instead"
#- "missing cases in switch of type Group: maxID"

exclude-rules:
- path: ./*
linters:
- exhaustive
#exclude-rules:
# - path: internal/hash.go
# linters:
# - errcheck
# - path: internal/tag/strings.go
# linters:
# - gosec

max-issues-per-linter: 0
max-same-issues: 0

# Independently from option `exclude` we use default exclude patterns,
# Independently of option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
Expand All @@ -199,5 +282,7 @@ issues:
run:
tests: false

output:
format: github-actions
#output:
# formats:
# - format: github-actions
# show-stats: true
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @bytemare
1 change: 1 addition & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


# Contributor Covenant Code of Conduct [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md)

## Our Pledge
Expand Down
6 changes: 5 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ Please note that changes that are purely cosmetic and do not add anything substa

This project tries to be as Go idiomatic as possible. Conventions from [Effective Go](https://golang.org/doc/effective_go) apply here. Tests use a very opinionated linting configuration that you should use before committing to your changes.

## Governance Model

This project follows the [Benevolent Dictator Governance Model](http://oss-watch.ac.uk/resources/benevolentdictatorgovernancemodel) where the project owner and lead makes all final decisions.

### Licence

By contributing to this project, you agree that your contributions will be licensed under the project's [License](https://github.com/bytemare/template/blob/main/LICENSE).

All contributions (including pull requests) must agree to the [Developer Certificate of Origin (DCO) version 1.1](http://developercertificate.org). It states that the contributor has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include the "Signed-off-by" git tag in every commit (this tag is a conventional way to confirm that you agree to the DCO).
All contributions (including pull requests) must agree to the [Developer Certificate of Origin (DCO) version 1.1](https://developercertificate.org). It states that the contributor has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include the "Signed-off-by" git tag in every commit (this tag is a conventional way to confirm that you agree to the DCO).

Thanks! :heart:
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: Questions, feature requests, and more 💬
url: https://github.com/bytemare/frost/discussions
about: Do you need help? Did you make something with frost? Do you have an idea? Tell us about it!
about: Do you need help? Did you make something with FROST? Do you have an idea? Tell us about it!
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "📈 Enhancement"
about: Request or discuss improvements
title: "[Enhancement]"
labels: enhancement
assignees: bytemare

---

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### Describe the feature

A clear and concise description of what the enhancement is and what problem it solves.

**Expected behaviour**

A clear and concise description of what you expected to happen.

**Additional context**

Add any other context about the problem here.
Loading
Loading