Skip to content

[proto] Unnecessery protobuf messages #111

@liran-funaro

Description

@liran-funaro

Some of the protobuf messages can be removed to reduce the number of protobuf messages.
This can improve the API's readability.

For example:

VC

message Tx {
  protocoordinatorservice.TxRef ref = 1;
  repeated protoblocktx.TxNamespace namespaces = 2;
  optional InvalidTxStatus prelim_invalid_tx_status = 3;
}

message InvalidTxStatus {
    protoblocktx.Status code = 1;
}

Can be reduced to:

message Tx {
  protocoordinatorservice.TxRef ref = 1;
  repeated protoblocktx.TxNamespace namespaces = 2;
  optional protoblocktx.Status prelim_invalid_tx_status = 3;
}

Notify

message NotificationResponse {
    repeated TxStatusEvent tx_status_events = 1;
    repeated string timeout_tx_ids = 2;
}

message TxStatusEvent {
    string tx_id = 1;
    protoblocktx.StatusWithHeight status_with_height = 2;
}

Can be reduced to:

message NotificationResponse {
    repeated protoblocktx.TransactionsStatus tx_status_events = 1;
    repeated string timeout_tx_ids = 2;
}

Moreover, protoblocktx.TransactionsStatus and protoblocktx.StatusWithHeight can be removed completely by using protoblocktx.TxStatusInfo.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions