Skip to content

Commit

Permalink
crisis manual
Browse files Browse the repository at this point in the history
int
  • Loading branch information
rigelrozanski committed Apr 3, 2019
1 parent bf17e1b commit 2c48238
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gaia/cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {

// prepare and add flags
executor := cli.PrepareBaseCmd(rootCmd, "GA", app.DefaultNodeHome)
rootCmd.Flags().BoolVar(&assertInvariantsBlockly, flagAssertInvariantsBlockly,
rootCmd.PersistentFlags().BoolVar(&assertInvariantsBlockly, flagAssertInvariantsBlockly,
false, "Assert registered invariants on a blockly basis")
err := executor.Execute()
if err != nil {
Expand Down
30 changes: 30 additions & 0 deletions docs/gaia/join-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,36 @@ If you plan to start a new network from the exported state, export with the `--f
gaiad export --height [height] --for-zero-height > [filename].json
```

## Verify Mainnet

Help to prevent a catastrophe by running invariants on each block on your full
node. In essence, by running invariants you ensure that the state of mainnet is
the correct expected state. One vital invariant check is that no atoms are
being created or destroyed outside of expected protocol, however there are many
other invariant checks each unique to their respective module. Because invariant checks
are computationally expensive, they are not enabled by default. To run a node with
these checks start your node with the assert-invariants-blockly flag:

```bash
gaiad start --assert-invariants-blockly
```

If an invariant is broken on your node, your node will panic and prompt you to send
a transaction which will halt mainnet. For example the provided message may look like:

```bash
invariant broken:
loose token invariance:
pool.NotBondedTokens: 100
sum of account tokens: 101
CRITICAL please submit the following transaction:
gaiacli tx crisis invariant-broken staking supply

```

When submitting a invariant-broken transaction, transaction fee tokens are not
deducted as the blockchain will halt (aka. this is a free transaction).

## Upgrade to Validator Node

You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 100 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto [the Validator Setup](./validators/validator-setup.md).

0 comments on commit 2c48238

Please sign in to comment.