Aptos Wiki
MoveMove 社区Aptos 链接合集Sui WikiStarcoin Wiki
  • 🎉欢迎
  • 💡概览
    • 起源
    • 愿景
    • 主网路线图
    • 激励测试网(1)
    • 技术路线图
    • 激励测试网(2)
    • 激励测试网(3)
    • 激励测试网(4)
  • 📌基础
    • 账户(Account)
    • 事件(Events)
    • 证明(Proof)
    • Gas 和交易费
    • 节点网络和同步
    • 验证者节点
    • 全节点
    • 交易和状态
  • 🔄交易
    • 与 Aptos 区块链交互
  • 📓教程
    • Petra 钱包插件安装使用
    • 教程指引
    • 您的第一笔交易
    • 您的第一个 Move 模块
    • 您的第一个 NFT
    • 运行本地网络
    • 开发网 Devnet
      • 运行全节点(官方教程)
      • 运行全节点(社区教程)
        • Windows
        • Linux
    • 测试网 Testnet
      • 社区教程
        • AIT-3 新功能
        • 节点要求
        • AIT-3 步骤
        • 使用 Docker
        • 全节点搭建
        • 加入测试网
        • 离开激励测试网
  • 🖊️博客
    • Block-STM:我们如何在 Aptos 区块链上每秒执行超过 16 万笔交易
  • 🗻生态
    • Aptos 宣布资助计划!
    • Aptos 生态项目汇总
      • 聚合器
        • Hippo Labs
      • Defi
        • 🟢Pontem Network
        • 🟢Vial Protocol
        • 1KX Protocol
        • Seam Money
        • Aries Markets
        • Empo Finance
        • Ultima protocol
        • Econia
        • Zaptos Finance
        • Laminar Market
        • Thala Labs
        • AptoSwap
        • Aptoslend
        • ASwap
      • 基础设施
        • 🟢Aptos 域名服务
        • Nutrios
        • Dialect
        • Switchboard
      • NFT
        • 🟢Topaz NFT Marketplace
        • TokenMasksLabs
        • Clone Protocol
        • Aptos Ape Society
      • 钱包
        • 🟢Fewcha Wallet
        • 🟢Martian Wallet
        • Volt.id wallet
        • ONTO Wallet
        • Hive Wallet
        • Blocto
      • 工具
        • ChainIDE
        • Paymagic
        • Aptosphere
        • Saber Labs
  • ❓问题(FAQ)
    • 常见问题
    • 如何分享自己的节点
    • 如何运行多个节点
    • 如何修改节点配置文件
Powered by GitBook
On this page
  1. 问题(FAQ)

如何修改节点配置文件

Previous如何运行多个节点

Last updated 3 years ago

本篇提供给源码方式运行节点的社区用户,作为学习交流。

编辑 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

❓