bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 23쪽 중 6쪽
r, pin a fixed version rather than `latest`:
```toml
identity = {
source = "gcp_secret",
secret = "projects/<YOUR_PROJECT>/secrets/<YOUR_SECRET>/versions/1",
}
```
## 2. Generate Identity and Deploy
```bash
cd <YOUR_GRAVITY_SDK_PATH>/cluster
just init cluster-validator.toml
just deploy cluster-validator.toml
```
Expected layout:
```
<YOUR_DEPLOY_BASE_DIR>/validator-1/config/
<YOUR_DEPLOY_BASE_DIR>/validator-1/data/
<YOUR_DEPLOY_BASE_DIR>/validator-1/script/start.sh
<YOUR_DEPLOY_BASE_DIR>/validator-1/script/stop.sh
```
The public identity used during `validator join` is written to:
```
<YOUR_GRAVITY_SDK_PATH>/cluster/output/validator-1/config/identity.public.yaml
```
## 3. Optional: Warm Start the Databases
To reduce cold-sync time, copy only chain databases from an existing RPC/PFN you control:
```bash
cd <YOUR_EXISTING_NODE_DATA_DIR>
tar -cf - consensus_db quorumstoreDB reth | \
ssh <YOUR_TARGET_HOST> \
"mkdir -p <YOUR_DEPLOY_BASE_DIR>/validator-1/data && \
cd <YOUR_DEPLOY_BASE_DIR>/validator-1/data && tar -xf -"
```
Do **not** copy another node's `secure_storage.json`. It contains safety-rules owner and consensus-key state. Reusing it can produce errors such as:
```
The validator is not in the validator set. Address not in set: <OLD_OWNER_ACCOUNT>
```
## 4. Fund the Validator Account
Set common variables:
```bash
export RPC_URL="https://mainnet-rpc.gravity.xyz"
export VALIDATOR_ADDRESS="<YOUR_VALIDATOR_EVM_ADDRESS>"
export STAKE_AMOUNT="<YOUR_STAKE_AMOUNT>"
export STAKING_ADDRESS="<STAKING_CONTRACT_ADDRESS>"
export VALIDATOR_MANAGER_ADDRESS="<VALIDATOR_MANAGER_CONTRACT_ADDRESS>"
export GOVERNANCE_ADDRESS="<GOVERNANCE_CONTRACT_ADDRESS>"
```
Fund the validator account with enough balance for stake and gas:
```bash
cast balance "$VALIDATOR_ADDRESS" --rpc-url "$RPC_URL"
```
The validator account must sign StakePool and validator lifecycle operations. Use your normal secure signing workflow. If `gravity_cli` prompts for a key on stdin, ensure the signer is the StakePool operator.
## 5. Create a StakePool
Use the validator account to create a StakePool:
```bash
gravity_cli stake create \
--rpc-url "$RPC_URL" \
--stake-amount "$STAKE_AMOUNT" \
--lockup-duration <YOUR_LOCKUP_SECONDS> \
--gas-limit <YOUR_GAS_LIMIT>
```
Record the created pool:
```bash
export STAKE_POOL="<YOUR_STAKE_POOL_ADDRESS>"
```
Verify:
```bash
gravity_cli stake get \
--rpc-url "$RPC_URL" \
--owner "$VALIDATOR_ADDRESS"
cast call "$STAKING_ADDRESS" \
"isPool(address)(bool)" "$STAKE_POOL" \
--rpc-url "$RPC_URL"
```
If the chain enforces a minimum lockup duration, do not set the lockup exactly at the minimum. Add a buffer so timestamp drift does not trigger `LockupDurationTooShort`.
## 6. Whitelist the StakePool
The whitelist target is the StakePool address, not the validator EOA:
```solidity
ValidatorManagement.setValidatorPoolAllowed(address stakePool, bool allowed)
```
This call must go through governance. Direct calls from an EOA are expected to revert.
Create calldata:
```bash
export ALLOW_CALL=$(cast calldata \
"setValidatorPoolAllowed(address,bool)" \
"$STAKE_POOL" true)
```
Create, vote, resolve, and execute the proposal according to the current governance process:
```bash
cast send "$GOVERNANCE_ADDRESS" \
"createProposal(address,address[],bytes[],string)(uint64)" \
"<YOUR_PROPOSER_POOL>" \
"[$VALIDATOR_MANAGER_ADDRESS]" \
"[$ALLOW_CALL]" \
"add-validator-whitelist-validator-1" \
--rpc-url "$RPC_URL" \
--private-key <YOUR_PROPOSER_PRIVATE_KEY>
export PROPOSAL_ID="<YOUR_PROPOSAL_ID>"
cast send "$GOVERNANCE_ADDRESS" \
"vote(address,uint64,uint128,bool)" \
"<YOUR_PROPOSER_POOL>" "$PROPOSAL_ID" \
340282366920938463463374607431768211455 true \
--rpc-url "$RPC_URL" \
--private-key <YOUR_PROPOSER_PRIVATE_KEY>
cast send "$GOVERNANCE_ADDRESS" \
"resolve(uint64)" "$PROPOSAL_ID" \
--rpc-url "$RPC_URL" \
--private-key <YOUR_PROPOSER_PRIVATE_KEY>
cast send "$GOVERNANCE_ADDRESS" \
"execute(uint64,address[],bytes[])" \
"$PROPOSAL_ID" \
"[$VALIDATOR_MANAGER_ADDRESS]" \
"[$ALLOW_CALL]" \
--rpc-url "$RPC_URL" \
--private-key <YOUR_GOVERNANCE_EXECUTOR_PRIVATE_KEY>
```
Confirm the pool is allowed:
```bash
cast call "$VALIDATOR_MANAGER_ADDRESS" \
"isValidatorPoolAllowed(address)(bool)" "$STAKE_POOL" \
--rpc-url "$RPC_URL"
```
## 7. Join the Validator Set
Read the node's public identity:
```bash
export CONSENSUS_PUBLIC_KEY=$(yq -r '.consensus_public_key' \
<YOUR_GRAVITY_SDK_PATH>/cluster/output/validator-1/config/identity.public.yaml)
export CONSENSUS_POP=$(yq -r '.consensus_pop' \
<YOUR_GRAVITY_SDK_PATH>/cluster/output/validator-1/config/identity.public.yaml)
export NETWORK_PUBLIC_KEY=$(yq -r '.network_public_key' \
<YOUR_GRAVITY_SDK_PATH>/cluster/output/validator-1/config/identity.public.yaml)
```
Join:
```bash
gravity_cli validator join \
--rpc-url "$RPC_URL" \
--stake-pool "$STAKE_POOL" \
--consensus-public-key "$CONSENSUS_PUBLIC_KEY" \
--consensus-pop "$CONSENSUS_POP" \
--network-public-key "$NETWORK_PUBLIC_KEY" \
--validator-network-address "/dns/<YOUR_VALIDATOR_HOST>/tcp/6180" \
--fullnode-network-address "/dns/<YOUR_VALIDATOR_HOST>/tcp/6190" \
--moniker "validator-1" \
--gas-limit <YOUR_GAS_LIMIT>
```
The signer must be the StakePool operator.
## 8. Start and Verify
```bash
bash <YOUR_DEPLOY_BASE_DIR>/validator-1/script/start.sh
```
Check validator set and epoch status:
```bash
gravity_cli validator list --rpc-url "$RPC_URL"
gravity_cli epoch status --rpc-url "$RPC_URL"
cast call "$VALIDATOR_MANAGER_ADDRESS" \
"getValidatorStatus(address)(uint8)" "$STAKE_POOL" \
--rpc-url "$RPC_URL"
```
Status values:
| Value | Status |
| ----- | ------------------ |
| `0` | `INACTIVE` |
| `1` | `PENDING_ACTIVE` |
| `2` | `ACTIVE` |
| `3` | `PENDING_INACTIVE` |
After joining, a validator usually enters `PENDING_ACTIVE` and becomes `ACTIVE` after an epoch transition.
You can also check node health:
```bash
gravity_cli status --rpc-url "$RPC_URL"
curl -s http://127.0.0.1:8545 \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```
## Leave the Validator Set
To leave:
```bash
gravity_cli validator leave \
--rpc-url "$RPC_URL" \
--stake-pool "$STAKE_POOL" \
--gas-limit <YOUR_GAS_LIMIT>
```
If the validator is `ACTIVE`, it becomes `PENDING_INACTIVE` and exits after the next epoch transition. If it is still `PENDING_ACTIVE`, it can become `INACTIVE` immediately.
Verify:
```bash
gravity_cli validator list --rpc-url "$RPC_URL"
```
## Troubleshooting
| Symptom | Cause / fix |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `isValidatorPoolAllowed` returns `false` | The governance whitelist proposal has not executed, or it targeted the wrong StakePool. |
| `LockupDurationTooShort` | Increase the lockup duration above the minimum with a buffer. |
| Validator remains `PENDING_ACTIVE` | Activation normally happens at the next epoch transition. Check `gravity_cli epoch status`. |
| `Address not in set: <OLD_OWNER_ACCOUNT>` | Another node's `secure_storage.json` was copied. Remove it and regenerate/redeploy with the correct identity. |
| Node paths do not point to `<node>/data` | `data_dir` should be the deploy directory, not the database directory. |
## See Also
* [Run a Gravity Mainnet Public Full Node](/gravity-networks/run-a-mainnet-pfn)
* [Run a Gravity Mainnet VFN](/gravity-networks/run-a-mainnet-vfn)
* [Gravity Mainnet (L1)](/gravity-networks/l1-mainnet)
* [Gravity Mainnet (L1) Contracts](/developer-resources/mainnet)
# Node Operation Anti-Patterns
Node operation mistakes that cause sync problems on Gravity L1, with the symptoms to look for, why they happen, how to confirm them, and how to fix them.
This page collects node operation mistakes that cause sync problems on Gravity L1. Each entry lists what you will see, why it happens, how to confirm it, and how to fix it. The guidance applies to PFNs, VFNs, and validators unless an entry says otherwise.
## Sharing One Network Identity Across Nodes
**Anti-pattern:** running two or more nodes with the same `identity.yaml`, or pointing two nodes at the same identity secret.
This usually happens when a second node is created by copying an existing one: the whole deploy directory, a Docker workspace, or the `cluster/output/<node>/` tree. `just init` reuses an identity that already exists in `cluster/output/<node>/config/`, so copying that tree also copies the identity.
### Symptoms
* The node height moves in a **staircase**. It stays flat for most of an epoch, catches up about one epoch of blocks right after each epoch change (roughly every 2 hours on Mainnet), and then goes flat again. It stays about one epoch behind the chain head and never reaches it.
* Another node that shares the identity also syncs slowly or stalls.
* The node's connections to its upstream seeds close and reopen every few seconds.
### Why It Happens
A node's network identity is the x25519 network key in `identity.yaml`. Other nodes identify it by the peer ID derived from that key (`account_address` in `identity.public.yaml`), and an upstream node keeps at most **one connection per peer ID**. When two nodes share an identity, each new connection from one node replaces the other node's existing connection. The upstream node logs this as:
```
Closing existing connection with Peer <peer_id> to mitigate simultaneous dial
```
Requests that were still in flight on the replaced connection fail. The two sync paths react to this differently:
* **Catching up inside the current epoch** fetches the missing range in one pass and only keeps it after the whole range arrives. A dropped connection anywhere in the pass discards the work, and the next attempt starts again against a newer chain head. When the connection is replaced every few seconds, the pass never completes.
* **Syncing an epoch that has already ended** persists every batch and resumes from the node's local position after an interruption. It keeps advancing, but only after each epoch change.
Together these produce the staircase.
### How to Confirm
Compare the identity files of every node you run. Each node must have its own identity.
```bash
# Run on each host, then compare the hashes. Equal hashes mean a shared identity.
sha256sum <YOUR_DEPLOY_BASE_DIR>/<YOUR_NODE_ID>/config/identity.yaml
```
For the Docker flow, check `config/identity.yaml` in each Docker workspace instead. For `identity.source = "gcp_secret"`, check that each node references a different secret.
If you cannot reach every host, check the node's consensus log for upstream connections that close and reconnect every few seconds. You can also contact the Gravity team with your node's peer ID and ask whether upstream nodes see its connection being replaced repeatedly.
### Fix
Keep one node on the existing identity and give every other node a new one. For a **PFN**:
1. Stop the duplicate node.
2. Move its old identity out of the way and generate a new one in place:
```bash
CONFIG_DIR=<YOUR_DEPLOY_BASE_DIR>/<YOUR_NODE_ID>/config
mv "$CONFIG_DIR/identity.yaml" "$CONFIG_DIR/identity.yaml.shared.bak"
gravity_cli genesis generate-key \
--output-file "$CONFIG_DIR/identity.yaml" \
--public-output-file "$CONFIG_DIR/identity.public.yaml"
```
For the Docker flow, set `CONFIG_DIR` to that Docker workspace's `config` directory. Do not re-run the Docker guide's `just init` step for this: it reuses the identity already generated for the same node `id`. For `identity.source = "gcp_secret"`, create a separate secret for the node.
3. Start the node again. Chain data does not need to be reset.
4. Confirm that both nodes now advance during an epoch, not only right after an epoch change.
If other nodes dial this PFN as a seed, give them the new `account_address` and `network_public_key` from `identity.public.yaml`.
For a **VFN or validator**, do not rotate the identity on your own. Other nodes and the validator set reference it. Stop the duplicate and contact the Gravity team.
### Prevention
* Create every node's identity with its own node `id` in `cluster.toml`. This includes Docker nodes: running the Docker guide's identity step again with the same `id` returns the same identity. Do not copy `cluster/output/<node>/`, a deploy directory, or a Docker workspace to bring up another node.
* To warm-start a new node from an existing one, copy only the chain databases (`consensus_db`, `quorumstoreDB`, and `reth`), as described in [Copy From an Existing Node You Control](/gravity-networks/run-a-mainnet-pfn#option-b-copy-from-an-existing-node-you-control).
* Use one identity secret per node.
## See Also
* [Run a Gravity Mainnet Public Full Node](/gravity-networks/run-a-mainnet-pfn)
* [Run a Gravity Mainnet Public Full Node With Docker](/gravity-networks/run-a-mainnet-pfn-with-docker)
* [Run a Gravity Mainnet VFN](/gravity-networks/run-a-mainnet-vfn)
# Gravity Longevity Testnet (L1)
## **Network Details**
* **Chain ID:** `7771625`
* **Status:** Long-running testnet — no planned resets.
* **Configuration:** See [genesis/testnet](https://github.com/Galxe/gravity-sdk/tree/main/genesis/testnet) for the exact version and network configuration.
* **Hardforks:** See [Longevity Testnet Hardforks](/gravity-networks/testnet-hardforks) for the activation schedule and required node version.
* **Run a PFN:** [binary](/gravity-networks/run-a-testnet-pfn) · [Docker](/gravity-networks/run-a-testnet-pfn-with-docker)
## **Developer Resources**
* **Faucet:** [Gravity Testnet Faucet](https://faucet.gravity.xyz/)
* **Explorer:** [Gravity Testnet Explorer](https://explorer-testnet.gravity.xyz/)
* **RPC Endpoint:** [Gravity Testnet RPC](https://testnet-rpc.gravity.xyz)
## **Performance Benchmarking**
Benchmarking of the Gravity L1, conducted under controlled conditions, indicates the following performance metrics:
* **Block Time:** \~200ms
* **ERC20 Transfer Throughput:** \~**9,500 – 11,000 TPS** on a 3-validator cluster (8 vCPU / 16 GB RAM per node); limited by disk I/O persistence latency, not CPU or execution.
For detailed results and bottleneck analysis, see [3-Validator Cluster Benchmark Results](/research-and-development/benchmark-results).
For instructions on how to reproduce these results, refer to the [Benchmark Reproduction Guide](/research-and-development/benchmark-guide).
# Gravity Longevity Testnet Hardforks
Gravity Longevity Testnet (L1) hardfork schedule, how activations are stored, and the node version needed to follow the live chain.
Longevity Testnet (chain ID `7771625`) activation times live in each node's `genesis.json` under `config.<name>` (for example `pragueTime`, `alphaTime`). Rolling upgrades append those fields. They are **not** compiled into `gravity_node` the way [Mainnet hardforks](/gravity-networks/mainnet-hardforks) are.
A public full node must use:
1. a `genesis.json` / `waypoint.txt` pair that matches the live chain identity and hardfork schedule; and
2. a `gravity_node` release that implements every fork already activated on testnet.
## Current required version
Testnet operators are on [v1.10.1-testnet](https://github.com/Galxe/gravity-sdk/releases/tag/v1.10.1-testnet) (or newer) after the TestnetOwnerFix activation. Build or pull that tag before syncing a new PFN to the live tip.
```bash
docker pull ghcr.io/galxe/gravity_node:v1.10.1-testnet
```
Canonical artifacts:
* Genesis / waypoint: [`gravity-sdk/genesis/testnet`](https://github.com/Galxe/gravity-sdk/tree/main/genesis/testnet)
* Network overview: [Gravity Longevity Testnet (L1)](/gravity-networks/l1-longevity-testnet)
* Deploy a PFN: [binary](/gravity-networks/run-a-testnet-pfn) · [Docker](/gravity-networks/run-a-testnet-pfn-with-docker)
## Schedule
Newest first. Times are taken from live `debug_chainConfig` and match the recorded upgrade plans under `mono-grav/docs/testnet/upgrades/`. Rows other than TestnetOwnerFix have already activated; TestnetOwnerFix is scheduled.
| Hardfork | Activation (UTC) | Unix | First release used on testnet |
| --------------------------- | ------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------- |
| TestnetOwnerFix (scheduled) | 2026-09-04 03:00:00 | `1788490800` | [v1.10.1-testnet](https://github.com/Galxe/gravity-sdk/releases/tag/v1.10.1-testnet) |
| Gamma | 2026-08-19 03:00:00 | `1787108400` | [v1.10.0-pre](https://github.com/Galxe/gravity-sdk/releases/tag/v1.10.0-pre) |
| Beta + Osaka | 2026-08-04 03:00:00 | `1785812400` | [v1.9.0](https://github.com/Galxe/gravity-sdk/releases/tag/v1.9.0) |
| Alpha | 2026-07-06 09:00:00 | `1783328400` | live genesis field (`alphaTime`; no archived upgrade JSON) |
| Prague | 2026-06-08 09:04:02 | `1780909442` | [`v1.6.3`](https://github.com/Galxe/gravity-sdk/tree/v1.6.3) (upgrade artifact labeled `gravity-mainnet-v1.6.3`) |
Beijing (UTC+8) equivalents: TestnetOwnerFix 11:00, Gamma 11:00, Beta/Osaka 11:00, Alpha 17:00, Prague 17:04:02 on the same calendar dates.
## Testnet vs mainnet
| | Longevity Testnet | Mainnet |
| -------------------- | ---------------------------------- | -------------------------------------------------------- |
| Chain ID | `7771625` | `127001` |
| Where times live | `genesis.json` `config.*` fields | compiled into `gravity_node` |
| Editing genesis | updates the schedule for that node | does not override the binary |
| Public schedule page | this page | [Mainnet hardforks](/gravity-networks/mainnet-hardforks) |
Do not copy mainnet unix timestamps onto testnet (or the reverse). The two networks activate the same fork names on different clocks.
## If you miss a hardfork
A node on older rules computes a different execution hash once the network has moved on. The first mismatched block stops the process. RPC height stops increasing. This is fail-stop: the node does not keep serving a private fork.
Search logs for:
```
commit_info mismatch
Block hash mismatch
assertion `left == right` failed
```
There is no dedicated "hardfork missed" message.
Recovery for a public full node is usually: install a current release, load a genesis that includes the live hardfork fields, then warm-start from the [testnet data snapshot](/gravity-networks/run-a-testnet-pfn#5-optional-warm-start-from-a-snapshot-or-existing-node) instead of replaying from block zero.
## See also
* [Gravity Longevity Testnet (L1)](/gravity-networks/l1-longevity-testnet)
* [Run a Gravity Testnet Public Full Node](/gravity-networks/run-a-testnet-pfn)
* [Run a Gravity Testnet Public Full Node With Docker](/gravity-networks/run-a-testnet-pfn-with-docker)
* [Gravity Mainnet Hardforks](/gravity-networks/mainnet-hardforks)
# Run a Gravity Testnet Public Full Node
Run a Gravity Longevity Testnet (L1) Public Full Node. Covers binaries, testnet genesis artifacts, the public-network seed, deployment, database warm start, and sync verification for a PFN/RPC endpoin
This guide walks you through running a Public Full Node (PFN) on Gravity Longevity Testnet (L1, Chain ID `7771625`). A PFN syncs from an upstream public or VFN seed and can serve EVM JSON-RPC for your applications, indexers, or internal services.
A PFN does **not** participate in consensus, does **not** hold validator stake, and does **not** require an invite. If you only need occasional reads or writes, you can use the public endpoint at <https://testnet-rpc.gravity.xyz> instead.
{% hint style="warning" %}
**Required version.** Longevity Testnet nodes must run [v1.10.0-pre](https://github.com/Galxe/gravity-sdk/releases/tag/v1.10.0-pre) (or newer) to follow the live tip after Gamma. See [Gravity Longevity Testnet Hardforks](/gravity-networks/testnet-hardforks).
{% endhint %}
> **Placeholders.** Commands below use `<YOUR_...>` placeholders. Replace each value before ru프로젝트로 돌아가기