Search in sources :

Example 1 with SyncCommitteeMessage

use of tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.SyncCommitteeMessage in project web3signer by ConsenSys.

the class Eth2RequestUtils method createSyncCommitteeMessageRequest.

private static Eth2SigningRequestBody createSyncCommitteeMessageRequest() {
    final ForkInfo forkInfo = forkInfo();
    final Bytes signingRoot;
    try {
        signingRoot = signingRootFromSyncCommitteeUtils(slot, utils -> utils.getSyncCommitteeMessageSigningRoot(beaconBlockRoot, altairSpec.computeEpochAtSlot(slot), forkInfo.asInternalForkInfo())).get();
    } catch (final InterruptedException | ExecutionException e) {
        throw new RuntimeException(e);
    }
    final SyncCommitteeMessage syncCommitteeMessage = new SyncCommitteeMessage(beaconBlockRoot, slot);
    return new Eth2SigningRequestBody(ArtifactType.SYNC_COMMITTEE_MESSAGE, signingRoot, forkInfo, null, null, null, null, null, null, null, null, syncCommitteeMessage, null, null);
}
Also used : Bytes(org.apache.tuweni.bytes.Bytes) ForkInfo(tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.ForkInfo) Eth2SigningRequestBody(tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.Eth2SigningRequestBody) ExecutionException(java.util.concurrent.ExecutionException) SyncCommitteeMessage(tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.SyncCommitteeMessage)

Aggregations

ExecutionException (java.util.concurrent.ExecutionException)1 Bytes (org.apache.tuweni.bytes.Bytes)1 Eth2SigningRequestBody (tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.Eth2SigningRequestBody)1 ForkInfo (tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.ForkInfo)1 SyncCommitteeMessage (tech.pegasys.web3signer.core.service.http.handlers.signing.eth2.SyncCommitteeMessage)1