Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
s3://injective-snapshots/mainnet/subnode
/0073
/6068
/7380
/8088
/8896
/8898
/98106
/98107
/66101
/105116
/113127
/119143
/138150
aws s3 cp --recursive s3://injective-snapshots/mainnet/subnode/<SNAPSHOT_DIR> $INJ_HOME
injectived init $MONIKER --chain-id injective-1 --home $INJ_HOME --overwrite
# 在 app.toml 中禁用修剪 sed -i 's/^pruning *= *.*/pruning = "nothing"/' $INJ_HOME/config/app.toml # 在 config.toml 中禁用 p2p 并禁用创建空块 awk ' BEGIN { section = "" } /^\[/ { section = $0 } section == "[p2p]" { if ($1 ~ /^laddr/) $0 = "laddr = \"tcp://0.0.0.0:26656\"" if ($1 ~ /^max_num_inbound_peers/) $0 = "max_num_inbound_peers = 0" if ($1 ~ /^min_num_inbound_peers/) $0 = "min_num_inbound_peers = 0" if ($1 ~ /^pex/) $0 = "pex = false" if ($1 ~ /^seed_mode/) $0 = "seed_mode = false" } section == "[consensus]" { if ($1 ~ /^create_empty_blocks/) $0 = "create_empty_blocks = false" } { print } ' $INJ_HOME/config/config.toml > $INJ_HOME/config/config.tmp && mv $INJ_HOME/config/config.tmp $INJ_HOME/config/config.toml # 将日志级别设置为 error(更少的磁盘写入 = 更好的性能) sed -i 's/^log_level *= *.*/log_level = "error"/' $INJ_HOME/config/app.toml
injectived start --home $INJ_HOME
git clone https://github.com/decentrio/gateway
make build
upstream: # 示例:节点 1 持有区块 0-80M,而节点 2 持有区块 80-88M - rpc: "http://$NODE1:$RPC_PORT" grpc: "$NODE1:$GRPC_PORT" api: "http://$NODE1:$API_PORT" blocks: [0,80000000] - rpc: "http://$NODE2:$RPC_PORT" grpc: "$NODE2:$GRPC_PORT" api: "http://$NODE2:$API_PORT" blocks: [80000000,88000000] # <其他节点在这里> # 归档尖端,这服务于最新的 x 个区块,通常设置为修剪节点 - rpc: "http://$PRUNED_NODE:$RPC_PORT" grpc: "$PRUNED_NODE:$GRPC_PORT" api: "http://$PRUNED_NODE:$API_PORT" blocks: [1000] ports: rpc: $RPC_PORT api: $API_PORT grpc: $GRPC_PORT # 暂时将这些设置为零以禁用 jsonrpc: 0 jsonrpc_ws: 0
gateway start --config $CONFIG_FILE