update engine API signatures to alpha.6
This commit is contained in:
parent
7daafe7b9c
commit
a8a464c5fe
|
@ -1,7 +1,7 @@
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.5/src/engine/specification.md
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#core
|
||||||
|
|
||||||
import ethtypes, engine_api_types
|
import ethtypes, engine_api_types
|
||||||
|
|
||||||
proc engine_executePayloadV1(payload: ExecutionPayloadV1): ExecutePayloadResponse
|
proc engine_newPayloadV1(payload: ExecutionPayloadV1): PayloadStatusV1
|
||||||
proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]): ForkchoiceUpdatedResponse
|
proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]): ForkchoiceUpdatedResponse
|
||||||
proc engine_getPayloadV1(payloadId: PayloadID): ExecutionPayloadV1
|
proc engine_getPayloadV1(payloadId: PayloadID): ExecutionPayloadV1
|
||||||
|
|
|
@ -6,39 +6,47 @@ export
|
||||||
ethtypes
|
ethtypes
|
||||||
|
|
||||||
type
|
type
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.5/src/engine/specification.md#payloadattributesv1
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadattributesv1
|
||||||
PayloadAttributesV1* = object
|
PayloadAttributesV1* = object
|
||||||
timestamp*: Quantity
|
timestamp*: Quantity
|
||||||
random*: FixedBytes[32]
|
random*: FixedBytes[32]
|
||||||
suggestedFeeRecipient*: Address
|
suggestedFeeRecipient*: Address
|
||||||
|
|
||||||
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadstatusv1
|
||||||
PayloadExecutionStatus* {.pure.} = enum
|
PayloadExecutionStatus* {.pure.} = enum
|
||||||
valid = "VALID"
|
valid = "VALID"
|
||||||
invalid = "INVALID"
|
invalid = "INVALID"
|
||||||
syncing = "SYNCING"
|
syncing = "SYNCING"
|
||||||
|
accepted = "ACCEPTED"
|
||||||
|
invalid_block_hash = "INVALID_BLOCK_HASH"
|
||||||
|
invalid_terminal_block = "INVALID_TERMINAL_BLOCK"
|
||||||
|
|
||||||
PayloadID* = FixedBytes[8]
|
PayloadStatusV1* = object
|
||||||
|
|
||||||
ExecutePayloadResponse* = object
|
|
||||||
status*: PayloadExecutionStatus
|
status*: PayloadExecutionStatus
|
||||||
latestValidHash*: Option[BlockHash]
|
latestValidHash*: Option[BlockHash]
|
||||||
validationError*: Option[string]
|
validationError*: Option[string]
|
||||||
|
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.5/src/engine/specification.md#forkchoicestatev1
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#forkchoicestatev1
|
||||||
ForkchoiceStateV1* = object
|
ForkchoiceStateV1* = object
|
||||||
headBlockHash*: BlockHash
|
headBlockHash*: BlockHash
|
||||||
safeBlockHash*: BlockHash
|
safeBlockHash*: BlockHash
|
||||||
finalizedBlockHash*: BlockHash
|
finalizedBlockHash*: BlockHash
|
||||||
|
|
||||||
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#response-1
|
||||||
ForkchoiceUpdatedStatus* {.pure.} = enum
|
ForkchoiceUpdatedStatus* {.pure.} = enum
|
||||||
success = "SUCCESS"
|
valid = "VALID"
|
||||||
|
invalid = "INVALID"
|
||||||
syncing = "SYNCING"
|
syncing = "SYNCING"
|
||||||
|
invalid_terminal_block = "INVALID_TERMINAL_BLOCK"
|
||||||
|
|
||||||
|
PayloadID* = FixedBytes[8]
|
||||||
|
|
||||||
ForkchoiceUpdatedResponse* = object
|
ForkchoiceUpdatedResponse* = object
|
||||||
status*: ForkchoiceUpdatedStatus
|
payloadStatus*: ForkchoiceUpdatedStatus
|
||||||
payloadId*: Option[PayloadID]
|
payloadId*: Option[PayloadID]
|
||||||
|
|
||||||
const
|
const
|
||||||
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#errors
|
||||||
engineApiParseError* = - 32700
|
engineApiParseError* = - 32700
|
||||||
engineApiInvalidRequest* = -32600
|
engineApiInvalidRequest* = -32600
|
||||||
engineApiMethodNotFound* = -32601
|
engineApiMethodNotFound* = -32601
|
||||||
|
@ -46,4 +54,3 @@ const
|
||||||
engineApiInternalError* = -32603
|
engineApiInternalError* = -32603
|
||||||
engineApiServerError* = -32000
|
engineApiServerError* = -32000
|
||||||
engineApiUnknownPayload* = -32001
|
engineApiUnknownPayload* = -32001
|
||||||
engineApiInvalidTerminalBlock* = -32002
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ type
|
||||||
|
|
||||||
TypedTransaction* = distinct seq[byte]
|
TypedTransaction* = distinct seq[byte]
|
||||||
|
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.5/src/engine/specification.md#executionpayloadv1
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#executionpayloadv1
|
||||||
ExecutionPayloadV1* = object
|
ExecutionPayloadV1* = object
|
||||||
parentHash*: BlockHash
|
parentHash*: BlockHash
|
||||||
feeRecipient*: Address
|
feeRecipient*: Address
|
||||||
|
|
Loading…
Reference in New Issue