Celestia 백서

Celestia

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 20쪽 중 14쪽

irectory (the Homebrew bin directory when Go is installed with Homebrew, otherwise `$GOBIN` or `$GOPATH/bin`) - System bin directory (`/usr/local/bin`) - Keep in current directory - If Go is not installed: - System bin directory (`/usr/local/bin`) - Keep in current directory Follow the instructions in the terminal output to choose your installation preferences. After installation, you can verify the setup by checking the version: ```bash celestia version && celestia --help ``` View [the script](https://github.com/celestiaorg/docs/blob/main/public/celestia-node.sh) to learn more about what it is doing. > **Note**: The script maintains a log file at `$HOME/celestia-node-temp/logfile.log` for troubleshooting purposes. ## Next steps First, we recommend [reading the overview](/operate/getting-started/hardware-requirements) of our node types, if you haven't yet. Now that you've installed Celestia Node, it's time to [pick your node type](/operate/getting-started/overview) and run your node! If you're planning to run a light node, we recommend the [quick-start guide](/operate/data-availability/light-node/quickstart/). ## Upgrading your binary To upgrade your binary, install the recommended version for your network using the instructions above. When upgrading from a version earlier than celestia-node v0.31.3 to v0.31.3 or later, update the node configuration after replacing the binary and before starting the node: ```bash celestia <node_type> config-update --p2p.network <network> ``` The [v0.31.3 release](https://github.com/celestiaorg/celestia-node/releases/tag/v0.31.3) adds support for Mainnet Beta v9 and introduces new config fields. The command merges those fields into the existing configuration while preserving custom values. Review your configuration after the update, then start the node. If you run into any issues, refer to the [troubleshooting section](/operate/maintenance/troubleshooting#resetting-your-config). --- Title: Advanced URL: https://docs.celestia.org/operate/data-availability/light-node/advanced.md Source: app/operate/data-availability/light-node/advanced/page.mdx --- # Advanced This page collects advanced topics for Celestia light nodes. For setup and blob posting, see [Getting started](/operate/data-availability/light-node/quickstart). --- ## Start light node with consensus endpoint authentication If the consensus node gRPC endpoint you connect to requires authentication, pass a directory containing `xtoken.json`: ```bash celestia light start \ --core.ip snowy-methodical-leaf.celestia-mainnet.quiknode.pro \ --core.tls \ --core.xtoken.path /path-to-directory \ --core.port 9090 ``` Where `/path-to-directory` contains `xtoken.json` (recommended: `chmod 600`): ```json { "x-token": "<YOUR-SECRET-X-TOKEN>" } ``` --- ## Run the light node with a custom key To use a non-default key, make sure the key exists in your node store and pass `--keyring.keyname` on `start`: For key creation, backup, import/recover, and Docker setups, see [Create a wallet with celestia-node](/operate/keys-wallets/celestia-node-key). --- ## Run the light node with SystemD Follow the tutorial for running Celestia Node as a background process with SystemD: [/operate/maintenance/systemd#celestia-light-node](/operate/maintenance/systemd#celestia-light-node). --- ## Fast sync with a trusted hash Setting and syncing to a trusted height and hash means your light node will not sample the entire chain from genesis. This is useful when you want to sync your light node quickly. This adds the trust assumption that you trust the source of the height and hash. Celestia also supports initializing from a trusted hash via [trusted hash recovery](/operate/maintenance/trusted-hash-recovery). --- ## High throughput transaction submission Celestia supports three transaction submission modes that affect how transactions are queued and submitted, impacting throughput and ordering guarantees. These modes are controlled by the `TxWorkerAccounts` setting in your light node's `config.toml` file. ### Default mode (TxWorkerAccounts = 0) This is the default behavior. Transactions are submitted immediately without a queue. **Characteristics:** - Transactions enter the mempool immediately - No queuing or waiting for confirmations - Potential sequence number conflicts if submitting multiple transactions quickly - Same behavior as versions prior to v0.28.2 ### Queued mode (TxWorkerAccounts = 1) Enable synchronous, ordered submission by setting `TxWorkerAccounts` to `1` in your `config.toml`. **Characteristics:** - Each transaction queues until the previous one is confirmed - Preserves strict ordering of transactions based on submission time - Avoids sequence mismatch errors - Throughput: approximately 1 PayForBlobs transaction every other block **Use case:** Applications requiring strict transaction ordering ### Parallel mode (TxWorkerAccounts > 1) For high-throughput applications that don't require sequential ordering, enable parallel submission by setting `TxWorkerAccounts` to a value greater than 1. **How it works:** - Creates `TxWorkerAccounts` parallel submission lanes - Each lane is a subaccount automatically created and funded from your default account - Example: `TxWorkerAccounts = 8` creates 7 subaccounts + 1 default account = 8 parallel lanes - Enables at least 8 PayForBlobs transactions per block **Characteristics:** - Transactions can be submitted concurrently across multiple lanes - Does NOT guarantee transaction ordering - Blobs may be included in blocks in a different order than submitted - Higher throughput for applications that can handle unordered transactions **Use case:** High-throughput, unordered workflows **Important:** When retrieving blobs submitted in parallel mode, you must track the height, namespace, and commitment for each blob submission, as you won't know which subaccount was used. **Subaccount management:** - Subaccounts are automatically created and funded from your default account - They are named `parallel-worker-1`, `parallel-worker-2`, etc. in your keyring - Subaccounts are reused across node restarts if `TxWorkerAccounts` value remains the same - If you decrease `TxWorkerAccounts`, only the first N workers are used - If you increase `TxWorkerAccounts`, additional workers are created ### Comparison table | Mode | TxWorkerAccounts | Ordering | Throughput | Use case | | -------- | ---------------- | -------------- | ---------------- | ---------------------------------------- | | Default | 0 | Not guaranteed | Immediate | Simple applications, single transactions | | Queued | 1 | Guaranteed | ~1 tx per block | Applications requiring strict ordering | | Parallel | >1 | Not guaranteed | ≥N txs per block | High-throughput, unordered workflows | --- ## Node store contents The node store is created during `celestia light init` and lives under `~/.celestia-<node-type>-<network>`. For example, a Mocha light node store at `~/.celestia-light-mocha-5` contains: - `config.toml`: Node configuration settings - `data/`: Database files - `keys/`: Node identity and account keys --- ## Get your auth token Your auth token is useful when you want to interact with your Celestia light node from another machine or a client application. Generate an admin token with: ```bash celestia light auth admin --p2p.network mocha ``` Each time you run this, you will receive a new token. It's not possible to revoke tokens once they are issued. Use `celestia light auth --help` to learn more about the available options. --- ## Find your node ID Your node ID is your libp2p peer ID. You’ll need it when creating multiaddrs (for example, `.../p2p/<node-ID>`). While your node is running, run: ```bash celestia p2p info ``` See also `p2p.Info` in the [Node API `p2p` section](/build/rpc/node-api/#p2p). --- ## Migrate node ID to another server If you want the new machine to keep the same node identity, back up the identity material from your node store (for example, the `keys/` directory under `~/.celestia-light-<network>/`) and restore it on the new machine before starting the node. --- ## Pruning windows If you need data older than your current pruning windows, use `SyncFromHeight`/`SyncFromHash` to re-sync from an earlier point in time. - Sampling window: 7 days ([v0.25.3 release notes](https://github.com/celestiaorg/celestia-node/releases/tag/v0.25.3)) - Header pruning window: 14 days ([v0.26.4 release notes](https://github.com/celestiaorg/celestia-node/releases/tag/v0.26.4)) --- ## Advanced key management with `cel-key` For key management beyond the built-in capabilities of the light node, use the separate `cel-key` utility. This dedicated tool allows you to create, import, and manage keys, and to select which key your node uses. See [Create a wallet with celestia-node](/operate/keys-wallets/celestia-node-key). --- Title: Light node: overview & quickstart URL: https://docs.celestia.org/operate/data-availability/light-node/quickstart.md Source: app/operate/data-availability/light-node/quickstart/page.mdx --- # Light node: overview & quickstart Celestia light nodes perform data availability sampling (DAS) to verify that block data is available without downloading it all. They can also post and retrieve blobs (data) from the Celestia network. ## Overview Light nodes are the most common way to interact with Celestia networks. ![light-node](/img/nodes/LightNodes.png) Light nodes: 1. Listen for `ExtendedHeaders` (block headers + DA metadata). 2. Perform DAS on received headers. ## Optional: run a light node in your browser You can run Lumina in your browser on the decentralized explorer, [Celenium](https://celenium.io). <img width="1000" alt="Celenium running a light node with Lumina" src="https://github.com/user-attachments/assets/28183a24-8bb1-4f77-850c-d0528de075c7" /> ## Run a light node (CLI) This guide assumes you've completed: - [Hardware requirements](/operate/getting-started/hardware-requirements) - [Environment setup](/operate/getting-started/environment-setup) If you see `header: syncing in progress`, wait for the node to sync or use [fast sync](/operate/data-availability/light-node/advanced#fast-sync-with-a-trusted-hash). ## Next steps - More operations and configuration: [Advanced](/operate/data-availability/light-node/advanced) - Submitting blobs from an app: [Submit data](/learn/TIA/submit-data) --- Title: celestia-node metrics URL: https://docs.celestia.org/operate/data-availability/metrics.md Source: app/operate/data-availability/metrics/page.mdx --- # celestia-node metrics This tutorial is for running metrics for your celestia-node data availability instance. This tutorial will focus on running metrics for a light node. This tutorial assumes you have already setup your light node by following the tutorial in the [light node guide](/operate/data-availability/light-node/quickstart). ## Running metrics flags You can enable the `celestia-node` metric flags with the following command: ```sh celestia <node-type> start --metrics.tls=<boolean> \ --metrics --metrics.endpoint <URI> \ --p2p.network <network> \ --core.ip <URI> --core.port <port> ``` Add metrics flags to your node start command and restart your node to apply it. The metrics endpoint will gather your node's data to track your uptime. Note that the `--metrics` flag enables metrics and expects an input into `--metrics.endpoint`. We will go over what the endpoint will need to be in the [metrics endpoint design considerations](#metrics-endpoint-design-considerations) section. ### Mainnet Beta Here is an example for Mainnet Beta: ```sh celestia <node-type> start --metrics.tls=true \ --metrics --metrics.endpoint otel.celestia.observer \ --core.ip <URI> --core.port <port> ``` ### Mocha testnet Here is an example for Mocha testnet: ```sh celestia <node-type> start --metrics.tls=true \ --metrics --metrics.endpoint otel.mocha.celestia.observer \ --core.ip <URI> --core.port <port> --p2p.network mocha ``` ### TLS connections The `--metrics.tls` flag enables or disables a TLS connection to the OpenTelemetry Protocol metrics backend. You need to choose a boolean value (`true` or `false`) for this flag. It's also common to set this flag to `false` when spinning up a local collector to check the metrics locally. However, if the collector is hosted in the cloud as a separate entity (like in a DevOps environment), enabling TLS is a necessity for secure communication. Here are examples of how to use it: ```bash # To enable TLS connection celestia <node-type> start --metrics.tls=true --metrics \ --metrics.endpoint <URI> \ --p2p.network <network> --core.ip <URI> --core.port <port> # To disable TLS connection celestia <node-type> start --metrics.tls=false --metrics \ --metrics.endpoint <URI> \ --p2p.network <network> --core.ip <URI> --core.port <port> ``` ## DAS sampling head lag Use `das_sampling_head_lag` to monitor how far data availability sampling (DAS) is behind the network head known to your node. Enable metrics with the flags above and view the gauge in your metrics backend. > This metric requires a celestia-node build that includes > [celestia-node #5307](https://github.com/celestiaorg/celestia-node/pull/5307). > The change is merged but is not included in a published release as of > 5 October 2026. The gauge reports `max(NetworkHead - SampledChainHead, 0)` in headers. `SampledChainHead` is the head of the continuously sampled chain. For example, a network head of 100 and a sampled chain head of 90 produce a lag of 10. This measures a difference in height, not elapsed time. A sustained or growing positive value means sampling remains behind the node's known network head; check the node logs for sampling errors. A value of zero means the sampled chain head has reached or exceeded that known head. It does not by itself prove the node has the latest network header. If the metric is missing, check that your build includes the change and that metrics are enabled and reaching your collector. ## Metrics endpoint design considerations At the moment, the architecture of celestia-node metrics works as specified in the following [ADR #010](https://github.com/celestiaorg/celestia-node/blob/main/docs/adr/adr-010-incentivized-testnet-monitoring.md). Essentially, the design considerations here will necessitate running an OpenTelemetry (OTEL) collector that connects to Celestia light node. For an overview of OTEL, check out [the guide](https://opentelemetry.io/docs/collector). The ADR and the OTEL docs will help you run your collector on the metrics endpoint. This will then allow you to process the data in the collector on a Prometheus server which can then be viewed on a Grafana dashboard. In the future, we do want to open-source some developer toolings around this infrastructure to allow for node operators to be able to monitor their data availability nodes. ### Configure celestia-node to export to multiple OTEL collectors It is not supported to directly export metrics to multiple OTEL collectors (see the discussions [here](https://github.com/open-telemetry/opentelemetry-go/issues/3055)). To achieve this goal, an agent OTEL collector needs to be deployed for the node, from which the metrics can be forwarded to any other OTEL collectors. Here are the necessary steps and example configurations. Follow the instructions [here](https://opentelemetry.io/docs/collector/installation/) to install the OTEL collector. If you have the binary installed in `/usr/local/bin/otelcol`, you may consider creating a systemd service to run the collector as a background service. Here is an example of a systemd service definition in `/etc/systemd/system/otelcol.service`: ```ini [Unit] Description=OpenTelemetry Collector After=network.target [Service] ExecStart=/usr/local/bin/otelcol --config /path/to/otelcol_config.yaml Restart=on-failure [Install] WantedBy=multi-user.target ``` The following is an example of the `otelcol_config.yaml` file that transforms the metrics into Prometheus metrics and reports them to the Celestia OTEL collector at the same time: ```yaml receivers: otlp: protocols: http: # Enable HTTP receiving endpoint: "127.0.0.1:4318" # the endpoint where the celestia-node will send metrics (the default value of --metrics.endpoint for celestia when --metrics is specified) exporters: prometheus: # the node metrics will be transformed to Prometheus format and exposed on the following endpoint endpoint: "0.0.0.0:8889" namespace: "celestia" otlphttp: # report the metrics to Mocha testnet OTEL collector as an example # change it according to your network endpoint: https://otel.mocha.celestia.observer service: pipelines: metrics: receivers: [otlp] exporters: [prometheus, otlphttp] ``` Run the following commands to enable the OTEL collector systemd service: ```bash sudo systemctl daemon-reload sudo systemctl enable --now otelcol.service # check the status of the service sudo systemctl status otelcol.service ``` If the collector is up and running without any error, you can adjust the options for the `celestia-node` service: ```sh celestia <node-type> start --metrics.tls=false \ --metrics --metrics.endpoint localhost:4318 \ ... ``` --- Title: Optional: Setting up your DA node to use ZFS URL: https://docs.celestia.org/operate/data-availability/storage-optimization.md Source: app/operate/data-availability/storage-optimization/page.mdx --- # Optional: Setting up your DA node to use ZFS > **Warning:** Using ZFS compression may impact node performance depending on your hardware configuration. Ensure your system meets the recommended requirements before proceeding. This is an optional optimization that may not be suitable for all deployments. Enabling ZFS compression on a DA Node server can significantly optimize storage efficiency by compressing data on the fly. Follow this step-by-step guide to implement ZFS compression without requiring any additional tuning on the DA node. > **Note:** ZFS compression `zstd-3` example: ``` $ zfs get compressratio celestia && du -h /celestia/bridge/.celestia-bridge NAME PROPERTY VALUE SOURCE celestia compressratio 1.22x - 1.3T /celestia/bridge/.celestia-bridge ``` > EXT4, no compression: ``` $ du -h ~/.celestia-bridge/ 1.8T /home/ubuntu/.celestia-bridge/ ``` ## Requirements 1. A bare metal server with: - RAM: 64GB or more - CPU: Latest generation EPYC or Xeon with: - Clock speed: 2.1GHz or higher - Threads: 32 or higher - Note: Additional CPU overhead is required for ZFS compression 2. At least one empty disk (with no filesystem) ## Guide Get your disk name: ```sh lsblk --nodeps -o name ``` Verify disk is empty (should show no partitions): ```sh lsblk YOUR_DISK_NAME (/dev/nvme0n1 or /dev/sda i.e.) ``` Verify disk is not mounted: ```sh mount | grep YOUR_DISK_NAME ``` Set variables: ```sh ZFS_POOL_NAME="celestia" && ZFS_DATASET_NAME="bridge" ``` Validate variables are set: ```sh if [ -z "$ZFS_POOL_NAME" ] || [ -z "$ZFS_DATASET_NAME" ]; then echo "Error: Variables not set correctly" exit 1 fi ``` Install ZFS utils: ```sh sudo apt update && sudo apt install zfsutils-linux ``` Create ZFS pool: ```sh zpool create -o ashift=12 $ZFS_POOL_NAME /dev/nvme0n1 ``` > **Note:** If you have more than one disk available, you can add them also: ```sh zpool create -o ashift=12 $ZFS_POOL_NAME /dev/nvme0n1 /dev/nvme1n1 ``` Verify pool status: ```sh zpool status $ZFS_POOL_NAME ``` Verify pool properties: ```sh zpool get all $ZFS_POOL_NAME ``` Create dataset: ```sh zfs create $ZFS_POOL_NAME/$ZFS_DATASET_NAME ``` Enable compression: ```sh zfs set compression=zstd-3 $ZFS_POOL_NAME/$ZFS_DATASET_NAME ``` Set the custom path to the bridge data folder: > **Note:** It is recommended to sync from scratch. In case of using a snapshot it is important to have your local route to `--data.store` identical to one in a snapshot.
프로젝트로 돌아가기