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

Update config and reference tests to v1.0.0-rc.0 + Reject BLS infinity pubkeys and signatures #2971

Merged
merged 28 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9e53aea
Apply new config for 1.0.0-rc.0
ajsutton Oct 12, 2020
45c683f
Apply the right version of config.
ajsutton Oct 12, 2020
c52e422
No really, the phase 0 constants from 1.0.0-rc.0
ajsutton Oct 12, 2020
81b9ade
Update expected length bounds. New constants allow beacon state to b…
ajsutton Oct 12, 2020
215d6bf
Merge branch 'master' of github.com:PegaSysEng/teku into rc1
ajsutton Oct 13, 2020
14795cc
Update states in FuzzUtilTest to match new constants.
ajsutton Oct 13, 2020
4633620
Support weird case of one test using messages instead of message.
ajsutton Oct 13, 2020
4df2638
Handle signing tests that are expected to fail.
ajsutton Oct 13, 2020
7f9dccb
Merge branch 'master' of github.com:PegaSysEng/teku into rc1
ajsutton Oct 13, 2020
3aadfb2
Fix the original issue with BlstSignature.verify(List<PublicKeyMessa…
Nashatyrev Oct 13, 2020
cf76b2f
Add global BLSConstants.VALID_INFINITY variable and make use of it fo…
Nashatyrev Oct 13, 2020
7bf299f
Convert invalid signature test cases from Mikuli specific to generic
Nashatyrev Oct 13, 2020
92087a1
Use dedicated DeserializeException when failed to deserialize G1/G2 p…
Nashatyrev Oct 14, 2020
4eacd8f
Cleanup Mikuli implementation. Handle malformed serialized pkeys and …
Nashatyrev Oct 14, 2020
2fcdc0f
A bit more Mikuli clean up
Nashatyrev Oct 14, 2020
a98fa08
More Mikuli BLS code cleanup
Nashatyrev Oct 14, 2020
a071d94
Make reference BLS tests executing on both BLS implementations
Nashatyrev Oct 14, 2020
3d4c0cf
Handle Infinity pubkey in mikuli implementation
Nashatyrev Oct 14, 2020
425f1e3
Spotless apply
Nashatyrev Oct 14, 2020
3cceb09
Fix unit tests to conform new BLS spec draft: Infinite pubkey/sig are…
Nashatyrev Oct 14, 2020
7114377
Fix batchVerify with respect to Infinite pubkeys in both implementations
Nashatyrev Oct 14, 2020
ac93af6
Merge remote-tracking branch 'pegasys/master' into feature/rc1-bls
Nashatyrev Oct 14, 2020
145d503
Fix warnings
Nashatyrev Oct 14, 2020
373732f
Return back accidentally removed @Disabled
Nashatyrev Oct 14, 2020
c80cdb9
Specify BLSConstants.VALID_INFINITY by custom Constants const
Nashatyrev Oct 15, 2020
8422bd2
Fix the test
Nashatyrev Oct 15, 2020
b3cfcc5
Make BLS_INFINITY_VALID boolean
Nashatyrev Oct 16, 2020
7d0ae75
Merge remote-tracking branch 'pegasys/master' into feature/rc1-bls
Nashatyrev Oct 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make BLS_INFINITY_VALID boolean
  • Loading branch information
Nashatyrev committed Oct 16, 2020
commit b3cfcc5a6caaa816c4ab674621a3fca88678f6fe
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public class Constants {
// Custom
// Temporary BLS backward compatibility flag
// Set to 1 if required BLS to be pre rc-1 spec compatible
public static int BLS_INFINITY_VALID = 0;
public static boolean BLS_INFINITY_VALID = false;

static {
setConstants("minimal");
Expand All @@ -181,7 +181,7 @@ public class Constants {
public static void setConstants(final String source) {
try (final InputStream input = createInputStream(source)) {
ConstantsReader.loadConstantsFrom(input);
BLSConstants.VALID_INFINITY = BLS_INFINITY_VALID > 0;
BLSConstants.VALID_INFINITY = BLS_INFINITY_VALID;
} catch (IOException e) {
throw new IllegalArgumentException("Failed to load constants from " + source, e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ConstantsReader {
.put(String.class, Function.identity())
.put(Bytes.class, toString(Bytes::fromHexString))
.put(Bytes4.class, toString(Bytes4::fromHexString))
.put(boolean.class, toString(Boolean::valueOf))
.build();

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ DOMAIN_AGGREGATE_AND_PROOF: 0x06000000

# Custom constants
# ---------------------------------------------------------------
BLS_INFINITY_VALID: 1
BLS_INFINITY_VALID: true
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ DOMAIN_DEPOSIT: 0x03000000
DOMAIN_VOLUNTARY_EXIT: 0x04000000
DOMAIN_SELECTION_PROOF: 0x05000000
DOMAIN_AGGREGATE_AND_PROOF: 0x06000000
BLS_INFINITY_VALID: 1
BLS_INFINITY_VALID: true