bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 20쪽 중 9쪽
crease sync time.
### Save on storage requirements
If you want to save on storage requirements, consider using
`pruning = "everything"` in your `app.toml` to prune everything. If you
select `"everything"` or `"default"`, but still want to keep the block data,
you can do so by explicitly setting
`min-retain-blocks = 0` in your `app.toml`. A value of `0` for
`min-retain-blocks` will keep all block data. This will prune snapshots of
the state, but it will keep block data:
```toml
pruning = "everything"
min-retain-blocks = 0 # retain all block data
```
### Recommended block retention for validators
The default `min-retain-blocks` value is `3000`. For validators that do not
need to retain all block data, set `min-retain-blocks = 600000` in your
`app.toml`. This keeps a larger recent block history without retaining all
block data:
```toml
min-retain-blocks = 600000 # retain recent block data while pruning older blocks
```
## Sync types
| Sync mode | Time | Notes |
| ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Block sync | ~3 weeks | Downloads and executes all blocks from genesis to the tip |
| State sync | ~1 hour | Downloads a snapshot of the state then downloads and executes all blocks after that snapshot to the tip. |
| Quick sync | ~5 hours | Downloads the data directory from a node. Time depends on your download speed because the data being downloaded can exceed 1 TB for mainnet. |
### Option 1: Block sync
By default, a consensus node will sync using block sync; which will request, validate
and execute every block up to the head of the blockchain. This is the most secure
mechanism yet the slowest (taking up to weeks depending on the height of the blockchain).
Starting with celestia-app v9, `verify_data` defaults to `false` in the
`[blocksync]` section of `config.toml`. This skips re-running `ProcessProposal`
on historical blocks to improve block sync speed. Blocks are still verified by
their validator signatures, and normal validation resumes after the node enters
consensus mode. To restore the pre-v9 behaviour, set:
```toml
[blocksync]
verify_data = true
```
See the [celestia-app v9 release notes](https://github.com/celestiaorg/celestia-app/blob/v9.0.4/docs/release-notes/release-notes.md#block-sync-verify_data-default-changed-to-false)
for details.
There are two alternatives for quicker syncing.
### Option 2: State sync
State sync uses light client verification to verify state snapshots from peers
and then apply them. State sync relies on weak subjectivity; a trusted header
(specifically the hash and height) must be provided. This can be found by querying
a trusted RPC endpoint (/block). RPC endpoints are also required for retrieving
light blocks. These can be found in the docs here under the respective networks or
from [the chain-registry](https://github.com/cosmos/chain-registry).
#### State sync quick start scripts
If you are looking to quickly sync a consensus node, and do not need historical blocks,
you can use the following scripts and state sync.
**Before running the scripts, make sure to checkout to the [correct version](/operate/networks/overview):**
> **Note:** State sync scripts for each network are available in the [networks repository](https://github.com/celestiaorg/networks).
The public networks will use state sync so they'll get to the tip very quickly,
but won't work for your use case if you need historical blocks.
#### Manual state sync setup
In `$HOME/.celestia-app/config/config.toml`, set
```toml
rpc_servers = ""
trust_height = 0
trust_hash = ""
```
And also set statesync to `true`:
```toml
#######################################################
### State Sync Configuration Options ###
#######################################################
[statesync]
enable = true
```
To their respective fields. At least two different rpc endpoints should be provided.
The more, the greater the chance of detecting any fraudulent behavior.
Once setup, you should be ready to start the node as normal. In the logs, you should
see: `Discovering snapshots`. This may take a few minutes before snapshots are found
depending on the network topology.
### Option 3: Quick sync
Quick sync effectively downloads the entire `data` directory from a third-party provider
meaning the node has all the application and blockchain state as the node it was
copied from.
Run the following command to quick-sync from a snapshot:
The [Node snapshots guide](/operate/maintenance/snapshots) provides everything you need to quick sync your node:
- Details about pruned and archive snapshots
- A list of snapshot providers for different node types
- Installation and usage instructions for `celestia-snapshot-finder` - a tool that automatically finds and downloads the fastest snapshot for your server location
## Start the consensus node
If you are running celestia-app >= v4.0.0, the `rpc.grpc_laddr` config option is required. This option can be set via the CLI flag `--rpc.grpc_laddr tcp://0.0.0.0:9098` or in the `config.toml`.
```sh
celestia-appd start --rpc.grpc_laddr tcp://0.0.0.0:9098
```
If you are running celestia-app v2.x.x then you'll want to start the node with a `--v2-upgrade-height` that is dependent on the network. The `--v2-upgrade-height` flag is only needed during the v2 upgrade height so after your node has executed the upgrade (e.g. you see the log `upgraded from app version 1 to 2`), you don't need to provide this flag for future `celestia-appd start` invocations.
Optional: If you would like celestia-app to run as a background process, you can follow the [SystemD tutorial](/operate/maintenance/systemd).
## Extra resources for consensus nodes
### Optional: Reset network
There are several ways to reset your consensus node, depending on what you need to preserve:
#### Option 1: Reset blockchain data with `reset-state`
This command removes blockchain data but preserves validator state and address book of the consensus node:
```sh
celestia-appd tendermint reset-state
```
This preserves your configuration, validator state (`priv_validator_state.json`), and peer connections (`addrbook.json`), but removes:
- blockstore.db
- state.db
- evidence.db
This option is safe for validator nodes and was created specifically for validators who need to reset their node's blockchain data without risking double signing. Use this when you need to resync your node but want to maintain your validator's signing state and peer connections.
#### Option 2: Full reset with `unsafe-reset-all`
⚠️ **CAUTION FOR VALIDATORS**: This is considered "unsafe" because it resets validator state:
```sh
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
```
This command:
- Resets blockchain data
- Resets validator state (`priv_validator_state.json`) but NOT private keys (which are in `priv_validator_key.json`)
- Clears address book (`addrbook.json`)
- Preserves node configuration
This option should ONLY be used when you're absolutely certain your validator isn't actively participating in consensus. Using this while your validator is active could lead to double signing. Always back up your validator keys before using this command.
#### Option 3: Manual reset (recommended for validator nodes)
For more granular control over what gets reset:
```sh
mv ~/.celestia-app/data ~/.celestia-app/old-data
mkdir -pv ~/.celestia-app/data
cp ~/.celestia-app/old-data/priv_validator_state.json ~/.celestia-app/data/priv_validator_state.json
```
This approach lets you manually preserve the validator state file while replacing all other data. The advantage over Option 1 is that you can selectively copy additional files if needed. Use this when you want maximum control over which files are preserved during reset.
#### Option 4: Simple data directory cleanup
For non-validator nodes, you can completely erase all blockchain data and test keys by removing and recreating the data directory:
```sh
# Remove data directory
rm -rf ~/.celestia-app/data
rm -rf ~/.celestia-app/keyring-test
# Create data directory and initialize validator state file
mkdir -p ~/.celestia-app/data/
echo "{}" > ~/.celestia-app/data/priv_validator_state.json
```
This approach:
- Completely removes all blockchain data (blocks, state, evidence, etc.)
- Removes the keyring-test directory containing transaction signing keys (but not validator consensus keys)
- Creates a new, empty data directory structure
- Initializes a blank validator state file, which erases the record of blocks your validator has signed
**Important:** This option should NOT be used for validator nodes because it creates a double-signing risk. The validator's consensus private key (in `priv_validator_key.json` in the config directory) remains intact, but the node loses all record of which blocks it has already signed. If the node is still an active validator on the network, it could sign conflicting blocks at the same height, resulting in slashing penalties.
Use this option only for non-validator nodes when you want a complete fresh start with no preserved state or connections.
It's recommended to test these commands on a testnet first before applying them to a mainnet node.
### Optional: Configure an RPC endpoint
You can configure your consensus node to be a public RPC endpoint.
This allows it to accept connections from data availability nodes and
serve requests for the data availability API.
If you're running a bridge node that connects to your consensus node, ensure that gRPC is properly configured in your `app.toml` file. Bridge nodes require gRPC access (typically on port 9090) to communicate with the consensus layer.
The Cosmos SDK REST API also requires application gRPC. If you enable
`[api]` with `enable = true` in `config/app.toml`, keep `enable = true`
in the existing `[grpc]` section. The equivalent CLI flags are
`--api.enable=true --grpc.enable=true`. The `rpc.grpc_laddr` setting in
`config.toml` configures a separate service and does not satisfy this
dependency.
#### Configure heavy RPC concurrency
Memory-intensive RPC endpoints share a process-wide concurrency limit across
HTTP, WebSocket and gRPC. The default limit is `20` concurrent requests. Set it
under `[rpc]` in `config.toml`:
```toml
[rpc]
max_concurrent_heavy_requests = 20
```
A value of `0` selects the built-in default of `20`. A negative value disables
the limit, which is not recommended. Increasing the limit can increase peak
memory consumption. Only raise it when the node has sufficient RAM, and monitor
node memory usage under RPC load.
#### Expose RPC
By default, the RPC service listens on `localhost` which means it can't
be accessed from other machines. To make the RPC service available publicly,
you need to bind it to a public IP or `0.0.0.0` (which means listening on all
available network interfaces).
You can do this by editing the config.toml file:
```sh
sed -i 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.celestia-app/config/config.toml
```
This command replaces the `localhost` IP address with `0.0.0.0`, making the
RPC service listen on all available network interfaces.
#### Note on `external-address`
The `external-address` field in the configuration is used when your node
is behind a NAT and you need to advertise a different address for peers
to dial. Populating this field is not necessary for making the RPC
endpoint public.
```sh
EXTERNAL-ADDRESS=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external-address = ""/external-address = "$EXTERNAL-ADDRESS:26656"/" \
$HOME/.celestia-app/config/config.toml
```
#### Restart the node
After making these changes, restart `celestia-appd` to load the new
configurations.
### Optional: Transaction indexer configuration options
This section guides you on how to configure your `config.toml`
file in `celestia-app` to select which transactions to index.
Depending on the application's configuration, a node operator
may decide which transactions to index.
The available options are:
1. `null` (default): This option disables indexing outside of
transaction status. If you don't need to query transaction data,
you can choose this option to save space.
2. `kv`: This is the simplest indexer, backed by
PebbleDB key-value storage.
When `kv` is chosen, `tx.height` and `tx.hash` will always be
indexed. This option is suitable for basic queries on transactions.
3. `psql`: This indexer is backed by PostgreSQL. When psql is chosen,
`tx.height` and `tx.hash` will always be indexed. This option is
suitable for complex queries on transactions.
An example to set the value to `kv` in `config.toml` is:
```toml
indexer = "kv"
```
Remember to restart `celestia-appd` after making changes to the
configuration to load the new settings.
### Optional: Discard ABCI responses configuration
This section will guide you on how to configure your `config.toml` file in
`celestia-app` to manage the storage of ABCI responses. ABCI responses are
the results of executing transactions and are used for `/block_results` RPC
queries and to reindex events in the command-line tool.
The `discard_abci_responses` option allows you to control whether these
responses are persisted in the state store:
- `false` (default): ABCI responses are stored in the state store. This
ensures that ABCI responses are available for `/block_results` RPC queries
and for reindexing events. However, it can consume a significant amount
of disk space.
- `true`: ABCI responses are not stored in the state store. This can
save a considerable amount of disk space, but `/block_results` RPC queries
and event reindexing will not be available.
An example to set the value to false in `config.toml` is:
```toml
discard_abci_responses = false
```
Remember to restart `celestia-appd` after making changes to the
configuration to load the new settings.
### Optional: Reduce log level
To reduce the log level, you can modify the `log_level` field in your `config.toml` file.
```diff
# Output level for logging, including package level options
-log_level = "info"
+log_level = "*:error,p2p:info,state:info"
```
### Passthrough command for historical queries
Starting with celestia-app v4 the `passthrough` command allows you to invoke queries on historical app versions. This is particularly useful when you need to query data from before a major version upgrade occurred.
#### When to use the passthrough command
The passthrough command is useful in scenarios where:
- You need to query state or transactions that existed before a major app version upgrade
- You're running a post-upgrade node but need to access data using the query format from a previous version
- You're debugging issues related to version compatibility after an upgrade
#### Basic usage
```sh
celestia-appd passthrough [app-version] [command] [flags]
```
Where:
- `[app-version]` is the historical app version you want to query against (e.g., `v1`, `v2`, `v3`)
- `[command]` is the command you want to execute using that app version's format
#### Examples
Query account balance using app version 1 format:
```sh
celestia-appd passthrough v1 query bank balances [address]
```
Query validator information using app version 2 format:
```sh
celestia-appd passthrough v2 query staking validator [validator-address]
```
Query transaction using app version 3 format:
```sh
celestia-appd passthrough v3 query tx [transaction-hash]
```
#### Important considerations
- The passthrough command requires that your node has the historical data for the version you're querying
- Not all query types may be available for all historical versions
- This command is most useful immediately after major version upgrades when you need backward compatibility
- Ensure your node is fully synced before using passthrough queries for accurate results
#### Getting help
To see all available options for the passthrough command:
```sh
celestia-appd passthrough --help
```
To see available commands for a specific app version:
```sh
celestia-appd passthrough [app-version] --help
```
---
Title: Run a Fibre server
URL: https://docs.celestia.org/operate/consensus-validators/fibre.md
Source: app/operate/consensus-validators/fibre/page.mdx
---
# Run a Fibre server
Fibre is a data availability service that validators run alongside
celestia-app. Clients upload blob shards to validator-operated Fibre servers
and download them from there, and each server's storage budget is derived from
the validator's stake. Starting with app version 10, every bonded validator is
expected to run one. See the
[Fibre server reference](https://github.com/celestiaorg/celestia-app/blob/v10.4.0-mocha/fibre/cmd/README.md)
for the protocol details.
The examples use the Mocha release `v10.4.0-mocha`, its
matching Fibre binary, and the Mocha chain ID. Substitute the values for your
network.
Mocha has activated app version 10. Bonded Mocha validators can now start Fibre
and register their public address. See the
[Mocha-5 upgrade history](/operate/maintenance/network-upgrades#mocha-5).
Installing a v10 binary does not activate app version 10 on the chain. Prepare
the binaries and configuration before activation, then start Fibre and register
its address after activation. Follow the upgrade announcement for your network
for timing.
## Prerequisites
- A running, synced [validator node](/operate/consensus-validators/validator-node)
in the bonded validator set. Fibre derives its storage budget from your stake.
- The v10 multiplexer celestia-app binary installed before activation. Follow the
[release upgrade instructions](https://github.com/celestiaorg/celestia-app/releases/tag/v10.4.0-mocha)
and check the [celestia-app installation requirements](/operate/consensus-validators/install-celestia-app#linux-requirements).
- Separate disks for Fibre data and celestia-app data, and enough memory for
the receive buffers described in [Plan capacity](#plan-capacity).
- If your consensus key lives in an external key management system (KMS), the
KMS must support the `SignRawBytes` request and keep median signing latency
at or below 10 ms. Fibre talks to the node's signing service, which forwards
requests to the KMS.
Any KMS may be used if it meets these requirements. Review the release's
[KMS policy](https://github.com/celestiaorg/celestia-app/blob/v10.4.0-mocha/docs/release-notes/release-notes.md#key-management-systems-kms)
before choosing or upgrading a signer. It describes Horcrux's maintenance
risks and the risk of double signing and slashing from incorrect KMS
configuration.
The 10 ms requirement is measured on celestia-app, not on Fibre. Nodes using a
remote signer expose `cometbft_privval_signing_latency_*` Prometheus metrics,
and the node logs a warning when the median of the last 50 signatures exceeds
10 ms. Collect these through the
[validator metrics setup](/operate/consensus-validators/metrics) and colocate
the signing infrastructure if needed to stay within the threshold.
## Plan capacity
Store Fibre data on a different disk from celestia-app data, so that growth in
one service cannot exhaust the space available to the other.
Memory is dominated by gRPC receive buffers. Each in-flight upload stream can
buffer a full message of about 132 MiB, and two settings in Fibre's
`server_config.toml` bound how many streams can be in flight at once:
| Setting | Default | Limits |
|---|---|---|
| `max_connections` | `16` | Client connections to the server |
| `max_concurrent_streams` | `13` | Concurrent gRPC streams per connection |
```text
worst-case receive buffers ≈ max_connections × max_concurrent_streams × 132 MiB
```
With the defaults that is about 27 GiB. Size the host for that figure plus
celestia-app, Fibre's other work, and the operating system. Raise the limits
only when the host has memory to spare.
An upload uses all 16 default connection slots, which blocks concurrent
downloads프로젝트로 돌아가기