diff --git a/guides/metrics.md b/guides/metrics.md index 1be349421..d4ee4b6e6 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -12,45 +12,7 @@ Metrics will be served under `/metrics` on port 26660 by default. The listening ## List of available metrics -The following metrics are available, grouped by their subsystem: - -### Block Manager - -| Name | Type | Tags | Description | -|------|------|------|-------------| -| `rollkit_sequencer_height` | Gauge | chain_id | Height of the chain | -| `rollkit_sequencer_num_txs` | Gauge | chain_id | Number of transactions | -| `rollkit_sequencer_block_size_bytes` | Gauge | chain_id | Size of the block | -| `rollkit_sequencer_total_txs` | Gauge | chain_id | Total number of transactions | -| `rollkit_sequencer_latest_block_height` | Gauge | chain_id | The latest block height | - -### P2P - -| Name | Type | Tags | Description | -|------|------|------|-------------| -| `rollkit_p2p_peers` | Gauge | chain_id | Number of connected peers | -| `rollkit_p2p_peer_receive_bytes_total` | Counter | peer_id, chID | Number of bytes received from a given peer | -| `rollkit_p2p_peer_send_bytes_total` | Counter | peer_id, chID | Number of bytes sent to a given peer | -| `rollkit_p2p_peer_pending_send_bytes` | Gauge | peer_id | Pending bytes to be sent to a given peer | -| `rollkit_p2p_num_txs` | Gauge | peer_id | Number of transactions submitted by each peer | -| `rollkit_p2p_message_receive_bytes_total` | Counter | message_type | Number of bytes of each message type received | -| `rollkit_p2p_message_send_bytes_total` | Counter | message_type | Number of bytes of each message type sent | - -In addition to these, [go-libp2p metrics](https://github.com/libp2p/go-libp2p/tree/master/dashboards) are exported as well. - -### Single Sequencer - -| Name | Type | Tags | Description | -|------|------|------|-------------| -| `sequencer_gas_price` | Gauge | chain_id | The gas price of DA | -| `sequencer_last_blob_size` | Gauge | chain_id | The size in bytes of the last DA blob | -| `sequencer_transaction_status` | Counter | chain_id, status | Count of transaction statuses for DA submissions | -| `sequencer_num_pending_blocks` | Gauge | chain_id | The number of pending blocks for DA submission | -| `sequencer_included_block_height` | Gauge | chain_id | The last DA included block height | - -### Based Sequencer - -The Based Sequencer uses the same metrics as the Single Sequencer, with additional metrics related to the based DA layer. +You can find the full list of available metrics in the [Technical Specifications](https://rollkit.github.io/rollkit/specs/block-manager.html#metrics). ## Viewing Metrics @@ -58,7 +20,7 @@ Once your Rollkit node is running with metrics enabled, you can view the metrics 1. Accessing the metrics endpoint directly: - ``` + ```bash curl http://localhost:26660/metrics ``` diff --git a/guides/reset-state.md b/guides/reset-state.md index 9c57aefe9..61ff63017 100644 --- a/guides/reset-state.md +++ b/guides/reset-state.md @@ -18,37 +18,59 @@ In order to complete this guide, you will need to have completed either the [qui ## Quick Start -When you run your chain with `rollkit start` you will create a `.rollkit` directory in your root directory. +When you run your chain with `testapp start` you will create a `.testapp` directory in your root directory. This directory will look like the following. ```bash -tree $HOME/.rollkit +tree $HOME/.testapp ├── config -│   ├── config.toml │   ├── genesis.json │   ├── node_key.json -│   └── priv_validator_key.json +│   ├── rollkit.yaml +│   └── signer.json └── data - ├── priv_validator_state.json - └── rollkit + ├── cache + │   ├── data + │   │   ├── da_included.gob + │   │   ├── hashes.gob + │   │   ├── items_by_hash.gob + │   │   └── items_by_height.gob + │   └── header + │   ├── da_included.gob + │   ├── hashes.gob + │   ├── items_by_hash.gob + │   └── items_by_height.gob + ├── executor + │   ├── 000001.sst + │   ├── 000002.vlog + │   ├── 000003.vlog + │   ├── 00003.mem + │   ├── DISCARD + │   ├── KEYREGISTRY + │   ├── LOCK + │   └── MANIFEST + └── testapp ├── 000001.sst - ├── 000001.vlog ├── 000002.sst ├── 000002.vlog + ├── 000003.sst + ├── 000003.vlog ├── DISCARD ├── KEYREGISTRY └── MANIFEST ``` -To reset the state of the chain, delete the entire `.rollkit` directory. +To reset the state of the chain, delete the content of the `data` directory. + +Alternatively, you can use this command. ```bash -${BINARY} unsafe-clean +testapp unsafe-clean ``` -When you launch your chain again with `rollkit start` your `.rollkit` directory will be re-created and you will see your chain starting at block height 1 again. +When you launch your chain again with `testapp start` your `data` directory will be re-populated and you will see your chain starting at block height 1 again. ## gm-world @@ -114,20 +136,12 @@ tree $HOME/.gm └── e24d9eeca2d24193bdd98ed9116ff70f8a2e2b5e.address ``` -The directories you need to delete to reset your state are in the `./data` directory. - -```bash -$HOME/.gm/data/application.db -$HOME/.gm/data/rollkit -$HOME/.gm/data/snapshots -$HOME/.gm/data/cache - -``` +The directories you need to delete to reset your state are in the `data` directory. -You can delete them with the following command: +Alternatively, you can run the following command to delete the data directories: ```bash -gmd tendermint unsafe-reset-all +gmd comet unsafe-reset-all ``` When you launch your chain again with your `gmd start ` command, these data directories will be re-created and you will see your chain starting at block height 1 again. diff --git a/guides/restart-rollup.md b/guides/restart-rollup.md index 501e33135..be0cbe5bd 100644 --- a/guides/restart-rollup.md +++ b/guides/restart-rollup.md @@ -12,7 +12,7 @@ command for your rollup. For example, if you ran the [quick start](/guides/quick-start.md) tutorial, you started your rollup with: ```bash -rollkit start +testapp start ``` You would have see output similar to: @@ -27,7 +27,7 @@ I[2024-10-17|14:52:12.846] indexed block events module=t If you need to restart your rollup, you can run the same command again: ```bash -rollkit start +testapp start ``` You will see that the block height will continue from where it left off: @@ -39,7 +39,7 @@ I[2024-10-17|14:52:13.845] executed block module=B I[2024-10-17|14:52:13.845] indexed block events module=txindex height=8 ``` -It is important to include any additional flags that you used when you first started your rollup. For example, if you used the `--rollkit.da_namespace` flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace. +It is important to include any additional flags that you used when you first started your rollup. For example, if you used the `--rollkit.da.namespace` flag, you will need to include that flag when restarting your rollup to ensure your rollup continues to publish blobs to the same namespace. ## Restart rollup after running out of funds diff --git a/public/gm/init-arabica-testnet.sh b/public/gm/init-arabica-testnet.sh index b3e2f93a5..6924c772c 100644 --- a/public/gm/init-arabica-testnet.sh +++ b/public/gm/init-arabica-testnet.sh @@ -54,7 +54,7 @@ jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-testnet.sh echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-testnet.sh -echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh +echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh # start the chain -gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" +gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:26657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/public/gm/init-local.sh b/public/gm/init-local.sh index 0f94c1889..2ff9695ce 100644 --- a/public/gm/init-local.sh +++ b/public/gm/init-local.sh @@ -90,7 +90,7 @@ jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-local.sh echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-local.sh -echo "gmd start --rollkit.aggregator --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-local.sh +echo "gmd start --rollkit.node.aggregator --rollkit.da.auth_token=\$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-local.sh # start the chain -gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" +gmd start --rollkit.node.aggregator --rollkit.da.auth_token=$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/public/gm/init-mainnet.sh b/public/gm/init-mainnet.sh index f0ed0e67c..4491ed2ed 100644 --- a/public/gm/init-mainnet.sh +++ b/public/gm/init-mainnet.sh @@ -54,7 +54,7 @@ jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-mainnet.sh echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-mainnet.sh -echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-mainnet.sh +echo "gmd start --rollkit.aggregator --rollkit.da.auth_token=\$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-mainnet.sh # start the chain -gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" +gmd start --rollkit.aggregator --rollkit.da.auth_token=$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" diff --git a/public/gm/init-mocha-testnet.sh b/public/gm/init-mocha-testnet.sh index 221723519..ed3cc65ad 100644 --- a/public/gm/init-mocha-testnet.sh +++ b/public/gm/init-mocha-testnet.sh @@ -54,7 +54,7 @@ jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS echo "DA_BLOCK_HEIGHT=$DA_BLOCK_HEIGHT" >> restart-testnet.sh echo "AUTH_TOKEN=$AUTH_TOKEN" >> restart-testnet.sh -echo "gmd start --rollkit.aggregator --rollkit.da_auth_token=\$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh +echo "gmd start --rollkit.aggregator --rollkit.da.auth_token=\$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-testnet.sh # start the chain -gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN --rollkit.da_namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da_start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" +gmd start --rollkit.aggregator --rollkit.da.auth_token=$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height $DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake"