From 884d4d525299e4d43ab881ac19062501c1e09ddf Mon Sep 17 00:00:00 2001 From: Marko Date: Sun, 7 Mar 2021 11:36:58 +0000 Subject: [PATCH] note: add nondeterministic note to events (#6220) ## 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 --- proto/tendermint/abci/types.proto | 2 +- types/block.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 4e9c2820d..31275c5ee 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -208,7 +208,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; } diff --git a/types/block.go b/types/block.go index bab082dc5..dae8830b7 100644 --- a/types/block.go +++ b/types/block.go @@ -350,6 +350,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