Skip to content

Commit

Permalink
Remove engine_exchangeTransitionConfiguration (#12430)
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis authored Oct 24, 2024
1 parent cdf9e83 commit 17e9b48
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ jobs:
# Run RPC integration test runner via http
python3 ./run_tests.py -p 8545 --continue -f --json-diff -x debug_,\
engine_exchangeCapabilities/test_1.json,\
engine_exchangeTransitionConfigurationV1/test_01.json,\
engine_getClientVersionV1/test_1.json,\
erigon_getLogsByHash/test_04.json,\
erigon_getHeaderByHash/test_02.json,\
Expand Down
1 change: 0 additions & 1 deletion cmd/rpcdaemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ The following table shows the current implementation status of Erigon's RPC daem
| engine_getPayloadV1 | Yes | |
| engine_getPayloadV2 | Yes | |
| engine_getPayloadV3 | Yes | |
| engine_exchangeTransitionConfigurationV1 | Yes | |
| | | |
| debug_accountRange | Yes | Private Erigon debug module |
| debug_accountAt | Yes | Private Erigon debug module |
Expand Down
25 changes: 0 additions & 25 deletions turbo/engineapi/engine_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -737,30 +737,6 @@ func (e *EngineServer) NewPayloadV4(ctx context.Context, payload *engine_types.E
return e.newPayload(ctx, payload, expectedBlobHashes, parentBeaconBlockRoot, executionRequests, clparams.ElectraVersion)
}

// Receives consensus layer's transition configuration and checks if the execution layer has the correct configuration.
// Can also be used to ping the execution layer (heartbeats).
// See https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.1/src/engine/specification.md#engine_exchangetransitionconfigurationv1
func (e *EngineServer) ExchangeTransitionConfigurationV1(ctx context.Context, beaconConfig *engine_types.TransitionConfiguration) (*engine_types.TransitionConfiguration, error) {
terminalTotalDifficulty := e.config.TerminalTotalDifficulty
if e.caplin {
e.logger.Crit(caplinEnabledLog)
return nil, errCaplinEnabled
}
if terminalTotalDifficulty == nil {
return nil, fmt.Errorf("the execution layer doesn't have a terminal total difficulty. expected: %v", beaconConfig.TerminalTotalDifficulty)
}

if terminalTotalDifficulty.Cmp((*big.Int)(beaconConfig.TerminalTotalDifficulty)) != 0 {
return nil, fmt.Errorf("the execution layer has a wrong terminal total difficulty. expected %v, but instead got: %d", beaconConfig.TerminalTotalDifficulty, terminalTotalDifficulty)
}

return &engine_types.TransitionConfiguration{
TerminalTotalDifficulty: (*hexutil.Big)(terminalTotalDifficulty),
TerminalBlockHash: libcommon.Hash{},
TerminalBlockNumber: (*hexutil.Big)(libcommon.Big0),
}, nil
}

// Returns an array of execution payload bodies referenced by their block hashes
// See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1
func (e *EngineServer) GetPayloadBodiesByHashV1(ctx context.Context, hashes []libcommon.Hash) ([]*engine_types.ExecutionPayloadBody, error) {
Expand Down Expand Up @@ -797,7 +773,6 @@ var ourCapabilities = []string{
"engine_getPayloadV2",
"engine_getPayloadV3",
"engine_getPayloadV4",
"engine_exchangeTransitionConfigurationV1",
"engine_getPayloadBodiesByHashV1",
"engine_getPayloadBodiesByHashV2",
"engine_getPayloadBodiesByRangeV1",
Expand Down
1 change: 0 additions & 1 deletion turbo/engineapi/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type EngineAPI interface {
GetPayloadV2(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
GetPayloadV3(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
GetPayloadV4(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
ExchangeTransitionConfigurationV1(ctx context.Context, transitionConfiguration *engine_types.TransitionConfiguration) (*engine_types.TransitionConfiguration, error)
GetPayloadBodiesByHashV1(ctx context.Context, hashes []common.Hash) ([]*engine_types.ExecutionPayloadBody, error)
GetPayloadBodiesByHashV2(ctx context.Context, hashes []common.Hash) ([]*engine_types.ExecutionPayloadBody, error)
GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBody, error)
Expand Down

0 comments on commit 17e9b48

Please sign in to comment.