-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit balance change events from the protocol #3141
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3141 +/- ##
==========================================
+ Coverage 59.41% 59.65% +0.24%
==========================================
Files 298 303 +5
Lines 92326 93349 +1023
==========================================
+ Hits 54853 55689 +836
- Misses 37473 37660 +187 ☔ View full report in Codecov by Sentry. |
FWIW, currently slashing does not actually involve any balance changes. The tokens are held in the PoS account and they are kept there, only other voting power-related data is manipulated. In PoS, only bonding and withdrawing involve balance changes. I don't think I know enough about the event emission in general to say whether or not we should still emit events for slashing or if they should strictly be done for balance changes in the context of this PR though. |
@brentstone yeah, slashing events were loosely grouped together with other balance change events in this pr, but they're defined as Proof-of-Stake events, rather than Token events. I think it's still useful to emit them in the protocol, as long as we distinguish them from balance change events. |
my only comment is that we could move each |
406f715
to
50dc3c7
Compare
* origin/tiago/balance-change-events: Changelog for #3141 Fix Multitoken native VP err msg Log which token failed to be minted on IBC native VP Fix unit tests Emit token transfer event from wasm Emit PoS slashing events Add void event sink for testing Proof of stake events Move `token` events to `trans_token` Refactor token events Remove minted supply target Governance refund balance change events Burn IBC tokens and emit events Mint IBC tokens and emit events Remove unused file Implement EmitEvents on state impls Add token minting function Emit PGF payment events Add event level to balance change events Make the token event's post balance optional Extend event with a closure Refactor governace event emission Add more balance change targets Include wrapper tx hash in balance change event Include current height in wrapper fee payment event Emit fee payment balance change events Add token balance change events Negate I256 numbers Convert from Uint to Amount with 0 denom Implement FromStr on I256
Describe your changes
Closes #84
Emits balance change events for the following protocol actions:
Indicate on which release or other PRs this topic is based on
#3102
Diff for review: https://github.com/anoma/namada/compare/tiago/move-events-to-submodules..tiago/balance-change-events (https://github.com/anoma/namada/pull/3141/files/68420a57f251ca8e68ae6960a4a0081e57c16403..406f715b416b069b310410fec20f0ba0cb7c4a06)
Checklist before merging to
draft