-
Notifications
You must be signed in to change notification settings - Fork 326
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
12 changed files
with
322 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use ic_interfaces_state_manager::StateManagerError; | ||
use ic_protobuf::proxy::ProxyDecodeError; | ||
use ic_types::{ | ||
batch::VetKdAgreement, messages::CallbackId, registry::RegistryClientError, Height, | ||
}; | ||
|
||
#[derive(Debug)] | ||
pub enum InvalidVetKdPayloadReason { | ||
/// The feature is not enabled | ||
Disabled, | ||
/// The payload could not be deserialized | ||
DeserializationFailed(ProxyDecodeError), | ||
/// The payload contained a response that was already delivered | ||
DuplicateResponse(CallbackId), | ||
/// The payload contained a response that wasn't requested | ||
MissingContext(CallbackId), | ||
/// The payload contained a response for an IDkg context | ||
IDkgContext(CallbackId), | ||
/// A response was rejected for the wrong reason | ||
MismatchedReject { | ||
expected: Option<VetKdAgreement>, | ||
received: Option<VetKdAgreement>, | ||
}, | ||
/// A success response couldn't be decoded | ||
DecodingError(String), | ||
} | ||
|
||
#[derive(Debug)] | ||
pub enum VetKdPayloadValidationFailure { | ||
/// The state was not available for a height | ||
StateUnavailable(StateManagerError), | ||
/// The registry version was not available for a height | ||
RegistryVersionUnavailable(Height), | ||
/// The registry client returned an error | ||
RegistryClientError(RegistryClientError), | ||
} |
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
Oops, something went wrong.