Create a virtual machine

检查我的进度

/ 10

Install the EOSIO platform on the virtual machine

检查我的进度

/ 10

Create a default wallet

检查我的进度

/ 10

Add the private key of the eosio system account to the wallet

检查我的进度

/ 10

Install the EOSIO Contract Development Toolkit

检查我的进度

/ 10

Build the system contracts and eosio.boot

检查我的进度

/ 10

Start boot node and create system accounts

检查我的进度

/ 10

Create and deploy the eosio.token, eosio.msig contracts, and SYS token

检查我的进度

/ 10

Deploy eosio.boot and eosio.system contracts

检查我的进度

/ 10

Create the block producer accounts

检查我的进度

/ 5

Transition from single node producer to multi node producers

检查我的进度

/ 5

此实验可能会提供 AI 工具来支持您学习。

本实验由 Google 与我们的合作伙伴 Block.one 共同开发。如果您在账号资料中选择接收产品动态、通知和优惠信息,我们可能会与实验赞助商 Block.one 共享您的个人信息。

GSP991

Google Cloud 自学实验

概览

在本实验中,您将对单节点 EOSIO 区块链进行扩展,使其支持多个节点。您将安装各种 EOSIO 软件组件,以便搭建您的多节点 EOSIO 区块链。最后,您将在新的 EOSIO 区块链上执行一些节点运维任务。

目标

在本实验中,您将学习如何执行以下任务:

  • 加载现有的 Compute Engine 虚拟机。
  • 安装并构建 EOSIO 系统合约。
  • 部署具有四 (4) 个 EOSIO 节点的多节点区块链。
  • 在该 EOSIO 多节点区块链上创建用户账号。
  • 通过调用操作在用户账号间进行代币转账。

前提条件

在开始本实验之前,建议您先完成标题为 Block.one:EOSIO 区块链使用入门的实验。

此外,建议您熟悉以下概念:

设置和要求

点击“开始实验”按钮前的注意事项

请阅读以下说明。实验是计时的,并且您无法暂停实验。计时器在您点击开始实验后即开始计时,显示 Google Cloud 资源可供您使用多长时间。

此实操实验可让您在真实的云环境中开展实验活动,免受模拟或演示环境的局限。为此,我们会向您提供新的临时凭据,您可以在该实验的规定时间内通过此凭据登录和访问 Google Cloud。

为完成此实验,您需要:

  • 能够使用标准的互联网浏览器(建议使用 Chrome 浏览器)。
注意:请使用无痕模式(推荐)或无痕浏览器窗口运行此实验。这可以避免您的个人账号与学生账号之间发生冲突,这种冲突可能导致您的个人账号产生额外费用。
  • 完成实验的时间 - 请注意,实验开始后无法暂停。
注意:请仅使用学生账号完成本实验。如果您使用其他 Google Cloud 账号,则可能会向该账号收取费用。

如何开始实验并登录 Google Cloud 控制台

  1. 点击开始实验按钮。如果该实验需要付费,系统会打开一个对话框供您选择支付方式。右侧是实验设置和访问权限面板,其中包含以下内容:

    • 打开 Google Cloud 控制台按钮
    • 您在本实验中必须使用的临时凭证(用户名和密码)
    • 帮助您逐步完成该实验所需的其他信息(如果需要)

    请注意,实验计时器位于页面顶部附近,将显示剩余时间。

  2. 点击打开 Google Cloud 控制台(如果您使用的是 Chrome 浏览器,请右键点击并选择在无痕式窗口中打开链接)。

    该实验会启动资源并打开另一个标签页,显示“登录”页面。

    提示:可以将这些标签页分别放在不同的窗口中,并排显示。

    注意:如果您看见选择账号对话框,请点击使用其他账号
  3. 如有必要,请复制下方的用户名,然后将其粘贴到登录对话框中。

    {{{user_0.username | "<用户名>"}}}

    您也可以在实验设置和访问权限面板中找到“用户名”。

  4. 点击下一步

  5. 复制下面的密码,然后将其粘贴到欢迎对话框中。

    {{{user_0.password | "<密码>"}}}

    您也可以在实验设置和访问权限面板中找到“密码”。

  6. 点击下一步

    重要提示:您必须使用实验提供的凭证。请勿使用您的 Google Cloud 账号凭证。 注意:在本实验中使用您自己的 Google Cloud 账号可能会产生额外费用。
  7. 依次点击进入后续页面:

    • 接受条款及条件。
    • 由于这是临时账号,请勿添加账号恢复选项或双重身份验证。
    • 请勿注册免费试用。

片刻之后,系统会在此标签页中打开 Google Cloud 控制台。

注意:如需访问 Google Cloud 产品和服务,请点击导航菜单,或在搜索字段中输入服务或产品的名称。 “导航菜单”图标和“搜索”字段

背景

本部分简要介绍了本实验涉及的概念。

EOSIO 区块链

EOSIO 区块链是一种高效、确定性的分布式状态机,支持以去中心化方式运行。区块链通过一系列相互连接的区块来记录交易。每个区块都通过密码学方式对同一条链上的前序区块做出承诺。因此,在不破坏后续区块密码学校验的情况下,想要修改记录在特定区块上的交易是极难实现的。正是这一简单的事实,确保了区块链交易的不可篡改性和安全性。区块的生产和验证由被称为“区块生产者”的特殊节点完成。

EOSIO 共识

在任何分布式节点组中,实现区块验证都是一项挑战。去中心化系统必须引入共识机制,从而实现对此类区块的容错验证。共识是分布式节点和用户对区块链当前状态达成一致的方式。区块链中最常用的两种共识机制是工作量证明 (PoW) 和权益证明 (PoS)。在权益证明机制中,拥有最大权益或最高资产占比的节点拥有等效的决策权。一种有趣的变体是委托权益证明 (DPoS),即由大量参与者或权益持有者选举出少数代表,再由这些代表代其做出决策。EOSIO 采用委托权益证明 (DPoS) 机制来选举活跃生产者。这些生产者随后将获得授权,负责区块的出块、验证和签名,最终将其添加到区块链中。

EOSIO 账号、密钥和权限

账号用于标识 EOSIO 区块链中的参与者。参与者可以是个人,也可以是群组,具体取决于账号中分配的权限。账号还代表了智能合约的执行主体,负责向区块链中的其他账号推送操作,并从其他账号接收操作。EOSIO 中的密钥是采用 Base58 编码的二进制字符串,用于对交易、区块及其他消息进行签名和验证。密钥是在与账号关联的数字钱包中创建的。由于账号所有权完全取决于账号名称,更新与账号关联的密钥并不会危及安全性。一种涉及账号、权限和授权表的新型权限方案,决定了账号可以执行的操作,以及如何对构成交易的操作进行授权。为此,系统为每个账号分配了分层权限结构,并为每项权限配置了一对用于签名和验证的公钥与私钥。

EOSIO 智能合约

智能合约是一种底层软件库,包含了构成交易的各项操作的具体实现。它还定义了如何存储这些操作访问和处理的数据。在 EOSIO 中,智能合约使用 C++ 等高级语言编写,并编译为 WebAssembly (WASM) 二进制文件。此后,智能合约即可在区块链上的账号沙盒中部署并运行。

任务 1. 创建虚拟机

  1. 导航菜单 (“导航菜单”图标) 中,点击 Compute Engine > 虚拟机实例

  2. 点击创建实例,创建新实例。

  3. 机器配置中,

    选择以下值:

    • 名称instance-1
    • 区域
    • 可用区
    • 机器家族通用(默认)
    • 系列E2
    • 机器类型e2-standard-2(2 个 vCPU,8 GB 内存)
  4. 点击操作系统和存储空间

    点击更改开始配置启动磁盘,并选择以下各项的值:

    • 操作系统Ubuntu
    • 版本Ubuntu 22.04 LTS
    • 架构x86/64

    点击选择

  5. 点击创建,创建并启动该虚拟机。

注意:虚拟机可能需要大约两分钟的时间才能启动并完全就绪。

点击“检查我的进度”以验证是否完成了以下目标: 创建虚拟机

任务 2. 安装 EOSIO 平台

  1. 导航菜单 (“导航菜单”图标) 中,点击 Compute Engine > 虚拟机实例

您将看到您创建的虚拟机实例。

  1. 虚拟机实例列表中点击虚拟机实例 instance-1 所在行中的 SSH,以在该实例上打开命令提示符。系统会打开一个 shell 终端窗口。

  2. 首先,请务必更新虚拟机中的软件包列表:

sudo apt update
    sudo apt update 安装 libssl1.1 依赖项,它是 EOSIO 2.1.0 的必需组件,但 Ubuntu 22.04 及更高版本默认不包含该依赖项:
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb sudo apt install ./libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb
    获取 EOSIO 软件二进制文件,包括节点 p2p 软件 nodeos、CLI 客户端 cleos、钱包管理器 keosd 和其他工具: wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb sudo apt install ./libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb
    curl -LO https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb
    1. 安装 EOSIO 软件二进制文件。如有需要,请按 Enter 键安装任何必需的软件依赖项:
    sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb
      curl -LO https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb 确认已安装 nodeos:
    nodeos --version 响应内容为 nodeos 版本: sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb v2.1.0
    1. 确认已安装 cleos:
    cleos version client nodeos --version

    响应内容为 cleos 版本:

    v2.1.0 v2.1.0
    1. 确认已安装 keosd:
    keosd -v cleos version client

    响应内容为 keosd 版本:

    v2.1.0 v2.1.0
  1. 点击“检查我的进度”以验证是否完成了以下目标: 安装 EOSIO 平台
  2. 任务 3. 创建默认钱包 keosd -v

    钱包用于存储加密密钥,账号和生产者分别使用这些密钥对交易和区块进行签名。它们还提供了一个安全隔离区来执行签名,从而确保私钥始终保留在钱包内,不会外泄。若要更改区块链上的状态,您需要使用钱包来存储加密密钥并进行数字签名。

    v2.1.0

    首先,为由 EOSIO 钱包管理器 keosd 管理的所有钱包设置一个较长的解锁超时时长:

