Skip to content

Commit

Permalink
Blocks after capella are execution (#14614)
Browse files Browse the repository at this point in the history
* Blocks after capella are execution

* fix test
  • Loading branch information
potuz authored Nov 4, 2024
1 parent 9ae9778 commit 5ef5b65
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- Simplified `EjectedValidatorIndices`.
- `engine_newPayloadV4`,`engine_getPayloadV4` are changes due to new execution request serialization decisions, [PR](https://github.com/prysmaticlabs/prysm/pull/14580)
- Use ROBlock earlier in block syncing pipeline.
- Changed the signature of `ProcessPayload`
- Only Build the Protobuf state once during serialization
- Changed the signature of `ProcessPayload`.
- Only Build the Protobuf state once during serialization.
- Capella blocks are execution.

### Deprecated

Expand Down
3 changes: 3 additions & 0 deletions beacon-chain/core/blocks/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func IsExecutionBlock(body interfaces.ReadOnlyBeaconBlockBody) (bool, error) {
if body == nil {
return false, errors.New("nil block body")
}
if body.Version() >= version.Capella {
return true, nil
}
payload, err := body.Execution()
switch {
case errors.Is(err, consensus_types.ErrUnsupportedField):
Expand Down
3 changes: 2 additions & 1 deletion beacon-chain/core/blocks/payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ func Test_IsExecutionBlockCapella(t *testing.T) {
require.NoError(t, err)
got, err := blocks.IsExecutionBlock(wrappedBlock.Body())
require.NoError(t, err)
require.Equal(t, false, got)
// #14614
require.Equal(t, true, got)
}

func Test_IsExecutionEnabled(t *testing.T) {
Expand Down

0 comments on commit 5ef5b65

Please sign in to comment.