Skip to content

Commit

Permalink
note: add nondeterministic note to events (#6220) (#6225)
Browse files Browse the repository at this point in the history
## Description

Since events are not hashed into the header they can be non deterministic. Changing an event is not consensus breaking. Will update docs in the spec

(cherry picked from commit 884d4d5)

Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
mergify[bot] and tac0turtle authored Mar 9, 2021
1 parent 8bb8585 commit 11523b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion proto/tendermint/abci/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ message ResponseDeliverTx {
int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
string codespace = 8;
}

Expand Down
1 change: 1 addition & 0 deletions types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ type Header struct {
ConsensusHash tmbytes.HexBytes `json:"consensus_hash"` // consensus params for current block
AppHash tmbytes.HexBytes `json:"app_hash"` // state after txs from the previous block
// root hash of all results from the txs from the previous block
// see `deterministicResponseDeliverTx` to understand which parts of a tx is hashed into here
LastResultsHash tmbytes.HexBytes `json:"last_results_hash"`

// consensus info
Expand Down

0 comments on commit 11523b1

Please sign in to comment.