Search in sources :

Example 1 with BeaconBlockBodyBellatrix

use of tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodyBellatrix in project teku by ConsenSys.

the class MiscHelpersBellatrix method isMergeTransitionBlock.

public boolean isMergeTransitionBlock(final BeaconState genericState, final BeaconBlock block) {
    final BeaconStateBellatrix state = BeaconStateBellatrix.required(genericState);
    final BeaconBlockBodyBellatrix blockBody = BeaconBlockBodyBellatrix.required(block.getBody());
    return !isMergeTransitionComplete(state) && !blockBody.getExecutionPayload().isDefault();
}
Also used : BeaconStateBellatrix(tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.BeaconStateBellatrix) BeaconBlockBodyBellatrix(tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodyBellatrix)

Example 2 with BeaconBlockBodyBellatrix

use of tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodyBellatrix in project teku by ConsenSys.

the class BlockProcessorBellatrix method processBlock.

@Override
public void processBlock(final MutableBeaconState genericState, final BeaconBlock block, final IndexedAttestationCache indexedAttestationCache, final BLSSignatureVerifier signatureVerifier, final OptimisticExecutionPayloadExecutor payloadExecutor) throws BlockProcessingException {
    final MutableBeaconStateBellatrix state = MutableBeaconStateBellatrix.required(genericState);
    final BeaconBlockBodyBellatrix blockBody = BeaconBlockBodyBellatrix.required(block.getBody());
    processBlockHeader(state, block);
    if (miscHelpersBellatrix.isExecutionEnabled(genericState, block)) {
        processExecutionPayload(state, blockBody.getExecutionPayload(), payloadExecutor);
    }
    processRandaoNoValidation(state, block.getBody());
    processEth1Data(state, block.getBody());
    processOperationsNoValidation(state, block.getBody(), indexedAttestationCache);
    processSyncAggregate(state, blockBody.getSyncAggregate(), signatureVerifier);
}
Also used : MutableBeaconStateBellatrix(tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.MutableBeaconStateBellatrix) BeaconBlockBodyBellatrix(tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodyBellatrix)

Aggregations

BeaconBlockBodyBellatrix (tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodyBellatrix)2 BeaconStateBellatrix (tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.BeaconStateBellatrix)1 MutableBeaconStateBellatrix (tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.MutableBeaconStateBellatrix)1