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

[Merge] Ref tests update to v1.1.0-beta.5 #4423

Merged
merged 8 commits into from
Sep 28, 2021
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ allprojects {
}
}

def refTestVersion = 'v1.1.0-beta.4'
def refTestVersion = 'v1.1.0-beta.5'
def blsRefTestVersion = 'v0.1.0'
def refTestBaseUrl = 'https://github.com/ethereum/eth2.0-spec-tests/releases/download'
def blsRefTestBaseUrl = 'https://github.com/ethereum/bls12-381-tests/releases/download'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ public ExecutionPayloadSchema() {
return (SszListSchema<Transaction, ?>) getFieldSchema13();
}

public SszByteListSchema<?> getExtraDataSchema() {
return (SszByteListSchema<?>) getFieldSchema10();
}

@Override
public ExecutionPayload createFromBackingNode(TreeNode node) {
return new ExecutionPayload(this, node);
Expand Down Expand Up @@ -155,7 +159,7 @@ public ExecutionPayload(
SszUInt64.of(gas_limit),
SszUInt64.of(gas_used),
SszUInt64.of(timestamp),
SszByteList.fromBytes(extra_data),
SSZ_SCHEMA.getExtraDataSchema().fromBytes(extra_data),
SszBytes32.of(baseFeePerGas),
SszBytes32.of(block_hash),
transactions.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public ExecutionPayloadHeaderSchema() {
namedSchema("transactions_root", SszPrimitiveSchemas.BYTES32_SCHEMA));
}

public SszByteListSchema<?> getExtraDataSchema() {
return (SszByteListSchema<?>) getFieldSchema10();
}

@Override
public ExecutionPayloadHeader createFromBackingNode(TreeNode node) {
return new ExecutionPayloadHeader(this, node);
Expand Down Expand Up @@ -143,7 +147,7 @@ public ExecutionPayloadHeader(
SszUInt64.of(gas_limit),
SszUInt64.of(gas_used),
SszUInt64.of(timestamp),
SszByteList.fromBytes(extra_data),
SSZ_SCHEMA.getExtraDataSchema().fromBytes(extra_data),
SszBytes32.of(baseFeePerGas),
SszBytes32.of(block_hash),
SszBytes32.of(transactions_root));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,16 @@ public void processBlock(
final MutableBeaconStateMerge state = MutableBeaconStateMerge.required(genericState);
final BeaconBlockBodyMerge blockBody = BeaconBlockBodyMerge.required(block.getBody());

super.processBlock(
executionEngineChannel, state, block, indexedAttestationCache, signatureVerifier);
processBlockHeader(state, block);

if (miscHelpersMerge.isExecutionEnabled(genericState, block)) {
processExecutionPayload(executionEngineChannel, state, blockBody.getExecution_payload());
}

processRandaoNoValidation(state, block.getBody());
processEth1Data(state, block.getBody());
processOperationsNoValidation(state, block.getBody(), indexedAttestationCache);
processSyncAggregate(state, blockBody.getSyncAggregate(), signatureVerifier);
}

@Override
Expand Down