More complete Engine API v1.0.0-alpha.5

* Added error codes
* Renamed ExecutionPayloadResponse.message to validationError
This commit is contained in:
Zahary Karadjov 2022-01-24 15:06:12 +02:00
parent 0f82cf22f3
commit 7daafe7b9c
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,7 @@ type
ExecutePayloadResponse* = object
status*: PayloadExecutionStatus
latestValidHash*: Option[BlockHash]
message*: Option[string]
validationError*: Option[string]
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.5/src/engine/specification.md#forkchoicestatev1
ForkchoiceStateV1* = object
@ -37,3 +37,13 @@ type
ForkchoiceUpdatedResponse* = object
status*: ForkchoiceUpdatedStatus
payloadId*: Option[PayloadID]
const
engineApiParseError* = - 32700
engineApiInvalidRequest* = -32600
engineApiMethodNotFound* = -32601
engineApiInvalidParams* = -32602
engineApiInternalError* = -32603
engineApiServerError* = -32000
engineApiUnknownPayload* = -32001
engineApiInvalidTerminalBlock* = -32002