-
-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: offline error message when node is shutting down #5797
Changes from 9 commits
52c65a2
f0bf76b
597ccea
68ac9a3
a3b46ee
3b0245e
08420f6
9ade9c4
2ad9173
f77c8d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import {ExecutionPayloadBody} from "./types.js"; | |
|
||
export {PayloadIdCache, PayloadId, WithdrawalV1}; | ||
|
||
export enum ExecutePayloadStatus { | ||
export enum ExecutionPayloadStatus { | ||
/** given payload is valid */ | ||
VALID = "VALID", | ||
/** given payload is invalid */ | ||
|
@@ -30,7 +30,7 @@ export enum ExecutePayloadStatus { | |
UNSAFE_OPTIMISTIC_STATUS = "UNSAFE_OPTIMISTIC_STATUS", | ||
} | ||
|
||
export enum ExecutionEngineState { | ||
export enum ExecutionState { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i am thinking if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I use |
||
ONLINE = "ONLINE", | ||
OFFLINE = "OFFLINE", | ||
SYNCING = "SYNCING", | ||
|
@@ -39,19 +39,26 @@ export enum ExecutionEngineState { | |
} | ||
|
||
export type ExecutePayloadResponse = | ||
| {status: ExecutePayloadStatus.SYNCING | ExecutePayloadStatus.ACCEPTED; latestValidHash: null; validationError: null} | ||
| {status: ExecutePayloadStatus.VALID; latestValidHash: RootHex; validationError: null} | ||
| {status: ExecutePayloadStatus.INVALID; latestValidHash: RootHex | null; validationError: string | null} | ||
| { | ||
status: ExecutePayloadStatus.INVALID_BLOCK_HASH | ExecutePayloadStatus.ELERROR | ExecutePayloadStatus.UNAVAILABLE; | ||
status: ExecutionPayloadStatus.SYNCING | ExecutionPayloadStatus.ACCEPTED; | ||
latestValidHash: null; | ||
validationError: null; | ||
} | ||
| {status: ExecutionPayloadStatus.VALID; latestValidHash: RootHex; validationError: null} | ||
| {status: ExecutionPayloadStatus.INVALID; latestValidHash: RootHex | null; validationError: string | null} | ||
| { | ||
status: | ||
| ExecutionPayloadStatus.INVALID_BLOCK_HASH | ||
| ExecutionPayloadStatus.ELERROR | ||
| ExecutionPayloadStatus.UNAVAILABLE; | ||
latestValidHash: null; | ||
validationError: string; | ||
}; | ||
|
||
export type ForkChoiceUpdateStatus = | ||
| ExecutePayloadStatus.VALID | ||
| ExecutePayloadStatus.INVALID | ||
| ExecutePayloadStatus.SYNCING; | ||
| ExecutionPayloadStatus.VALID | ||
| ExecutionPayloadStatus.INVALID | ||
| ExecutionPayloadStatus.SYNCING; | ||
|
||
export type PayloadAttributes = { | ||
timestamp: number; | ||
|
@@ -141,5 +148,5 @@ export interface IExecutionEngine { | |
|
||
getPayloadBodiesByRange(start: number, count: number): Promise<(ExecutionPayloadBody | null)[]>; | ||
|
||
getState(): ExecutionEngineState; | ||
getState(): ExecutionState; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this error handling is required upstream in processBlocks (as well as to not downgrade the peer in case of UNAVAILABLE)