@@ -36,8 +36,8 @@ type unauthenticatedBundle struct {
36
36
Step step `codec:"step"`
37
37
Proposal proposalValue `codec:"prop"`
38
38
39
- Votes []voteAuthenticator `codec:"vote"`
40
- EquivocationVotes []equivocationVoteAuthenticator `codec:"eqv"`
39
+ Votes []voteAuthenticator `codec:"vote,allocbound=config.MaxVoteThreshold "`
40
+ EquivocationVotes []equivocationVoteAuthenticator `codec:"eqv,allocbound=config.MaxVoteThreshold "`
41
41
}
42
42
43
43
// bundle is a set of votes, all from the same round, period, and step, and from distinct senders, that reaches quorum.
@@ -48,19 +48,23 @@ type bundle struct {
48
48
49
49
U unauthenticatedBundle `codec:"u"`
50
50
51
- Votes []vote `codec:"vote"`
52
- EquivocationVotes []equivocationVote `codec:"eqv"`
51
+ Votes []vote `codec:"vote,allocbound=config.MaxVoteThreshold "`
52
+ EquivocationVotes []equivocationVote `codec:"eqv,allocbound=config.MaxVoteThreshold "`
53
53
}
54
54
55
55
// voteAuthenticators omit the Round, Period, Step, and Proposal for compression
56
56
// and to simplify checking logic.
57
57
type voteAuthenticator struct {
58
+ _struct struct {} `codec:""` // not omitempty
59
+
58
60
Sender basics.Address `codec:"snd"`
59
61
Cred committee.UnauthenticatedCredential `codec:"cred"`
60
62
Sig crypto.OneTimeSignature `codec:"sig,omitempty,omitemptycheckstruct"`
61
63
}
62
64
63
65
type equivocationVoteAuthenticator struct {
66
+ _struct struct {} `codec:""` // not omitempty
67
+
64
68
Sender basics.Address `codec:"snd"`
65
69
Cred committee.UnauthenticatedCredential `codec:"cred"`
66
70
Sigs [2 ]crypto.OneTimeSignature `codec:"sig,omitempty,omitemptycheckstruct"`
0 commit comments