We can adopt a more flexible and performant event model by using cosmossdk.io/schema/appdata events in core/app and code which implements that API.
Problem Definition
The event model in core/app simply replicates the key-value Comet/Tendermint event model that we have had for years. While some users may be totally satisfied with this model, many are not as evidenced by ADR 032 which came from representatives three important organizations in the ecosystem.
The major blockers in adopting the resulting typed events more widely were:
the implementation pushed JSON marshaling into the state machine layer which was a performance layer
the mapping of protobuf JSON to Comet key-value pairs was a bit awkward (it quotes strings for instance)
We have even heard that some users would like the SDK to manage its own events and not send any events to Comet at all.
Proposed Feature
The event model in cosmossdk.io/schema introduces an alternative which allows:
a native JSON event model and storage that would allow users to stop using Comet's events altogether
We could adopt it in core/app and consequently STF and AppManager and then implementors can choose whether they render events as key-value pairs, JSON, or skip rendering events at all depending on their performance and UX needs.
Summary
We can adopt a more flexible and performant event model by using
cosmossdk.io/schema/appdata
events incore/app
and code which implements that API.Problem Definition
The event model in
core/app
simply replicates the key-value Comet/Tendermint event model that we have had for years. While some users may be totally satisfied with this model, many are not as evidenced by ADR 032 which came from representatives three important organizations in the ecosystem.The major blockers in adopting the resulting typed events more widely were:
We have even heard that some users would like the SDK to manage its own events and not send any events to Comet at all.
Proposed Feature
The event model in
cosmossdk.io/schema
introduces an alternative which allows:We could adopt it in
core/app
and consequentlySTF
andAppManager
and then implementors can choose whether they render events as key-value pairs, JSON, or skip rendering events at all depending on their performance and UX needs.