Skip to content

Commit

Permalink
chore(abci)!: remove ExecTxResult.GasWanted (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek authored Feb 20, 2024
1 parent 4679528 commit 67084ca
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 284 deletions.
7 changes: 3 additions & 4 deletions abci/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,9 @@ func (m *ValidatorUpdate) UnmarshalJSON(b []byte) error {
// non-deterministic fields. The input response is not modified.
func deterministicExecTxResult(response *ExecTxResult) *ExecTxResult {
return &ExecTxResult{
Code: response.Code,
Data: response.Data,
GasWanted: response.GasWanted,
GasUsed: response.GasUsed,
Code: response.Code,
Data: response.Data,
GasUsed: response.GasUsed,
}
}

Expand Down
505 changes: 235 additions & 270 deletions abci/types/types.pb.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions abci/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func TestHashDeterministicFieldsOnly(t *testing.T) {
Data: []byte("transaction"),
Log: "nondeterministic data: abc",
Info: "nondeterministic data: abc",
GasWanted: 1000,
GasUsed: 1000,
Events: []abci.Event{},
Codespace: "nondeterministic.data.abc",
Expand All @@ -63,7 +62,6 @@ func TestHashDeterministicFieldsOnly(t *testing.T) {
Data: []byte("transaction"),
Log: "nondeterministic data: def",
Info: "nondeterministic data: def",
GasWanted: 1000,
GasUsed: 1000,
Events: []abci.Event{},
Codespace: "nondeterministic.data.def",
Expand Down
13 changes: 7 additions & 6 deletions proto/tendermint/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -733,12 +733,13 @@ message EventAttribute {

// ExecTxResult contains results of executing one individual transaction.
message ExecTxResult {
uint32 code = 1; // Response code within codespace; by convention, 0 means success.
bytes data = 2; // Result bytes, if any (arbitrary data, not interpreted by Tenderdash).
string log = 3; // The output of the application's logger. May be non-deterministic.
string info = 4; // Additional information. May be non-deterministic.
int64 gas_wanted = 5; // Amount of gas requested for transaction.
int64 gas_used = 6; // Amount of gas consumed by transaction.
uint32 code = 1; // Response code within codespace; by convention, 0 means success.
bytes data = 2; // Result bytes, if any (arbitrary data, not interpreted by Tenderdash).
string log = 3; // The output of the application's logger. May be non-deterministic.
string info = 4; // Additional information. May be non-deterministic.
reserved "gas_wanted";
reserved 5;
int64 gas_used = 6; // Amount of gas consumed by transaction.
// Type & Key-Value events for indexing transactions (e.g. by account).
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
Expand Down
1 change: 0 additions & 1 deletion spec/abci++/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ ExecTxResult contains results of executing one individual transaction.
| data | [bytes](#bytes) | | Result bytes, if any (arbitrary data, not interpreted by Tenderdash). |
| log | [string](#string) | | The output of the application's logger. May be non-deterministic. |
| info | [string](#string) | | Additional information. May be non-deterministic. |
| gas_wanted | [int64](#int64) | | Amount of gas requested for transaction. |
| gas_used | [int64](#int64) | | Amount of gas consumed by transaction. |
| events | [Event](#tendermint-abci-Event) | repeated | Type & Key-Value events for indexing transactions (e.g. by account). |
| codespace | [string](#string) | | Namespace for the code. |
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const (
// when not using git describe. It is formatted with semantic versioning.
TMVersionDefault = "0.14.0-dev.2"
// ABCISemVer is the semantic version of the ABCI library
ABCISemVer = "0.25.0"
ABCISemVer = "0.25.1"

ABCIVersion = ABCISemVer
)
Expand Down

0 comments on commit 67084ca

Please sign in to comment.