keosd --unlock-timeout 999999999 & 这样可以避免每 15 分钟(默认超时时长)就得重新解锁一次钱包。此操作还会启动
    keosd 守护程序服务。响应内容应如下所示:
  1. info thread-0 wallet_plugin.cpp:38 plugin_initialize ] initializing wallet plugin info thread-0 wallet_api_plugin.cpp:84 plugin_startup ] starting wallet_api_plugin info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/wallet/create ... info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/wallet/unlock info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/node/get_supported_apis
  2. 如果需要,请按 Enter 键以返回 shell 提示符。 keosd --unlock-timeout 999999999 &

    info thread-0 wallet_plugin.cpp:38 plugin_initialize ] initializing wallet plugin info thread-0 wallet_api_plugin.cpp:84 plugin_startup ] starting wallet_api_plugin info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/wallet/create ... info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/wallet/unlock info thread-0 http_plugin.cpp:983 add_handler ] add api url: /v1/node/get_supported_apis

    创建默认钱包并将钱包密码输出到名为 my_wallet_password 的文件中:

    cleos wallet create --file my_wallet_password
  1. 这将创建一个名为 default 的钱包。响应内容应如下所示:
  2. Creating wallet: default Save password to use in the future to unlock this wallet. Without password imported keys will not be retrievable. saving password to my_wallet_password cleos wallet create --file my_wallet_password

    钱包创建完成后,keosd 会默认打开并解锁该钱包。

    Creating wallet: default Save password to use in the future to unlock this wallet. Without password imported keys will not be retrievable. saving password to my_wallet_password

    如需查看所有受管理的钱包,请执行以下命令:
cleos wallet list 响应内容应如下所示: cleos wallet list

Wallets: [ "default *" ]

Wallets: [ "default *" ]

钱包名称旁边的星号表示该钱包已解锁

点击“检查我的进度”以验证是否完成了以下目标: 创建默认钱包

任务 4. 将 EOSIO 系统账号的私钥添加到钱包

每个新的 EOSIO 区块链都有一个名为 eosio 的默认系统账号。该账号最初用于搭建区块链。默认情况下,它与以下私钥相关联:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

将此私钥导入您的钱包,以便代表 eosio 账号对交易进行签名。

  1. 使用 cleos wallet open 命令打开默认钱包。请注意,该钱包现已打开并解锁。不过,如果钱包再次被锁定,您就需要执行以下操作:
cleos wallet open cleos wallet open

响应内容应如下所示:

