Skip to content

Commit

Permalink
P2P AppRequestFailed protobuf definition (#2111)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
  • Loading branch information
joshua-kim and StephenButtolph committed Oct 30, 2023
1 parent 826f941 commit 5b96789
Show file tree
Hide file tree
Showing 2 changed files with 367 additions and 233 deletions.
16 changes: 15 additions & 1 deletion proto/p2p/p2p.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ message Message {
AppGossip app_gossip = 32;

PeerListAck peer_list_ack = 33;
AppRequestFailed app_request_failed = 34;
}
}

Expand Down Expand Up @@ -385,7 +386,8 @@ message Chits {

// AppRequest is a VM-defined request.
//
// Remote peers must respond to AppRequest with corresponding AppResponse
// Remote peers must respond to AppRequest with a corresponding AppResponse or
// AppRequestFailed
message AppRequest {
// Chain being requested from
bytes chain_id = 1;
Expand All @@ -407,6 +409,18 @@ message AppResponse {
bytes app_bytes = 3;
}

// AppRequestFailed is a VM-defined error sent in response to AppRequest
message AppRequestFailed {
// Chain the message is for
bytes chain_id = 1;
// Request id of the original AppRequest
uint32 request_id = 2;
// VM defined error code
uint32 error_code = 3;
// VM defined error message
string error_message = 4;
}

// AppGossip is a VM-defined message
message AppGossip {
// Chain the message is for
Expand Down

0 comments on commit 5b96789

Please sign in to comment.