cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.2k stars 3.58k forks source link

[Feature]: Consider using schema/appdata event model in core/app #21312

Open aaronc opened 1 month ago

aaronc commented 1 month ago

Summary

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:

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 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.

julienrbrt commented 4 days ago

Re-opening as it hasn't been implemented in stf yet.