-
Notifications
You must be signed in to change notification settings - Fork 28
/
ValidateTest.sol
185 lines (172 loc) · 4.2 KB
/
ValidateTest.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
pragma solidity ^0.5.12;
import "../libraries/Validate.sol";
/// @notice Validate is a library for validating malicious darknode behaviour.
contract ValidateTest {
function duplicatePropose(
uint256 _height,
uint256 _round,
bytes memory _blockhash1,
uint256 _validRound1,
bytes memory _signature1,
bytes memory _blockhash2,
uint256 _validRound2,
bytes memory _signature2
) public pure returns (address) {
return Validate.duplicatePropose(
_height,
_round,
_blockhash1,
_validRound1,
_signature1,
_blockhash2,
_validRound2,
_signature2
);
}
function recoverPropose(
uint256 _height,
uint256 _round,
bytes memory _blockhash,
uint256 _validRound,
bytes memory _signature
) public pure returns (address) {
return Validate.recoverPropose(
_height,
_round,
_blockhash,
_validRound,
_signature
);
}
function duplicatePrevote(
uint256 _height,
uint256 _round,
bytes memory _blockhash1,
bytes memory _signature1,
bytes memory _blockhash2,
bytes memory _signature2
) public pure returns (address) {
return Validate.duplicatePrevote(
_height,
_round,
_blockhash1,
_signature1,
_blockhash2,
_signature2
);
}
function recoverPrevote(
uint256 _height,
uint256 _round,
bytes memory _blockhash,
bytes memory _signature
) public pure returns (address) {
return Validate.recoverPrevote(
_height,
_round,
_blockhash,
_signature
);
}
function duplicatePrecommit(
uint256 _height,
uint256 _round,
bytes memory _blockhash1,
bytes memory _signature1,
bytes memory _blockhash2,
bytes memory _signature2
) public pure returns (address) {
return Validate.duplicatePrecommit(
_height,
_round,
_blockhash1,
_signature1,
_blockhash2,
_signature2
);
}
function recoverPrecommit(
uint256 _height,
uint256 _round,
bytes memory _blockhash,
bytes memory _signature
) public pure returns (address) {
return Validate.recoverPrecommit(
_height,
_round,
_blockhash,
_signature
);
}
function proposeMessage(
uint256 _height,
uint256 _round,
bytes memory _blockhash,
uint256 _validRound
) public pure returns (bytes memory) {
return Validate.proposeMessage(
_height,
_round,
_blockhash,
_validRound
);
}
function prevoteMessage(
uint256 _height,
uint256 _round,
bytes memory _blockhash
) public pure returns (bytes memory) {
return Validate.prevoteMessage(
_height,
_round,
_blockhash
);
}
function precommitMessage(
uint256 _height,
uint256 _round,
bytes memory _blockhash
) public pure returns (bytes memory) {
return Validate.precommitMessage(
_height,
_round,
_blockhash
);
}
function recoverSecret(
uint256 _a,
uint256 _b,
uint256 _c,
uint256 _d,
uint256 _e,
uint256 _f,
bytes memory _signature
) public pure returns (address) {
return Validate.recoverSecret(
_a,
_b,
_c,
_d,
_e,
_f,
_signature
);
}
function secretMessage(
uint256 _a,
uint256 _b,
uint256 _c,
uint256 _d,
uint256 _e,
uint256 _f
) public pure returns (bytes memory) {
return Validate.secretMessage(
_a,
_b,
_c,
_d,
_e,
_f
);
}
}