我只是按照说明操作:https://github.com/near/nearcore/blob/master/chain/indexer/README.md来设置testnet indexer。在指令中建议运行的命令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/文件夹,在那里找不到任何genesis文件。我做错了什么?我在哪里可以找到这个创世文件?
操作系统: Mac OS
发布于 2020-10-15 15:11:38
NEAR Indexer的Codeowner在这里。
感谢您在自述文件中指出缺少--。我在修呢。
至于您的问题,您可以从链接https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/testnet/genesis.json下载genesis.json (它发布在Discord https://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命令来尝试重新开始。
发布于 2020-10-15 15:11:27
尝试手动下载genesis文件(wget或curl,或者您喜欢的任何工具):
https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore-deploy/testnet/genesis.json
并将其放入主文件夹(~/.ear/testnet)
https://stackoverflow.com/questions/64365958
复制相似问题