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

Change all occurrence of election into form #178

Merged
merged 14 commits into from
Oct 24, 2022
Merged

Conversation

Ghita2002
Copy link
Contributor

I change election to form. I need to do other changes like changing the image in the home page.

@Ghita2002 Ghita2002 requested a review from nkcr October 2, 2022 19:30
@Ghita2002 Ghita2002 self-assigned this Oct 2, 2022
@CLAassistant
Copy link

CLAassistant commented Oct 2, 2022

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Oct 2, 2022

Pull Request Test Coverage Report for Build 3169817580

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 205 of 451 (45.45%) changed or added relevant lines in 16 files are covered.
  • 63 unchanged lines in 4 files lost coverage.
  • Overall coverage remained the same at 58.5%

Changes Missing Coverage Covered Lines Changed/Added Lines %
services/shuffle/neff/controller/action.go 0 1 0.0%
services/shuffle/neff/controller/mod.go 0 1 0.0%
contracts/evoting/mod.go 15 21 71.43%
services/shuffle/neff/mod.go 29 37 78.38%
contracts/evoting/types/election.go 0 11 0.0%
services/dkg/pedersen/controller/action.go 9 20 45.0%
services/dkg/pedersen/controller/mod.go 2 13 15.38%
contracts/evoting/types/transactions.go 0 17 0.0%
contracts/evoting/evoting.go 108 157 68.79%
contracts/evoting/controller/action.go 0 131 0.0%
Files with Coverage Reduction New Missed Lines %
contracts/evoting/types/election.go 1 17.29%
services/shuffle/neff/mod.go 1 84.0%
contracts/evoting/evoting.go 4 69.2%
contracts/evoting/controller/action.go 57 0.0%
Totals Coverage Status
Change from base Build 3143684289: 0.0%
Covered Lines: 2364
Relevant Lines: 4041

💛 - Coveralls

@nkcr nkcr marked this pull request as draft October 5, 2022 07:47
@Ghita2002 Ghita2002 marked this pull request as ready for review October 8, 2022 14:33
@Ghita2002 Ghita2002 marked this pull request as draft October 10, 2022 07:08
@Ghita2002 Ghita2002 marked this pull request as ready for review October 12, 2022 07:40
Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a big chunk, thanks for the update!

I made some comments, mostly about the documentation. Some parts need a bit of rephrasing, otherwise it can be weird.

Also, since this is updating pretty much everything in the code base, you should ensure that nothing got broken along the way. The CI already provides some guarantees but this is not enough. Did you try running the system manually with you changes ? You should ensure that all functionalities are still working, and the web frontend should work both with nomock=on or not (i.e. using the mocks).

README.md Outdated

In D-Voting we use the Neff [[2]] implementation of verifiable shuffling. Once
an election is closed, an admin can trigger the shuffling steps from the nodes.
an form is closed, an admin can trigger the shuffling steps from the nodes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
an form is closed, an admin can trigger the shuffling steps from the nodes.
a form is closed, an admin can trigger the shuffling steps from the nodes.

README.md Outdated
@@ -107,11 +107,11 @@ be linked to the original voter.
<img height="50px" src="docs/assets/audit-white.png#gh-dark-mode-only">
</div>

**Transparency/Verifiability/Auditability** - The whole election process is
**Transparency/Verifiability/Auditability** - The whole form process is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a "form process" doesn't make much sense, compared to the previous "election process". We should come with a better naming. In this case we might say the "voting process".
(same in other places)

README.md Outdated
@@ -120,12 +120,12 @@ The project has 4 main high-level components:
**Proxy** - A proxy offers the mean for an external actor such as a website to
interact with a blockchain node. It is a component of the blockchain node that
exposes HTTP endpoints for external entities to send commands to the node. The
proxy is notably used by the web clients to use the election system.
proxy is notably used by the web clients to use the form system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we should either simply say "use the system", or "use the voting system".


**Web frontend** - The web frontend is a web app built with React. It offers a
view for end-users to use the D-Voting system. The app is meant to be used by
voters and admins. Admins can perform administrative tasks such as creating an
election, closing it, or revealing the results. Depending on the task, the web
form, closing it, or revealing the results. Depending on the task, the web
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"an election" -> "a form"
(same elsewhere)

README.md Outdated
@@ -137,7 +137,7 @@ web-backend has a local database to store configuration data such as
authorizations. Admins use the web-frontend to perform updates.

**Blockchain node** - A blockchain node is the wide definition of the program
that runs on a host and participate in the election logic. The blockchain node
that runs on a host and participate in the form logic. The blockchain node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"form logic" -> "voting logic".

@@ -32,7 +32,7 @@ import (
const (
shufflingProtocolName = "PairShuffle"
errGetTransaction = "failed to get transaction: %v"
errGetElection = "failed to get election: %v"
errGetForm = "failed to get form: %v"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that your IDE is not formatting your go code for you. Please make sure it does by installing the recommended tooling for go code.

the election has an attribute called "BallotSize" which is the size
that all ballots should have before they're encrypted. Smaller ballots should therefore be
In order to maintain complete voter anonymity and untraceability of ballots throughout the
form process, it is important that all encrypted ballots have the same size. To this aim,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"voting process"

@@ -16,15 +16,15 @@ end-user can interact with the system.

<p style="text-align:center"><img src="assets/layers.png"/></p>

## Election flow
## Form flow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"voting flow"


<p style="text-align:center"><img src="assets/election flow.png"/></p>
<p style="text-align:center"><img src="assets/form flow.png"/></p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can generate the new sequence diagram but copy/pasting the source bellow there: https://sequencediagram.org/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm not sure to understand. Did you mean that I need to past the link in the source line 23 ?

@@ -166,9 +166,9 @@ type Actor struct {
factory serde.Factory
service ordering.Service
context serde.Context
electionFac serde.Factory
formFac serde.Factory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about formatting. Your IDE should automatically do gofmt for you, which is the standard code formater for go.

@Ghita2002 Ghita2002 requested a review from a team as a code owner October 14, 2022 16:52
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 19 Code Smells

9.8% 9.8% Coverage
2.0% 2.0% Duplication

Copy link
Contributor

@nkcr nkcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👍

@nkcr nkcr merged commit 5be3e40 into main Oct 24, 2022
@nkcr nkcr deleted the d-voting_frontend_ghita branch October 24, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants