You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

  1. # ADR 012: ABCI Events
  2. ## Changelog
  3. - *2018-09-02* Remove ABCI errors component. Update description for events
  4. - *2018-07-12* Initial version
  5. ## Context
  6. ABCI tags were first described in [ADR 002](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-002-event-subscription.md).
  7. They are key-value pairs that can be used to index transactions.
  8. Currently, ABCI messages return a list of tags to describe an
  9. "event" that took place during the Check/DeliverTx/Begin/EndBlock,
  10. where each tag refers to a different property of the event, like the sending and receiving account addresses.
  11. Since there is only one list of tags, recording data for multiple such events in
  12. a single Check/DeliverTx/Begin/EndBlock must be done using prefixes in the key
  13. space.
  14. Alternatively, groups of tags that constitute an event can be separated by a
  15. special tag that denotes a break between the events. This would allow
  16. straightforward encoding of multiple events into a single list of tags without
  17. prefixing, at the cost of these "special" tags to separate the different events.
  18. TODO: brief description of how the indexing works
  19. ## Decision
  20. Instead of returning a list of tags, return a list of events, where
  21. each event is a list of tags. This way we naturally capture the concept of
  22. multiple events happening during a single ABCI message.
  23. TODO: describe impact on indexing and querying
  24. ## Status
  25. Proposed
  26. ## Consequences
  27. ### Positive
  28. - Ability to track distinct events separate from ABCI calls (DeliverTx/BeginBlock/EndBlock)
  29. - More powerful query abilities
  30. ### Negative
  31. - More complex query syntax
  32. - More complex search implementation
  33. ### Neutral