如何修改节点配置文件
本篇提供给源码方式运行节点的社区用户,作为学习交流。
编辑 public_full_node.yaml,配置文件,可修改以下内容:
  • base.data_dir: 数据存储目录;
  • full_node_networks[0].listen_address: peer 监听地址及端口;
  • debug_interface.admission_control_node_debug_port: DEBUG 端口;
  • debug_interface.metrics_server_port: 指标获取端口;
  • debug_interface.public_metrics_server_port: 指标获取端口;
  • api.address: API 接口地址及端口;
需要修改的内容如下图标注所示:
配置文件内容:
base:
# This is the location Aptos will store its database. It is backed by a dedicated docker volume
# for persistence.
data_dir: "/opt/aptos/data"
role: "full_node"
waypoint:
# This is a checkpoint into the blockchain for added security.
from_file: "/opt/aptos/etc/waypoint.txt"
execution:
# Path to a genesis transaction. Note, this must be paired with a waypoint. If you update your
# waypoint without a corresponding genesis, the file location should be an empty path.
genesis_file_location: "/opt/aptos/etc/genesis.blob"
full_node_networks:
- network_id: "public"
discovery_method: "onchain"
# The network must have a listen address to specify protocols. This runs it locally to
# prevent remote, incoming connections.
listen_address: "/ip4/0.0.0.0/tcp/6180"
# Define the upstream peers to connect to
seeds:
bb14af025d226288a3488b4433cf5cb54d6a710365a2d95ac6ffbd9b9198a86a:
addresses:
- "/dns4/pfn0.node.devnet.aptoslabs.com/tcp/6182/ln-noise-ik/bb14af025d226288a3488b4433cf5cb54d6a710365a2d95ac6ffbd9b9198a86a/ln-handshake/0"
role: "Upstream"
7fe8523388084607cdf78ff40e3e717652173b436ae1809df4a5fcfc67f8fc61:
addresses:
- "/dns4/pfn1.node.devnet.aptoslabs.com/tcp/6182/ln-noise-ik/7fe8523388084607cdf78ff40e3e717652173b436ae1809df4a5fcfc67f8fc61/ln-handshake/0"
role: "Upstream"
f6b135a59591677afc98168791551a0a476222516fdc55869d2b649c614d965b:
addresses:
- "/dns4/pfn2.node.devnet.aptoslabs.com/tcp/6182/ln-noise-ik/f6b135a59591677afc98168791551a0a476222516fdc55869d2b649c614d965b/ln-handshake/0"
role: "Upstream"
debug_interface:
admission_control_node_debug_port: 6191
address: "0.0.0.0"
metrics_server_port: 9101
public_metrics_server_port: 9102
api:
# This specifies your REST API endpoint. Intentionally on public so that Docker can export it.
address: 0.0.0.0:8080
Copy link