Skip to content

Commit

Permalink
Merge pull request #8 from c4dt/move_fork
Browse files Browse the repository at this point in the history
Pointing to c4dt forks for dela and d-voting
  • Loading branch information
PascalinDe authored Sep 29, 2023
2 parents 724bf85 + 5cfa5c1 commit 636d9aa
Show file tree
Hide file tree
Showing 98 changed files with 811 additions and 817 deletions.
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/dedis/dela.git
git clone https://github.com/c4dt/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/dedis/dela.git
git clone https://github.com/c4dt/dela.git
cd dela
go install ./cli/crypto
Expand Down
33 changes: 1 addition & 32 deletions .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,4 @@ jobs:

- name: Test all, except integration, with coverage
run: |
go test -json -covermode=count -coverprofile=profile.cov $(go list ./... | grep -v /integration) 2>&1 | tee report.json
- name: Sonarcloud scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=dedis
-Dsonar.projectKey=dedis_d-voting
-Dsonar.go.tests.reportPaths=report.json
-Dsonar.go.coverage.reportPaths=profile.cov
-Dsonar.coverage.exclusions=**/*_test.go,/internal/**/*
-Dsonar.issue.ignore.multicriteria=e1
-Dsonar.issue.ignore.multicriteria.e1.ruleKey=*Naming*
-Dsonar.issue.ignore.multicriteria.e1.resourceKey=**/*_test.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true

# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
go test $(go list ./... | grep -v /integration)
2 changes: 1 addition & 1 deletion Dockerfiles/Dockerfile.dela
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.20.6-bookworm AS base
RUN apt-get update && apt-get install git
# make sure we're using the same head as d-voting
RUN git clone -b fix-bbolt https://github.com/dedis/dela.git
RUN git clone https://github.com/c4dt/dela.git
WORKDIR /go/dela/cli/crypto
RUN go install
WORKDIR /go/d-voting
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/dedis/d-voting.Version=$(version)"
versionFlag="github.com/c4dt/d-voting.Version=$(version)"
versionFile=$(shell echo $(version) | tr . _)
timeFlag="github.com/dedis/d-voting.BuildTime=$(shell date +'%d/%m/%y_%H:%M')"
timeFlag="github.com/c4dt/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/dedis/d-voting/actions/workflows/go_release.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_release.yml/badge.svg">
<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><br/>
<a href="https://github.com/dedis/d-voting/graphs/contributors">
<a href="https://github.com/c4dt/d-voting/graphs/contributors">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/dedis/d-voting">
</a>
<a href="https://github.com/dedis/d-voting/releases">
<a href="https://github.com/c4dt/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/dedis/d-voting/actions/workflows/go_test.yml">
<img src="https://github.com/dedis/d-voting/actions/workflows/go_test.yml/badge.svg">
<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>
<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 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>
<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 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>
<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 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><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/dedis/d-voting">
<img src="https://goreportcard.com/badge/github.com/dedis/d-voting">
<a href="https://goreportcard.com/report/github.com/c4dt/d-voting">
<img src="https://goreportcard.com/badge/github.com/c4dt/d-voting">
</a>
<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 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>
</td>
<tr>
<tr>
<td>WEB</td>
<td>
<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 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>
<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 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>
</td>
</tr>
Expand All @@ -67,7 +67,7 @@
# D-Voting

**D-Voting** is an e-voting platform based on the
[Dela](https://github.com/dedis/dela) blockchain. It uses state-of-the-art
[Dela](https://github.com/c4dt/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/dedis/dela/tree/master/mino/minogrpc
[minogrpc]: https://github.com/c4dt/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/dedis/dela.git
git clone https://github.com/c4dt/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/dedis/d-voting/integration -count=1
NNODES=4 KILLNODE=true go test -v -run ^TestScenario$ github.com/c4dt/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/dedis/d-voting.Version=`git describe --tags`"
timeFlag="github.com/dedis/d-voting.BuildTime=`date +'%d/%m/%y_%H:%M'`"
versionFlag="github.com/c4dt/d-voting.Version=`git describe --tags`"
timeFlag="github.com/c4dt/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/dedis/d-voting/integration -count=1 | tee ./log/log/gotest.log
NNODES=$N_NODE go test -v -run ^TestScenario$ github.com/c4dt/d-voting/integration -count=1 | tee ./log/log/gotest.log
sleep 3
# Stop the test
./kill_test.sh
Expand Down
20 changes: 10 additions & 10 deletions cli/cosipbftcontroller/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import (
"fmt"
"strings"

"go.dedis.ch/dela"
"go.dedis.ch/dela/cli/node"
"go.dedis.ch/dela/core/ordering"
"go.dedis.ch/dela/core/ordering/cosipbft/authority"
"go.dedis.ch/dela/core/ordering/cosipbft/contracts/viewchange"
"go.dedis.ch/dela/core/txn"
"go.dedis.ch/dela/core/txn/pool"
"go.dedis.ch/dela/cosi"
"go.dedis.ch/dela/crypto"
"go.dedis.ch/dela/mino"
"github.com/c4dt/dela"
"github.com/c4dt/dela/cli/node"
"github.com/c4dt/dela/core/ordering"
"github.com/c4dt/dela/core/ordering/cosipbft/authority"
"github.com/c4dt/dela/core/ordering/cosipbft/contracts/viewchange"
"github.com/c4dt/dela/core/txn"
"github.com/c4dt/dela/core/txn/pool"
"github.com/c4dt/dela/cosi"
"github.com/c4dt/dela/crypto"
"github.com/c4dt/dela/mino"
"golang.org/x/xerrors"
)

Expand Down
24 changes: 12 additions & 12 deletions cli/cosipbftcontroller/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (
"testing"
"time"

"github.com/dedis/d-voting/internal/testing/fake"
"github.com/c4dt/d-voting/internal/testing/fake"
"github.com/c4dt/dela/cli/node"
"github.com/c4dt/dela/core/access"
"github.com/c4dt/dela/core/ordering"
"github.com/c4dt/dela/core/ordering/cosipbft/authority"
"github.com/c4dt/dela/core/txn"
"github.com/c4dt/dela/core/txn/pool"
"github.com/c4dt/dela/core/txn/pool/mem"
"github.com/c4dt/dela/core/validation"
"github.com/c4dt/dela/cosi"
"github.com/c4dt/dela/crypto"
"github.com/c4dt/dela/mino"
"github.com/stretchr/testify/require"
"go.dedis.ch/dela/cli/node"
"go.dedis.ch/dela/core/access"
"go.dedis.ch/dela/core/ordering"
"go.dedis.ch/dela/core/ordering/cosipbft/authority"
"go.dedis.ch/dela/core/txn"
"go.dedis.ch/dela/core/txn/pool"
"go.dedis.ch/dela/core/txn/pool/mem"
"go.dedis.ch/dela/core/validation"
"go.dedis.ch/dela/cosi"
"go.dedis.ch/dela/crypto"
"go.dedis.ch/dela/mino"
)

func TestSetupAction_Execute(t *testing.T) {
Expand Down
48 changes: 24 additions & 24 deletions cli/cosipbftcontroller/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ import (
"path/filepath"
"time"

"go.dedis.ch/dela/contracts/value"
"go.dedis.ch/dela/crypto"

"go.dedis.ch/dela/cli"
"go.dedis.ch/dela/cli/node"
"go.dedis.ch/dela/core/access/darc"
"go.dedis.ch/dela/core/execution/native"
"go.dedis.ch/dela/core/ordering"
"go.dedis.ch/dela/core/ordering/cosipbft"
"go.dedis.ch/dela/core/ordering/cosipbft/authority"
"go.dedis.ch/dela/core/ordering/cosipbft/blockstore"
"go.dedis.ch/dela/core/ordering/cosipbft/types"
"go.dedis.ch/dela/core/store/hashtree/binprefix"
"go.dedis.ch/dela/core/store/kv"
"go.dedis.ch/dela/core/txn/pool"
poolimpl "go.dedis.ch/dela/core/txn/pool/gossip"
"go.dedis.ch/dela/core/txn/signed"
"go.dedis.ch/dela/core/validation/simple"
"go.dedis.ch/dela/cosi/threshold"
"go.dedis.ch/dela/crypto/bls"
"go.dedis.ch/dela/crypto/loader"
"go.dedis.ch/dela/mino"
"go.dedis.ch/dela/mino/gossip"
"go.dedis.ch/dela/serde/json"
"github.com/c4dt/dela/contracts/value"
"github.com/c4dt/dela/crypto"

"github.com/c4dt/dela/cli"
"github.com/c4dt/dela/cli/node"
"github.com/c4dt/dela/core/access/darc"
"github.com/c4dt/dela/core/execution/native"
"github.com/c4dt/dela/core/ordering"
"github.com/c4dt/dela/core/ordering/cosipbft"
"github.com/c4dt/dela/core/ordering/cosipbft/authority"
"github.com/c4dt/dela/core/ordering/cosipbft/blockstore"
"github.com/c4dt/dela/core/ordering/cosipbft/types"
"github.com/c4dt/dela/core/store/hashtree/binprefix"
"github.com/c4dt/dela/core/store/kv"
"github.com/c4dt/dela/core/txn/pool"
poolimpl "github.com/c4dt/dela/core/txn/pool/gossip"
"github.com/c4dt/dela/core/txn/signed"
"github.com/c4dt/dela/core/validation/simple"
"github.com/c4dt/dela/cosi/threshold"
"github.com/c4dt/dela/crypto/bls"
"github.com/c4dt/dela/crypto/loader"
"github.com/c4dt/dela/mino"
"github.com/c4dt/dela/mino/gossip"
"github.com/c4dt/dela/serde/json"
"golang.org/x/xerrors"
)

Expand Down
16 changes: 8 additions & 8 deletions cli/cosipbftcontroller/mod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import (
"path/filepath"
"testing"

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

"github.com/dedis/d-voting/internal/testing/fake"
"github.com/c4dt/d-voting/services/dkg"
"github.com/c4dt/dela/core/ordering"

"github.com/c4dt/d-voting/internal/testing/fake"
"github.com/c4dt/dela/cli"
"github.com/c4dt/dela/cli/node"
"github.com/c4dt/dela/core/store/kv"
"github.com/c4dt/dela/core/txn/pool"
"github.com/stretchr/testify/require"
"go.dedis.ch/dela/cli"
"go.dedis.ch/dela/cli/node"
"go.dedis.ch/dela/core/store/kv"
"go.dedis.ch/dela/core/txn/pool"
)

func TestMinimal_SetCommands(t *testing.T) {
Expand Down
Loading

0 comments on commit 636d9aa

Please sign in to comment.