0g-chain/x/shutdown/spec/README.md

18 lines
753 B
Markdown
Raw Normal View History

2020-03-04 14:35:16 +00:00
2020-03-04 19:16:27 +00:00
# `shutdown`
2020-03-04 14:35:16 +00:00
## Table of Contents
## Overview
2020-03-04 19:16:27 +00:00
The `x/shutdown` module allows certain message types to be disabled based on governance votes.
2020-03-04 14:35:16 +00:00
2020-03-04 16:41:13 +00:00
Msgs and routes are disabled via an antehandler decorator. The decorator checks incoming all txs and rejects them if they contain a disallowed msg type.
Disallowed msg types are stored in a circuit breaker keeper.
The list of disallowed msg types is updated via a custom governance proposal and handler.
Design Alternatives:
2020-03-04 19:50:30 +00:00
- store list of disallowed msg types in params, then we don't need the custom gov proposal
2020-03-04 16:41:13 +00:00
- replace the app Router with a custom one to avoid using the antehandler - can't be done with current baseapp, but v0.38.x enables this. (https://github.com/cosmos/cosmos-sdk/issues/5455)