# Engine API sequence
## Block validation
### Canonical chain
```sequence
Note over CL: Block B arrives
Note over CL: state_transition(state: pre_state, block: B)
CL->EL: engine_newPayload(B.payload)
Note over EL: runs full payload validation
EL-->CL: {status: VALID}
CL->EL: engine_forkchoiceUpdated(head: B.payload.hash)
EL-->CL: {payloadStatus: {status: VALID}}
```
### Non-canonical chain
#### Deep-state EL client
```sequence
Note over CL: Block B arrives
Note over CL: state_transition(state: pre_state, block: B)
CL->EL: engine_newPayload(B.payload)
Note over EL: runs full payload validation
EL-->CL: {status: VALID}
Note over CL: Chain re-orgs to B
CL->EL: engine_forkchoiceUpdated(head: B.payload.hash)
EL-->CL: {payloadStatus: {status: VALID}}
```
#### Shallow-state EL client
```sequence
Note over CL: Block B arrives
Note over CL: state_transition(state: pre_state, block: B)
CL->EL: engine_newPayload(B.payload)
Note over EL: validates payload is from a well-formed chain
EL-->CL: {status: ACCEPTED}
Note over CL: Chain re-orgs to B
CL->EL: engine_forkchoiceUpdated(head: B.payload.hash)
Note over EL: runs full payload validation
EL-->CL: {payloadStatus: {status: VALID}}
```
## Block proposal
```sequence
Note over CL: Block B arrives
Note over CL: state_transition(state: pre_state, block: B)
CL->EL: engine_newPayload(B.payload)
Note over EL: runs full payload validation
EL-->CL: {status: VALID}
CL->EL: engine_forkchoiceUpdated(head: B.payload.hash, payloadAttributes: {...})
EL-->CL: {payloadStatus: {status: VALID}, payloadId: buildProcessId}
Note over CL: slot ticks
CL->EL: engine_getPayload(payloadId: buildProcessId)
EL-->CL: builtExecutionPayload
Note over CL: proposes B', a child of B with builtExecutionPayload payload
```