Opened: default
    Opened: default
    1. 使用 cleos wallet unlock 命令并传递存储在 my_wallet_password 文件中的钱包密码,以解锁默认钱包:
    cleos wallet unlock <my_wallet_password cleos wallet unlock <my_wallet_password

    响应内容应如下所示:

    password: Unlocked: default
      password: Unlocked: default
      1. 使用 cleos wallet import 命令将 EOSIO 私钥 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 导入到默认钱包:
      cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

      响应内容应如下所示:

      imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

      imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

      这是与导入的私钥相对应的公钥。请忽略任何关于使用默认钱包的警告。在生产环境部署中,您可能需要为钱包命名,而不是使用默认名称。

      点击“检查我的进度”以验证是否完成了以下目标: 将 EOSIO 系统账号的私钥添加到钱包

      任务 5. 安装 EOSIO 合约开发工具包 (CDT)

      EOSIO CDT 工具包包含 CDT C++ 编译器,您可以使用该编译器来构建系统合约,随后还可以构建您自己的 C++ 智能合约。系统合约非常重要,因为它们可以实现第二层软件功能,进而添加并支持更多功能。
    1. 首先,安装软件包 build-essential。此软件包包含在 Linux 设备上构建 C/C++ 软件所需的各种工具。 sudo apt install build-essential
      sudo apt install build-essential
      1. 获取 EOSIO CDT 二进制文件:
      curl -LO https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb
        curl -LO https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb 安装 EOSIO CDT 二进制文件:
      sudo apt install ./eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb
        确认已安装 EOSIO CDT 编译器: sudo apt install ./eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb
        eosio-cpp --version
      1. 响应内容应为 EOSIO CDT 编译器的版本:
      2. eosio-cpp version 1.8.1 eosio-cpp --version

        点击“检查我的进度”以验证是否完成了以下目标: 安装 EOSIO 合约开发工具包

        eosio-cpp version 1.8.1

        任务 6. 构建系统合约和 eosio.boot

        若要构建可正常运行的多节点 EOSIO 区块链,您需要部署 EOSIO 系统合约。系统合约的功能包括但不限于:提供 EOSIO 共识所需的第二层功能,包括质押代币、投票、创建自有代币等。它们还支持添加新功能。

        安装 CMake,这是 eosio.contracts 构建脚本所使用的软件依赖项:
      sudo apt install cmake
        下载最新的系统 eosio.contracts sudo apt install cmake
        git clone https://github.com/EOSIO/eosio.contracts.git \ --branch release/1.9.x --single-branch
        1. 构建系统合约 eosio.contracts。在这一步中,您还需要传递 eosioeosio.cdt 的安装目录。
        cd eosio.contracts ./build.sh -e /usr/opt/eosio/2.1.0 -c /usr/opt/eosio.cdt/1.8.1 cd ~ git clone https://github.com/EOSIO/eosio.contracts.git \ --branch release/1.9.x --single-branch 请忽略有关缺少 ricardian 合同的警告(如果有)。响应内容应如下所示(不含警告):
      1. Using EOSIO.CDT installation at: /usr/opt/eosio.cdt/1.8.1 =========== Building eosio.contracts =========== ... -- Building eosio.contracts v1.9.2 ... -- Unit tests will not be built. To build tests, set BUILD_TESTS to true. -- Configuring done -- Generating done -- Build files have been written to: ./eosio.contracts/build [ 11%] Performing build step for 'contracts_project' [ 18%] Built target eosio.bios [ 18%] Built target eosio.msig [ 36%] Built target powup.results [ 36%] Built target rex.results [ 54%] Built target eosio.token [ 90%] Built target eosio.system [100%] Built target eosio.wrap [ 22%] No install step for 'contracts_project' [ 33%] No test step for 'contracts_project' [ 44%] Completed 'contracts_project' [100%] Built target contracts_project`
      2. 请记下 EOSIO 系统合约的构建位置。稍后在部署特定系统合约时将用到它:~/eosio.contracts/build/contracts cd eosio.contracts ./build.sh -e /usr/opt/eosio/2.1.0 -c /usr/opt/eosio.cdt/1.8.1 cd ~

        Using EOSIO.CDT installation at: /usr/opt/eosio.cdt/1.8.1 =========== Building eosio.contracts =========== ... -- Building eosio.contracts v1.9.2 ... -- Unit tests will not be built. To build tests, set BUILD_TESTS to true. -- Configuring done -- Generating done -- Build files have been written to: ./eosio.contracts/build [ 11%] Performing build step for 'contracts_project' [ 18%] Built target eosio.bios [ 18%] Built target eosio.msig [ 36%] Built target powup.results [ 36%] Built target rex.results [ 54%] Built target eosio.token [ 90%] Built target eosio.system [100%] Built target eosio.wrap [ 22%] No install step for 'contracts_project' [ 33%] No test step for 'contracts_project' [ 44%] Completed 'contracts_project' [100%] Built target contracts_project`

        构建 eosio.boot 系统合约:

        git clone https://github.com/EOSIO/eos.git \ --branch release/2.1.x --single-branch cd eos/contracts/contracts/eosio.boot cmake . make cd ~
      1. 请忽略出现的警告。响应内容应如下所示:
      2. -- Configuring done -- Generating done -- Build files have been written to: ~/eos/contracts/contracts/eosio.boot
          git clone https://github.com/EOSIO/eos.git \ --branch release/2.1.x --single-branch cd eos/contracts/contracts/eosio.boot cmake . make cd ~

          请记下 eosio.boot 合约的构建位置。您稍后需要部署它:~/eos/contracts/contracts/eosio.boot

          -- Configuring done -- Generating done -- Build files have been written to: ~/eos/contracts/contracts/eosio.boot
      3. 点击“检查我的进度”以验证是否完成了以下目标: 构建系统合约和 eosio.boot
      4. 任务 7. 启动引导节点并创建系统账号

        在此任务中,您将启动引导创世节点并创建系统账号。与创建钱包不同,创建账号需要向区块链发送一笔交易。

        因此,至少引导节点必须处于运行状态。为此,您首先需要创建供所有节点使用的数据目录和创世文件。在生产环境中,每个节点都将托管在各自独立的服务器上,并使用其自身的资源。但在这里,您将在同一台机器上部署所有节点。

        创建新目录 nodes。区块链数据库、日志文件和每个节点的配置文件都将存储在此处。

        mkdir nodes
        1. nodes 目录中创建默认的 genesis.json 文件:
        cat >nodes/genesis.json
          mkdir nodes 复制以下 JSON 内容并将其粘贴到终端中,按 Enter 键,然后按 Ctrl-D 键以保存 genesis.json 文件:
        1. { "initial_timestamp": "2018-06-01T12:00:00.000", "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "initial_configuration": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 524288, "max_inline_action_depth": 4, "max_authority_depth": 6 }, "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000" }
        2. “initial_key”表示 eosio 账号使用的初始开发公钥。如有需要,您可以在此处使用自己的开发密钥来替换它;对于生产环境部署,建议这样做。eosio 账号所使用的钱包中必须包含此类密钥。您已在上一部分中导入该密钥。 cat >nodes/genesis.json
          1. 检查 genesis.json 文件是否已成功创建并写入内容:
          cat nodes/genesis.json { "initial_timestamp": "2018-06-01T12:00:00.000", "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "initial_configuration": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, "max_transaction_net_usage": 524288, "base_per_transaction_net_usage": 12, "net_usage_leeway": 500, "context_free_discount_net_usage_num": 20, "context_free_discount_net_usage_den": 100, "max_block_cpu_usage": 200000, "target_block_cpu_usage_pct": 1000, "max_transaction_cpu_usage": 150000, "min_transaction_cpu_usage": 100, "max_transaction_lifetime": 3600, "deferred_trx_expiration_window": 600, "max_transaction_delay": 3888000, "max_inline_action_size": 524288, "max_inline_action_depth": 4, "max_authority_depth": 6 }, "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000" }

          您应该会看到与上一步中相同的内容。

          1. 创建引导节点目录 nodes/00-boot,以存储与引导节点相关的所有区块链数据:
          mkdir nodes/00-boot
            cat nodes/genesis.json

            启动引导节点,以后台任务的形式启动 nodeos 服务守护程序,并将 stdout/stderr 重定向到 00-boot/00.log 文件:

            nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name eosio \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/00-boot/blocks \ --config-dir ~/nodes/00-boot \ --data-dir ~/nodes/00-boot \ --http-server-address 127.0.0.1:8888 \ --p2p-listen-endpoint 127.0.0.1:9876 \ --signature-provider EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 \ >>~/nodes/00-boot/00.log 2>&1 &
          1. 此命令将启动具有一些插件的引导节点,生产者名称为 eosio,监听 HTTP 端口 8888 和 p2p 端口 9876,并使用默认的开发密钥 EOS6MRy...5KQwrP... 进行区块签名。如果未使用 --signature-provider 替换,则使用默认的 eosio 开发密钥。
            1. mkdir nodes/00-boot 确认引导节点正在运行并生产区块:
            2. tail -f nodes/00-boot/00.log
            3. 输出将如下所示。 nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name eosio \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/00-boot/blocks \ --config-dir ~/nodes/00-boot \ --data-dir ~/nodes/00-boot \ --http-server-address 127.0.0.1:8888 \ --p2p-listen-endpoint 127.0.0.1:9876 \ --signature-provider EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 \ >>~/nodes/00-boot/00.log 2>&1 &

              输出:

                ... info 2021-03-08T02:44:11.900 nodeos producer_plugin.cpp:2333 produce_block ] Produced block e0dc6324ce3c8f35... #588 @ 2021-03-08T02:44:12.000 signed by eosio [trxs: 0, lib: 587, confirmed: 0]
              1. 最后一行显示了最新生产的区块编号,以及当前的最后一个不可逆区块 (lib),后者标志着最终区块和区块链的末端。
                1. tail -f nodes/00-boot/00.log

                  Ctrl+C 退出 tail 程序。

                  ... info 2021-03-08T02:44:11.900 nodeos producer_plugin.cpp:2333 produce_block ] Produced block e0dc6324ce3c8f35... #588 @ 2021-03-08T02:44:12.000 signed by eosio [trxs: 0, lib: 587, confirmed: 0]

                  现在,引导节点已在运行,您可以获取存储在区块链数据库中的 eosio 账号信息:
                cleos get account eosio

                响应内容应如下所示:

              2. created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV memory: quota: unlimited used: 2.66 KiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited

                请注意,eosio 账号其实是一个特权账号,且与 owneractive 权限关联的密钥正是导入到钱包中的默认开发密钥。这样,在搭建多节点区块链时,eosio 账号便能够对交易进行授权。

                1. cleos get account eosio

                  创建更多系统账号。这些账号也会存储在区块链数据库中。

                  created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV memory: quota: unlimited used: 2.66 KiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited

                  cleos create account eosio eosio.bpay EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.msig EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.names EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.ram EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.ramfee EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.saving EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.stake EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.token EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.vpay EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.rex EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

                  您将相同的开发密钥对分配给了所有系统账号,以及 owneractive 权限。在生产环境部署中,您可能需要为每项权限分配不同的密钥对,以提高安全性。您还可以为每个系统账号使用不同的密钥。
                2. 上述命令的响应内容应如下所示:
                3. executed transaction: 98f22027c6703e554042b1d4a93beb70b1dc30be0fe65267932155c9d70e6493 200 bytes 153 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"eosio.bpay","owner":{"threshold":1,"keys":[{"key":"EOS6MRyAjQq8ud7hVNYcfn... warning: transaction executed locally, but may not be confirmed by the network yet ] ... executed transaction: 2f0cb00110374976f3cd9195bccac81fe0ee330c515b4a656d6d41f6181f636d 200 bytes 189 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"eosio.rex","owner":{"threshold":1,"keys":[{"key":"EOS6MRyAjQq8ud7hVNYcfnV... warning: transaction executed locally, but may not be confirmed by the network yet ] cleos create account eosio eosio.bpay EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.msig EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.names EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.ram EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.ramfee EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.saving EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.stake EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.token EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.vpay EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV cleos create account eosio eosio.rex EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

                  请忽略出现的警告。您将在后续任务中使用这些账号。

                  点击“检查我的进度”以验证是否完成了以下目标: 构建系统合约和 eosio.boot

                  executed transaction: 98f22027c6703e554042b1d4a93beb70b1dc30be0fe65267932155c9d70e6493 200 bytes 153 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"eosio.bpay","owner":{"threshold":1,"keys":[{"key":"EOS6MRyAjQq8ud7hVNYcfn... warning: transaction executed locally, but may not be confirmed by the network yet ] ... executed transaction: 2f0cb00110374976f3cd9195bccac81fe0ee330c515b4a656d6d41f6181f636d 200 bytes 189 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"eosio.rex","owner":{"threshold":1,"keys":[{"key":"EOS6MRyAjQq8ud7hVNYcfnV... warning: transaction executed locally, but may not be confirmed by the network yet ]

                  任务 8. 部署 eosio.token 和 eosio.msig 合约,并创建/发行 SYS 代币

                  在此任务中,您将创建并发行一种虚构的 SYS 代币。为此,您还需要部署之前构建的 eosio.tokeneosio.msig 系统合约。

                  部署 eosio.token 合约。此合约允许您创建、发行和转移新代币或现有代币。

                  cleos set contract eosio.token ~/eosio.contracts/build/contracts/eosio.token/
                1. 响应内容应如下所示:
                2. Reading WASM from ~/eosio.contracts/build/contracts/eosio.token/eosio.token.wasm... Publishing contract... executed transaction: 11aca7fb68e0821cf8f74be0188741964787f830d0918abdfccae4a54c25e291 19360 bytes 4445 us # eosio &lt;= eosio::setcode {"account":"eosio.token","vmtype":0,"vmversion":0,"code":"0061736d010000000180022860000060037f7f7f01... # eosio &lt;= eosio::setabi {"account":"eosio.token","abi":"0e656f73696f3a3a6162692f312e320008076163636f756e7400010762616c616e63...
                    cleos set contract eosio.token ~/eosio.contracts/build/contracts/eosio.token/

                    部署 eosio.msig 合约。此合约可在账号之间实现多重签名流程,并简化权限管理。

                    Reading WASM from ~/eosio.contracts/build/contracts/eosio.token/eosio.token.wasm... Publishing contract... executed transaction: 11aca7fb68e0821cf8f74be0188741964787f830d0918abdfccae4a54c25e291 19360 bytes 4445 us # eosio &lt;= eosio::setcode {"account":"eosio.token","vmtype":0,"vmversion":0,"code":"0061736d010000000180022860000060037f7f7f01... # eosio &lt;= eosio::setabi {"account":"eosio.token","abi":"0e656f73696f3a3a6162692f312e320008076163636f756e7400010762616c616e63...
                    cleos set contract eosio.msig ~/eosio.contracts/build/contracts/eosio.msig/
                  1. 响应内容应如下所示:
                  2. Reading WASM from ~/eosio.contracts/build/contracts/eosio.msig/eosio.msig.wasm... Publishing contract... executed transaction: c2260b7d05bb38d2df097799baedd890ce7560bedbd1b79e7d07e4f6a5b25238 23256 bytes 3684 us # eosio &lt;= eosio::setcode {"account":"eosio.msig","vmtype":0,"vmversion":0,"code":"0061736d0100000001b8022f60000060037f7f7f017... # eosio &lt;= eosio::setabi {"account":"eosio.msig","abi":"0e656f73696f3a3a6162692f312e32001006616374696f6e0004076163636f756e740...
                      cleos set contract eosio.msig ~/eosio.contracts/build/contracts/eosio.msig/

                      创建总发行量为 100 亿枚的 SYS 代币:

                      Reading WASM from ~/eosio.contracts/build/contracts/eosio.msig/eosio.msig.wasm... Publishing contract... executed transaction: c2260b7d05bb38d2df097799baedd890ce7560bedbd1b79e7d07e4f6a5b25238 23256 bytes 3684 us # eosio &lt;= eosio::setcode {"account":"eosio.msig","vmtype":0,"vmversion":0,"code":"0061736d0100000001b8022f60000060037f7f7f017... # eosio &lt;= eosio::setabi {"account":"eosio.msig","abi":"0e656f73696f3a3a6162692f312e32001006616374696f6e0004076163636f756e740...
                      cleos push action eosio.token create '["eosio", "10000000000.0000 SYS"]' -p eosio.token
                    1. 上述命令会推送一笔交易,其中包含 eosio.token 合约的 create 操作,并由 eosio.token 账号的 active 权限授权。响应内容应如下所示:
                    2. executed transaction: 6a4766a00c8fe26343d5eb6c1ad5e53b35064dc6f3a5f55908eff2edba30efca 120 bytes 603 us # eosio.token &lt;= eosio.token::create {"issuer":"eosio","maximum_supply":"10000000000.0000 SYS"}
                        cleos push action eosio.token create '["eosio", "10000000000.0000 SYS"]' -p eosio.token

                        将 10 亿枚 SYS 代币由储备转入流通:

                        executed transaction: 6a4766a00c8fe26343d5eb6c1ad5e53b35064dc6f3a5f55908eff2edba30efca 120 bytes 603 us # eosio.token &lt;= eosio.token::create {"issuer":"eosio","maximum_supply":"10000000000.0000 SYS"}
                        cleos push action eosio.token issue '["eosio", "1000000000.0000 SYS", "memo"]' -p eosio
                      1. 上述命令会推送一笔交易,其中包含 eosio.token 合约的 issue 操作,该交易由 eosio 账号的 active 权限授权。
                      2. 响应内容应如下所示: cleos push action eosio.token issue '["eosio", "1000000000.0000 SYS", "memo"]' -p eosio

                        executed transaction: 4613fcff26bc6f96010273b475e839018f0afe2ef2af840d481070c9c54e36f1 128 bytes 405 us # eosio.token &lt;= eosio.token::issue {"to":"eosio","quantity":"1000000000.0000 SYS","memo":"memo"}

                        点击“检查我的进度”以验证是否完成了以下目标: 创建并部署 eosio.token、eosio.msig 合约以及 SYS 代币

                        executed transaction: 4613fcff26bc6f96010273b475e839018f0afe2ef2af840d481070c9c54e36f1 128 bytes 405 us # eosio.token &lt;= eosio.token::issue {"to":"eosio","quantity":"1000000000.0000 SYS","memo":"memo"}

                        任务 9. 激活协议功能并部署 eosio.boot 和 eosio.system 合约

                        协议功能为 EOSIO 区块链带来了额外的可选功能。在此任务中,您将激活一些强烈建议用于 EOSIO 区块链的协议功能。为此,您将先部署 eosio.boot 合约,然后激活这些功能。最后,您将部署 eosio.system 合约,以完成 EOSIO 区块链第二层的搭建。

                        这能实现对系统资源(CPU、RAM、NET)的调度,支持代币的质押与赎回、资源的购买、潜在生产者的注册及后续投票、生产者奖励的领取,以及特权与限制的设置等。协议功能必须由绝对多数生产者通过 EOSIO 共识进行激活。在本例中,使用正在运行的引导节点就足够了。

                        首先,安装 jq 工具,以便更直观地解析 JSON 字符串:
                      sudo apt install jq
                        现在,我们来查看支持哪些协议功能: sudo apt install jq
                        curl -X POST http://127.0.0.1:8888/v1/producer/get_supported_protocol_features -d '{"exclude_disabled": false, "exclude_unactivatable": false}' | jq | more
                      1. 上述命令会向 Producer API 插件提供的 get_supported_protocol_features 端点发送一个 HTTP POST 请求。
                      2. 响应内容将显示当前 EOSIO 网络(目前仅由引导节点组成)支持的所有协议功能。 curl -X POST http://127.0.0.1:8888/v1/producer/get_supported_protocol_features -d '{"exclude_disabled": false, "exclude_unactivatable": false}' | jq | more

                        查看输出(多次按空格键),直到返回 shell 提示符。

                        输出:

                        [{"feature_digest": "0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd", "subjective_restrictions": {"enabled": true, "preactivation_required": false, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "64fe7df32e9b86be2b296b3f81dfd527f84e82b98e363bc97e40bc7a83733310", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "PREACTIVATE_FEATURE"}]}, ... {"feature_digest": "ded2e25adcd78cbb94fa7f63a8f80a9af2b1a905e551a6e124e7d7829da1ea02", "subjective_restrictions": {"enabled": true, "preactivation_required": true, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "72ec6337e369cbb33ef7716d3267db9d5678fe54555c25ca4c9f5b9dfb7739f3", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "SECURITY_GROUP"}]}, ... {"feature_digest": "f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d", "subjective_restrictions": {"enabled": true, "preactivation_required": true, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "1eab748b95a2e6f4d7cb42065bdee5566af8efddf01a55a0a8d831b823f8828a", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "GET_SENDER"}]}]

                        激活 PREACTIVATE_FEATURE 功能。这样就能启用其他功能,包括对 eosio.system 合约进行潜在升级,进而实现新的功能。另请注意,协议功能必须通过传递该特定功能的功能摘要或哈希值来激活。

                        [{"feature_digest": "0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd", "subjective_restrictions": {"enabled": true, "preactivation_required": false, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "64fe7df32e9b86be2b296b3f81dfd527f84e82b98e363bc97e40bc7a83733310", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "PREACTIVATE_FEATURE"}]}, ... {"feature_digest": "ded2e25adcd78cbb94fa7f63a8f80a9af2b1a905e551a6e124e7d7829da1ea02", "subjective_restrictions": {"enabled": true, "preactivation_required": true, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "72ec6337e369cbb33ef7716d3267db9d5678fe54555c25ca4c9f5b9dfb7739f3", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "SECURITY_GROUP"}]}, ... {"feature_digest": "f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d", "subjective_restrictions": {"enabled": true, "preactivation_required": true, "earliest_allowed_activation_time": "1970-01-01T00:00:00.000"}, "description_digest": "1eab748b95a2e6f4d7cb42065bdee5566af8efddf01a55a0a8d831b823f8828a", "dependencies": [], "protocol_feature_type": "builtin", "specification": [{"name": "builtin_feature_codename", "value": "GET_SENDER"}]}]
                        curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'
                      1. 请注意,功能摘要哈希码 0ec7e... 可从上一步中 get_supported_protocol_features 端点返回的 feature_digest 字段中获取。如果激活成功,响应内容应如下所示。
                      2. 输出: curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'

                        {"result": "ok"}

                        如果相应功能已激活,但系统返回了以下响应,您可以放心地予以忽略。

                        {"result": "ok"}

                        输出:

                        {"code": 500, "message": "Internal Service Error", "error": {"code": 3250000, "name": "protocol_feature_exception", "what": "Protocol feature exception", "details": [{"message": "protocol feature with digest '<hex-value>' has already been activated", "file": "controller.cpp", "line_number": 1650, "method": "check_protocol_features"}]}}

                        {"code": 500, "message": "Internal Service Error", "error": {"code": 3250000, "name": "protocol_feature_exception", "what": "Protocol feature exception", "details": [{"message": "protocol feature with digest '<hex-value>' has already been activated", "file": "controller.cpp", "line_number": 1650, "method": "check_protocol_features"}]}} 部署 eosio.boot 合约:
                      cleos set contract eosio ~/eos/contracts/contracts/eosio.boot/ 响应内容应如下所示: cleos set contract eosio ~/eos/contracts/contracts/eosio.boot/

                      Reading WASM from ~/eos/contracts/contracts/eosio.boot/eosio.boot.wasm... Publishing contract... executed transaction: a029c644104da357a201f75058fc6772cf63f5fdfa9135be2c3b7c498d81d46d 2752 bytes 852 us # eosio &lt;= eosio::setcode {"account":"eosio","vmtype":0,"vmversion":0,"code":"0061736d01000000013e0c60000060027f7f0060017e0060... # eosio &lt;= eosio::setabi {"account":"eosio","abi":"0e656f73696f3a3a6162692f312e32001008616374697661746500010e666561747572655f...

                      Reading WASM from ~/eos/contracts/contracts/eosio.boot/eosio.boot.wasm... Publishing contract... executed transaction: a029c644104da357a201f75058fc6772cf63f5fdfa9135be2c3b7c498d81d46d 2752 bytes 852 us # eosio &lt;= eosio::setcode {"account":"eosio","vmtype":0,"vmversion":0,"code":"0061736d01000000013e0c60000060027f7f0060017e0060... # eosio &lt;= eosio::setabi {"account":"eosio","abi":"0e656f73696f3a3a6162692f312e32001008616374697661746500010e666561747572655f... 激活其他协议功能,例如 KV_DATABASEACTION_RETURN_VALUE 等。此操作可在部署 eosio.boot 合约后执行。
                    3. # KV_DATABASE cleos push action eosio activate '["825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"]' -p eosio # ACTION_RETURN_VALUE cleos push action eosio activate '["c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"]' -p eosio # CONFIGURABLE_WASM_LIMITS cleos push action eosio activate '["bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"]' -p eosio # BLOCKCHAIN_PARAMETERS cleos push action eosio activate '["5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"]' -p eosio # GET_SENDER cleos push action eosio activate '["f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"]' -p eosio # FORWARD_SETCODE cleos push action eosio activate '["2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"]' -p eosio # ONLY_BILL_FIRST_AUTHORIZER cleos push action eosio activate '["8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405"]' -p eosio # RESTRICT_ACTION_TO_SELF cleos push action eosio activate '["ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43"]' -p eosio # DISALLOW_EMPTY_PRODUCER_SCHEDULE cleos push action eosio activate '["68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428"]' -p eosio # FIX_LINKAUTH_RESTRICTION cleos push action eosio activate '["e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526"]' -p eosio # REPLACE_DEFERRED cleos push action eosio activate '["ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"]' -p eosio # NO_DUPLICATE_DEFERRED_ID cleos push action eosio activate '["4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"]' -p eosio # ONLY_LINK_TO_EXISTING_PERMISSION cleos push action eosio activate '["1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"]' -p eosio # RAM_RESTRICTIONS cleos push action eosio activate '["4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"]' -p eosio # WEBAUTHN_KEY cleos push action eosio activate '["4fca8bd82bbd181e714e283f83e1b45d95ca5af40fb89ad3977b653c448f78c2"]' -p eosio # WTMSIG_BLOCK_SIGNATURES cleos push action eosio activate '["299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"]' -p eosio
                    4. 部署 eosio.system 合约。这将启用第二层功能,并实现从单节点区块链到多节点区块链的过渡。 # KV_DATABASE cleos push action eosio activate '["825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"]' -p eosio # ACTION_RETURN_VALUE cleos push action eosio activate '["c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"]' -p eosio # CONFIGURABLE_WASM_LIMITS cleos push action eosio activate '["bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"]' -p eosio # BLOCKCHAIN_PARAMETERS cleos push action eosio activate '["5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"]' -p eosio # GET_SENDER cleos push action eosio activate '["f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"]' -p eosio # FORWARD_SETCODE cleos push action eosio activate '["2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"]' -p eosio # ONLY_BILL_FIRST_AUTHORIZER cleos push action eosio activate '["8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405"]' -p eosio # RESTRICT_ACTION_TO_SELF cleos push action eosio activate '["ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43"]' -p eosio # DISALLOW_EMPTY_PRODUCER_SCHEDULE cleos push action eosio activate '["68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428"]' -p eosio # FIX_LINKAUTH_RESTRICTION cleos push action eosio activate '["e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526"]' -p eosio # REPLACE_DEFERRED cleos push action eosio activate '["ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"]' -p eosio # NO_DUPLICATE_DEFERRED_ID cleos push action eosio activate '["4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"]' -p eosio # ONLY_LINK_TO_EXISTING_PERMISSION cleos push action eosio activate '["1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"]' -p eosio # RAM_RESTRICTIONS cleos push action eosio activate '["4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"]' -p eosio # WEBAUTHN_KEY cleos push action eosio activate '["4fca8bd82bbd181e714e283f83e1b45d95ca5af40fb89ad3977b653c448f78c2"]' -p eosio # WTMSIG_BLOCK_SIGNATURES cleos push action eosio activate '["299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"]' -p eosio
                      cleos set contract eosio ~/eosio.contracts/build/contracts/eosio.system/
                    1. 点击“检查我的进度”以验证是否完成了以下目标: 部署 eosio.boot 和 eosio.system 合约
                    2. 任务 10. 创建区块生产者账号 cleos set contract eosio ~/eosio.contracts/build/contracts/eosio.system/

                      在此任务中,您将创建生产者账号,这些账号最终会接管 EOSIO 区块链并生产区块。第一步是将 eosio.msig 指定为特权账号,使其能够代表 eosio 账号进行授权。随后,eosio 账号将交出其权限,让代表当选生产者群体的 eosio.prods 账号接管区块生产及验证的职责。

                      eosio.msig 设置为特权账号:

                      cleos push action eosio setpriv '["eosio.msig", 1]' -p eosio
                    1. 响应内容应如下所示:
                    2. executed transaction: 385f0eb3c169898cc7faae46bb4371dbbfc46c5d482249c9933c4f8627fb271c 104 bytes 208 us # eosio &lt;= eosio::setpriv {"account":"eosio.msig","is_priv":1}
                        cleos push action eosio setpriv '["eosio.msig", 1]' -p eosio

                        将 SYS 代币初始化为版本 0,并设置 4 位小数的精度:

                        executed transaction: 385f0eb3c169898cc7faae46bb4371dbbfc46c5d482249c9933c4f8627fb271c 104 bytes 208 us # eosio &lt;= eosio::setpriv {"account":"eosio.msig","is_priv":1}
                        cleos push action eosio init '["0", "4,SYS"]' -p eosio
                      1. 响应内容应如下所示:
                      2. executed transaction: c537fbd77983104d8dcb1c58b09b433f68a2dd12c876a27b7556d4a722d42939 104 bytes 3467 us # eosio &lt;= eosio::init {"version":0,"core":"4,SYS"} # eosio.token &lt;= eosio.token::open {"owner":"eosio.rex","symbol":"4,SYS","ram_payer":"eosio"}
                          cleos push action eosio init '["0", "4,SYS"]' -p eosio

                          导入供生产者用于区块签名的密钥。在生产环境部署中,应该先创建这些密钥,然后再导入。

                          executed transaction: c537fbd77983104d8dcb1c58b09b433f68a2dd12c876a27b7556d4a722d42939 104 bytes 3467 us # eosio &lt;= eosio::init {"version":0,"core":"4,SYS"} # eosio.token &lt;= eosio.token::open {"owner":"eosio.rex","symbol":"4,SYS","ram_payer":"eosio"}
                          cleos wallet import --private-key 5KLGj1HGRWbk5xNmoKfrcrQHXvcVJBPdAckoiJgFftXSJjLPp7b cleos wallet import --private-key 5K6qk1KaCYYWX86UhAfUsbMwhGPUqrqHrZEQDjs9ekP5j6LgHUu cleos wallet import --private-key 5JCStvbRgUZ6hjyfUiUaxt5iU3HP6zC1kwx3W7SweaEGvs4EPfQ cleos wallet import --private-key 5JJjaKnAb9KM2vkkJDgrYXoeUEdGgWtB5WK1a38wrmKnS3KtkS6
                        1. 导入现有的密钥将简化本实验的资源管理。不过,对于生产环境部署,应该创建新密钥。
                        2. 每个命令的响应内容应如下所示: cleos wallet import --private-key 5KLGj1HGRWbk5xNmoKfrcrQHXvcVJBPdAckoiJgFftXSJjLPp7b cleos wallet import --private-key 5K6qk1KaCYYWX86UhAfUsbMwhGPUqrqHrZEQDjs9ekP5j6LgHUu cleos wallet import --private-key 5JCStvbRgUZ6hjyfUiUaxt5iU3HP6zC1kwx3W7SweaEGvs4EPfQ cleos wallet import --private-key 5JJjaKnAb9KM2vkkJDgrYXoeUEdGgWtB5WK1a38wrmKnS3KtkS6

                          imported private key for: EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz imported private key for: EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC imported private key for: EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 imported private key for: EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d

                          如果节点是分布式的,则每个密钥对将独立存储在每个服务器的钱包中。在本实验中,为简单起见,您将把它们存储在同一个钱包中。

                          imported private key for: EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz imported private key for: EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC imported private key for: EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 imported private key for: EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d

                          创建具有初始资源和公钥的区块生产者账号:
                        cleos system newaccount --transfer eosio producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 上述命令将创建新账号 producer.oneproducer.twoproduc.threeproduce.four,并将上一步导入的各个密钥与相应的账号相关联。此外,该命令还将为 NET 和 CPU 分配并质押 5,000 万枚 SYS,并购买 8 KB 的 RAM。 cleos system newaccount --transfer eosio producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192 cleos system newaccount --transfer eosio produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d --stake-net "50000000.0000 SYS" --stake-cpu "50000000.0000 SYS" --buy-ram-kbytes 8192

                        响应内容应如下所示(针对每个新账号):

                        executed transaction: 6164d2741433c68edf426d430cb0986b198a6f4c63e7f7a46bcf8343562eacc0 336 bytes 1029 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"producer.one","owner":{"threshold":1,"keys":[{"key":"EOS8imf2TDq6FKtLZ8mv... # eosio &lt;= eosio::buyrambytes {"payer":"eosio","receiver":"producer.one","bytes":8388608} # eosio &lt;= eosio::delegatebw {"from":"eosio","receiver":"producer.one","stake_net_quantity":"50000000.0000 SYS","stake_cpu_quantity... # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio.ram &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio.ramfee &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"} # eosio.stake &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"}

                        executed transaction: 6164d2741433c68edf426d430cb0986b198a6f4c63e7f7a46bcf8343562eacc0 336 bytes 1029 us # eosio &lt;= eosio::newaccount {"creator":"eosio","name":"producer.one","owner":{"threshold":1,"keys":[{"key":"EOS8imf2TDq6FKtLZ8mv... # eosio &lt;= eosio::buyrambytes {"payer":"eosio","receiver":"producer.one","bytes":8388608} # eosio &lt;= eosio::delegatebw {"from":"eosio","receiver":"producer.one","stake_net_quantity":"50000000.0000 SYS","stake_cpu_quantity... # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio.ram &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ram","quantity":"122.0851 SYS","memo":"buy ram"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio.ramfee &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.ramfee","quantity":"0.6135 SYS","memo":"ram fee"} # eosio.token &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"} # eosio &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"} # eosio.stake &lt;= eosio.token::transfer {"from":"eosio","to":"eosio.stake","quantity":"100000000.0000 SYS","memo":"stake bandwidth"} 将新账号注册为生产者。请注意,每条命令还需要提供生产者的网址。此处使用的是虚假网址,仅用于演示说明。
                      cleos system regproducer producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz cleos system regproducer producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC cleos system regproducer produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 cleos system regproducer produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d 上述命令的响应内容应如下所示: cleos system regproducer producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz cleos system regproducer producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC cleos system regproducer produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 cleos system regproducer produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d

                      executed transaction: 28ced4a34abd64fb2fc11fbb51d3e4e18d2933a9ab2560fc1c6fb80b0cfc336d 216 bytes 753 us # eosio &lt;= eosio::regproducer {"producer":"producer.one","producer_key":"EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz","u... executed transaction: 06b8be4187c5fbabc3197064ae4c6d55ba553fdbcc8a560f060078e59d5dfc5e 216 bytes 306 us # eosio &lt;= eosio::regproducer {"producer":"producer.two","producer_key":"EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC","u... executed transaction: c23a5164bf0cc1e35dfa3e55fed56e935ceb7d764dbe2e7a3bf4aee446e7d88d 216 bytes 270 us # eosio &lt;= eosio::regproducer {"producer":"produc.three","producer_key":"EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6","u... executed transaction: 081aa8aca08b6d4e8e6bf576b2882f578faa7148e7c550196ff256ab0a9dcca3 216 bytes 224 us # eosio &lt;= eosio::regproducer {"producer":"produce.four","producer_key":"EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d","u...

                      executed transaction: 28ced4a34abd64fb2fc11fbb51d3e4e18d2933a9ab2560fc1c6fb80b0cfc336d 216 bytes 753 us # eosio &lt;= eosio::regproducer {"producer":"producer.one","producer_key":"EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz","u... executed transaction: 06b8be4187c5fbabc3197064ae4c6d55ba553fdbcc8a560f060078e59d5dfc5e 216 bytes 306 us # eosio &lt;= eosio::regproducer {"producer":"producer.two","producer_key":"EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC","u... executed transaction: c23a5164bf0cc1e35dfa3e55fed56e935ceb7d764dbe2e7a3bf4aee446e7d88d 216 bytes 270 us # eosio &lt;= eosio::regproducer {"producer":"produc.three","producer_key":"EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6","u... executed transaction: 081aa8aca08b6d4e8e6bf576b2882f578faa7148e7c550196ff256ab0a9dcca3 216 bytes 224 us # eosio &lt;= eosio::regproducer {"producer":"produce.four","producer_key":"EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d","u... 列出当前的生产者账号。总共应有 4 个。
                    cleos system listproducers 响应内容应如下所示: cleos system listproducers

                    Producer Producer key Url Scaled votes` **`produc.three`** `EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNj` **`0.0000`** **`produce.four`** `EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8` **`0.0000`** **`producer.one`** `EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8` **`0.0000`** **`producer.two`** `EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuE` **`0.0000`**

                    Producer Producer key Url Scaled votes` **`produc.three`** `EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNj` **`0.0000`** **`produce.four`** `EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8` **`0.0000`** **`producer.one`** `EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8` **`0.0000`** **`producer.two`** `EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuE` **`0.0000`**

                    请注意,由于尚未对任何生产者进行投票,因此每位生产者的票数仍为零。

                    点击“检查我的进度”以验证是否完成了以下目标: 创建区块生产者账号

                    任务 11. 从单节点生产者过渡到多节点生产者

                    在此任务中,您将最终从单节点区块链过渡到多节点区块链。目前,只有 eosio 账号拥有特权,能够执行区块签名。我们的目标是创建一个由一组当选生产者管理的 EOSIO 区块链。在该链中,当绝对多数 (2/3 + 1) 生产者确认某个区块后,即达成共识。随后,该区块中的所有交易都将最终确定。

                    1. 创建剩余的节点目录 nodes/01-nodenodes/02-nodenodes/03-nodenodes/04-node,以存储与新生产节点 1、2、3、4 相关的所有区块链数据:
                    mkdir nodes/01-node nodes/02-node nodes/03-node nodes/04-node
                      mkdir nodes/01-node nodes/02-node nodes/03-node nodes/04-node 启动节点 1,以后台任务的形式启动 nodeos 服务守护程序,并将 stdout/stderr 重定向到 01-node/01.log 文件:
                    1. nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name producer.one \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/01-node/blocks \ --config-dir ~/nodes/01-node \ --data-dir ~/nodes/01-node \ --http-server-address 127.0.0.1:8889 \ --p2p-listen-endpoint 127.0.0.1:9877 \ --signature-provider EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz=KEY:5KLGj1HGRWbk5xNmoKfrcrQHXvcVJBPdAckoiJgFftXSJjLPp7b \ --p2p-peer-address 127.0.0.1:9876 \ >>~/nodes/01-node/01.log 2>&1 &
                    2. 此命令将启动具有一些插件的节点 1,生产者名称为 producer.one,监听 HTTP 端口 8889 和 p2p 端口 9877,并使用自己的密钥 EOS8imf...5KLGj1... 替换默认的开发密钥,同时连接到 p2p 节点 9876(引导节点)。 nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name producer.one \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/01-node/blocks \ --config-dir ~/nodes/01-node \ --data-dir ~/nodes/01-node \ --http-server-address 127.0.0.1:8889 \ --p2p-listen-endpoint 127.0.0.1:9877 \ --signature-provider EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz=KEY:5KLGj1HGRWbk5xNmoKfrcrQHXvcVJBPdAckoiJgFftXSJjLPp7b \ --p2p-peer-address 127.0.0.1:9876 \ >>~/nodes/01-node/01.log 2>&1 &

                      您可以运行以下命令,检查节点 1 的日志中与引导节点(p2p 节点 9876)交换的任何消息:
                    cat nodes/01-node/01.log | grep :9876 -C 3 输出结果应类似于以下内容: cat nodes/01-node/01.log | grep :9876 -C 3

                    输出:

                    info 2021-10-22T21:56:43.161 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block e79c2cc7df2bd7bc... #3040 @ 2021-10-22T21:56:41.500 signed by eosio [trxs: 0, lib: 3039, conf: 0, latency: 1661 ms] ... info 2021-10-22T21:56:43.162 net-1 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T21:56:43.162 net-1 net_plugin.cpp:1132 operator() ] Sending handshake generation 2 to 127.0.0.1:9876- 446609d, lib 3040, head 3041, id 5d69f1fa874933cf info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 3043, blk_num 3043, id b8f3389c52ff416c... info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 3043 target LIB = 3041 next_expected = 3042, id b8f3389c52ff416c..., peer 127.0.0.1:9876 - 446609d info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup info 2021-10-22T21:56:43.164 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 917275dee8c12e57... #3042 @ 2021-10-22T21:56:42.500 signed by eosio [trxs: 0, lib: 3041, conf: 0, latency: 664 ms] ...

                    info 2021-10-22T21:56:43.161 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block e79c2cc7df2bd7bc... #3040 @ 2021-10-22T21:56:41.500 signed by eosio [trxs: 0, lib: 3039, conf: 0, latency: 1661 ms] ... info 2021-10-22T21:56:43.162 net-1 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T21:56:43.162 net-1 net_plugin.cpp:1132 operator() ] Sending handshake generation 2 to 127.0.0.1:9876- 446609d, lib 3040, head 3041, id 5d69f1fa874933cf info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 3043, blk_num 3043, id b8f3389c52ff416c... info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 3043 target LIB = 3041 next_expected = 3042, id b8f3389c52ff416c..., peer 127.0.0.1:9876 - 446609d info 2021-10-22T21:56:43.163 net-0 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup info 2021-10-22T21:56:43.164 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 917275dee8c12e57... #3042 @ 2021-10-22T21:56:42.500 signed by eosio [trxs: 0, lib: 3041, conf: 0, latency: 664 ms] ...

                    请注意,节点 1 目前尚未生产区块,而是从其他节点(例如引导节点)接收/同步区块。

                    1. 启动节点 2,以后台任务的形式启动 nodeos 服务守护程序,并将 stdout/stderr 重定向到 02-node/02.log 文件:
                    nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name producer.two \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/02-node/blocks \ --config-dir ~/nodes/02-node \ --data-dir ~/nodes/02-node \ --http-server-address 127.0.0.1:8890 \ --p2p-listen-endpoint 127.0.0.1:9878 \ --signature-provider EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC=KEY:5K6qk1KaCYYWX86UhAfUsbMwhGPUqrqHrZEQDjs9ekP5j6LgHUu \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ >>~/nodes/02-node/02.log 2>&1 & nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name producer.two \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/02-node/blocks \ --config-dir ~/nodes/02-node \ --data-dir ~/nodes/02-node \ --http-server-address 127.0.0.1:8890 \ --p2p-listen-endpoint 127.0.0.1:9878 \ --signature-provider EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC=KEY:5K6qk1KaCYYWX86UhAfUsbMwhGPUqrqHrZEQDjs9ekP5j6LgHUu \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ >>~/nodes/02-node/02.log 2>&1 &

                    此命令将启动具有一些插件的节点 2,生产者名称为 producer.two,监听 HTTP 端口 8890 和 p2p 端口 9878,并使用自己的密钥 EOS8imf...5KLGj1... 替换默认的开发密钥,同时连接到 p2p 节点 9876(启动节点)和 p2p 节点 9877(节点 1)。

                    1. 您可以运行以下命令,检查节点 2 的日志中与节点 1(p2p 节点 9877)交换的任何消息:
                    cat nodes/02-node/02.log | grep :9877 -C 3 cat nodes/02-node/02.log | grep :9877 -C 3

                    输出结果应类似于以下内容:

                    输出:

                    info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:9877 - 1a245d2 info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:9877- 1a245d2 info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:9877- 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:9877 - 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...

                    info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:9877 - 1a245d2 info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:9877- 1a245d2 info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:9877- 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:9877 - 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...

                    请注意,节点 2 目前尚未生产区块,而是从其他节点(例如引导节点和节点 1)接收/同步区块。
                  3. 启动节点 3,以后台任务的形式启动 nodeos 服务守护程序,并将 stdout/stderr 重定向到 03-node/03.log 文件: nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name produc.three \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/03-node/blocks \ --config-dir ~/nodes/03-node \ --data-dir ~/nodes/03-node \ --http-server-address 127.0.0.1:8891 \ --p2p-listen-endpoint 127.0.0.1:9879 \ --signature-provider EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6=KEY:5JCStvbRgUZ6hjyfUiUaxt5iU3HP6zC1kwx3W7SweaEGvs4EPfQ \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ --p2p-peer-address 127.0.0.1:9878 \ >>~/nodes/03-node/03.log 2>&1 &

                    nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name produc.three \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/03-node/blocks \ --config-dir ~/nodes/03-node \ --data-dir ~/nodes/03-node \ --http-server-address 127.0.0.1:8891 \ --p2p-listen-endpoint 127.0.0.1:9879 \ --signature-provider EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6=KEY:5JCStvbRgUZ6hjyfUiUaxt5iU3HP6zC1kwx3W7SweaEGvs4EPfQ \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ --p2p-peer-address 127.0.0.1:9878 \ >>~/nodes/03-node/03.log 2>&1 &

                    此命令将启动具有一些插件的节点 3,生产者名称为 produc.three,监听 HTTP 端口 8891 和 p2p 端口 9879,并使用自己的密钥 EOS5n44...5JCStv... 替换默认的开发密钥,同时连接到 p2p 节点 9876(引导节点)、p2p 节点 9877(节点 1)和 p2p 节点 9878(节点 2)。
                  4. 您可以运行以下命令,检查节点 3 的日志中与节点 2(p2p 节点 9878)交换的任何消息: cat nodes/03-node/03.log | grep :9878 -C 3

                  cat nodes/03-node/03.log | grep :9878 -C 3

                  输出结果应类似于以下内容:

                  info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:`**`9878`** `- 1a245d2` info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:`**`9878`** `- 1a245d2` info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:`**`9878`** `- 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:`**`9878`** `- 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...

                  输出:

                    info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:`**`9878`** `- 1a245d2` info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:`**`9878`** `- 1a245d2` info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:`**`9878`** `- 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:`**`9878`** `- 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...
                  1. 请注意,节点 3 目前尚未生产区块,而是从其他节点(例如引导节点、节点 1 和节点 2)接收/同步区块。
                    1. nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name produce.four \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/04-node/blocks \ --config-dir ~/nodes/04-node \ --data-dir ~/nodes/04-node \ --http-server-address 127.0.0.1:8892 \ --p2p-listen-endpoint 127.0.0.1:9880 \ --signature-provider EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d=KEY:5JJjaKnAb9KM2vkkJDgrYXoeUEdGgWtB5WK1a38wrmKnS3KtkS6 \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ --p2p-peer-address 127.0.0.1:9878 \ --p2p-peer-address 127.0.0.1:9879 \ >>~/nodes/04-node/04.log 2>&1 &

                      启动节点 4,以后台任务的形式启动 nodeos 服务守护程序,并将 stdout/stderr 重定向到 04-node/04.log 文件:

                      nodeos \ --plugin eosio::http_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::producer_api_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::net_api_plugin \ --contracts-console \ --max-transaction-time=200 \ --chain-state-db-size-mb 1024 \ --enable-stale-production \ --producer-name produce.four \ --genesis-json ~/nodes/genesis.json \ --blocks-dir ~/nodes/04-node/blocks \ --config-dir ~/nodes/04-node \ --data-dir ~/nodes/04-node \ --http-server-address 127.0.0.1:8892 \ --p2p-listen-endpoint 127.0.0.1:9880 \ --signature-provider EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d=KEY:5JJjaKnAb9KM2vkkJDgrYXoeUEdGgWtB5WK1a38wrmKnS3KtkS6 \ --p2p-peer-address 127.0.0.1:9876 \ --p2p-peer-address 127.0.0.1:9877 \ --p2p-peer-address 127.0.0.1:9878 \ --p2p-peer-address 127.0.0.1:9879 \ >>~/nodes/04-node/04.log 2>&1 &
                    1. 此命令将启动具有一些插件的节点 4,生产者名称为 produce.four,监听 HTTP 端口 8892 和 p2p 端口 9880,并使用自己的密钥 EOS5y3T...5JJjaK... 替换默认的开发密钥,同时连接到 p2p 节点 9876(引导节点)、p2p 节点 9877(节点 1)、p2p 节点 9878(节点 2)和 p2p 节点 9879(节点 3)。
                      1. cat nodes/04-node/04.log | grep :9879 -C 3

                        您可以运行以下命令,检查节点 4 的日志中与节点 3(p2p 节点 9879)交换的任何消息:

                        info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:9879 - 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...

                      cat nodes/04-node/04.log | grep :9879 -C 3

                      响应内容应如下所示:

                      info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1771 start_sync ] Catching up with chain, our last req is 6852, theirs is 6859 peer 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.496 net-1 net_plugin.cpp:1717 operator() ] requesting range 6853 to 6859, from 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.497 nodeos producer_plugin.cpp:421 on_incoming_block ] Received block 3073fa4230d8d232... #6853 @ 2021-10-22T22:28:28.000 signed by eosio [trxs: 0, lib: 6852, conf: 0, latency: 3497 ms] ... info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1604 set_state ] old state lib catchup becoming in sync info 2021-10-22T22:28:31.501 net-0 net_plugin.cpp:1132 operator() ] Sending handshake generation 3 to 127.0.0.1:9879 - 1a245d2, lib 6858, head 6859, id 9a791a880b9b875e info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1947 sync_recv_notice ] notice_message, pending 6860, blk_num 6860, id 4dd2c7c8ae5301ed... info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1908 verify_catchup ] catch_up while in in sync, fork head num = 6860 target LIB = 6859 next_expected = 6860, id 4dd2c7c8ae5301ed..., peer 127.0.0.1:9879 - 1a245d2 info 2021-10-22T22:28:31.501 net-1 net_plugin.cpp:1604 set_state ] old state in sync becoming head catchup ...

                      请注意,节点 4 目前尚未生产区块,而是从其他节点(例如引导节点、节点 1、节点 2 和节点 3)接收/同步区块。
                    2. 至此,所有新节点 1、2、3、4 均已启动并成功连接。它们会接收并同步由引导节点生产的区块,但自身尚未开始生产区块。要生产区块,必须选举产生新的生产者。在生产环境部署中,用户通常会通过投票命令,从候选生产者池中为最多 30 个生产者投票。得票数排名前 21 的生产者将当选为区块生产者。
                    3. 在这里,您将使用现有的生产者账号,从仅有的四个生产者中进行选举。当质押的 SYS 代币达到总供应量的 15% 后,系统就会提议由得票数最高的生产者负责生产。在包含生产者名单的区块被确认并最终确定后,新生产者将在下一个预定轮次中开始生产区块。 cleos system voteproducer prods producer.one producer.one producer.two produc.three produce.four cleos system voteproducer prods producer.two producer.two produc.three produce.four cleos system voteproducer prods produc.three produc.three produce.four cleos system voteproducer prods produce.four produce.four

                      executed transaction: 833178bdc9d5b8c86778fa2b2c0f20e976f4c253cb6ebcaa6ade8eb8bf3d0a4f 144 bytes 861 us # eosio &lt;= eosio::voteproducer {"voter":"producer.one","proxy":"","producers":["produc.three","produce.four","producer.one","produc... executed transaction: 9c4961678017bfc2a7fd1398a2e4b33e472a6cadc0340400ebe9207e188d7692 136 bytes 379 us # eosio &lt;= eosio::voteproducer {"voter":"producer.two","proxy":"","producers":["produc.three","produce.four","producer.two"]} executed transaction: d3d23bae8730f18e82da53defaff7184c49b83181bb9b6fa32096684e61ed74d 128 bytes 371 us` # eosio &lt;= eosio::voteproducer {"voter":"produc.three","proxy":"","producers":["produc.three","produce.four"]} executed transaction: 95f63d46554dd436388e36b017b8e350514ef5b407b1c33c5779dc29c862cdb6 120 bytes 304 us` # eosio &lt;= eosio::voteproducer {"voter":"produce.four","proxy":"","producers":["produce.four"]} 使用 cleos system voteproducer prods 命令为特定生产者投票。账号 producer.one 为自己及生产者 2、3 和 4 投票。producer.two 为自己及生产者 3 和 4(produc.threeproduce.four)投票。produc.three 为自己和 produce.four 投票。produce.four 为自己投票。
                    cleos system voteproducer prods producer.one producer.one producer.two produc.three produce.four cleos system voteproducer prods producer.two producer.two produc.three produce.four cleos system voteproducer prods produc.three produc.three produce.four cleos system voteproducer prods produce.four produce.four 响应内容应如下所示: cleos system listproducers

                    executed transaction: 833178bdc9d5b8c86778fa2b2c0f20e976f4c253cb6ebcaa6ade8eb8bf3d0a4f 144 bytes 861 us # eosio &lt;= eosio::voteproducer {"voter":"producer.one","proxy":"","producers":["produc.three","produce.four","producer.one","produc... executed transaction: 9c4961678017bfc2a7fd1398a2e4b33e472a6cadc0340400ebe9207e188d7692 136 bytes 379 us # eosio &lt;= eosio::voteproducer {"voter":"producer.two","proxy":"","producers":["produc.three","produce.four","producer.two"]} executed transaction: d3d23bae8730f18e82da53defaff7184c49b83181bb9b6fa32096684e61ed74d 128 bytes 371 us` # eosio &lt;= eosio::voteproducer {"voter":"produc.three","proxy":"","producers":["produc.three","produce.four"]} executed transaction: 95f63d46554dd436388e36b017b8e350514ef5b407b1c33c5779dc29c862cdb6 120 bytes 304 us` # eosio &lt;= eosio::voteproducer {"voter":"produce.four","proxy":"","producers":["produce.four"]}

                    Producer Producer key Url Scaled votes produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8 0.4000 produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNj 0.3000 producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuE 0.2000 producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8 0.1000

                    查看每个生产者获得的票数百分比:

                  cleos system listproducers 上述命令的输出结果应如下所示:
                3. Producer Producer key Url Scaled votes produce.four EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8qHjmRjFxTyhh2vxvF5d https://produce.four.com/EOS5y3Tm1czTCia3o3JidVKmC78J9gRQU8 0.4000 produc.three EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNjRxAfPhUvM8tWS5svid6 https://produc.three.com/EOS5n442Qz4yVc4LbdPCDnxNSseAiUCrNj 0.3000 producer.two EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuEz2RMWhXb8LXxEgcR7MC https://producer.two.com/EOS7Ef4kuyTbXbtSPP5Bgethvo6pbitpuE 0.2000 producer.one EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8zKdLNzsbU9EiMSt9Lwz https://producer.one.com/EOS8imf2TDq6FKtLZ8mvXPWcd6EF2rQwo8 0.1000
                4. 请注意,生产者 1 获得了 10% 的票,随后是生产者 2 获得了 20%,生产者 3 获得了 30%,最后生产者 4 获得了 40%。由于所有生产者质押的 SYS 代币总数已超过代币供应量的 15%,系统将提议由票数排名前 21(默认情况下)的生产者负责区块生产。 tail -f nodes/01-node/01.log | grep Produced

                  当包含区块生产者名单的区块被最终确定后,实际生产过程才会开始。由于只有四个生产者,所有生产者都将参与生产,且其中任意三个即可构成绝对多数。

                  info 2021-10-28T15:31:47.904 nodeos producer_plugin.cpp:2333 produce_block ] Produced block adeb43a9249e0ef8...` **`#7035`** `@ 2021-10-28T15:31:48.000 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 36] info 2021-10-28T15:31:48.400 nodeos producer_plugin.cpp:2333 produce_block ] Produced block 991c7f7addb6006e...` **`#7036`** `@ 2021-10-28T15:31:48.500 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0] ... info 2021-10-28T15:31:52.901 nodeos producer_plugin.cpp:2333 produce_block ] Produced block c947dfab144600f7...` **`#7045`** `@ 2021-10-28T15:31:53.000 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0] info 2021-10-28T15:31:53.300 nodeos producer_plugin.cpp:2333 produce_block ] Produced block c871f71b3ebe9151...` **`#7046`** `@ 2021-10-28T15:31:53.500 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0]`

                  确认新生产者是否确实在生产区块:

                  tail -f nodes/01-node/01.log | grep Produced
                1. 上述命令应显示生产者 1 生产的最后几个区块。如果您尚未看到任何输出,请等待几秒钟。共有 4 个生产者,每个生产者每 6 秒生产 12 个区块。因此,同一生产者上一轮生产最后一个区块与下一轮生产第一个区块之间应有 18 秒的间隔。

                  响应内容应如下所示:

                2. info 2021-10-28T15:31:47.904 nodeos producer_plugin.cpp:2333 produce_block ] Produced block adeb43a9249e0ef8...` **`#7035`** `@ 2021-10-28T15:31:48.000 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 36] info 2021-10-28T15:31:48.400 nodeos producer_plugin.cpp:2333 produce_block ] Produced block 991c7f7addb6006e...` **`#7036`** `@ 2021-10-28T15:31:48.500 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0] ... info 2021-10-28T15:31:52.901 nodeos producer_plugin.cpp:2333 produce_block ] Produced block c947dfab144600f7...` **`#7045`** `@ 2021-10-28T15:31:53.000 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0] info 2021-10-28T15:31:53.300 nodeos producer_plugin.cpp:2333 produce_block ] Produced block c871f71b3ebe9151...` **`#7046`** `@ 2021-10-28T15:31:53.500 signed by` **`producer.one`** `[trxs: 0, lib: 6998, confirmed: 0]`

                  如果您再等待 18 秒,应该会看到下一轮生产的 12 个区块,依此类推。您还可以将上述命令中的 01 替换为 020304,以确认另外三个节点也确实在生产区块。

                  1. tail -f nodes/00-boot/00.log | grep Produced

                    Ctrl+C 退出 tail 命令。

                  2. 确认引导节点已不再生产区块:
                  tail -f nodes/00-boot/00.log | grep Produced cleos get account eosio

                  请注意,上述命令不应产生任何输出,这表明引导节点已将区块生产权移交给新当选的生产者。

                  created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV memory: quota: unlimited used: 2.989 MiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited SYS balances: liquid: 599999509.0258 SYS staked: 0.0000 SYS unstaking: 0.0000 SYS total: 599999509.0258 SYS 现在,您已经拥有一个包含四个生产者且功能完备的区块链,接下来您应该移除默认 eosio 账号及相关的 eosio.* 账号在区块链上为交易签名和修改状态的所有权限。为此,您需要将 eosioeosio.* 账号所用的密钥重置为 null,以便注销这些密钥。
                3. 获取 eosio 账号信息。请注意与 owneractive 权限关联的密钥: cleos push action eosio updateauth '{"account": "eosio", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"}}]}}' -p eosio@owner cleos push action eosio updateauth '{"account": "eosio", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"}}]}}' -p eosio@active cleos get account eosio

                cleos get account eosio created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 eosio.prods@active active 1: 1 eosio.prods@active `memory: quota: unlimited used: 2.989 MiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited SYS balances: liquid: 599999509.0258 SYS staked: 0.0000 SYS unstaking: 0.0000 SYS total: 599999509.0258 SYS

                响应内容应如下所示:

                created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV active 1: 1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV memory: quota: unlimited used: 2.989 MiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited SYS balances: liquid: 599999509.0258 SYS staked: 0.0000 SYS unstaking: 0.0000 SYS total: 599999509.0258 SYS

                注销 eosio 账号所用的密钥,并将其权限与 eosio.prods 账号相关联:
              3. cleos push action eosio updateauth '{"account": "eosio", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"}}]}}' -p eosio@owner cleos push action eosio updateauth '{"account": "eosio", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio.prods", "permission": "active"}}]}}' -p eosio@active cleos get account eosio
              4. 响应内容应如下所示: cleos push action eosio updateauth '{"account": "eosio.bpay", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.bpay@owner cleos push action eosio updateauth '{"account": "eosio.bpay", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.bpay@active cleos push action eosio updateauth '{"account": "eosio.msig", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.msig@owner cleos push action eosio updateauth '{"account": "eosio.msig", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.msig@active cleos push action eosio updateauth '{"account": "eosio.names", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.names@owner cleos push action eosio updateauth '{"account": "eosio.names", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.names@active cleos push action eosio updateauth '{"account": "eosio.ram", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ram@owner cleos push action eosio updateauth '{"account": "eosio.ram", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ram@active cleos push action eosio updateauth '{"account": "eosio.ramfee", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ramfee@owner cleos push action eosio updateauth '{"account": "eosio.ramfee", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ramfee@active cleos push action eosio updateauth '{"account": "eosio.saving", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.saving@owner cleos push action eosio updateauth '{"account": "eosio.saving", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.saving@active cleos push action eosio updateauth '{"account": "eosio.stake", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.stake@owner cleos push action eosio updateauth '{"account": "eosio.stake", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.stake@active cleos push action eosio updateauth '{"account": "eosio.token", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.token@owner cleos push action eosio updateauth '{"account": "eosio.token", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.token@active cleos push action eosio updateauth '{"account": "eosio.vpay", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.vpay@owner cleos push action eosio updateauth '{"account": "eosio.vpay", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.vpay@active cleos push action eosio updateauth '{"account": "eosio.rex", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.rex@owner cleos push action eosio updateauth '{"account": "eosio.rex", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.rex@active

                created: 2018-06-01T12:00:00.000 privileged: true permissions: owner 1: 1 eosio.prods@active active 1: 1 eosio.prods@active `memory: quota: unlimited used: 2.989 MiB net bandwidth: used: unlimited available: unlimited limit: unlimited cpu bandwidth: used: unlimited available: unlimited limit: unlimited SYS balances: liquid: 599999509.0258 SYS staked: 0.0000 SYS unstaking: 0.0000 SYS total: 599999509.0258 SYS

                请注意,eosio 账号不再具有与 owneractive 权限关联的默认开发密钥。相反,这些权限现在已成为父级 eosio.prods@active 权限下的子权限。这正是代表所有活跃区块生产者的账号组。

                因此,eosio 账号现在实际上由 eosio.prods 账号控制。

                注销 eosio.* 账号所用的密钥,并将其权限与 eosio 账号相关联:

              cleos push action eosio updateauth '{"account": "eosio.bpay", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.bpay@owner cleos push action eosio updateauth '{"account": "eosio.bpay", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.bpay@active cleos push action eosio updateauth '{"account": "eosio.msig", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.msig@owner cleos push action eosio updateauth '{"account": "eosio.msig", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.msig@active cleos push action eosio updateauth '{"account": "eosio.names", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.names@owner cleos push action eosio updateauth '{"account": "eosio.names", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.names@active cleos push action eosio updateauth '{"account": "eosio.ram", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ram@owner cleos push action eosio updateauth '{"account": "eosio.ram", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ram@active cleos push action eosio updateauth '{"account": "eosio.ramfee", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ramfee@owner cleos push action eosio updateauth '{"account": "eosio.ramfee", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.ramfee@active cleos push action eosio updateauth '{"account": "eosio.saving", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.saving@owner cleos push action eosio updateauth '{"account": "eosio.saving", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.saving@active cleos push action eosio updateauth '{"account": "eosio.stake", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.stake@owner cleos push action eosio updateauth '{"account": "eosio.stake", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.stake@active cleos push action eosio updateauth '{"account": "eosio.token", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.token@owner cleos push action eosio updateauth '{"account": "eosio.token", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.token@active cleos push action eosio updateauth '{"account": "eosio.vpay", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.vpay@owner cleos push action eosio updateauth '{"account": "eosio.vpay", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.vpay@active cleos push action eosio updateauth '{"account": "eosio.rex", "permission": "owner", "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.rex@owner cleos push action eosio updateauth '{"account": "eosio.rex", "permission": "active", "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts": [{"weight": 1, "permission": {"actor": "eosio", "permission": "active"}}]}}' -p eosio.rex@active 现在,eosio.* 账号不再具有与 owneractive 权限关联的默认开发密钥。相反,这些权限现在已成为父级 eosio@active 权限下的子权限,而该权限本身又是 eosio.prods@active 权限下的子权限。
            4. 因此,包括 eosio 在内的所有系统账号现在实际上都由 eosio.prods 账号控制,该账号代表了由所有活跃区块生产者组成的账号组。至此,您已成功构建出一个功能完备的多节点 EOSIO 区块链!
            5. 恭喜!
            6. 后续步骤/了解详情

              访问开发者门户,详细了解 EOSIO 平台。

              https://developers.eos.io/

准备工作

  1. 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
  2. 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
  3. 在屏幕左上角,点击开始实验即可开始

使用无痕浏览模式

  1. 复制系统为实验提供的用户名密码
  2. 在无痕浏览模式下,点击打开控制台

登录控制台

  1. 使用您的实验凭证登录。使用其他凭证可能会导致错误或产生费用。
  2. 接受条款,并跳过恢复资源页面
  3. 除非您已完成此实验或想要重新开始,否则请勿点击结束实验,因为点击后系统会清除您的工作并移除该项目

此内容目前不可用

一旦可用,我们会通过电子邮件告知您

太好了!

一旦可用,我们会通过电子邮件告知您

一次一个实验

确认结束所有现有实验并开始此实验

使用无痕浏览模式运行实验

使用无痕模式或无痕浏览器窗口是运行此实验的最佳方式。这可以避免您的个人账号与学生账号之间发生冲突,这种冲突可能导致您的个人账号产生额外费用。

完成此快速步骤即可开始实验。