Skip to content

Commit

Permalink
Also adding AddPoints and ReconstructReply to the models.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Jun 27, 2023
1 parent 3aceccb commit 43c220d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 24 deletions.
39 changes: 39 additions & 0 deletions evoting/proto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package evoting

import (
"go.dedis.ch/cothority/v3/skipchain"
"go.dedis.ch/kyber/v3"
)

// PROTOSTART
// package evoting_api;
// type :skipchain.SkipBlockID:bytes
// type :kyber.Point:bytes
//
// option java_package = "ch.epfl.dedis.lib.proto";
// option java_outer_classname = "EvotingAPI";

// Reconstruct message.
type Reconstruct struct {
// ID of the election skipchain.
ID skipchain.SkipBlockID
}

// ReconstructReply message.
type ReconstructReply struct {
// Points are the decrypted plaintexts.
Points []kyber.Point
// Eventual additional points - only if more than 9 candidates
AdditionalPoints []AddPoints
}

type AddPoints struct {

Check failure on line 30 in evoting/proto.go

View workflow job for this annotation

GitHub Actions / pre-commit

exported type AddPoints should have comment or be unexported
// The additional Points
AdditionalPoints []kyber.Point
}

// Ping message.
type Ping struct {
// Nonce can be any integer.
Nonce uint32
}
25 changes: 2 additions & 23 deletions evoting/struct.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package evoting

import (
"go.dedis.ch/cothority/v3/evoting/lib"
"go.dedis.ch/cothority/v3/skipchain"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/onet/v3"
"go.dedis.ch/onet/v3/network"

"go.dedis.ch/cothority/v3/evoting/lib"
"go.dedis.ch/cothority/v3/skipchain"
)

func init() {
Expand Down Expand Up @@ -152,23 +151,3 @@ type GetPartials struct {
type GetPartialsReply struct {
Partials []*lib.Partial // Partials from all conodes.
}

// Reconstruct message.
type Reconstruct struct {
ID skipchain.SkipBlockID // ID of the election skipchain.
}

// ReconstructReply message.
type ReconstructReply struct {
Points []kyber.Point // Points are the decrypted plaintexts.
AdditionalPoints []AddPoints // Eventual additional points - only if more than 9 candidates
}

type AddPoints struct {
AdditionalPoints []kyber.Point // The additional Points
}

// Ping message.
type Ping struct {
Nonce uint32 // Nonce can be any integer.
}
Loading

0 comments on commit 43c220d

Please sign in to comment.