Search in sources :

Example 66 with BLSKeyPair

use of tech.pegasys.teku.bls.BLSKeyPair in project teku by ConsenSys.

the class ActiveKeyManagerTest method generateActiveValidatorsList.

private List<Validator> generateActiveValidatorsList() {
    final BLSKeyPair keyPair1 = BLSTestUtil.randomKeyPair(1);
    final BLSKeyPair keyPair2 = BLSTestUtil.randomKeyPair(2);
    final Validator validator1 = new Validator(keyPair1.getPublicKey(), NO_OP_SIGNER, Optional::empty, true);
    final Validator validator2 = new Validator(keyPair2.getPublicKey(), NO_OP_SIGNER, Optional::empty, false);
    return Arrays.asList(validator1, validator2);
}
Also used : Optional(java.util.Optional) BLSKeyPair(tech.pegasys.teku.bls.BLSKeyPair) ExternalValidator(tech.pegasys.teku.validator.client.restapi.apis.schema.ExternalValidator)

Aggregations

BLSKeyPair (tech.pegasys.teku.bls.BLSKeyPair)66 Test (org.junit.jupiter.api.Test)24 Bytes (org.apache.tuweni.bytes.Bytes)17 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)14 HashMap (java.util.HashMap)12 Bytes32 (org.apache.tuweni.bytes.Bytes32)11 TimingContext (org.hyperledger.besu.plugin.services.metrics.OperationTimer.TimingContext)10 Path (java.nio.file.Path)9 BlsArtifactSigner (tech.pegasys.web3signer.core.signing.BlsArtifactSigner)7 BLSPublicKey (tech.pegasys.teku.bls.BLSPublicKey)6 ArtifactSigner (tech.pegasys.web3signer.core.signing.ArtifactSigner)6 BlsArtifactSigner (tech.pegasys.web3signer.signing.BlsArtifactSigner)6 KeyStoreData (tech.pegasys.signers.bls.keystore.model.KeyStoreData)5 BeaconState (tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState)5 ArtifactSigner (tech.pegasys.web3signer.signing.ArtifactSigner)5 Disabled (org.junit.jupiter.api.Disabled)4 InlineEventThread (tech.pegasys.teku.infrastructure.async.eventthread.InlineEventThread)4 SignedBeaconBlock (tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock)4 Optional (java.util.Optional)3 KeyStoreValidationException (tech.pegasys.signers.bls.keystore.KeyStoreValidationException)3