Merge PR #4541: Events Tracking / Tendermint v0.32.0 Update

* Update Tendermint to v0.32.0-dev0

* Initial refactor of tags

* Update event types and add unit tests

* Refactor context

* Update module manager

* Update result godoc

* Implement ToABCIEvents

* Update BaseApp

* Minor cleanup

* Fix typo

* Update x/bank message handler

* Update x/bank keeper

* Update x/bank

* Update x/bank events docs

* Update x/crisis module events

* Reset context with events on each message exec

* Update x/distribution events and docs

* Update BaseApp to not set empty events manually

* Implement simple event manager

* Update module manager

* Update modules to use event manager

* Update x/gov module to use events

* Update events docs

* Update gov queries and crisis app module

* Update bank keeper

* Add events to minting begin blocker

* Update modules to use types/events.go

* Cleanup x/mint

* Update x/staking events

* Update x/staking events

* Update events to have sender part of message.sender

* Fix build

* Fix module unit tests

* Add pending log entry

* Update deps

* Update x/crisis/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/bank/internal/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/distribution/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/mint/internal/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/slashing/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/staking/types/events.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/gov/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/gov/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/mint/abci.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/mint/abci.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/slashing/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/staking/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/slashing/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/staking/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/staking/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update x/staking/handler.go

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Upgrade TM to v0.32.0-dev1

* Update events as strings

* Update Tendermint to v0.32.0-dev2

* Fix BaseApp unit tests

* Fix unit tests

* Bump tendermint version to v0.32.0

