Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build/post-retrieve-blob/client/go/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func main() {

// Add Core gRPC config if provided
if coreGRPC != "" {
network := p2p.Network("mocha-4")
network := p2p.Network("{{constants['mochaChainId']}}")
cfg.SubmitConfig.Network = network
cfg.SubmitConfig.CoreGRPCConfig = client.CoreGRPCConfig{
Addr: coreGRPC,
Expand Down Expand Up @@ -446,7 +446,7 @@ cfg := client.Config{
},
SubmitConfig: client.SubmitConfig{
DefaultKeyName: "my_key",
Network: p2p.Network("mocha-4"),
Network: p2p.Network("{{constants['mochaChainId']}}"),
CoreGRPCConfig: client.CoreGRPCConfig{
Addr: coreGRPC,
TLSEnabled: coreTLS,
Expand Down
1 change: 0 additions & 1 deletion app/learn/TIA/staking/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ Just connect your wallet to get started!

- [https://testnet.keplr.app/chains/celestia-mocha-testnet](https://testnet.keplr.app/chains/celestia-mocha-testnet)
- [https://explorer.kjnodes.com/celestia-testnet](https://explorer.kjnodes.com/celestia-testnet)
- [https://alphab.ai/s/t/celestia-mocha-4/](https://alphab.ai/s/t/celestia-mocha-4/)
91 changes: 91 additions & 0 deletions app/operate/networks/mocha-testnet/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
description: Learn how to connect to the Mocha network.
---

import { Callout } from 'nextra/components';
import { constants, mochaVersions } from '@/constants';

# Mocha testnet
Expand All @@ -21,6 +22,96 @@ Your best approach to participating is to first determine which node
you would like to run. Each node's guide will link to the relevant networks,
to show you how to connect to them.

## Mocha-5 network restart

<Callout type="warning">
Mocha-5 is a new chain that starts at height 1; it is not an in-place
upgrade from `mocha-4`. Existing consensus operators must initialize
`mocha-5` in a separate home directory, as described below. You do not
need to keep your own copy of `mocha-4` chain data.
</Callout>

Only account balances recorded at the selected `mocha-4` snapshot height
will carry over to `mocha-5`. Transactions and balance changes after that
height will not exist on `mocha-5`, and account sequences reset to 0.
Existing delegations, unbonding delegations, and pending staking rewards
will become liquid balances.

The initial validator set will be created from separately coordinated
genesis transactions. Other validators can join after launch with
`MsgCreateValidator`. The validator set, governance proposals, IBC
channels, Hyperlane state, community pool, and all other chain state
will not carry over.

### Accessing mocha-4 history after the restart

Because `mocha-5` starts from a new genesis, `mocha-4` history is not
queryable on the restarted network. Individual node operators are not
expected to retain `mocha-4` data. Community-hosted archives of the final
`mocha-4` state, or community operators who continue serving `mocha-4`
endpoints for a period after the restart, may be available, but neither
is guaranteed.

If you depend on specific `mocha-4` transaction history, export what you
need before the restart.

<Callout type="info">
Archival arrangements for `mocha-4` are still being decided. This section
will be updated if and when copies are published.
</Callout>

### Prepare a separate consensus-node home

If you already operate a `mocha-4` consensus node or validator, do not
initialize `mocha-5` in the existing `$HOME/.celestia-app` directory.
That directory's `data/priv_validator_state.json` records the last
`mocha-4` height you signed, and a validator will not sign at a height
at or below that value. Because `mocha-5` restarts at height 1, a node
reusing the old home would refuse to sign. The old `data` directory also
holds blocks from a different chain, which will not reconcile with the
`mocha-5` genesis.

Using a separate home avoids both problems and leaves your `mocha-4`
node runnable if you need to fall back during the cutover. Back up your
[wallet keys](/operate/keys-wallets/celestia-app-wallet#key-management)
and `$HOME/.celestia-app/config/priv_validator_key.json` before
continuing.

Initialize `mocha-5` with its own home directory:

```bash
MOCHA_5_HOME="$HOME/.celestia-app-mocha-5"

celestia-appd init "node-name" \
--chain-id {{constants['mochaChainId']}} \
--home "$MOCHA_5_HOME"

celestia-appd download-genesis {{constants['mochaChainId']}} \
--home "$MOCHA_5_HOME"
```

Configure the new Mocha seeds and peers in that directory:

```bash
SEEDS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['mochaChainId']}}/seeds.txt | tr '\n' ',')
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['mochaChainId']}}/peers.txt | tr '\n' ',')

sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" "$MOCHA_5_HOME/config/config.toml"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" "$MOCHA_5_HOME/config/config.toml"
```

Do not copy the `mocha-4` data directory or
`data/priv_validator_state.json` into the new home. Initial validators
should restore validator and wallet keys only as directed by the
separately coordinated genesis transaction process.

At launch, run `mocha-5` under a separate service whose start command
includes the new home:

```bash
celestia-appd start --home "$MOCHA_5_HOME"
```

You have a list of options on the types of nodes you can run to
participate in Mocha:

Expand Down
2 changes: 1 addition & 1 deletion constants/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"golangNodeArabica": "1.24.1",
"arabicaChainId": "arabica-11",
"mainnetChainId": "celestia",
"mochaChainId": "mocha-4",
"mochaChainId": "mocha-5",
"orchrelayVersion": "v1.0.1",
"mochaRpcUrl": "https://rpc-mocha.pops.one/",
"mochaRestUrl": "https://api-mocha.pops.one/",
Expand Down