-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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.