From 5088e5e057a97c762a36627721996a61a7880bed Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 27 Sep 2024 07:12:34 -0700 Subject: [PATCH 01/13] docs: add metrics configuration --- guides/metrics.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 guides/metrics.md diff --git a/guides/metrics.md b/guides/metrics.md new file mode 100644 index 000000000..1b18bd1b1 --- /dev/null +++ b/guides/metrics.md @@ -0,0 +1,25 @@ +# How to configure metrics + +# Metrics + +Rollkit can report and serve the Prometheus metrics, which in their turn can +be consumed by Prometheus collector(s). + +This functionality is disabled by default. + +To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your +config file. Metrics will be served under `/metrics` on 26660 port by default. +Listen address can be changed in the config file (see +`instrumentation.prometheus\_listen\_addr`). + +## List of available metrics + +The following metrics are available: + +| **Name** | **Type** | **Tags** | **Description** | +|--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| +| gas_price | Gauge | | Gas Price of the DA transaction | +| last_blob_size | Gauge | | Last blob size submitted to the DA | +| transaction_status | Gauge | | Tranasction status of the DA transaction | +| num_pending_blocks | Gauge | | Number of blocks pending DA submission | +| included_block_height | Gauge | | Block height of the last DA transaction | From 28d7929dd0aed9ca9d1d5ee36876a93c3982d5a6 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 11 Oct 2024 06:26:05 -0700 Subject: [PATCH 02/13] docs: rollkit metrics --- guides/metrics.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/guides/metrics.md b/guides/metrics.md index 1b18bd1b1..5f142f779 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -18,8 +18,37 @@ The following metrics are available: | **Name** | **Type** | **Tags** | **Description** | |--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| -| gas_price | Gauge | | Gas Price of the DA transaction | -| last_blob_size | Gauge | | Last blob size submitted to the DA | -| transaction_status | Gauge | | Tranasction status of the DA transaction | -| num_pending_blocks | Gauge | | Number of blocks pending DA submission | -| included_block_height | Gauge | | Block height of the last DA transaction | +| consensus\_height | Gauge | | Height of the chain | +| consensus\_validators | Gauge | | Number of validators | +| consensus\_validators\_power | Gauge | | Total voting power of all validators | +| consensus\_validator\_power | Gauge | | Voting power of the node if in the validator set | +| consensus\_validator\_last\_signed\_height | Gauge | | Last height the node signed a block, if the node is a validator | +| consensus\_validator\_missed\_blocks | Gauge | | Total amount of blocks missed for the node, if the node is a validator | +| consensus\_missing\_validators | Gauge | | Number of validators who did not sign | +| consensus\_missing\_validators\_power | Gauge | | Total voting power of the missing validators | +| consensus\_byzantine\_validators | Gauge | | Number of validators who tried to double sign | +| consensus\_byzantine\_validators\_power | Gauge | | Total voting power of the byzantine validators | +| consensus\_block\_interval\_seconds | Histogram | | Time between this and last block (Block.Header.Time) in seconds | +| consensus\_rounds | Gauge | | Number of rounds | +| consensus\_num\_txs | Gauge | | Number of transactions | +| consensus\_total\_txs | Gauge | | Total number of transactions committed | +| consensus\_block\_parts | Counter | peer\_id | Number of blockparts transmitted by peer | +| consensus\_latest\_block\_height | Gauge | | /status sync\_info number | +| consensus\_fast\_syncing | Gauge | | Either 0 (not fast syncing) or 1 (syncing) | +| consensus\_state\_syncing | Gauge | | Either 0 (not state syncing) or 1 (syncing) | +| consensus\_block\_size\_bytes | Gauge | | Block size in bytes | +| consensus\_step\_duration | Histogram | step | Histogram of durations for each step in the consensus protocol | +| consensus\_block\_gossip\_parts\_received | Counter | matches\_current | Number of block parts received by the node | +| p2p\_message\_send\_bytes\_total | Counter | message\_type | Number of bytes sent to all peers per message type | +| p2p\_message\_receive\_bytes\_total | Counter | message\_type | Number of bytes received from all peers per message type | +| p2p\_peers | Gauge | | Number of peers node's connected to | +| p2p\_peer\_receive\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel received from a given peer | +| p2p\_peer\_send\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel sent to a given peer | +| p2p\_peer\_pending\_send\_bytes | Gauge | peer\_id | Number of pending bytes to be sent to a given peer | +| p2p\_num\_txs | Gauge | peer\_id | Number of transactions submitted by each peer\_id | +| p2p\_pending\_send\_bytes | Gauge | peer\_id | Amount of data pending to be sent to peer | +| mempool\_size | Gauge | | Number of uncommitted transactions | +| mempool\_tx\_size\_bytes | Histogram | | Transaction sizes in bytes | +| mempool\_failed\_txs | Counter | | Number of failed transactions | +| mempool\_recheck\_times | Counter | | Number of transactions rechecked in the mempool | +| state\_block\_processing\_time | Histogram | | Time between BeginBlock and EndBlock in ms | From 1d0be7bbd7e9176c8713bb8bb040293f754de0de Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 11 Oct 2024 06:37:22 -0700 Subject: [PATCH 03/13] docs: centralized sequencer page --- learn/centralized-sequencer-node.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 learn/centralized-sequencer-node.md diff --git a/learn/centralized-sequencer-node.md b/learn/centralized-sequencer-node.md new file mode 100644 index 000000000..983952664 --- /dev/null +++ b/learn/centralized-sequencer-node.md @@ -0,0 +1,18 @@ +### Centralized Sequencer Node + +The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. + + +| Flag | Usage | Default | +| ---------------------------- |-----------------------------------------|-----------------------------| +| `batch-time` | time in seconds to wait before generating a new batch | 2 seconds | +| `da_address` | DA address | `http:////localhost:26658`| +| `da_auth_token` | auth token for the DA | `""` | +| `da_namespace` | DA namespace where the sequencer submits transactions | `""` | +| `host` | centralized sequencer host | localhost | +| `port` | centralized sequencer port | 50051 | +| `listen-all` |listen on all network interfaces (0.0.0.0) instead of just localhost|disabled| +| `metrics` |enable prometheus metrics|disabled| +| `metrics-address` |address to expose prometheus metrics|`":8080"`| + +See `centralized-sequencer --help` for details. From 6929da5a713123df48bdd92661d0979dab4737ab Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Fri, 11 Oct 2024 06:41:04 -0700 Subject: [PATCH 04/13] docs: centralized sequencer metrics --- learn/centralized-sequencer-node.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/learn/centralized-sequencer-node.md b/learn/centralized-sequencer-node.md index 983952664..0ae8353d7 100644 --- a/learn/centralized-sequencer-node.md +++ b/learn/centralized-sequencer-node.md @@ -16,3 +16,16 @@ The `centralized-sequencer` node implements a pluggable centralized sequencer s | `metrics-address` |address to expose prometheus metrics|`":8080"`| See `centralized-sequencer --help` for details. + +The `centralized-sequencer` node reports prometheus metrics when the `-metrics` flag is enabled. By default metrics are exported to `http://localhost:8080/metrics`, +the listen address and port can be configured with `-metrics-address` + +The following metrics are available: + +| **Name** | **Type** | **Tags** | **Description** | +|--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| +| gas_price | Gauge | | Gas Price of the DA transaction | +| last_blob_size | Gauge | | Last blob size submitted to the DA | +| transaction_status | Gauge | | Tranasction status of the DA transaction | +| num_pending_blocks | Gauge | | Number of blocks pending DA submission | +| included_block_height | Gauge | | Block height of the last DA transaction | From 197784dc96f2aec8b6932abdc7162032deef7fee Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 12:47:47 -0700 Subject: [PATCH 05/13] docs: typo --- learn/centralized-sequencer-node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn/centralized-sequencer-node.md b/learn/centralized-sequencer-node.md index 0ae8353d7..6f29f9be7 100644 --- a/learn/centralized-sequencer-node.md +++ b/learn/centralized-sequencer-node.md @@ -26,6 +26,6 @@ The following metrics are available: |--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| | gas_price | Gauge | | Gas Price of the DA transaction | | last_blob_size | Gauge | | Last blob size submitted to the DA | -| transaction_status | Gauge | | Tranasction status of the DA transaction | +| transaction_status | Gauge | | Transaction status of the DA transaction | | num_pending_blocks | Gauge | | Number of blocks pending DA submission | | included_block_height | Gauge | | Block height of the last DA transaction | From e5b66860dacfa2f16dca38d57c8f415027ae6417 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 14:55:04 -0700 Subject: [PATCH 06/13] docs: clarify config file; rewrite --- guides/metrics.md | 93 +++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 39 deletions(-) diff --git a/guides/metrics.md b/guides/metrics.md index 5f142f779..d7822386f 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -8,47 +8,62 @@ be consumed by Prometheus collector(s). This functionality is disabled by default. To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your -config file. Metrics will be served under `/metrics` on 26660 port by default. +CometBFT App's [config file](https://docs.cometbft.com/v0.38/core/configuration) +located in `$CMTHOME/config/config.toml`. + +Metrics will be served under `/metrics` on 26660 port by default. Listen address can be changed in the config file (see `instrumentation.prometheus\_listen\_addr`). ## List of available metrics -The following metrics are available: - -| **Name** | **Type** | **Tags** | **Description** | -|--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| -| consensus\_height | Gauge | | Height of the chain | -| consensus\_validators | Gauge | | Number of validators | -| consensus\_validators\_power | Gauge | | Total voting power of all validators | -| consensus\_validator\_power | Gauge | | Voting power of the node if in the validator set | -| consensus\_validator\_last\_signed\_height | Gauge | | Last height the node signed a block, if the node is a validator | -| consensus\_validator\_missed\_blocks | Gauge | | Total amount of blocks missed for the node, if the node is a validator | -| consensus\_missing\_validators | Gauge | | Number of validators who did not sign | -| consensus\_missing\_validators\_power | Gauge | | Total voting power of the missing validators | -| consensus\_byzantine\_validators | Gauge | | Number of validators who tried to double sign | -| consensus\_byzantine\_validators\_power | Gauge | | Total voting power of the byzantine validators | -| consensus\_block\_interval\_seconds | Histogram | | Time between this and last block (Block.Header.Time) in seconds | -| consensus\_rounds | Gauge | | Number of rounds | -| consensus\_num\_txs | Gauge | | Number of transactions | -| consensus\_total\_txs | Gauge | | Total number of transactions committed | -| consensus\_block\_parts | Counter | peer\_id | Number of blockparts transmitted by peer | -| consensus\_latest\_block\_height | Gauge | | /status sync\_info number | -| consensus\_fast\_syncing | Gauge | | Either 0 (not fast syncing) or 1 (syncing) | -| consensus\_state\_syncing | Gauge | | Either 0 (not state syncing) or 1 (syncing) | -| consensus\_block\_size\_bytes | Gauge | | Block size in bytes | -| consensus\_step\_duration | Histogram | step | Histogram of durations for each step in the consensus protocol | -| consensus\_block\_gossip\_parts\_received | Counter | matches\_current | Number of block parts received by the node | -| p2p\_message\_send\_bytes\_total | Counter | message\_type | Number of bytes sent to all peers per message type | -| p2p\_message\_receive\_bytes\_total | Counter | message\_type | Number of bytes received from all peers per message type | -| p2p\_peers | Gauge | | Number of peers node's connected to | -| p2p\_peer\_receive\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel received from a given peer | -| p2p\_peer\_send\_bytes\_total | Counter | peer\_id, chID | Number of bytes per channel sent to a given peer | -| p2p\_peer\_pending\_send\_bytes | Gauge | peer\_id | Number of pending bytes to be sent to a given peer | -| p2p\_num\_txs | Gauge | peer\_id | Number of transactions submitted by each peer\_id | -| p2p\_pending\_send\_bytes | Gauge | peer\_id | Amount of data pending to be sent to peer | -| mempool\_size | Gauge | | Number of uncommitted transactions | -| mempool\_tx\_size\_bytes | Histogram | | Transaction sizes in bytes | -| mempool\_failed\_txs | Counter | | Number of failed transactions | -| mempool\_recheck\_times | Counter | | Number of transactions rechecked in the mempool | -| state\_block\_processing\_time | Histogram | | Time between BeginBlock and EndBlock in ms | +The following metrics are available, grouped by their subsystem: + +### ABCI + +| Name | Type | Tags | Description | +|----------------------------------------------|-----------|-----------------------------|--------------------------------------------| +| cometbft_abci_connection_method_timing_seconds | Histogram | chain_id, method, type | Timing for each ABCI method. | + +### sequencer + +| Name | Type | Tags | Description | +|--------------------------------------|-------|----------|------------------------------| +| cometbft_sequencer_height | Gauge | chain_id | Height of the chain. | +| cometbft_sequencer_num_txs | Gauge | chain_id | Number of transactions. | +| cometbft_sequencer_block_size_bytes | Gauge | chain_id | Size of the block. | +| cometbft_sequencer_total_txs | Gauge | chain_id | Total number of transactions. | +| cometbft_sequencer_latest_block_height | Gauge | chain_id | The latest block height. | + +### mempool + +| Name | Type | Tags | Description | +|------------------------------------------|-----------|----------|--------------------------------------------------------------------------------| +| cometbft_mempool_size | Gauge | chain_id | Size of the mempool (number of uncommitted transactions). | +| cometbft_mempool_size_bytes | Gauge | chain_id | Total size of the mempool in bytes. | +| cometbft_mempool_tx_size_bytes | Histogram | chain_id | Transaction sizes in bytes. | +| cometbft_mempool_failed_txs | Counter | chain_id | Number of failed transactions. | +| cometbft_mempool_rejected_txs | Counter | chain_id | Number of rejected transactions. | +| cometbft_mempool_evicted_txs | Counter | chain_id | Number of evicted transactions. | +| cometbft_mempool_recheck_times | Counter | chain_id | Number of times transactions are rechecked in the mempool. | + +### p2p + +| Name | Type | Tags | Description | +|--------------------------------------|---------|---------------------|--------------------------------------------------| +| cometbft_p2p_peers | Gauge | chain_id | Number of peers. | +| cometbft_p2p_peer_receive_bytes_total| Counter | peer_id, chID | Number of bytes received from a given peer. | +| cometbft_p2p_peer_send_bytes_total | Counter | peer_id, chID | Number of bytes sent to a given peer. | +| cometbft_p2p_peer_pending_send_bytes | Gauge | peer_id | Pending bytes to be sent to a given peer. | +| cometbft_p2p_num_txs | Gauge | peer_id | Number of transactions submitted by each peer. | +| cometbft_p2p_message_receive_bytes_total | Counter | message_type | Number of bytes of each message type received. | +| cometbft_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. + +### state + +| Name | Type | Tags | Description | +|--------------------------------------------|-----------|----------|--------------------------------------------------------------------------| +| cometbft_state_block_processing_time | Histogram | chain_id | Time spent processing FinalizeBlock. | +| cometbft_state_consensus_param_updates | Counter | chain_id | Number of consensus parameter updates returned by the application since process start. | From f83123e075d08c3b3c6949c7b7dad8490c69f520 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 14:58:36 -0700 Subject: [PATCH 07/13] doc: review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- guides/metrics.md | 8 ++++---- learn/centralized-sequencer-node.md | 14 ++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/guides/metrics.md b/guides/metrics.md index d7822386f..405f74f88 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -8,12 +8,12 @@ be consumed by Prometheus collector(s). This functionality is disabled by default. To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your -CometBFT App's [config file](https://docs.cometbft.com/v0.38/core/configuration) -located in `$CMTHOME/config/config.toml`. +CometBFT node's [config file](https://docs.cometbft.com/v0.38/core/configuration) +located at `~/.cometbft/config/config.toml`. Metrics will be served under `/metrics` on 26660 port by default. -Listen address can be changed in the config file (see -`instrumentation.prometheus\_listen\_addr`). +The listening address (default: `localhost:26660`) can be changed in the config file using +`instrumentation.prometheus_listen_addr`. ## List of available metrics diff --git a/learn/centralized-sequencer-node.md b/learn/centralized-sequencer-node.md index 6f29f9be7..8e3d3787c 100644 --- a/learn/centralized-sequencer-node.md +++ b/learn/centralized-sequencer-node.md @@ -5,21 +5,19 @@ The `centralized-sequencer` node implements a pluggable centralized sequencer s | Flag | Usage | Default | | ---------------------------- |-----------------------------------------|-----------------------------| -| `batch-time` | time in seconds to wait before generating a new batch | 2 seconds | -| `da_address` | DA address | `http:////localhost:26658`| +| `batch-time` | time in seconds to wait before generating a new batch | `2` seconds | +| `da_address` | DA address | `http://localhost:26658`| | `da_auth_token` | auth token for the DA | `""` | | `da_namespace` | DA namespace where the sequencer submits transactions | `""` | -| `host` | centralized sequencer host | localhost | -| `port` | centralized sequencer port | 50051 | +| `host` | centralized sequencer host | `localhost` | +| `port` | centralized sequencer port | `50051` | | `listen-all` |listen on all network interfaces (0.0.0.0) instead of just localhost|disabled| | `metrics` |enable prometheus metrics|disabled| | `metrics-address` |address to expose prometheus metrics|`":8080"`| - See `centralized-sequencer --help` for details. -The `centralized-sequencer` node reports prometheus metrics when the `-metrics` flag is enabled. By default metrics are exported to `http://localhost:8080/metrics`, -the listen address and port can be configured with `-metrics-address` - +The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. By default, metrics are exported to `http://localhost:8080/metrics`. +The listening address and port can be configured with the `-metrics-address` flag. The following metrics are available: | **Name** | **Type** | **Tags** | **Description** | From d282848b00af1871892f7fa767b1fd65621dfbe3 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 15:01:08 -0700 Subject: [PATCH 08/13] docs: add to menu --- guides/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guides/overview.md b/guides/overview.md index 8eec07d47..40c2e8827 100644 --- a/guides/overview.md +++ b/guides/overview.md @@ -27,6 +27,7 @@ In this section, you'll find: * [Configure DA chain block sync time](/guides/da-block-time) * [Change speed of block production](/guides/block-times) * [Use lazy sequencing (aggregation)](/guides/lazy-sequencing) + * [Configure Prometheus metrics](/guides/metrics) * Integrations * [Test and deploy cosmwasm smart-contracts](/guides/cw-orch) * [Add zkML to your EVM rollup](/guides/zkml) From 3c244c51cde2cfdc177b62303d135712c76a893e Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 15:10:40 -0700 Subject: [PATCH 09/13] docs: sidebar; heading --- .vitepress/config.ts | 4 ++++ guides/metrics.md | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index d8294bdda..25bfe1dd8 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -318,6 +318,10 @@ function sidebarHome() { text: "Use lazy sequencing (aggregation)", link: "/guides/lazy-sequencing", }, + { + text: "Configure Prometheus metrics", + link: "/guides/metrics", + }, ], }, { diff --git a/guides/metrics.md b/guides/metrics.md index 405f74f88..4f2b541b6 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -1,7 +1,5 @@ # How to configure metrics -# Metrics - Rollkit can report and serve the Prometheus metrics, which in their turn can be consumed by Prometheus collector(s). From bda8ad5777c6dd3fd99b7e5f292cebdf00062bd1 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 15:11:55 -0700 Subject: [PATCH 10/13] docs: fix config file path --- guides/metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/metrics.md b/guides/metrics.md index 4f2b541b6..1da6cf46c 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -7,7 +7,7 @@ This functionality is disabled by default. To enable the Prometheus metrics, set `instrumentation.prometheus=true` in your CometBFT node's [config file](https://docs.cometbft.com/v0.38/core/configuration) -located at `~/.cometbft/config/config.toml`. +located at `$CMTHOME/config/config.toml`. Metrics will be served under `/metrics` on 26660 port by default. The listening address (default: `localhost:26660`) can be changed in the config file using From e485549797cc8cff8ed58cf85e6fb02573365bfa Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 15:16:12 -0700 Subject: [PATCH 11/13] docs: centralized sequencer metrics --- .vitepress/config.ts | 4 ++++ guides/centralized-sequencer.md | 29 +++++++++++++++++++++++++++++ guides/metrics.md | 4 ++++ guides/overview.md | 1 + learn/centralized-sequencer-node.md | 29 ----------------------------- 5 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 guides/centralized-sequencer.md delete mode 100644 learn/centralized-sequencer-node.md diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 25bfe1dd8..0e7284170 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -286,6 +286,10 @@ function sidebarHome() { text: "Run a rollup full node", link: "/guides/full-node", }, + { + text: "Run a centralized sequencer", + link: "/guides/centralized-sequencer", + }, { text: "CometBFT into a Rollkit app", link: "/guides/cometbft-to-rollkit", diff --git a/guides/centralized-sequencer.md b/guides/centralized-sequencer.md new file mode 100644 index 000000000..5b1334d25 --- /dev/null +++ b/guides/centralized-sequencer.md @@ -0,0 +1,29 @@ +### Centralized Sequencer Node + +The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. + +| Flag | Usage | Default | +|------------------------------|------------------------------------------------------------------|------------------------------| +| `batch-time` | Time in seconds to wait before generating a new batch | `2` seconds | +| `da_address` | DA address | `http://localhost:26658` | +| `da_auth_token` | Auth token for the DA | `""` | +| `da_namespace` | DA namespace where the sequencer submits transactions | `""` | +| `host` | Centralized sequencer host | `localhost` | +| `port` | Centralized sequencer port | `50051` | +| `listen-all` | Listen on all network interfaces (0.0.0.0) instead of just localhost | disabled | +| `metrics` | Enable Prometheus metrics | disabled | +| `metrics-address` | Address to expose Prometheus metrics | `":8080"` | + +See `centralized-sequencer --help` for details. + +The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. By default, metrics are exported to `http://localhost:8080/metrics`. The listening address and port can be configured with the `-metrics-address` flag. + +The following metrics are available: + +| **Name** | **Type** | **Tags** | **Description** | +|-------------------------------------------|-----------|-----------|------------------------------------------------------------------------| +| sequencer_gas_price | Gauge | | Gas price of the DA transaction | +| sequencer_last_blob_size | Gauge | | Last blob size submitted to the DA | +| sequencer_transaction_status | Gauge | | Transaction status of the DA transaction | +| sequencer_num_pending_blocks | Gauge | | Number of blocks pending DA submission | +| sequencer_included_block_height | Gauge | | Block height of the last DA transaction | diff --git a/guides/metrics.md b/guides/metrics.md index 1da6cf46c..d0f1e881c 100644 --- a/guides/metrics.md +++ b/guides/metrics.md @@ -65,3 +65,7 @@ In addition to these, [go-libp2p metrics](https://github.com/libp2p/go-libp2p/tr |--------------------------------------------|-----------|----------|--------------------------------------------------------------------------| | cometbft_state_block_processing_time | Histogram | chain_id | Time spent processing FinalizeBlock. | | cometbft_state_consensus_param_updates | Counter | chain_id | Number of consensus parameter updates returned by the application since process start. | + +## centralized-sequencer + +The `centralized-sequencer` has its own metrics and configuration, see the [centralized sequencer docs](guides/centralized-sequencer) for details. diff --git a/guides/overview.md b/guides/overview.md index 40c2e8827..6f5636d90 100644 --- a/guides/overview.md +++ b/guides/overview.md @@ -19,6 +19,7 @@ In this section, you'll find: * [Create genesis for your rollup](/guides/create-genesis) * [Restart your rollup](/guides/restart-rollup) * [Run a rollup full node](/guides/full-node) +* [Run a centralized sequencer](/guides/centralized-sequencer) * [Turn your CometBFT app into a Rollkit app](/guides/cometbft-to-rollkit) * [Use Ignite to create a Rollkit app](/guides/ignite-rollkit) * Configuration diff --git a/learn/centralized-sequencer-node.md b/learn/centralized-sequencer-node.md deleted file mode 100644 index 8e3d3787c..000000000 --- a/learn/centralized-sequencer-node.md +++ /dev/null @@ -1,29 +0,0 @@ -### Centralized Sequencer Node - -The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. - - -| Flag | Usage | Default | -| ---------------------------- |-----------------------------------------|-----------------------------| -| `batch-time` | time in seconds to wait before generating a new batch | `2` seconds | -| `da_address` | DA address | `http://localhost:26658`| -| `da_auth_token` | auth token for the DA | `""` | -| `da_namespace` | DA namespace where the sequencer submits transactions | `""` | -| `host` | centralized sequencer host | `localhost` | -| `port` | centralized sequencer port | `50051` | -| `listen-all` |listen on all network interfaces (0.0.0.0) instead of just localhost|disabled| -| `metrics` |enable prometheus metrics|disabled| -| `metrics-address` |address to expose prometheus metrics|`":8080"`| -See `centralized-sequencer --help` for details. - -The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. By default, metrics are exported to `http://localhost:8080/metrics`. -The listening address and port can be configured with the `-metrics-address` flag. -The following metrics are available: - -| **Name** | **Type** | **Tags** | **Description** | -|--------------------------------------------|-----------|------------------|------------------------------------------------------------------------| -| gas_price | Gauge | | Gas Price of the DA transaction | -| last_blob_size | Gauge | | Last blob size submitted to the DA | -| transaction_status | Gauge | | Transaction status of the DA transaction | -| num_pending_blocks | Gauge | | Number of blocks pending DA submission | -| included_block_height | Gauge | | Block height of the last DA transaction | From 23a2f240c0650e580332841cad4369e910162c5b Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 15:24:11 -0700 Subject: [PATCH 12/13] docs: centralized-sequencer fmt --- guides/centralized-sequencer.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guides/centralized-sequencer.md b/guides/centralized-sequencer.md index 5b1334d25..df78f42bb 100644 --- a/guides/centralized-sequencer.md +++ b/guides/centralized-sequencer.md @@ -16,7 +16,11 @@ The `centralized-sequencer` node implements a pluggable centralized sequencer s See `centralized-sequencer --help` for details. -The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. By default, metrics are exported to `http://localhost:8080/metrics`. The listening address and port can be configured with the `-metrics-address` flag. +The `centralized-sequencer` node reports Prometheus metrics when the `-metrics` flag is enabled. + +By default, metrics are exported to `http://localhost:8080/metrics`. + +The listening address and port can be configured with the `-metrics-address` flag. The following metrics are available: From 0904c555c4837c8ed6e25e0d23c31995a47bf6c5 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Tue, 22 Oct 2024 16:57:26 -0700 Subject: [PATCH 13/13] docs: centralized sequencer flags --- guides/centralized-sequencer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/centralized-sequencer.md b/guides/centralized-sequencer.md index df78f42bb..c2daa5ffa 100644 --- a/guides/centralized-sequencer.md +++ b/guides/centralized-sequencer.md @@ -1,6 +1,6 @@ ### Centralized Sequencer Node -The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. +The `centralized-sequencer` node implements a pluggable centralized sequencer scheme. It can be configured using the following flags: | Flag | Usage | Default | |------------------------------|------------------------------------------------------------------|------------------------------|