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

@Pierluca's and @jbsv's comments #181

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ jobs:
REACT_APP_BUILD
REACT_APP_BUILD_TIME
push: ${{ env.push }}
tags: ghcr.io/c4dt/d-voting-frontend:${{ env.DockerTag }}
tags: ghcr.io/dedis/d-voting-frontend:${{ env.DockerTag }}
- name: Build Backend
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfiles/Dockerfile.backend
platforms: linux/amd64
push: ${{ env.push }}
tags: ghcr.io/c4dt/d-voting-backend:${{ env.DockerTag }}
tags: ghcr.io/dedis/d-voting-backend:${{ env.DockerTag }}
- name: Build D-Voting
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfiles/Dockerfile.dela
platforms: linux/amd64
push: ${{ env.push }}
tags: ghcr.io/c4dt/d-voting-dela:${{ env.DockerTag }}
tags: ghcr.io/dedis/d-voting-dela:${{ env.DockerTag }}
2 changes: 1 addition & 1 deletion .github/workflows/go_dvoting_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install crypto util from Dela
run: |
git clone https://github.com/c4dt/dela.git
git clone https://github.com/dedis/dela.git
cd dela
go install ./cli/crypto

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go_scenario_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Install crypto util from Dela
run: |
git clone https://github.com/c4dt/dela.git
git clone https://github.com/dedis/dela.git
cd dela
go install ./cli/crypto

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Run lint
run: make lint

# TODO: https://github.com/dedis/d-voting/issues/392
# - name: Run lint
# run: make lint
#
- name: Run vet
run: make vet

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version=$(shell git describe --abbrev=0 --tags || echo '0.0.0')
versionFlag="github.com/c4dt/d-voting.Version=$(version)"
versionFlag="github.com/dedis/d-voting.Version=$(version)"
versionFile=$(shell echo $(version) | tr . _)
timeFlag="github.com/c4dt/d-voting.BuildTime=$(shell date +'%d/%m/%y_%H:%M')"
timeFlag="github.com/dedis/d-voting.BuildTime=$(shell date +'%d/%m/%y_%H:%M')"

lint:
# Coding style static check.
Expand Down
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,51 @@
<a href="https://sonarcloud.io/summary/new_code?id=dedis_d-voting">
<img src="https://sonarcloud.io/api/project_badges/measure?project=dedis_d-voting&metric=alert_status">
</a>
<a href="https://github.com/c4dt/d-voting/actions/workflows/go_release.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/go_release.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/go_release.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_release.yml/badge.svg">
</a><br/>
<a href="https://github.com/c4dt/d-voting/graphs/contributors">
<a href="https://github.com/dedis/d-voting/graphs/contributors">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/dedis/d-voting">
</a>
<a href="https://github.com/c4dt/d-voting/releases">
<a href="https://github.com/dedis/d-voting/releases">
<img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/dedis/d-voting">
</a>
</td>
</tr>
<tr>
<td>Blockchain</td>
<td>
<a href="https://github.com/c4dt/d-voting/actions/workflows/go_test.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/go_test.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/go_test.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_test.yml/badge.svg">
</a>
<a href="https://github.com/c4dt/d-voting/actions/workflows/go_dvoting_test.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/go_dvoting_test.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/go_dvoting_test.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_dvoting_test.yml/badge.svg">
</a>
<a href="https://github.com/c4dt/d-voting/actions/workflows/go_scenario_test.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/go_scenario_test.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/go_scenario_test.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_scenario_test.yml/badge.svg">
</a>
<a href="https://github.com/c4dt/d-voting/actions/workflows/go_integration_tests.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/go_integration_tests.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/go_integration_tests.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_integration_tests.yml/badge.svg">
</a><br/>
<a href="https://coveralls.io/github/dedis/d-voting?branch=main">
<img src="https://coveralls.io/repos/github/dedis/d-voting/badge.svg?branch=main">
</a>
<a href="https://goreportcard.com/report/github.com/c4dt/d-voting">
<img src="https://goreportcard.com/badge/github.com/c4dt/d-voting">
<a href="https://goreportcard.com/report/github.com/dedis/d-voting">
<img src="https://goreportcard.com/badge/github.com/dedis/d-voting">
</a>
<a href="https://pkg.go.dev/github.com/c4dt/d-voting">
<img src="https://pkg.go.dev/badge/github.com/c4dt/d-voting.svg" alt="Go Reference">
<a href="https://pkg.go.dev/github.com/dedis/d-voting">
<img src="https://pkg.go.dev/badge/github.com/dedis/d-voting.svg" alt="Go Reference">
</a>
</td>
<tr>
<tr>
<td>WEB</td>
<td>
<a href="https://github.com/c4dt/d-voting/actions/workflows/web_frontend_lint.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/web_frontend_lint.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/web_frontend_lint.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/web_frontend_lint.yml/badge.svg">
</a>
<a href="https://github.com/c4dt/d-voting/actions/workflows/web_backend_lint.yml">
<img src="https://github.com/c4dt/d-voting/actions/workflows/web_backend_lint.yml/badge.svg">
<a href="https://github.com/dedis/d-voting/actions/workflows/web_backend_lint.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/web_backend_lint.yml/badge.svg">
</a>
</td>
</tr>
Expand All @@ -67,7 +67,7 @@
# D-Voting

**D-Voting** is an e-voting platform based on the
[Dela](https://github.com/c4dt/dela) blockchain. It uses state-of-the-art
[Dela](https://github.com/dedis/dela) blockchain. It uses state-of-the-art
protocols that guarantee privacy of votes and a fully decentralized process.
This project was born in early 2021 and has been iteratively implemented by EPFL
students under the supervision of DEDIS members.
Expand Down Expand Up @@ -147,7 +147,7 @@ sometimes refer to the blockchain node simply as a "node".
The following component diagrams summarizes the interaction between those
high-level components:

[minogrpc]: https://github.com/c4dt/dela/tree/master/mino/minogrpc
[minogrpc]: https://github.com/dedis/dela/tree/master/mino/minogrpc

![Global component diagram](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/dedis/d-voting/main/docs/assets/component-global.puml)

Expand Down Expand Up @@ -390,7 +390,7 @@ results.
2: Install the `crypto` utility from Dela:

```sh
git clone https://github.com/c4dt/dela.git
git clone https://github.com/dedis/dela.git
cd dela/cli/crypto
go install
```
Expand Down Expand Up @@ -601,7 +601,7 @@ Afterwards use the following commands, replace 4 by the desired nb of nodes :
./runNode.sh -n 4 -a true -d true
./setupnNode.sh -n 4 -d true

NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/c4dt/d-voting/integration -count=1
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1
```

Here we set KILLNODE=true or false to decide whether kill and restart a node
Expand Down Expand Up @@ -650,8 +650,8 @@ Build info can be added to the binary with the `ldflags`, at build time. Infos
are stored on variables in the root `mod.go`. For example:

```sh
versionFlag="github.com/c4dt/d-voting.Version=`git describe --tags`"
timeFlag="github.com/c4dt/d-voting.BuildTime=`date +'%d/%m/%y_%H:%M'`"
versionFlag="github.com/dedis/d-voting.Version=`git describe --tags`"
timeFlag="github.com/dedis/d-voting.BuildTime=`date +'%d/%m/%y_%H:%M'`"

go build -ldflags="-X $versionFlag -X $timeFlag" ./cli/dvoting
```
Expand Down
2 changes: 1 addition & 1 deletion autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ do
./setupnNode.sh -n $N_NODE -d true
sleep 3
# Start scenario test and keep logs
NNODES=$N_NODE go test -v -run ^TestScenario$ github.com/c4dt/d-voting/integration -count=1 | tee ./log/log/gotest.log
NNODES=$N_NODE go test -v -run ^TestScenario$ github.com/dedis/d-voting/integration -count=1 | tee ./log/log/gotest.log
sleep 3
# Stop the test
./kill_test.sh
Expand Down
2 changes: 1 addition & 1 deletion cli/cosipbftcontroller/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/c4dt/d-voting/internal/testing/fake"
"github.com/dedis/d-voting/internal/testing/fake"
"github.com/stretchr/testify/require"
"go.dedis.ch/dela/cli/node"
"go.dedis.ch/dela/core/access"
Expand Down
4 changes: 2 additions & 2 deletions cli/cosipbftcontroller/mod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"path/filepath"
"testing"

"github.com/c4dt/d-voting/services/dkg"
"github.com/dedis/d-voting/services/dkg"
"go.dedis.ch/dela/core/ordering"

"github.com/c4dt/d-voting/internal/testing/fake"
"github.com/dedis/d-voting/internal/testing/fake"
"github.com/stretchr/testify/require"
"go.dedis.ch/dela/cli"
"go.dedis.ch/dela/cli/node"
Expand Down
16 changes: 8 additions & 8 deletions cli/dvoting/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import (
"io"
"os"

dkg "github.com/c4dt/d-voting/services/dkg/pedersen/controller"
"github.com/c4dt/d-voting/services/dkg/pedersen/json"
shuffle "github.com/c4dt/d-voting/services/shuffle/neff/controller"
dkg "github.com/dedis/d-voting/services/dkg/pedersen/controller"
"github.com/dedis/d-voting/services/dkg/pedersen/json"
shuffle "github.com/dedis/d-voting/services/shuffle/neff/controller"

cosipbft "github.com/c4dt/d-voting/cli/cosipbftcontroller"
"github.com/c4dt/d-voting/cli/postinstall"
evoting "github.com/c4dt/d-voting/contracts/evoting/controller"
metrics "github.com/c4dt/d-voting/metrics/controller"
cosipbft "github.com/dedis/d-voting/cli/cosipbftcontroller"
"github.com/dedis/d-voting/cli/postinstall"
evoting "github.com/dedis/d-voting/contracts/evoting/controller"
metrics "github.com/dedis/d-voting/metrics/controller"
"go.dedis.ch/dela/cli/node"
access "go.dedis.ch/dela/contracts/access/controller"
db "go.dedis.ch/dela/core/store/kv/controller"
Expand All @@ -46,7 +46,7 @@ import (
mino "go.dedis.ch/dela/mino/minogrpc/controller"
proxy "go.dedis.ch/dela/mino/proxy/http/controller"

_ "github.com/c4dt/d-voting/services/shuffle/neff/json"
_ "github.com/dedis/d-voting/services/shuffle/neff/json"

gapi "go.dedis.ch/dela-apps/gapi/controller"
)
Expand Down
8 changes: 4 additions & 4 deletions cli/postinstall/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"path/filepath"
"time"

evoting "github.com/c4dt/d-voting/contracts/evoting/controller"
prom "github.com/c4dt/d-voting/metrics/controller"
dkg "github.com/c4dt/d-voting/services/dkg/pedersen/controller"
neff "github.com/c4dt/d-voting/services/shuffle/neff/controller"
evoting "github.com/dedis/d-voting/contracts/evoting/controller"
prom "github.com/dedis/d-voting/metrics/controller"
dkg "github.com/dedis/d-voting/services/dkg/pedersen/controller"
neff "github.com/dedis/d-voting/services/shuffle/neff/controller"
"go.dedis.ch/dela"
"go.dedis.ch/dela/cli"
"go.dedis.ch/dela/cli/node"
Expand Down
14 changes: 7 additions & 7 deletions contracts/evoting/controller/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import (
"go.dedis.ch/kyber/v3/sign/schnorr"
"go.dedis.ch/kyber/v3/suites"

"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/c4dt/d-voting/internal/testing/fake"
eproxy "github.com/c4dt/d-voting/proxy"
"github.com/c4dt/d-voting/proxy/txnmanager"
ptypes "github.com/c4dt/d-voting/proxy/types"
"github.com/c4dt/d-voting/services/dkg"
"github.com/c4dt/d-voting/services/shuffle"
"github.com/dedis/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/internal/testing/fake"
eproxy "github.com/dedis/d-voting/proxy"
"github.com/dedis/d-voting/proxy/txnmanager"
ptypes "github.com/dedis/d-voting/proxy/types"
"github.com/dedis/d-voting/services/dkg"
"github.com/dedis/d-voting/services/shuffle"
"github.com/gorilla/mux"
"go.dedis.ch/dela"
"go.dedis.ch/dela/cli/node"
Expand Down
2 changes: 1 addition & 1 deletion contracts/evoting/evoting.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/evoting/json/ciphervote.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/contracts/evoting/types"
"go.dedis.ch/dela/serde"
"golang.org/x/xerrors"
)
Expand Down
32 changes: 16 additions & 16 deletions contracts/evoting/json/forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/hex"
"encoding/json"

"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/contracts/evoting/types"
"go.dedis.ch/dela/core/ordering/cosipbft/authority"
ctypes "go.dedis.ch/dela/core/ordering/cosipbft/types"
"go.dedis.ch/dela/serde"
Expand Down Expand Up @@ -36,8 +36,8 @@ func (formFormat) Encode(ctx serde.Context, message serde.Message) ([]byte, erro
}
}

suffragias := make([]string, len(m.SuffragiaIDs))
for i, suf := range m.SuffragiaIDs {
suffragias := make([]string, len(m.SuffragiaStoreKeys))
for i, suf := range m.SuffragiaStoreKeys {
suffragias[i] = hex.EncodeToString(suf)
}

Expand Down Expand Up @@ -146,19 +146,19 @@ func (formFormat) Decode(ctx serde.Context, data []byte) (serde.Message, error)
}

return types.Form{
Configuration: formJSON.Configuration,
FormID: formJSON.FormID,
Status: types.Status(formJSON.Status),
Pubkey: pubKey,
BallotSize: formJSON.BallotSize,
SuffragiaIDs: suffragias,
SuffragiaHashes: suffragiaHashes,
BallotCount: formJSON.BallotCount,
ShuffleInstances: shuffleInstances,
ShuffleThreshold: formJSON.ShuffleThreshold,
PubsharesUnits: pubSharesSubmissions,
DecryptedBallots: formJSON.DecryptedBallots,
Roster: roster,
Configuration: formJSON.Configuration,
FormID: formJSON.FormID,
Status: types.Status(formJSON.Status),
Pubkey: pubKey,
BallotSize: formJSON.BallotSize,
SuffragiaStoreKeys: suffragias,
SuffragiaHashes: suffragiaHashes,
BallotCount: formJSON.BallotCount,
ShuffleInstances: shuffleInstances,
ShuffleThreshold: formJSON.ShuffleThreshold,
PubsharesUnits: pubSharesSubmissions,
DecryptedBallots: formJSON.DecryptedBallots,
Roster: roster,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/evoting/json/mod.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/contracts/evoting/types"
"go.dedis.ch/dela/serde"
)

Expand Down
2 changes: 1 addition & 1 deletion contracts/evoting/json/suffragia.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package json
import (
"encoding/json"

"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/contracts/evoting/types"
"go.dedis.ch/dela/serde"
"golang.org/x/xerrors"
)
Expand Down
2 changes: 1 addition & 1 deletion contracts/evoting/json/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package json
import (
"encoding/json"

"github.com/c4dt/d-voting/contracts/evoting/types"
"github.com/dedis/d-voting/contracts/evoting/types"
"go.dedis.ch/dela/serde"
"golang.org/x/xerrors"
)
Expand Down
Loading
Loading