* typos
This commit is contained in:
Alexander Bezobchuk
2019-06-26 18:03:25 +02:00
committed by frog power 4000
co-authored by Federico Kunze
parent 3950017bd9
commit 67f6b02118
89 changed files with 1301 additions and 967 deletions
+23
View File
@@ -0,0 +1,23 @@
# Events
The bank module emits the following events:
## Handlers
### MsgSend
| Type | Attribute Key | Attribute Value |
|----------|---------------|--------------------|
| transfer | recipient | {recipientAddress} |
| message | module | bank |
| message | action | send |
| message | sender | {senderAddress} |
### MsgMultiSend
| Type | Attribute Key | Attribute Value |
|----------|---------------|--------------------|
| transfer | recipient | {recipientAddress} |
| message | module | bank |
| message | action | multisend |
| message | sender | {senderAddress} |
-23
View File
@@ -1,23 +0,0 @@
# Tags
The bank module emits the following events/tags:
## Handlers
### MsgSend
| Key | Value |
|-------------|---------------------------|
| `action` | `send` |
| `category` | `bank` |
| `sender` | {senderAccountAddress} |
| `recipient` | {recipientAccountAddress} |
### MsgMultiSend
| Key | Value |
|-------------|---------------------------|
| `action` | `multisend` |
| `category` | `bank` |
| `sender` | {senderAccountAddress} |
| `recipient` | {recipientAccountAddress} |
+2 -2
View File
@@ -22,6 +22,6 @@ This module will be used in the Cosmos Hub.
- [ViewKeeper](02_keepers.md#viewkeeper)
3. **[Messages](03_messages.md)**
- [MsgSend](03_messages.md#msgsend)
4. **[Tags](04_tags.md)**
- [Handlers](04_tags.md#handlers)
4. **[Events](04_events.md)**
- [Handlers](04_events.md#handlers)
5. **[Parameters](05_params.md)**
+14
View File
@@ -0,0 +1,14 @@
# Events
The crisis module emits the following events:
## Handlers
### MsgVerifyInvariance
| Type | Attribute Key | Attribute Value |
|-----------|---------------|------------------|
| invariant | route | {invariantRoute} |
| message | module | crisis |
| message | action | verify_invariant |
| message | sender | {senderAddress} |
-14
View File
@@ -1,14 +0,0 @@
# Tags
The crisis module emits the following events/tags:
## Handlers
### MsgVerifyInvariance
| Key | Value |
|-------------|--------------------|
| `action` | `verify_invariant` |
| `category` | `crisis` |
| `sender` | {message-sender} |
| `invariant` | {invariant-route} |
+2 -2
View File
@@ -12,6 +12,6 @@ application initialization process.
- [ConstantFee](01_state.md#constantfee)
2. **[Messages](02_messages.md)**
- [MsgVerifyInvariant](02_messages.md#msgverifyinvariant)
3. **[Tags](03_tags.md)**
- [Handlers](03_tags.md#handlers)
3. **[Events](03_events.md)**
- [Handlers](03_events.md#handlers)
4. **[Parameters](04_params.md)**
+44
View File
@@ -0,0 +1,44 @@
# Events
The distribution module emits the following events:
## BeginBlocker
| Type | Attribute Key | Attribute Value |
|-----------------|---------------|--------------------|
| proposer_reward | validator | {validatorAddress} |
| proposer_reward | reward | {proposerReward} |
| commission | amount | {commissionAmount} |
| commission | validator | {validatorAddress} |
| rewards | amount | {rewardAmount} |
| rewards | validator | {validatorAddress} |
## Handlers
### MsgSetWithdrawAddress
| Type | Attribute Key | Attribute Value |
|----------------------|------------------|----------------------|
| set_withdraw_address | withdraw_address | {withdrawAddress} |
| message | module | distribution |
| message | action | set_withdraw_address |
| message | sender | {senderAddress} |
### MsgWithdrawDelegatorReward
| Type | Attribute Key | Attribute Value |
|---------|---------------|---------------------------|
| withdraw_rewards | amount | {rewardAmount} |
| withdraw_rewards | validator | {validatorAddress} |
| message | module | distribution |
| message | action | withdraw_delegator_reward |
| message | sender | {senderAddress} |
### MsgWithdrawValidatorCommission
| Type | Attribute Key | Attribute Value |
|------------|---------------|-------------------------------|
| withdraw_commission | amount | {commissionAmount} |
| message | module | distribution |
| message | action | withdraw_validator_commission |
| message | sender | {senderAddress} |
-32
View File
@@ -1,32 +0,0 @@
# Tags
The distribution module emits the following events/tags:
## Handlers
### MsgSetWithdrawAddress
| Key | Value |
|------------|---------------------------|
| `action` | `set_withdraw_address` |
| `category` | `distribution` |
| `sender` | {delegatorAccountAddress} |
### MsgWithdrawDelegatorReward
| Key | Value |
|--------------------|-----------------------------|
| `action` | `withdraw_delegator_reward` |
| `category` | `distribution` |
| `rewards` | {rewards} |
| `sender` | {delegatorAccountAddress} |
| `source-validator` | {srcOperatorAddress} |
### MsgWithdrawValidatorCommission
| Key | Value |
|--------------|---------------------------------|
| `action` | `withdraw_validator_commission` |
| `category` | `distribution` |
| `commission` | {commission} |
| `sender` | {srcOperatorAddress} |
+3 -2
View File
@@ -90,6 +90,7 @@ to set up a script to periodically withdraw and rebond rewards.
- [Create or modify delegation distribution](05_hooks.md#create-or-modify-delegation-distribution)
- [Commission rate change](05_hooks.md#commission-rate-change)
- [Change in Validator State](05_hooks.md#change-in-validator-state)
6. **[Tags](06_tags.md)**
- [Handlers](06_tags.md#handlers)
6. **[Events](06_events.md)**
- [BeginBlocker](06_events.md#beginblocker)
- [Handlers](06_events.md#handlers)
7. **[Parameters](07_params.md)**
+51
View File
@@ -0,0 +1,51 @@
# Events
The governance module emits the following events:
## EndBlocker
| Type | Attribute Key | Attribute Value |
|-------------------|-----------------|------------------|
| inactive_proposal | proposal_id | {proposalID} |
| inactive_proposal | proposal_result | {proposalResult} |
| active_proposal | proposal_id | {proposalID} |
| active_proposal | proposal_result | {proposalResult} |
## Handlers
### MsgSubmitProposal
| Type | Attribute Key | Attribute Value |
|---------------------|---------------------|-----------------|
| submit_proposal | proposal_id | {proposalID} |
| submit_proposal [0] | voting_period_start | {proposalID} |
| proposal_deposit | amount | {depositAmount} |
| proposal_deposit | proposal_id | {proposalID} |
| message | module | governance |
| message | action | submit_proposal |
| message | sender | {senderAddress} |
* [0] Event only emitted if the voting period starts during the submission.
### MsgVote
| Type | Attribute Key | Attribute Value |
|---------------|---------------|-----------------|
| proposal_vote | option | {voteOption} |
| proposal_vote | proposal_id | {proposalID} |
| message | module | governance |
| message | action | vote |
| message | sender | {senderAddress} |
### MsgDeposit
| Type | Attribute Key | Attribute Value |
|----------------------|---------------------|-----------------|
| proposal_deposit | amount | {depositAmount} |
| proposal_deposit | proposal_id | {proposalID} |
| proposal_deposit [0] | voting_period_start | {proposalID} |
| message | module | governance |
| message | action | deposit |
| message | sender | {senderAddress} |
* [0] Event only emitted if the voting period starts during the submission.
-41
View File
@@ -1,41 +0,0 @@
# Tags
The governance module emits the following events/tags:
## EndBlocker
| Key | Value |
|-------------------|------------------------------------------------------------|
| `proposal-result` | `proposal-passed`\|`proposal-rejected`\|`proposal-dropped` |
## Handlers
### MsgSubmitProposal
| Key | Value |
|---------------------------|--------------------------|
| `action` | `submit_proposal` |
| `category` | `governance` |
| `sender` | {proposerAccountAddress} |
| `proposal-id` | {proposalID} |
| `voting-period-start` [0] | {proposalID} |
* [0] Tag only emitted if the voting period starts during the submission.
### MsgVote
| Key | Value |
|---------------|-----------------------|
| `action` | `vote` |
| `category` | `governance` |
| `sender` | {voterAccountAddress} |
| `proposal-id` | {proposalID} |
### MsgDeposit
| Key | Value |
|---------------|---------------------------|
| `action` | `deposit` |
| `category` | `governance` |
| `sender` | {depositorAccountAddress} |
| `proposal-id` | {proposalID} |
+3 -3
View File
@@ -43,8 +43,8 @@ staking token of the chain.
- [Proposal Submission](03_messages.md#proposal-submission)
- [Deposit](03_messages.md#deposit)
- [Vote](03_messages.md#vote)
4. **[Tags](04_tags.md)**
- [EndBlocker](04_tags.md#endblocker)
- [Handlers](04_tags.md#handlers)
4. **[Events](04_events.md)**
- [EndBlocker](04_events.md#endblocker)
- [Handlers](04_events.md#handlers)
5. **[Future Improvements](05_future_improvements.md)**
6. **[Parameters](06_params.md)**
+12
View File
@@ -0,0 +1,12 @@
# Events
The minting module emits the following events:
## BeginBlocker
| Type | Attribute Key | Attribute Value |
|------|-------------------|--------------------|
| mint | bonded_ratio | {bondedRatio} |
| mint | inflation | {inflation} |
| mint | annual_provisions | {annualProvisions} |
| mint | amount | {amount} |
+2
View File
@@ -11,4 +11,6 @@
- [NextAnnualProvisions](03_begin_block.md#nextannualprovisions)
- [BlockProvision](03_begin_block.md#blockprovision)
4. **[Parameters](04_params.md)**
5. **[Events](05_events.md)**
- [BeginBlocker](05_events.md#beginblocker)
+24
View File
@@ -0,0 +1,24 @@
# Tags
The slashing module emits the following events/tags:
## BeginBlocker
| Type | Attribute Key | Attribute Value |
|-------|---------------|-----------------------------|
| slash | address | {validatorConsensusAddress} |
| slash | power | {validatorPower} |
| slash | reason | {slashReason} |
| slash | jailed [0] | {validatorConsensusAddress} |
- [0] Only included if the validator is jailed.
## Handlers
### MsgUnjail
| Type | Attribute Key | Attribute Value |
|---------|---------------|-----------------|
| message | module | slashing |
| message | action | unjail |
| message | sender | {senderAddress} |
-13
View File
@@ -1,13 +0,0 @@
# Tags
The slashing module emits the following events/tags:
## Handlers
### MsgUnjail
| Key | Value |
|------------|----------------------------|
| `action` | `unjail` |
| `category` | `slashing` |
| `sender` | {validatorOperatorAddress} |
+3 -2
View File
@@ -29,8 +29,9 @@ This module will be used by the Cosmos Hub, the first hub in the Cosmos ecosyste
- [Uptime tracking](04_begin_block.md#uptime-tracking)
5. **[05_hooks.md](05_hooks.md)**
- [Hooks](05_hooks.md#hooks)
6. **[Tags](06_tags.md)**
- [Handlers](06_tags.md#handlers)
6. **[Events](06_events.md)**
- [BeginBlocker](06_events.md#beginblocker)
- [Handlers](06_events.md#handlers)
7. **[Staking Tombstone](07_tombstone.md)**
- [Abstract](07_tombstone.md#abstract)
8. **[Parameters](08_params.md)**
+72
View File
@@ -0,0 +1,72 @@
# Events
The staking module emits the following events:
## EndBlocker
| Type | Attribute Key | Attribute Value |
|-----------------------|-----------------------|-----------------------|
| complete_unbonding | validator | {validatorAddress} |
| complete_unbonding | delegator | {delegatorAddress} |
| complete_redelegation | source_validator | {srcValidatorAddress} |
| complete_redelegation | destination_validator | {dstValidatorAddress} |
| complete_redelegation | delegator | {delegatorAddress} |
## Handlers
### MsgCreateValidator
| Type | Attribute Key | Attribute Value |
|------------------|---------------|--------------------|
| create_validator | validator | {validatorAddress} |
| create_validator | amount | {delegationAmount} |
| message | module | staking |
| message | action | create_validator |
| message | sender | {senderAddress} |
### MsgEditValidator
| Type | Attribute Key | Attribute Value |
|----------------|---------------------|---------------------|
| edit_validator | commission_rate | {commissionRate} |
| edit_validator | min_self_delegation | {minSelfDelegation} |
| message | module | staking |
| message | action | edit_validator |
| message | sender | {senderAddress} |
### MsgDelegate
| Type | Attribute Key | Attribute Value |
|----------|---------------|--------------------|
| delegate | validator | {validatorAddress} |
| delegate | amount | {delegationAmount} |
| message | module | staking |
| message | action | delegate |
| message | sender | {senderAddress} |
### MsgUndelegate
| Type | Attribute Key | Attribute Value |
|---------|---------------------|--------------------|
| unbond | validator | {validatorAddress} |
| unbond | amount | {unbondAmount} |
| unbond | completion_time [0] | {completionTime} |
| message | module | staking |
| message | action | begin_unbonding |
| message | sender | {senderAddress} |
* [0] Time is formatted in the RFC3339 standard
### MsgBeginRedelegate
| Type | Attribute Key | Attribute Value |
|------------|-----------------------|-----------------------|
| redelegate | source_validator | {srcValidatorAddress} |
| redelegate | destination_validator | {dstValidatorAddress} |
| redelegate | amount | {unbondAmount} |
| redelegate | completion_time [0] | {completionTime} |
| message | module | staking |
| message | action | begin_redelegate |
| message | sender | {senderAddress} |
* [0] Time is formatted in the RFC3339 standard
-65
View File
@@ -1,65 +0,0 @@
# Tags
The staking module emits the following events/tags:
## EndBlocker
| Key | Value |
|-------------------------|-----------------------------------------------|
| `action` | `complete-unbonding`\|`complete-redelegation` |
| `category` | `staking` |
| `delegator` | {delegatorAccountAddress} |
| `source-validator` | {srcOperatorAddress} |
| `destination-validator` | {dstOperatorAddress} |
## Handlers
### MsgCreateValidator
| Key | Value |
|------------|----------------------|
| `action` | `create_validator` |
| `category` | `staking` |
| `sender` | {dstOperatorAddress} |
### MsgEditValidator
| Key | Value |
|------------|----------------------|
| `action` | `edit_validator` |
| `category` | `staking` |
| `sender` | {dstOperatorAddress} |
### MsgDelegate
| Key | Value |
|-------------------------|---------------------------|
| `action` | `delegate` |
| `category` | `staking` |
| `sender` | {delegatorAccountAddress} |
| `destination-validator` | {dstOperatorAddress} |
### MsgBeginRedelegate
| Key | Value |
|-------------------------|---------------------------|
| `action` | `begin_redelegate` |
| `category` | `staking` |
| `sender` | {delegatorAccountAddress} |
| `source-validator` | {srcOperatorAddress} |
| `destination-validator` | {dstOperatorAddress} |
| `end-time` [0] | {delegationFinishTime} |
* [0] Time is formatted in the RFC3339 standard
### MsgUndelegate
| Key | Value |
|--------------------|---------------------------|
| `action` | `begin_unbonding` |
| `category` | `staking` |
| `sender` | {delegatorAccountAddress} |
| `source-validator` | {srcOperatorAddress} |
| `end-time` [0] | {delegationFinishTime} |
* [0] Time is formatted in the RFC3339 standard
+3 -3
View File
@@ -39,7 +39,7 @@ network.
- [Validator Set Changes](04_end_block.md#validator-set-changes)
- [Queues ](04_end_block.md#queues-)
5. **[Hooks](05_hooks.md)**
6. **[Tags](06_tags.md)**
- [EndBlocker](06_tags.md#endblocker)
- [Handlers](06_tags.md#handlers)
6. **[Events](06_events.md)**
- [EndBlocker](06_events.md#endblocker)
- [Handlers](06_events.md#handlers)
7. **[Parameters](07_params.md)**