-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathabci.proto
173 lines (147 loc) · 5.84 KB
/
abci.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
syntax = "proto3";
package cosmos.base.abci.v1beta1;
import "gogoproto/gogo.proto";
import "cometbft/abci/v1/types.proto";
import "cometbft/types/v1/block.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
option go_package = "github.com/cosmos/cosmos-sdk/types";
option (gogoproto.goproto_stringer_all) = false;
// TxResponse defines a structure containing relevant tx data and metadata. The
// tags are stringified and the log is JSON decoded.
message TxResponse {
option (gogoproto.goproto_getters) = false;
// The block height
int64 height = 1;
// The transaction hash.
string txhash = 2 [(gogoproto.customname) = "TxHash"];
// Namespace for the Code
string codespace = 3;
// Response code.
uint32 code = 4;
// Result bytes, if any.
string data = 5;
// The output of the application's logger (raw string). May be
// non-deterministic.
string raw_log = 6;
// The output of the application's logger (typed). May be non-deterministic.
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false];
// Additional information. May be non-deterministic.
string info = 8;
// Amount of gas requested for transaction.
int64 gas_wanted = 9;
// Amount of gas consumed by transaction.
int64 gas_used = 10;
// The request transaction bytes.
google.protobuf.Any tx = 11;
// Time of the previous block. For heights > 1, it's the weighted median of
// the timestamps of the valid votes in the block.LastCommit. For height == 1,
// it's genesis time.
string timestamp = 12;
// Events defines all the events emitted by processing a transaction. Note,
// these events include those emitted by processing all the messages and those
// emitted from the ante. Whereas Logs contains the events, with
// additional metadata, emitted only by processing the messages.
repeated cometbft.abci.v1.Event events = 13
[(gogoproto.nullable) = false, (cosmos_proto.field_added_in) = "cosmos-sdk 0.45"];
}
// ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
message ABCIMessageLog {
option (gogoproto.stringer) = true;
uint32 msg_index = 1 [(gogoproto.jsontag) = "msg_index"];
string log = 2;
// Events contains a slice of Event objects that were emitted during some
// execution.
repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
}
// StringEvent defines en Event object wrapper where all the attributes
// contain key/value pairs that are strings instead of raw bytes.
message StringEvent {
option (gogoproto.stringer) = true;
string type = 1;
repeated Attribute attributes = 2 [(gogoproto.nullable) = false];
}
// Attribute defines an attribute wrapper where the key and value are
// strings instead of raw bytes.
message Attribute {
string key = 1;
string value = 2;
}
// GasInfo defines tx execution gas context.
message GasInfo {
// GasWanted is the maximum units of work we allow this tx to perform.
uint64 gas_wanted = 1;
// GasUsed is the amount of gas actually consumed.
uint64 gas_used = 2;
}
// Result is the union of ResponseFormat and ResponseCheckTx.
message Result {
option (gogoproto.goproto_getters) = false;
// Data is any data returned from message or handler execution. It MUST be
// length prefixed in order to separate data from multiple message executions.
// Deprecated. This field is still populated, but prefer msg_response instead
// because it also contains the Msg response typeURL.
bytes data = 1 [deprecated = true];
// Log contains the log information from message or handler execution.
string log = 2;
// Events contains a slice of Event objects that were emitted during message
// or handler execution.
repeated cometbft.abci.v1.Event events = 3 [(gogoproto.nullable) = false];
// msg_responses contains the Msg handler responses type packed in Anys.
repeated google.protobuf.Any msg_responses = 4 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.46"];
}
// SimulationResponse defines the response generated when a transaction is
// successfully simulated.
message SimulationResponse {
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
Result result = 2;
}
// MsgData defines the data returned in a Result object during message
// execution.
message MsgData {
option deprecated = true;
option (gogoproto.stringer) = true;
string msg_type = 1;
bytes data = 2;
}
// TxMsgData defines a list of MsgData. A transaction will have a MsgData object
// for each message.
message TxMsgData {
option (gogoproto.stringer) = true;
// data field is deprecated and not populated.
repeated MsgData data = 1 [deprecated = true];
// msg_responses contains the Msg handler responses packed into Anys.
repeated google.protobuf.Any msg_responses = 2 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.46"];
}
// SearchTxsResult defines a structure for querying txs pageable
message SearchTxsResult {
option (gogoproto.stringer) = true;
// Count of all txs
uint64 total_count = 1;
// Count of txs in current page
uint64 count = 2;
// Index of current page, start from 1
uint64 page_number = 3;
// Count of total pages
uint64 page_total = 4;
// Max count txs per page
uint64 limit = 5;
// List of txs in current page
repeated TxResponse txs = 6;
}
// SearchBlocksResult defines a structure for querying blocks pageable
message SearchBlocksResult {
option (gogoproto.stringer) = true;
// Count of all blocks
int64 total_count = 1;
// Count of blocks in current page
int64 count = 2;
// Index of current page, start from 1
int64 page_number = 3;
// Count of total pages
int64 page_total = 4;
// Max count blocks per page
int64 limit = 5;
// List of blocks in current page
repeated cometbft.types.v1.Block blocks = 6;
}