diff --git a/massa-execution-exports/src/mapping_grpc.rs b/massa-execution-exports/src/mapping_grpc.rs index 678a83977e4..7c5456b019d 100644 --- a/massa-execution-exports/src/mapping_grpc.rs +++ b/massa-execution-exports/src/mapping_grpc.rs @@ -7,16 +7,12 @@ impl From for grpc::SlotExecutionOutput { fn from(value: SlotExecutionOutput) -> Self { match value { SlotExecutionOutput::ExecutedSlot(execution_output) => grpc::SlotExecutionOutput { - message: Some(grpc::slot_execution_output::Message::ExecutionOutput( - execution_output.into(), - )), + status: vec![grpc::ExecutionOutputStatus::Candidate as i32], + execution_output: Some(execution_output.into()), }, - SlotExecutionOutput::FinalizedSlot(finalized_slot) => grpc::SlotExecutionOutput { - message: Some(grpc::slot_execution_output::Message::FinalExecutionOutput( - grpc::FinalizedExecutionOutput { - slot: Some(finalized_slot.into()), - }, - )), + SlotExecutionOutput::FinalizedSlot(execution_output) => grpc::SlotExecutionOutput { + status: vec![grpc::ExecutionOutputStatus::Final as i32], + execution_output: Some(execution_output.into()), }, } } diff --git a/massa-execution-exports/src/types.rs b/massa-execution-exports/src/types.rs index 319ae106b4c..3f7c219a0cd 100644 --- a/massa-execution-exports/src/types.rs +++ b/massa-execution-exports/src/types.rs @@ -43,7 +43,7 @@ pub enum SlotExecutionOutput { ExecutedSlot(ExecutionOutput), /// Finalized slot output - FinalizedSlot(Slot), + FinalizedSlot(ExecutionOutput), } /// structure describing the output of a single execution diff --git a/massa-execution-worker/src/execution.rs b/massa-execution-worker/src/execution.rs index df744c34843..56a161f19b5 100644 --- a/massa-execution-worker/src/execution.rs +++ b/massa-execution-worker/src/execution.rs @@ -1263,7 +1263,7 @@ impl ExecutionState { // Broadcast a final slot execution output to active channel subscribers. if self.config.broadcast_enabled { - let slot_exec_out = SlotExecutionOutput::FinalizedSlot(exec_out.slot); + let slot_exec_out = SlotExecutionOutput::FinalizedSlot(exec_out.clone()); if let Err(err) = self .channels .slot_execution_output_sender @@ -1311,7 +1311,7 @@ impl ExecutionState { // Broadcast a final slot execution output to active channel subscribers. if self.config.broadcast_enabled { - let slot_exec_out = SlotExecutionOutput::FinalizedSlot(exec_out.slot); + let slot_exec_out = SlotExecutionOutput::FinalizedSlot(exec_out.clone()); if let Err(err) = self .channels .slot_execution_output_sender diff --git a/massa-grpc/src/stream/new_blocks.rs b/massa-grpc/src/stream/new_blocks.rs index 5817496a3ed..94b50e65027 100644 --- a/massa-grpc/src/stream/new_blocks.rs +++ b/massa-grpc/src/stream/new_blocks.rs @@ -50,7 +50,7 @@ pub(crate) async fn new_blocks( break; } }, - Err(e) => {error!("error on receive new block : {}", e)} + Err(e) => error!("error on receive new block : {}", e) } }, // Receive a new message from the in_stream diff --git a/massa-grpc/src/stream/new_blocks_headers.rs b/massa-grpc/src/stream/new_blocks_headers.rs index f9edaa10e7e..88131a3216f 100644 --- a/massa-grpc/src/stream/new_blocks_headers.rs +++ b/massa-grpc/src/stream/new_blocks_headers.rs @@ -50,7 +50,7 @@ pub(crate) async fn new_blocks_headers( break; } }, - Err(e) => {error!("error on receive new block header : {}", e)} + Err(e) => error!("error on receive new block header : {}", e) } }, // Receive a new message from the in_stream diff --git a/massa-grpc/src/stream/new_endorsements.rs b/massa-grpc/src/stream/new_endorsements.rs index 2b63b9254ab..d81a5d2be40 100644 --- a/massa-grpc/src/stream/new_endorsements.rs +++ b/massa-grpc/src/stream/new_endorsements.rs @@ -50,7 +50,7 @@ pub(crate) async fn new_endorsements( break; } }, - Err(e) => {error!("error on receive new endorsement : {}", e)} + Err(e) => error!("error on receive new endorsement : {}", e) } }, // Receive a new message from the in_stream diff --git a/massa-grpc/src/stream/new_filled_blocks.rs b/massa-grpc/src/stream/new_filled_blocks.rs index a475d36cce2..e762cd8f7a3 100644 --- a/massa-grpc/src/stream/new_filled_blocks.rs +++ b/massa-grpc/src/stream/new_filled_blocks.rs @@ -50,7 +50,7 @@ pub(crate) async fn new_filled_blocks( break; } }, - Err(e) => {error!("error on receive new block : {}", e)} + Err(e) => error!("error on receive new block : {}", e) } }, // Receive a new message from the in_stream diff --git a/massa-grpc/src/stream/new_operations.rs b/massa-grpc/src/stream/new_operations.rs index 3633b773a61..18f9187440d 100644 --- a/massa-grpc/src/stream/new_operations.rs +++ b/massa-grpc/src/stream/new_operations.rs @@ -102,17 +102,17 @@ pub(crate) async fn new_operations( Ok(Box::pin(out_stream) as NewOperationsStreamType) } -/// Return if the type of operation should be send to client fn should_send(filter_opt: &Option, ope_type: grpc::OpType) -> bool { - if let Some(filter) = filter_opt { - let filtered_ope_ids = &filter.types; - if filtered_ope_ids.is_empty() { - return true; + match filter_opt { + Some(filter) => { + let filtered_ope_ids = &filter.types; + if filtered_ope_ids.is_empty() { + true + } else { + let id: i32 = ope_type as i32; + filtered_ope_ids.contains(&id) + } } - let id: i32 = ope_type as i32; - filtered_ope_ids.contains(&id) - } else { - // if user has no filter = All operations type is send - true + None => true, // if user has no filter = All operations type is send } } diff --git a/massa-grpc/src/stream/new_slot_execution_outputs.rs b/massa-grpc/src/stream/new_slot_execution_outputs.rs index 49a72127a8d..fd3ed0c816d 100644 --- a/massa-grpc/src/stream/new_slot_execution_outputs.rs +++ b/massa-grpc/src/stream/new_slot_execution_outputs.rs @@ -3,6 +3,7 @@ use crate::error::{match_for_io_error, GrpcError}; use crate::server::MassaGrpc; use futures_util::StreamExt; +use massa_execution_exports::SlotExecutionOutput; use massa_proto::massa::api::v1 as grpc; use std::io::ErrorKind; use std::pin::Pin; @@ -38,60 +39,72 @@ pub(crate) async fn new_slot_execution_outputs( tokio::spawn(async move { // Initialize the request_id string - let mut request_id = String::new(); - loop { - select! { - // Receive a new slot execution output from the subscriber - event = subscriber.recv() => { - match event { - Ok(massa_slot_execution_output) => { - // Send the new slot execution output through the channel - if let Err(e) = tx.send(Ok(grpc::NewSlotExecutionOutputsResponse { - id: request_id.clone(), - output: Some(massa_slot_execution_output.into()) - })).await { - error!("failed to send new slot execution output : {}", e); - break; - } - }, + if let Some(Ok(request)) = in_stream.next().await { + let mut request_id = request.id; + let mut filter = request.query.and_then(|q| q.filter); + loop { + select! { + // Receive a new slot execution output from the subscriber + event = subscriber.recv() => { + match event { + Ok(massa_slot_execution_output) => { + // Check if the slot execution output should be sent + if !should_send(&filter, &massa_slot_execution_output) { + continue; + } + // Send the new slot execution output through the channel + if let Err(e) = tx.send(Ok(grpc::NewSlotExecutionOutputsResponse { + id: request_id.clone(), + output: Some(massa_slot_execution_output.into()) + })).await { + error!("failed to send new slot execution output : {}", e); + break; + } + }, - Err(e) => {error!("error on receive new slot execution output : {}", e)} - } - }, - // Receive a new message from the in_stream - res = in_stream.next() => { - match res { - Some(res) => { - match res { - // Get the request_id from the received data - Ok(data) => { - request_id = data.id - }, - // Handle any errors that may occur during receiving the data - Err(err) => { - // Check if the error matches any IO errors - if let Some(io_err) = match_for_io_error(&err) { - if io_err.kind() == ErrorKind::BrokenPipe { - warn!("client disconnected, broken pipe: {}", io_err); + Err(e) => error!("error on receive new slot execution output : {}", e) + } + }, + // Receive a new message from the in_stream + res = in_stream.next() => { + match res { + Some(res) => { + match res { + // Get the request_id from the received data + Ok(data) => { + // Update current filter && request id + filter = data.query + .and_then(|q| q.filter); + request_id = data.id + }, + // Handle any errors that may occur during receiving the data + Err(err) => { + // Check if the error matches any IO errors + if let Some(io_err) = match_for_io_error(&err) { + if io_err.kind() == ErrorKind::BrokenPipe { + warn!("client disconnected, broken pipe: {}", io_err); + break; + } + } + error!("{}", err); + // Send the error response back to the client + if let Err(e) = tx.send(Err(err)).await { + error!("failed to send back new_slot_execution_outputs error response: {}", e); break; } } - error!("{}", err); - // Send the error response back to the client - if let Err(e) = tx.send(Err(err)).await { - error!("failed to send back new_slot_execution_outputs error response: {}", e); - break; - } } - } - }, - None => { - // The client has disconnected - break; - }, + }, + None => { + // The client has disconnected + break; + }, + } } } } + } else { + error!("empty request"); } }); @@ -101,3 +114,23 @@ pub(crate) async fn new_slot_execution_outputs( // Return the new stream of slot execution output Ok(Box::pin(out_stream) as NewSlotExecutionOutputsStreamType) } + +/// Return if the execution outputs should be send to client +fn should_send( + filter_opt: &Option, + exec_out_status: &SlotExecutionOutput, +) -> bool { + match filter_opt { + Some(filter) => match exec_out_status { + SlotExecutionOutput::ExecutedSlot(_) => { + let id = grpc::ExecutionOutputStatus::Candidate as i32; + filter.status.contains(&id) + } + SlotExecutionOutput::FinalizedSlot(_) => { + let id = grpc::ExecutionOutputStatus::Final as i32; + filter.status.contains(&id) + } + }, + None => true, // if user has no filter = All execution outputs status are sent + } +} diff --git a/massa-proto/doc/api.md b/massa-proto/doc/api.md index 597d02f9ed4..83b33db71c1 100644 --- a/massa-proto/doc/api.md +++ b/massa-proto/doc/api.md @@ -54,6 +54,8 @@ - [NewOperationsQuery](#massa-api-v1-NewOperationsQuery) - [NewOperationsRequest](#massa-api-v1-NewOperationsRequest) - [NewOperationsResponse](#massa-api-v1-NewOperationsResponse) + - [NewSlotExecutionOutputsFilter](#massa-api-v1-NewSlotExecutionOutputsFilter) + - [NewSlotExecutionOutputsQuery](#massa-api-v1-NewSlotExecutionOutputsQuery) - [NewSlotExecutionOutputsRequest](#massa-api-v1-NewSlotExecutionOutputsRequest) - [NewSlotExecutionOutputsResponse](#massa-api-v1-NewSlotExecutionOutputsResponse) - [OperationResult](#massa-api-v1-OperationResult) @@ -100,8 +102,8 @@ - [ScExecutionEventContext](#massa-api-v1-ScExecutionEventContext) - [SlotExecutionOutput](#massa-api-v1-SlotExecutionOutput) + - [ExecutionOutputStatus](#massa-api-v1-ExecutionOutputStatus) - [ScExecutionEventStatus](#massa-api-v1-ScExecutionEventStatus) - - [ScExecutionOutputStatus](#massa-api-v1-ScExecutionOutputStatus) - [operation.proto](#operation-proto) - [CallSC](#massa-api-v1-CallSC) @@ -920,6 +922,36 @@ NewOperationsResponse holds response from NewOperations + + +### NewSlotExecutionOutputsFilter +NewSlotExecutionOutputs Filter + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| status | [ExecutionOutputStatus](#massa-api-v1-ExecutionOutputStatus) | repeated | Execution output status enum | + + + + + + + + +### NewSlotExecutionOutputsQuery +NewSlotExecutionOutputs Query + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| filter | [NewSlotExecutionOutputsFilter](#massa-api-v1-NewSlotExecutionOutputsFilter) | | Filter | + + + + + + ### NewSlotExecutionOutputsRequest @@ -929,6 +961,7 @@ NewSlotExecutionOutputsRequest holds request for NewSlotExecutionOutputs | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | Request id | +| query | [NewSlotExecutionOutputsQuery](#massa-api-v1-NewSlotExecutionOutputsQuery) | | Query | @@ -1552,8 +1585,8 @@ SlotExecutionOutput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| status | [ExecutionOutputStatus](#massa-api-v1-ExecutionOutputStatus) | repeated | Status | | execution_output | [ExecutionOutput](#massa-api-v1-ExecutionOutput) | | Executed slot output | -| final_execution_output | [FinalizedExecutionOutput](#massa-api-v1-FinalizedExecutionOutput) | | Executed final slot | @@ -1562,30 +1595,30 @@ SlotExecutionOutput - + -### ScExecutionEventStatus -ScExecutionEventStatus type enum +### ExecutionOutputStatus +ExecutionOutputStatus type enum | Name | Number | Description | | ---- | ------ | ----------- | -| SC_EXECUTION_EVENT_STATUS_UNSPECIFIED | 0 | Defaut enum value | -| SC_EXECUTION_EVENT_STATUS_FINAL | 1 | Final status | -| SC_EXECUTION_EVENT_STATUS_READ_ONLY | 2 | Read only status | -| SC_EXECUTION_EVENT_STATUS_FAILURE | 3 | Failure status | +| EXECUTION_OUTPUT_STATUS_UNSPECIFIED | 0 | Defaut enum value | +| EXECUTION_OUTPUT_STATUS_CANDIDATE | 1 | Candidate status | +| EXECUTION_OUTPUT_STATUS_FINAL | 2 | Final status | - + -### ScExecutionOutputStatus -ScExecutionOutputStatus type enum +### ScExecutionEventStatus +ScExecutionEventStatus type enum | Name | Number | Description | | ---- | ------ | ----------- | -| SC_EXECUTION_OUTPUT_STATUS_UNSPECIFIED | 0 | Defaut enum value | -| SC_EXECUTION_OUTPUT_STATUS_FINAL | 1 | Final status | -| SC_EXECUTION_OUTPUT_STATUS_CANDIDATE | 2 | Read only status | +| SC_EXECUTION_EVENT_STATUS_UNSPECIFIED | 0 | Defaut enum value | +| SC_EXECUTION_EVENT_STATUS_FINAL | 1 | Final status | +| SC_EXECUTION_EVENT_STATUS_READ_ONLY | 2 | Read only status | +| SC_EXECUTION_EVENT_STATUS_FAILURE | 3 | Failure status | diff --git a/massa-proto/doc/index.html b/massa-proto/doc/index.html index a45e18af3e7..17a5e30d5aa 100644 --- a/massa-proto/doc/index.html +++ b/massa-proto/doc/index.html @@ -378,6 +378,14 @@

Table of Contents

MNewOperationsResponse +
  • + MNewSlotExecutionOutputsFilter +
  • + +
  • + MNewSlotExecutionOutputsQuery +
  • +
  • MNewSlotExecutionOutputsRequest
  • @@ -560,11 +568,11 @@

    Table of Contents

  • - EScExecutionEventStatus + EExecutionOutputStatus
  • - EScExecutionOutputStatus + EScExecutionEventStatus
  • @@ -2127,6 +2135,54 @@

    NewOperationsResponse

    +

    NewSlotExecutionOutputsFilter

    +

    NewSlotExecutionOutputs Filter

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    statusExecutionOutputStatusrepeated

    Execution output status enum

    + + + + + +

    NewSlotExecutionOutputsQuery

    +

    NewSlotExecutionOutputs Query

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    filterNewSlotExecutionOutputsFilter

    Filter

    + + + + +

    NewSlotExecutionOutputsRequest

    NewSlotExecutionOutputsRequest holds request for NewSlotExecutionOutputs

    @@ -2144,6 +2200,13 @@

    NewSlotExecutionOutputsRequ

    Request id

    + + query + NewSlotExecutionOutputsQuery + +

    Query

    + + @@ -3623,17 +3686,17 @@

    SlotExecutionOutput

    - execution_output - ExecutionOutput - -

    Executed slot output

    + status + ExecutionOutputStatus + repeated +

    Status

    - final_execution_output - FinalizedExecutionOutput + execution_output + ExecutionOutput -

    Executed final slot

    +

    Executed slot output

    @@ -3645,8 +3708,8 @@

    SlotExecutionOutput

    -

    ScExecutionEventStatus

    -

    ScExecutionEventStatus type enum

    +

    ExecutionOutputStatus

    +

    ExecutionOutputStatus type enum

    @@ -3654,34 +3717,28 @@

    ScExecutionEventStatus

    - + - + - + - + - - - - - - - +
    NameNumberDescription
    SC_EXECUTION_EVENT_STATUS_UNSPECIFIEDEXECUTION_OUTPUT_STATUS_UNSPECIFIED 0

    Defaut enum value

    SC_EXECUTION_EVENT_STATUS_FINALEXECUTION_OUTPUT_STATUS_CANDIDATE 1

    Final status

    Candidate status

    SC_EXECUTION_EVENT_STATUS_READ_ONLYEXECUTION_OUTPUT_STATUS_FINAL 2

    Read only status

    SC_EXECUTION_EVENT_STATUS_FAILURE3

    Failure status

    Final status

    -

    ScExecutionOutputStatus

    -

    ScExecutionOutputStatus type enum

    +

    ScExecutionEventStatus

    +

    ScExecutionEventStatus type enum

    @@ -3689,23 +3746,29 @@

    ScExecutionOutputStatus

    - + - + - + + + + + + +
    NameNumberDescription
    SC_EXECUTION_OUTPUT_STATUS_UNSPECIFIEDSC_EXECUTION_EVENT_STATUS_UNSPECIFIED 0

    Defaut enum value

    SC_EXECUTION_OUTPUT_STATUS_FINALSC_EXECUTION_EVENT_STATUS_FINAL 1

    Final status

    SC_EXECUTION_OUTPUT_STATUS_CANDIDATESC_EXECUTION_EVENT_STATUS_READ_ONLY 2

    Read only status

    SC_EXECUTION_EVENT_STATUS_FAILURE3

    Failure status

    diff --git a/massa-proto/proto/massa/api/v1/api.proto b/massa-proto/proto/massa/api/v1/api.proto index 9715c5f5504..99dcd13edcc 100644 --- a/massa-proto/proto/massa/api/v1/api.proto +++ b/massa-proto/proto/massa/api/v1/api.proto @@ -540,6 +540,20 @@ message NewOperationsResponse { message NewSlotExecutionOutputsRequest { // Request id string id = 1; + // Query + NewSlotExecutionOutputsQuery query = 2; +} + +// NewSlotExecutionOutputs Query +message NewSlotExecutionOutputsQuery { + // Filter + NewSlotExecutionOutputsFilter filter = 1; +} + +// NewSlotExecutionOutputs Filter +message NewSlotExecutionOutputsFilter { + // Execution output status enum + repeated ExecutionOutputStatus status = 1; } // NewSlotExecutionOutputsResponse holds response from NewSlotExecutionOutputs diff --git a/massa-proto/proto/massa/api/v1/execution.proto b/massa-proto/proto/massa/api/v1/execution.proto index 710564b3426..92ad5109418 100644 --- a/massa-proto/proto/massa/api/v1/execution.proto +++ b/massa-proto/proto/massa/api/v1/execution.proto @@ -17,13 +17,10 @@ option swift_prefix = "GRPC"; // SlotExecutionOutput message SlotExecutionOutput { - // ExecutionOutput or FinalizedExecutionOutput - oneof message { - // Executed slot output - ExecutionOutput execution_output = 1; - // Executed final slot - FinalizedExecutionOutput final_execution_output = 2; - } + // Status + repeated ExecutionOutputStatus status = 1; + // Executed slot output + ExecutionOutput execution_output = 2; } // FinalizedExecutionOutput @@ -76,9 +73,10 @@ enum ScExecutionEventStatus { SC_EXECUTION_EVENT_STATUS_FAILURE = 3; // Failure status } -// ScExecutionOutputStatus type enum -enum ScExecutionOutputStatus { - SC_EXECUTION_OUTPUT_STATUS_UNSPECIFIED = 0; // Defaut enum value - SC_EXECUTION_OUTPUT_STATUS_FINAL = 1; // Final status - SC_EXECUTION_OUTPUT_STATUS_CANDIDATE = 2; // Read only status -} \ No newline at end of file +// ExecutionOutputStatus type enum +enum ExecutionOutputStatus { + EXECUTION_OUTPUT_STATUS_UNSPECIFIED = 0; // Defaut enum value + EXECUTION_OUTPUT_STATUS_CANDIDATE = 1; // Candidate status + EXECUTION_OUTPUT_STATUS_FINAL = 2; // Final status +} + \ No newline at end of file diff --git a/massa-proto/src/api.bin b/massa-proto/src/api.bin index dc778aaac3d..116d0fef918 100644 Binary files a/massa-proto/src/api.bin and b/massa-proto/src/api.bin differ diff --git a/massa-proto/src/massa.api.v1.rs b/massa-proto/src/massa.api.v1.rs index cf241d34174..d26f95c697e 100644 --- a/massa-proto/src/massa.api.v1.rs +++ b/massa-proto/src/massa.api.v1.rs @@ -418,23 +418,12 @@ impl BlockStatus { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlotExecutionOutput { - /// ExecutionOutput or FinalizedExecutionOutput - #[prost(oneof = "slot_execution_output::Message", tags = "1, 2")] - pub message: ::core::option::Option, -} -/// Nested message and enum types in `SlotExecutionOutput`. -pub mod slot_execution_output { - /// ExecutionOutput or FinalizedExecutionOutput - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Message { - /// Executed slot output - #[prost(message, tag = "1")] - ExecutionOutput(super::ExecutionOutput), - /// Executed final slot - #[prost(message, tag = "2")] - FinalExecutionOutput(super::FinalizedExecutionOutput), - } + /// Status + #[prost(enumeration = "ExecutionOutputStatus", repeated, tag = "1")] + pub status: ::prost::alloc::vec::Vec, + /// Executed slot output + #[prost(message, optional, tag = "2")] + pub execution_output: ::core::option::Option, } /// FinalizedExecutionOutput #[allow(clippy::derive_partial_eq_without_eq)] @@ -534,37 +523,35 @@ impl ScExecutionEventStatus { } } } -/// ScExecutionOutputStatus type enum +/// ExecutionOutputStatus type enum #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] -pub enum ScExecutionOutputStatus { +pub enum ExecutionOutputStatus { /// Defaut enum value Unspecified = 0, + /// Candidate status + Candidate = 1, /// Final status - Final = 1, - /// Read only status - Candidate = 2, + Final = 2, } -impl ScExecutionOutputStatus { +impl ExecutionOutputStatus { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ScExecutionOutputStatus::Unspecified => { - "SC_EXECUTION_OUTPUT_STATUS_UNSPECIFIED" - } - ScExecutionOutputStatus::Final => "SC_EXECUTION_OUTPUT_STATUS_FINAL", - ScExecutionOutputStatus::Candidate => "SC_EXECUTION_OUTPUT_STATUS_CANDIDATE", + ExecutionOutputStatus::Unspecified => "EXECUTION_OUTPUT_STATUS_UNSPECIFIED", + ExecutionOutputStatus::Candidate => "EXECUTION_OUTPUT_STATUS_CANDIDATE", + ExecutionOutputStatus::Final => "EXECUTION_OUTPUT_STATUS_FINAL", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { - "SC_EXECUTION_OUTPUT_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "SC_EXECUTION_OUTPUT_STATUS_FINAL" => Some(Self::Final), - "SC_EXECUTION_OUTPUT_STATUS_CANDIDATE" => Some(Self::Candidate), + "EXECUTION_OUTPUT_STATUS_UNSPECIFIED" => Some(Self::Unspecified), + "EXECUTION_OUTPUT_STATUS_CANDIDATE" => Some(Self::Candidate), + "EXECUTION_OUTPUT_STATUS_FINAL" => Some(Self::Final), _ => None, } } @@ -1114,6 +1101,25 @@ pub struct NewSlotExecutionOutputsRequest { /// Request id #[prost(string, tag = "1")] pub id: ::prost::alloc::string::String, + /// Query + #[prost(message, optional, tag = "2")] + pub query: ::core::option::Option, +} +/// NewSlotExecutionOutputs Query +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NewSlotExecutionOutputsQuery { + /// Filter + #[prost(message, optional, tag = "1")] + pub filter: ::core::option::Option, +} +/// NewSlotExecutionOutputs Filter +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NewSlotExecutionOutputsFilter { + /// Execution output status enum + #[prost(enumeration = "ExecutionOutputStatus", repeated, tag = "1")] + pub status: ::prost::alloc::vec::Vec, } /// NewSlotExecutionOutputsResponse holds response from NewSlotExecutionOutputs #[allow(clippy::derive_partial_eq_without_eq)]