2022-08-01 14:43:47 +00:00
|
|
|
package execution
|
2022-02-03 03:46:27 +00:00
|
|
|
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
|
|
|
|
var (
|
|
|
|
// ErrParse corresponds to JSON-RPC code -32700.
|
|
|
|
ErrParse = errors.New("invalid JSON was received by the server")
|
|
|
|
// ErrInvalidRequest corresponds to JSON-RPC code -32600.
|
|
|
|
ErrInvalidRequest = errors.New("JSON sent is not valid request object")
|
|
|
|
// ErrMethodNotFound corresponds to JSON-RPC code -32601.
|
|
|
|
ErrMethodNotFound = errors.New("method not found")
|
|
|
|
// ErrInvalidParams corresponds to JSON-RPC code -32602.
|
|
|
|
ErrInvalidParams = errors.New("invalid method parameter(s)")
|
|
|
|
// ErrInternal corresponds to JSON-RPC code -32603.
|
|
|
|
ErrInternal = errors.New("internal JSON-RPC error")
|
|
|
|
// ErrServer corresponds to JSON-RPC code -32000.
|
|
|
|
ErrServer = errors.New("client error while processing request")
|
2022-05-20 20:08:00 +00:00
|
|
|
// ErrUnknownPayload corresponds to JSON-RPC code -38001.
|
2022-02-03 03:46:27 +00:00
|
|
|
ErrUnknownPayload = errors.New("payload does not exist or is not available")
|
2022-05-20 20:08:00 +00:00
|
|
|
// ErrInvalidForkchoiceState corresponds to JSON-RPC code -38002.
|
|
|
|
ErrInvalidForkchoiceState = errors.New("invalid forkchoice state")
|
|
|
|
// ErrInvalidPayloadAttributes corresponds to JSON-RPC code -38003.
|
|
|
|
ErrInvalidPayloadAttributes = errors.New("payload attributes are invalid / inconsistent")
|
2022-02-24 19:35:01 +00:00
|
|
|
// ErrUnknownPayloadStatus when the payload status is unknown.
|
|
|
|
ErrUnknownPayloadStatus = errors.New("unknown payload status")
|
|
|
|
// ErrAcceptedSyncingPayloadStatus when the status of the payload is syncing or accepted.
|
|
|
|
ErrAcceptedSyncingPayloadStatus = errors.New("payload status is SYNCING or ACCEPTED")
|
|
|
|
// ErrInvalidPayloadStatus when the status of the payload is invalid.
|
|
|
|
ErrInvalidPayloadStatus = errors.New("payload status is INVALID")
|
2022-07-06 00:22:12 +00:00
|
|
|
// ErrInvalidBlockHashPayloadStatus when the status of the payload fails to validate block hash.
|
|
|
|
ErrInvalidBlockHashPayloadStatus = errors.New("payload status is INVALID_BLOCK_HASH")
|
2022-02-24 19:35:01 +00:00
|
|
|
// ErrNilResponse when the response is nil.
|
|
|
|
ErrNilResponse = errors.New("nil response")
|
2023-03-14 15:52:16 +00:00
|
|
|
// ErrRequestTooLarge when the request is too large
|
|
|
|
ErrRequestTooLarge = errors.New("request too large")
|
2023-07-25 21:57:01 +00:00
|
|
|
// ErrUnsupportedVersion represents a case where a payload is requested for a block type that doesn't have a known mapping.
|
|
|
|
ErrUnsupportedVersion = errors.New("unknown ExecutionPayload schema for block version")
|
2022-02-03 03:46:27 +00:00
|
|
|
)
|