-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,240 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {LodestarError} from "@lodestar/utils"; | ||
import {GossipActionError} from "./gossipValidation.js"; | ||
|
||
export enum LightClientErrorCode { | ||
FINALITY_UPDATE_ALREADY_FORWARDED = "FINALITY_UPDATE_ALREADY_FORWARDED", | ||
OPTIMISTIC_UPDATE_ALREADY_FORWARDED = "OPTIMISTIC_UPDATE_ALREADY_FORWARDED", | ||
FINALITY_UPDATE_RECEIVED_TOO_EARLY = "FINALITY_UPDATE_RECEIVED_TOO_EARLY", | ||
OPTIMISTIC_UPDATE_RECEIVED_TOO_EARLY = "OPTIMISTIC_UPDATE_RECEIVED_TOO_EARLY", | ||
FINALITY_UPDATE_NOT_MATCHING_LOCAL = "FINALITY_UPDATE_NOT_MATCHING_LOCAL", | ||
OPTIMISTIC_UPDATE_NOT_MATCHING_LOCAL = "OPTIMISTIC_UPDATE_NOT_MATCHING_LOCAL", | ||
} | ||
export type LightClientErrorType = | ||
| {code: LightClientErrorCode.FINALITY_UPDATE_ALREADY_FORWARDED} | ||
| {code: LightClientErrorCode.OPTIMISTIC_UPDATE_ALREADY_FORWARDED} | ||
| {code: LightClientErrorCode.FINALITY_UPDATE_RECEIVED_TOO_EARLY} | ||
| {code: LightClientErrorCode.OPTIMISTIC_UPDATE_RECEIVED_TOO_EARLY} | ||
| {code: LightClientErrorCode.FINALITY_UPDATE_NOT_MATCHING_LOCAL} | ||
| {code: LightClientErrorCode.OPTIMISTIC_UPDATE_NOT_MATCHING_LOCAL}; | ||
|
||
export class LightClientError extends GossipActionError<LightClientErrorType> {} | ||
|
||
// Errors for the light client server | ||
|
||
export enum LightClientServerErrorCode { | ||
RESOURCE_UNAVAILABLE = "RESOURCE_UNAVALIABLE", | ||
} | ||
|
||
export type LightClientServerErrorType = {code: LightClientServerErrorCode.RESOURCE_UNAVAILABLE}; | ||
|
||
export class LightClientServerError extends LodestarError<LightClientServerErrorType> {} |
Oops, something went wrong.