【问题标题】:Could not open genesis config file无法打开创世配置文件
【发布时间】:2021-01-29 14:33:14
【问题描述】:

我只是按照指示进行操作:https://github.com/near/nearcore/blob/master/chain/indexer/README.md 设置测试网索引器。指令中建议运行的命令cargo run --release --home-dir ~/.near/testnet init --chain-id testnet --download不起作用,看来我们应该替换它-> cargo run --release -- --home-dir ~/.near/testnet init --chain-id testnet --download 然后,如说明中所述,我修改了配置文件以调整分片。 然后运行命令:cargo run --release -- --home-dir ~/.near/testnet/ run 并接收:

Finished release [optimized] target(s) in 0.51s
     Running `/Users/bohdan_malkevych/Documents/me/git/near-protocol/nearcore/target/release/indexer-example --home-dir /Users/bohdan_malkevych/.near/testnet/ run`
thread 'main' panicked at 'Could not open genesis config file.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/bohdan_malkevych/Documents/me/git/near-protocol/nearcore/core/chain-configs/src/genesis_config.rs:216:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

我检查了/.near/testnet/ 文件夹,但在那里找不到任何创世文件。 我做错了什么?在哪里可以找到这个创世文件?

操作系统:Mac 操作系统

【问题讨论】:

    标签: rust indexer nearprotocol


    【解决方案1】:

    尝试手动(wget 或 curl,或您喜欢的任何工具)下载 genesis 文件:

    https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/testnet/genesis.json

    并将其放入主文件夹(~/.near/testnet)

    【讨论】:

    • 之后我得到了这样的视图: INFO stats: #18819727 Waiting for peers 0/0/40 peers 0 B/s 0.00 bps 0 gas/s CPU: 1%, Mem: 5.1 Gib fro很久了
    【解决方案2】:

    NEAR Indexer 的代码所有者在这里。

    感谢您指出自述文件中缺少的 --。我正在修复它。

    至于你的问题你可以从链接https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/testnet/genesis.json下载genesis.json(发在Discordhttps://discord.com/channels/490367152054992913/708278589031710761/762954092703907850

    init 命令应该已经下载了genesis.json。如果您已经拥有提供给--home-dir 的目录并且已经放置了一些东西,则下载可能会失败。

    (我在写这个答案cargo run -- --home-dir ~/.near/test_init/ init --chain-id testnet --download之前检查了init,它已经下载了genesis.json以及其他必要的文件)

    同样使用run 命令尝试从--home-dir 中删除尾部斜杠,就像这样

    cargo run --release -- --home-dir ~/.near/testnet run
    

    您可以尝试删除 ~/.near/testnet 并再次运行 init 命令来重新开始。

    【讨论】:

      猜你喜欢
      • 2019-04-15
      • 2014-04-20
      • 2022-11-10
      • 1970-01-01
      • 2016-06-06
      • 2015-10-26
      • 2016-08-05
      • 1970-01-01
      • 2013-07-30
      相关资源
      最近更新 更多