You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ModuleAccount bonded_tokens_pool can receive coins,
so we can send some coins to this account to break the invariant.
same problem for not_bonded_tokens_pool
Suggestion
We suggest do not allow send coins into these Module Account through MsgSend and MsgMultiSend
Version
cosmos-sdk v0.36.0-rc1
x/staking/keeper/invariants.go:15
Steps to Reproduce
send some coins to the bonded_tokens_pool ModuleAccount
send tx MsgVerifyInvariant
Actually in our functional test env below, we enabled every block invariant checks.
--inv-check-period=1
so after the send coins tx processed, the invariant will broken and chain will showstop.
Scenario: send coins to bonded_tokens_pool ModuleAccount
Given CoinEx Chain is started
And node0 has 90000_0000_0000 sato.CET
And node0 send 1 sato.CET to bonded_tokens_pool address coinex1fl48vsnmsdzcv85q5d2q4z5ajdha8yu37uc2e4
And wait at least 3 blocks
#"module_name": "bonded_tokens_pool",
#coinex1fl48vsnmsdzcv85q5d2q4z5ajdha8yu37uc2e4
Good catch @whunmr. During the construction of the bank keeper in the app, we can pass it app.ModuleAccountAddrs(). The bank keeper will prohibit any sends to an account in this list.
Summary of Bug
The ModuleAccount
bonded_tokens_pool
can receive coins,so we can send some coins to this account to break the invariant.
same problem for
not_bonded_tokens_pool
Suggestion
We suggest do not allow send coins into these Module Account through MsgSend and MsgMultiSend
Version
cosmos-sdk v0.36.0-rc1
x/staking/keeper/invariants.go:15
Steps to Reproduce
Actually in our functional test env below, we enabled every block invariant checks.
--inv-check-period=1
so after the send coins tx processed, the invariant will broken and chain will showstop.
Invariant broken logs:
The text was updated successfully, but these errors were encountered: