From c4d766c95c2675a41c68b95d4911c26e2f951971 Mon Sep 17 00:00:00 2001 From: polibee <1244762327@qq.com> Date: Mon, 19 Feb 2024 23:42:33 +0800 Subject: [PATCH 1/5] translate --- .idea/.gitignore | 5 +++++ .idea/lava-docs.iml | 12 ++++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ docs/intro/about.md | 38 +++++++++++++++++++------------------- docs/intro/explorers.md | 18 +++++++++--------- docs/intro/faq.md | 22 +++++++++++----------- docs/intro/intro.md | 2 +- docs/power-lava-intro.md | 10 +++++----- docs/tutorials.md | 34 +++++++++++++++++----------------- 10 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/lava-docs.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..b58b603f --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/lava-docs.iml b/.idea/lava-docs.iml new file mode 100644 index 00000000..24643cc3 --- /dev/null +++ b/.idea/lava-docs.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..71a35e29 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/intro/about.md b/docs/intro/about.md index 04b15fa6..65a8041a 100644 --- a/docs/intro/about.md +++ b/docs/intro/about.md @@ -1,9 +1,9 @@ --- slug: /about -title: 🌋 About Lava +title: 🌋 关于 Lava --- -# Web3 Modular Data Access +# Web3模块化数据访问
@@ -17,36 +17,36 @@ flowchart LR ```
-## What is Lava? 🌋 +## Lava是什么? 🌋 -Lava is the first modular data access layer for blockchains. It introduces [`specs`](/spec): a modular primitive that lets contributors permissionlessly add support for new chains and data services to the base protocol. RPC is the first service supported by the protocol but we are soon bringing further choice by integrating with indexing and API partners, such as Subsquid. +Lava是区块链的第一个模块化数据访问层。它引入了 [`specs`](/spec):一种模块化原语,让贡献者无需权限即可向基础协议添加对新链和数据服务的支持。RPC是协议支持的第一个服务,但我们很快将通过与索引和API合作伙伴(例如 Subsquid)进行集成,为用户带来更多选择。 -Data consumers send requests to Lava’s network of data providers (node operators), who join Lava to meet demand for data. Lava creates dynamic, scalable markets around any blockchain data service. The protocol also creates crypto-economic guarantees around the quality of service, across speed, uptime and data accuracy. +数据消费者向 Lava 的数据提供者(节点运营商)网络发送请求,后者加入 Lava 以满足数据需求。Lava 围绕任何区块链数据服务创建动态、可扩展的市场。该协议还围绕服务质量(速度、运行时间和数据准确性)创建了加密经济保证。 -By leveraging modular architecture and a peer-to-peer network of node operators, Lava creates a unified platform for accessing the multi-chain world. +通过利用模块化架构和节点运营商的对等网络,Lava创建了一个访问多链世界的统一平台。 -### How Does It Work? 🔩 +### 它是如何工作的? 🔩 -**Developers and data consumers:** -With Lava, data consumers get easy, fast and reliable access to 30+ chains. The protocol incentivizes providers to offer performant service and algorithmically pairs consumers with the best node available. +**开发者和数据消费者:** +有了Lava,数据消费者可以轻松、快速和可靠地访问30多个链。该协议激励提供商提供高性能的服务,并在算法上将消费者与可用的最佳节点配对。 -**Data providers (RPC node runners, indexers, etc):** -Providers join Lava to reach more developers and to monetize their existing infrastructure. We also have 250+ providers on the Lava testnet, including large providers such as Blockdaemon. Lava also runs programs called Incentivized Public RPC. On these programs, chains such as Evmos, Axelar, NEAR and more pay node operators to serve quality RPC. +**数据提供者(RPC 节点运行器、索引器等):** +供应商加入Lava以触达更多开发者并将其现有基础设施变现。我们在Lava测试网上还有250多个提供商,包括像Blockdaemon这样的大型提供商。Lava还运行名为激励公共RPC的程序。在这些项目中,Evmos、Axelar、NEAR 等链向节点运营商支付提供高服务质量 RPC 的费用。 -### Why Lava? ❣️ +### 为什么选择Lava?❣️ - Lava provides Multi-Chain RPC that just works: +Lava 提供了即用的多链 RPC: -1. **Quality of Service -** Consumers monitor and rate providers based on response time, availability and freshness. When asking for rewards, providers are required to attach their QoS score and are rewarded accordingly. +1. **服务质量 -** 消费者根据响应时间、可用性和数据时效性监控和评价提供者。提供者在请求奖励时需要附加他们的QoS(服务质量)分数,并根据分数获得相应奖励。 -2. **Data Reliability -** Providers are subject to fraud and fault detection checks, whereby the network uses statistical inference and verifiably random selections to compare the responses of multiple providers. If a conflict is detected, the network uses an honest majority of providers to attain who was wrong, penalizing the offender. +2. **数据的可靠性 -** 提供者受到欺诈和故障检测的审查,网络使用统计推断和可验证的随机选择来比较多个提供者的响应。如果检测到冲突,网络将利用大多数诚实的提供者来确定谁错了,并对违规者进行惩罚。 -3. **Privacy & Anonymity -** Relays are randomly distributed between a changing list of top providers, so consumers are less likely to get service from the same provider for a significant period of time. Consumer-provider communications happen directly and identities are not linked to Lava Wallets. +3. **隐私与匿名 -** 中继器在不断变化的顶级供应商名单之间随机分配,因此消费者不太可能在相当长的一段时间内获得同一供应商的服务。消费者与提供商之间的通信是直接进行的,身份与 Lava 钱包没有关联。 -4. **Scalability -** Every aspect of Lava is being built with scalability in mind. A single-step reward system, aggregation, direct provider-dApp communication and staking incentives are designed to increase efficiency by sparing unnecessary stress from the network. +4. **可扩展性 -** Lava 的方方面面都考虑到了可扩展性。单步奖励系统、聚合、提供商与应用程序之间的直接通信以及质押激励措施旨在通过减少网络不必要的压力来提高效率。 -5. **Decentralized Access -** We encourage users to access our network in a fully decentralized way. All relays on our network are conducted peer-to-peer (P2P). +5. **去中心化访问 -** 我们鼓励用户以完全去中心化的方式访问我们的网络。 我们网络上的所有中继都是点对点(P2P)进行的。 -6. **Open Source -** Lava is commmitted to open source and modularity. Developers can investigate the code for the chain and any specs implemented. +6. **开源 -** Lava 致力于开源和模块化。开发人员可以研究链的代码和实施的任何规范。 diff --git a/docs/intro/explorers.md b/docs/intro/explorers.md index 625ecc4b..d86e9b5b 100644 --- a/docs/intro/explorers.md +++ b/docs/intro/explorers.md @@ -1,23 +1,23 @@ --- slug: /block-explorer -title: 🔭 Explorers +title: 🔭 区块资源管理器 --- -# Lava Blockchain Explorers 🔭 +# Lava 区块资源管理器 🔭 ![Explorers Banner](/img/banner/Explorers-b802a6190fe349c4b6181d3971f81da9.jpg)
-## ⭕ Official Explorer {#official-explorer} +## ⭕ 官方区块资源管理器 {#official-explorer} ![Nodes Guru](/img/explorer/nodes_guru.svg)
-Our **official block explorer** is brought to you by Nodes.Guru:
+我们的**官方区块资源管理器**由 Nodes.Guru 提供:
https://lava.explorers.guru/
-## Community Block Explorers 🧑🏾‍🤝‍🧑🏾 +## 社区区块资源管理器 🧑🏾‍🤝‍🧑🏾 - ✨[BCCNodes](https://explorer.bccnodes.com/lava-T/) - ✨[Kjnodes](https://explorer.kjnodes.com/lava-testnet) - ✨[Nodeist](https://exp.nodeist.net/Lava) @@ -28,10 +28,10 @@ https://lava.explorers.guru/ - ✨[STAKEME](https://lava.exploreme.pro) -## Community Public RPC Explorer 🕵🏼 -One of our community members is providing an experimental service to see all exposed providers on the network: +## 社区公共 RPC 区块资源管理器 🕵🏼 +我们的一位社区成员正在提供一项实验性服务,以查看网络上所有公开的提供商: > https://services.kjnodes.com/testnet/lava/public-rpc/ -## Lava SDK Block Explorer 🌐 -One of our team members has developed an [`allblocks`](/all-blocks-app) application which gets the latest block from Lava supported chains and reports latency information: +## Lava SDK 区块资源管理器 🌐 +我们的一名团队成员开发了一个 [`allblocks`](/all-blocks-app) 应用程序,该应用程序从 Lava 支持的链中获取最新的区块并报告延迟信息: > https://allblocks.vercel.app diff --git a/docs/intro/faq.md b/docs/intro/faq.md index f756c8b0..45e11c9c 100644 --- a/docs/intro/faq.md +++ b/docs/intro/faq.md @@ -1,31 +1,31 @@ --- slug: /faq -title: ❓ FAQs +title: ❓ 常见问题 --- -# FAQs +# 常见问题 ![FAQs Banner](/img/banner/FAQs.jpg) :::info -There is an additional channel called #FAQ on our Discord. If you need further help hop on to our support channels there. +在我们的Discord上还有一个名为#FAQ的频道。如果您需要进一步帮助,请访问我们的支持频道。 :::
-## Nodes, Validators and Providers ⏫ {#nodes-validators-providers} +## 节点、验证器和提供者 ⏫ {#nodes-validators-providers} -### 🟡 What is a specification and what does it let me do? {#specs} -A specification (“spec”) is a module which you can add to Lava, extending the range of data services the network of providers can serve. RPC specs are the first to be added to Lava, and we will offer subgraph specs soon. +### 🟡 specification是什么?它能让我做什么? {#specs} +specification("spec")是您可以添加到 Lava 的模块,它扩展了提供商网络可提供的数据服务范围。RPC specs是首批添加到 Lava ,我们将很快提供subgraph specs。 -### 🟡 I have problems running the install scripts. {#install-troubleshooting} +### 🟡 我在运行安装脚本时有问题。 {#install-troubleshooting} -Troubleshooting: +故障排除: -1. `lavad` command not found - 1. Try running `source ~/.profile` -2. The node is stuck on “Waiting for node to catch up” +1. `lavad` 未找到命令 + 1. 尝试运行 `source ~/.profile` +2. 节点卡在“Waiting for node to catch upgit”上。 1. This process might take some time based on your internet connection, compute capabilities and the height of the latest block on the network 2. Please allow 5-20 minutes for this procedure to catch up with the latest block in the network 3. curl or unzip commands are not found diff --git a/docs/intro/intro.md b/docs/intro/intro.md index 7dd149ab..e96cfb2e 100644 --- a/docs/intro/intro.md +++ b/docs/intro/intro.md @@ -1,6 +1,6 @@ --- slug: / -title: Introduction ❕ +title: 介绍 ❕ --- import RoadmapItem from '@site/src/components/RoadmapItem'; diff --git a/docs/power-lava-intro.md b/docs/power-lava-intro.md index 2386eee2..533f7ee8 100644 --- a/docs/power-lava-intro.md +++ b/docs/power-lava-intro.md @@ -4,15 +4,15 @@ slug: /power-lava import RoadmapItem from '@site/src/components/RoadmapItem'; -# Power-up the Lava Network +# 启动Lava网络 ![Lava Binary Banner](/img/banner/Lava-8d88fb7fab996d996b8927b5a133c541x.jpg) -Lava Network is powered by its participants. +Lava Network 由其参与者提供支持。 -Participants joining the network help reinforce data reliability and high quality of service. Lava's incentive framework prioritizes API providers that excel and allows anyone to stake (same as other PoS chains). Lava achieves fair rewards, privacy and censorship resistance for users by distributing consensus. +加入网络的参与者有助于加强数据可靠性和提供高质量的服务。 Lava的激励框架优先考虑表现优秀的API提供者,并允许任何人进行质押(与其他PoS链相同)。 Lava通过分配共识实现对用户的公平奖励、隐私和抗审查。 -Everything is on-chain and transparent. +一切都在链上,并且是透明的。 -**🌋 Ready to get the lava flowing? continue by joining the network on the following pages** \ No newline at end of file +**🌋 准备好让Lava联通链上世界了吗?继续通过在下面的页面加入网络。** \ No newline at end of file diff --git a/docs/tutorials.md b/docs/tutorials.md index b7135428..f6106af9 100644 --- a/docs/tutorials.md +++ b/docs/tutorials.md @@ -2,39 +2,39 @@ slug: /tutorials --- -# Tutorials & Resources 📚 +# 教程和资源 📚 ![Tutorials & Resource Banner](/img/banner/Tutorials-&-Resources-6c1b0890b929c44e93ad1d6f43c4d1fa.jpg) -In addition to our documentation, Lava has a growing selection of supportive learning resources that can assist you in your journey to master Web3. +除了我们的文档之外,Lava还提供了越来越多的支持性学习资源,可以帮助您在掌握Web3的过程中提供帮助。 --- -## ![](/img/favicon.ico) Lava Tutorials +## ![](/img/favicon.ico) Lava 教程 -- [Getting Started with our Gateway](/gateway-getting-started) -- [Using Lava Gateway for Juno RPC](https://medium.com/lava-network/tutorial-using-lava-gateway-for-juno-rpc-junod-bfe866296023) -- [Using Lava Gateway for Osmosis RPC](https://medium.com/lava-network/tutorial-using-lava-gateway-for-osmosis-rpc-osmosisd-f19bc30d0323) -- [Using Lava Gateway with Ethers.js](https://medium.com/lava-network/tutorial-using-lava-gateway-for-ethereum-rpc-access-ethers-js-7ad82293e37d) +- [Lava 网关入门](/gateway-getting-started) +- [在 Juno RPC 中使用 Lava 网关](https://medium.com/lava-network/tutorial-using-lava-gateway-for-juno-rpc-junod-bfe866296023) +- [在 Osmosis RPC 中使用Lava 网关](https://medium.com/lava-network/tutorial-using-lava-gateway-for-osmosis-rpc-osmosisd-f19bc30d0323) +- [将 Lava 网关与 Ethers.js 结合使用](https://medium.com/lava-network/tutorial-using-lava-gateway-for-ethereum-rpc-access-ethers-js-7ad82293e37d) -## ![](/img/cosmfavicon.ico) How-to Cosmos +## ![](/img/cosmfavicon.ico) Cosmos 实用指南 -- [How-to Cosmos Pt. 1- Building a Cosmos Wallet](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-1-building-a-cosmos-wallet-53155c94f737) -- [How to Cosmos Pt. 2 - Sign & Send Tx on Gaiad](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-2-building-and-signing-a-tx-on-cosmos-hub-using-gaiad-c380fb73882c) -- [How to Cosmos Pt. 3 - Sign & Send Tx with Cosmjs](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-3-sending-a-signed-tx-on-cosmos-hub-using-cosmjs-bd273381440d) -- [How to Cosmos Pt. 4 - Building your first app with Cosmjs](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-4-building-your-first-application-with-cosmjs-87c5db9f3cdf) +- [Cosmos 实用指南 1 - 构建 Cosmos 钱包](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-1-building-a-cosmos-wallet-53155c94f737) +- [Cosmos 实用指南 2 - 在 Gaiad 上签名和发送交易](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-2-building-and-signing-a-tx-on-cosmos-hub-using-gaiad-c380fb73882c) +- [Cosmos 实用指南 3 - 使用 Cosmjs 签名和发送交易](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-3-sending-a-signed-tx-on-cosmos-hub-using-cosmjs-bd273381440d) +- [Cosmos 实用指南 4 - 使用 Cosmjs 构建你的第一个应用程序](https://medium.com/lava-network/tutorial-how-to-cosmos-pt-4-building-your-first-application-with-cosmjs-87c5db9f3cdf) -## 🫂 Community Resources +## 🫂 社区资源 -- [Lava Deployment on AWS and other cloud providers](https://github.com/waelsy123/lava-net) -- [Setup your Node on Lava: Setup Scripts](https://github.com/appieasahbie/lava) +- [在 AWS 及其他云提供商上部署 Lava](https://github.com/waelsy123/lava-net) +- [在 Lava 上设置您的节点: 设置脚本](https://github.com/appieasahbie/lava) --- -## 💬 Discord Server +## 💬 Discord 服务器 -Still stuck? Our Discord Server channels are a premier way to get and receive help! We have an excellent community full of helpful providers and developers experienced in using Lava. Most inquiries receive a satisfactory response within minutes to hours! +仍然被问题卡住?我们的 Discord 服务器频道是获取和接受帮助的主要途径!我们拥有一个优秀的社区,其中有许多乐于助人的提供商和在使用 Lava 方面经验丰富的开发人员。大多数询问都会在几分钟到几小时内得到满意的答复! \ No newline at end of file From 2a89870c7f36680d8cd1235cc8bbf3991b564264 Mon Sep 17 00:00:00 2001 From: polibee <1244762327@qq.com> Date: Wed, 21 Feb 2024 22:22:50 +0800 Subject: [PATCH 2/5] Translate the doc of Specs --- docs/intro/about.md | 8 +- docs/intro/faq.md | 60 +++---- docs/intro/intro.md | 36 ++-- docs/intro/key-terms.md | 118 ++++++------- docs/intro/specs/add-spec.md | 24 +-- docs/intro/specs/spec-guide.md | 271 ++++++++++++++--------------- docs/intro/specs/spec-reference.md | 130 +++++++------- docs/intro/specs/spec.md | 68 ++++---- 8 files changed, 357 insertions(+), 358 deletions(-) diff --git a/docs/intro/about.md b/docs/intro/about.md index 65a8041a..186268bf 100644 --- a/docs/intro/about.md +++ b/docs/intro/about.md @@ -21,7 +21,7 @@ flowchart LR Lava是区块链的第一个模块化数据访问层。它引入了 [`specs`](/spec):一种模块化原语,让贡献者无需权限即可向基础协议添加对新链和数据服务的支持。RPC是协议支持的第一个服务,但我们很快将通过与索引和API合作伙伴(例如 Subsquid)进行集成,为用户带来更多选择。 -数据消费者向 Lava 的数据提供者(节点运营商)网络发送请求,后者加入 Lava 以满足数据需求。Lava 围绕任何区块链数据服务创建动态、可扩展的市场。该协议还围绕服务质量(速度、运行时间和数据准确性)创建了加密经济保证。 +数据消费者向 Lava 的数据提供商(节点运营商)网络发送请求,后者加入 Lava 以满足数据需求。Lava 围绕任何区块链数据服务创建动态、可扩展的市场。该协议还围绕服务质量(速度、运行时间和数据准确性)创建了加密经济保证。 通过利用模块化架构和节点运营商的对等网络,Lava创建了一个访问多链世界的统一平台。 @@ -31,7 +31,7 @@ Lava是区块链的第一个模块化数据访问层。它引入了 [`specs`](/s **开发者和数据消费者:** 有了Lava,数据消费者可以轻松、快速和可靠地访问30多个链。该协议激励提供商提供高性能的服务,并在算法上将消费者与可用的最佳节点配对。 -**数据提供者(RPC 节点运行器、索引器等):** +**数据提供商(RPC 节点运行器、索引器等):** 供应商加入Lava以触达更多开发者并将其现有基础设施变现。我们在Lava测试网上还有250多个提供商,包括像Blockdaemon这样的大型提供商。Lava还运行名为激励公共RPC的程序。在这些项目中,Evmos、Axelar、NEAR 等链向节点运营商支付提供高服务质量 RPC 的费用。 @@ -39,9 +39,9 @@ Lava是区块链的第一个模块化数据访问层。它引入了 [`specs`](/s Lava 提供了即用的多链 RPC: -1. **服务质量 -** 消费者根据响应时间、可用性和数据时效性监控和评价提供者。提供者在请求奖励时需要附加他们的QoS(服务质量)分数,并根据分数获得相应奖励。 +1. **服务质量 -** 消费者根据响应时间、可用性和数据时效性监控和评价提供商。提供商在请求奖励时需要附加他们的QoS(服务质量)分数,并根据分数获得相应奖励。 -2. **数据的可靠性 -** 提供者受到欺诈和故障检测的审查,网络使用统计推断和可验证的随机选择来比较多个提供者的响应。如果检测到冲突,网络将利用大多数诚实的提供者来确定谁错了,并对违规者进行惩罚。 +2. **数据的可靠性 -** 提供商受到欺诈和故障检测的审查,网络使用统计推断和可验证的随机选择来比较多个提供商的响应。如果检测到冲突,网络将利用大多数诚实的提供商来确定谁错了,并对违规者进行惩罚。 3. **隐私与匿名 -** 中继器在不断变化的顶级供应商名单之间随机分配,因此消费者不太可能在相当长的一段时间内获得同一供应商的服务。消费者与提供商之间的通信是直接进行的,身份与 Lava 钱包没有关联。 diff --git a/docs/intro/faq.md b/docs/intro/faq.md index 45e11c9c..aa384926 100644 --- a/docs/intro/faq.md +++ b/docs/intro/faq.md @@ -13,7 +13,7 @@ title: ❓ 常见问题
-## 节点、验证器和提供者 ⏫ {#nodes-validators-providers} +## 节点、验证器和提供商 ⏫ {#nodes-validators-providers} ### 🟡 specification是什么?它能让我做什么? {#specs} specification("spec")是您可以添加到 Lava 的模块,它扩展了提供商网络可提供的数据服务范围。RPC specs是首批添加到 Lava ,我们将很快提供subgraph specs。 @@ -23,53 +23,53 @@ specification("spec")是您可以添加到 Lava 的模块,它扩展了提 故障排除: -1. `lavad` 未找到命令 +1. 未找`lavad` 到命令 1. 尝试运行 `source ~/.profile` 2. 节点卡在“Waiting for node to catch upgit”上。 - 1. This process might take some time based on your internet connection, compute capabilities and the height of the latest block on the network - 2. Please allow 5-20 minutes for this procedure to catch up with the latest block in the network -3. curl or unzip commands are not found + 1. 这一过程可能需要一些时间,具体取决于您的网络连接、计算能力以及网络上最新区块的高度。 + 2. 请在 5-20 分钟内完成此程序,以便赶上网络中的最新区块 +3. 未找到 curl 或 unzip 命令 1. `sudo apt update && sudo apt install curl unzip -y` -4. sudo command not found +4. 未找到 sudo 命令 1. `apt install sudo -y` -5. When running `stake_validator` you get the error +5. 运行 `stake_validator` 时,您会收到错误信息 ```bash account lava@XYZ not found: key not found ``` - 1. Make sure your account is funded from Lava side before you try to stake as a validator + 1. 在您尝试以验证者身份质押之前,请确保您的账户已从 Lava 获得资金 -## Providers 🖥️ +## 提供商 🖥️ -### 🟡 How can I update/edit my provider information? {#provider-info} -To update your provider information on chain, send the `provider-stake` transaction with the updated information and an additional stake of minimum 1 ulava. +### 🟡 如何更新/编辑我的服务提供商信息?{#provider-info} +要更新链上的提供商信息,请发送包含更新信息和最少 1 ulava 额外质押的`provider-stake`交易。 -### 🟡 I get `ERR_stake_provider_endpoints: invalid provider endpoints` error when trying to stake as a provider {#staking-error} -In your stake-provider transaction you need to specify all required provider endpoints based on the chain you are staking on. For example to provide for cosmos chains you need both tendermint-rpc and rest as follows: `"IP:port,tendermintrpc,1 IP:port,rest,1"`. +### 🟡 在尝试以提供商身份质押时,我收到了`ERR_stake_provider_endpoints: invalid provider endpoints` (ERR_stake_provider_endpoints:无效提供商端点)错误信息 {#staking-error} +在您的质押提供商交易中,您需要根据您质押的链指定所有必需的提供者端点。例如,为了支持 Cosmos 链,您需要同时提供 tendermint-rpc 和 rest,格式如下:`"IP:port,tendermintrpc,1 IP:port,rest,1"`。 -### 🟡 Is there an unbonding period for providers? {#unbonding-period} -Yes, it's currently configured to 21 days. +### 🟡 供应商是否有解绑期? {#unbonding-period} +有的,目前配置为 21 天。 -### 🟡 How can I see my current provider state (incl. unbonding)? {#provider-state} -You can use the following query: `lavad q pairing providers ` +### 🟡 如何查看我当前的提供商状态(包括解除绑定)? {#provider-state} +您可以使用以下查询:`lavad q pairing providers ` -### 🟡 When running my provider process `lavad server` I get the following error `provider endpoint mismatch` {#provider-endpoint-mismatch} -This error means that you have used different geolocations when using the `provider-stake` transaction and when running `lavad server`, please ensure they match and the problem should be resolved. +### 🟡 运行我的提供商程序进程`lavad server` 时,出现以下错误`provider endpoint mismatch` {#provider-endpoint-mismatch} +这个错误意味着在使用`provider-stake`交易和运行`lavad server`时使用了不同的地理位置,请确保它们匹配,问题可以得到解决。 -## Developer ⌨️ +## 开发者 ⌨️ -### 🟡 Using Lava with Other RPC Clients {#using-lava-with-other-rpcs} +### 🟡 与其他 RPC 客户端一起使用 Lava {#using-lava-with-other-rpcs} -Lava easily integrates with other RPC clients. +Lava 可轻松与其他 RPC 客户端集成。 -1. **Gateway** - Simply create an account on the gateway, and replace your client's RPC URL with the appopriate one. Get started [immediately](/gateway-getting-started)! -2. **SDK** - You can also use the SDK library integrations to integrate with [viem](/viem), [cosmjs](/cosmjs), [web3.js](/web3js), or [ethers.js](/ethersjs5). +1. **Gateway** - 简单地在网关上创建一个账户,并用相应的客户端 RPC URL 替换掉您的客户端。立即[开始](/gateway-getting-started)! +2. **SDK** - 您还可以使用 SDK 库来与 [viem](/viem), [cosmjs](/cosmjs), [web3.js](/web3js),或 [ethers.js](/ethersjs5) 进行集成。 -### 🟡 I'm already using another SDK. {#using-lava-with-other-sdks} -No problem, Lava offers integrations to existing popular libraries [here](/sdk-integrations). +### 🟡 我已经在使用另一个 SDK。 {#using-lava-with-other-sdks} +没问题,Lava 提供与现有流行库的集成 [此处](/sdk-integrations)。 -### 🟡 How to change the RPC url which Cosmjs uses? {#changing-cosmjs-url} +### 🟡 如何更改 Cosmjs 使用的 RPC 网址? {#changing-cosmjs-url} -If you want a native integration to use seamlessly, please check out the new Lava integration for [CosmJS](/cosmjs)! -Alternatively, please check out the cosmolava-client created by one of our community members: [MELLIFERA-Labs/cosmolava-client](https://github.com/MELLIFERA-Labs/cosmolava-client) +如果您希望实现无缝使用的原生集成,请查看新的 Lava 集成 [CosmJS](/cosmjs)! +或者,请查看我们社区成员创建的 cosmolava-client:[MELLIFERA-Labs/cosmolava-client](https://github.com/MELLIFERA-Labs/cosmolava-client) -If you just want to switch the RPC URL you can do so using the HttpEndpoint interface on [stargate](https://cosmos.github.io/cosmjs/latest/stargate/interfaces/HttpEndpoint.html#url) or [cosmwasm-stargate](https://cosmos.github.io/cosmjs/latest/cosmwasm-stargate/interfaces/HttpEndpoint.html#url). Be sure you've grabbed the TendermintRPC endpoint from Lava or you may encounter errors. +如果您只想切换 RPC URL,您可以使用 [stargate](https://cosmos.github.io/cosmjs/latest/stargate/interfaces/HttpEndpoint.html#url) 或 [cosmwasm-stargate](https://cosmos.github.io/cosmjs/latest/cosmwasm-stargate/interfaces/HttpEndpoint.html#url) 上的 HttpEndpoint 接口。请确保您已从 Lava 获取了 TendermintRPC 端点,否则可能会遇到错误。 diff --git a/docs/intro/intro.md b/docs/intro/intro.md index e96cfb2e..5d2afd94 100644 --- a/docs/intro/intro.md +++ b/docs/intro/intro.md @@ -8,34 +8,34 @@ import LatestVersion from '@site/src/components/LatestVersion'; import LatestDocsVersion from '@site/src/components/LatestDocsVersion'; -# Lava Docs 📑 +# Lava 文档 📑 ![Intro Banner](/img/banner/Intro.jpg) -:::danger Testnet is up and running! -Welcome testers! Thank you for joining the testnet. If you find errors in our docs, please consider [contributing!](https://github.com/lavanet/docs) +:::danger 测试网已启动并运行! +欢迎测试人员!感谢您加入测试网。如果您在我们的文档中发现错误,请考虑 [投稿!](https://github.com/lavanet/docs) ::: -## Overview 🔍 +## 概览 🔍 -Today, RPC & data infrastructure is not up to par for scaling Ethereum, its rollups and all other blockchains. Lava’s novel architecture aims to offer developers fast, reliable and accurate access to any chain. RPC is the first service on Lava, but we will be expanding to subgraphs, oracles and more. +今天,RPC和数据基础设施没有达到扩展以太坊、其聚合和所有其他区块链的标准。Lava新颖的架构旨在为开发人员提供对任何链的快速、可靠和准确的访问。RPC是Lava上的第一个服务,但我们将扩展到subgraphs, oracle等。 -Lava is built as an application-specific L1 PoS Blockchain, based on CosmosSDK. The protocol introduces a primitive called “specs”. Specs are modules defining APIs in JSON-format, which can then be served by the network of providers to meet demand. We envision a modular economy for data infrastructure for web3 and beyond. +Lava 是构建在 CosmosSDK 上的特定应用层 L1 PoS 区块链。该协议引入了一个名为“specs”的原始构件。 Specs 是以 JSON 格式定义 API 的模块,然后可以由供应商网络提供以满足需求。我们设想了一个为 Web3 及其后续版本构建的数据基础设施的模块化经济。 -Lava documentation is intended to be the definitive reference for all technical aspects of Lava Protocol. For other information about Lava Network, please visit our [blog](https://www.lavanet.xyz/blog?utm_source=intro-page&utm_medium=docs) or review our new [research](https://community.lavanet.xyz/c/research/9?utm_source=intro-page&utm_medium=docs)! +Lava 文档旨在成为 Lava 协议所有技术方面的权威参考。有关 Lava 网络的其他信息,请访问我们的[博客](https://www.lavanet.xyz/blog?utm_source=intro-page&utm_medium=docs)或查看我们的新[研究](https://community.lavanet.xyz/c/research/9?utm_source=intro-page&utm_medium=docs)! -## Getting started 🌪️ +## 开始 🌪️ -[](/chains) +[](/chains) -[](/developer) +[](/developer) -[](/validator) +[](/validator) -[](/provider) +[](/provider) -## Version Information ℹ️ +## 版本信息 ℹ️ | | | |-----------|-------------------| @@ -45,11 +45,11 @@ Lava documentation is intended to be the definitive reference for all technical | Current Testnet | `lava-testnet-2` | | Docs Version | **** | -## Quick Links 🔗 +## 快捷链接 🔗 -- [🚪 Gateway](https://gateway.lavanet.xyz/?utm_source=intro-page&utm_medium=docs&utm_campaign=docs-to-gateway) - Quick access APIs -- [🔭 Explorer](https://lava.explorers.guru/) - Use our Official Block Explorer -- [💬 Community Forum](https://community.lavanet.xyz/?utm_source=intro-page&utm_medium=docs) - Long-form Discussion -- [🐦 Twitter/X Account](https://twitter.com/lavanetxyz) - Follow us on X! +- [🚪 Gateway](https://gateway.lavanet.xyz/?utm_source=intro-page&utm_medium=docs&utm_campaign=docs-to-gateway) - 快速访问API +- [🔭 Explorer](https://lava.explorers.guru/) - 使用我们的官方区块资源管理器 +- [💬 Community Forum](https://community.lavanet.xyz/?utm_source=intro-page&utm_medium=docs) - 论坛 +- [🐦 Twitter/X Account](https://twitter.com/lavanetxyz) - 在X关注我们! diff --git a/docs/intro/key-terms.md b/docs/intro/key-terms.md index 5d2ba107..6b73f182 100644 --- a/docs/intro/key-terms.md +++ b/docs/intro/key-terms.md @@ -1,163 +1,163 @@ --- slug: /key-terms -title: 📝 Key Terms +title: 📝 关键词 --- -# Key Terminology 📝 +# 关键术语 📝 -## 🌐 Network and Protocol +## 🌐 网络与协议
- Lava Network - A marketplace for blockchain data, driven by open-source software and protocols, aiming for modular peer-to-peer data accessibility and availability. + Lava 网络 + 一个由开源软件和协议驱动的区块链数据市场,旨在实现模块化的点对点数据可访问性和可用性。
- Lava Protocol - The practical implementation of Lava's features in code, both on and off-chain. + Lava 协议 + Lava功能在代码中的实际实现,涵盖链上和链下。
Token (LAVA) - LAVA is the native digital asset of the Lava Network, central to its economic model. It serves multiple purposes within the network, including as a means to pay for gas fees required for transactions, a governance token allowing holders to participate in network decisions, and as rewards distributed to validators, providers, and contributors. + LAVA 是 Lava 网络的本地数字资产,是其经济模型的核心。在网络中,它具有多种用途,包括用作支付交易所需的燃料费、作为治理代币,允许持有者参与网络决策,以及作为奖励分发给验证者、提供商和贡献者。
- Governance - The decentralized decision-making process in Lava Network, where token holders have control over key aspects. + 治理 + Lava 网络中的去中心化决策过程,其中代币持有者对关键方面拥有控制权。
Specifications - Modular blueprints for Lava's multichain and multi-API support, defining chain and method requirements, costs, and verifications. Specs are the minimum module necessary for Lava API support. + Lava 多链和多 API 支持的模块化蓝图,定义了链和方法的需求、成本和验证。Specs是支持 Lava API 的最小模块。
-## 💰 Subscriptions and Plans +## 💰 订阅与计划
- Subscription - Commitments made by consumers to access Lava Network's services, which include pricing, resource allocation, and usage rules. + 订阅 + 消费者为访问 Lava 网络服务所作的承诺,其中包括定价、资源分配和使用规则。
- Plans - Frameworks for defining various subscription offerings that consumers can purchase, including pricing and resource limits. + 计划 + 定义消费者可以购买的各种订阅方案的框架,包括定价和资源限制。
- Projects - Segmented environments within a subscription, allowing consumers to customize service provisioning and management for specific use cases. + 项目 + 订阅中的不同配置环境,允许消费者自定义特定用例的服务供应和管理。
-## 📊 Quality of Service (QoS) +## 📊 服务质量 (QoS)
-Excellence QoS - A set of metrics designed to ensure a high Quality of Service (QoS) for consumers, enabling monitoring and customization of provider performance. +优质服务 + 一套旨在确保为消费者提供高质量服务(QoS)的衡量标准,可对提供商的性能进行监控和定制。
- Passable QoS - A simplified binary metric indicating whether a relay meets a minimum usability standard, influencing payouts and penalties. + 合格的 QoS + 一个简化的二进制指标,表示中继站是否符合最低可用性标准,影响报酬和惩罚。
-## 👥 Roles on the Network +## 👥 网络中的角色
- Consumers - Individuals who purchase subscription plans to access blockchain data and services offered through the Lava protocol. + 消费者 + 购买订阅计划以访问通过 Lava 协议提供的区块链数据和服务的个人。
- Providers - Entities that stake tokens to offer services to consumers, playing a critical role in maintaining data integrity. + 提供商 + 质押代币以向消费者提供服务的实体,在维护数据完整性方面发挥着关键作用。
- Validators - Network participants who stake tokens to secure the network, create blocks, execute transactions, and vote on important matters. + 验证者 + 网络参与者通过质押代币来保护网络,创建区块,执行交易,并对重要事项进行投票。
- LAVA Token Holders - Individuals who hold LAVA tokens, with the option to delegate tokens, participate in governance, and potentially earn rewards. + LAVA Token 持有者 + 持有LAVA代币的个人,可以选择委托代币,参与治理,并可能获得奖励。
- Contributors - Members of the network who create and maintain RPC and API specifications and software, while also participating in the community through bounties and contributions. + 贡献者 + 创建和维护RPC和API规范和软件的网络成员,同时通过奖金和贡献参与社区。
-## 🔌 SDK and Integrations +## 🔌 SDK及其集成
SDK - A JavaScript/TypeScript package that simplifies the process of sending data relays to providers, offering compatibility with various development environments. + 一个JavaScript/TypeScript包,简化了向提供商发送数据中继的过程,提供了与各种开发环境的兼容性。
- Integrations - Compatibility of the SDK with well-known libraries like CosmJS, Web3JS, EthersJS, and viem, making it easier for developers to interact with the Lava Network. + 集成 + SDK与CosmJS、Web3JS、EthersJS和viem等知名库的兼容性,使开发人员更容易与Lava网络交互。
-## 🏅 Product Offerings +## 🏅 提供的产品
Gateway - A management system that empowers consumers to purchase subscriptions, create projects, and manage policies without the need for running nodes or consumers themselves. + 一种管理系统,使消费者能够购买订阅、创建项目和管理策略,无需运行节点。
- Lava Info - A web application providing insights into the Lava protocol, including data on relays, Compute Unit (CU) usage, provider statistics, and more. + Lava 信息 + 这是一个网络应用程序,提供有关 Lava 协议的详细信息,包括中继数据、计算单元 (CU) 使用情况、提供商统计数据等。
- Server Kit + 服务器工具包
-## 🎖️ Badges, Pairing, and Rewards +## 🎖️ 徽章、配对和奖励
- Badges - Special permissions required for end-users to send relays when connecting to the Lava Network from frontend applications, generated by Dapp owners using a subscription private key. + 徽章 + 终端用户从前端应用程序连接到 Lava 网络时,需要获得由 Dapp 所有者使用订阅私钥生成的发送中继的特殊权限。
- Pairing - A time-based mechanism ensuring that consumers are connected to the most suitable service providers based on various factors like location, preferences, and more. + 配对 + 一种基于时间的机制,可确保根据位置、偏好等各种因素将消费者连接到最合适的服务提供商。
- Rewards - In LAVA tokens, these incentivize honest participation in the Lava Network, distributed to validators, providers, and contributors for their contributions and services. + 奖励 + 在 LAVA 代币中,这些代币激励人们诚实地参与 Lava 网络,分发给验证者、提供者和贡献者,以奖励他们的贡献和服务。
-## Accounts & Wallets +## 账户和钱包
Keyring -The keyring holds the private/public keypairs used to interact with a node. For instance, a validator key needs to be set up before running the blockchain node, so that blocks can be correctly signed. The private key can be stored in different locations, called "backends", such as a file or the operating system's own key storage. (learn more here) +密匙环保存用于与节点交互的私有/公共对。例如,在运行区块链节点之前需要设置验证器密钥,以便对块进行正确签名。私钥可以存储在不同的位置,称为“backends”,例如文件或操作系统自己的密钥存储。(点击这里了解更多)
Keypair -A keypair in the context of the Lava Network consists of two essential components: a public key and a private key. This cryptographic pair is crucial for securing accounts and authorizing transactions within the Lava ecosystem. +Lava 网络中的密钥对由两个基本部分组成:公钥和私钥。这对加密密钥对确保账户安全和授权 Lava 生态系统内的交易至关重要。
-Public Key -A public key is a cryptographic key that is openly shared and used for various purposes, including encrypting data, verifying digital signatures, and establishing secure communication within the Lava Network. It is one half of a key pair, with the other half being the private key. Public keys are essential for securing Lava assets, verifying transactions, and ensuring data integrity. +公钥 +公开密钥是公开共享的加密密钥,用于各种目的,包括加密数据、验证数字签名和在 Lava 网络内建立安全通信。它是密钥对的一半,另一半是私人密钥。公开密钥对于保护 Lava 资产、验证交易和确保数据完整性至关重要。 -Example Key: `lava@16g2y9l2zj5yrwcftd6lrwepnhjnl0f2gd70tjg` +密钥示例: `lava@16g2y9l2zj5yrwcftd6lrwepnhjnl0f2gd70tjg`
-Private Key -In the Lava Network, a private key is a highly confidential and secret cryptographic key that forms a key pair with a corresponding public key. The private key is used for critical tasks such as decrypting data, signing transactions, and providing access to Lava assets and sensitive information. It should be securely stored and never shared publicly, as it grants full control and ownership over cryptographic assets and secure communications. +私钥 +在 Lava 网络中,私钥是一种高度机密的秘密加密密钥,它与相应的公钥组成一对密钥对。私钥用于解密数据、签署交易、访问 Lava 资产和敏感信息等关键任务。私钥应安全存储,切勿公开共享,因为它赋予了对加密资产和安全通信的完全控制权和所有权。 -Example Key: (`64 character hexadecimal string`) +密钥示例: (`64 character hexadecimal string`)
\ No newline at end of file diff --git a/docs/intro/specs/add-spec.md b/docs/intro/specs/add-spec.md index bb0f107e..d330ab60 100644 --- a/docs/intro/specs/add-spec.md +++ b/docs/intro/specs/add-spec.md @@ -1,28 +1,28 @@ --- slug: /add-spec -title: Adding Specifications 🔧 +title: 添加 Specifications 🔧 --- -# Adding a Specification to Lava +# 向Lava添加Specification -## ℹ️ Context -Creating a new specification in the Lava ecosystem is important for those aiming to extend or introduce new functionalities within the network. Lava is modular; entirely new APIs, additional chains, and indexers can be supported without modifications to the Lava Protocol. In Lava, a specification, often referred to as a 'spec', acts as a foundational blueprint that details the APIs, required methods, compute unit costs, and expected behavior pertinent to a specific chain or application. +## ℹ️ 内容 +在 Lava 生态系统中创建新的 specification 对于那些希望在网络中扩展或引入新功能的人来说至关重要。Lava 是模块化的;可以支持全新的 API、额外的链和索引器,而无需修改 Lava 协议。在 Lava 中,规范通常被称为 'spec',作为一个基础蓝图,详细描述了特定链或应用程序相关的 API、所需方法、计算单元成本和预期行为。 -Contributors play a vital role in Lava by adding new specs. Becoming a contributor to Lava is one of the most significant roles to play in the entire ecosystem. At Mainnet, it is planned for Contributors to be rewarded by the economics of the protocol. Creating new specs is not only a way to expand Lava, but has many other benefits: it builds a community of providers for an in-demand API, it allows modular changes to API collections on an as-needed basis, and it gives an opportunity to potentially earn rewards as a maintainer and creator of the spec. The contribution of new specs is highly appreciated and necessary endeavor for securing and improving web3 infrastructure. +贡献者通过添加新的specs在 Lava 中扮演着至关重要的角色。成为 Lava 的贡献者是整个生态系统中最重要的角色之一。在主网上,计划通过协议的经济机制来奖励贡献者。创建新的规范不仅是扩展 Lava 的一种方式,还具有许多其他好处:它建立了一个针对需求 API 的提供者社区,它允许根据需要以模块化的方式更改 API 集合,并为维护者和规范创建者提供了可能获得奖励的机会。贡献新的规范是非常受欢迎和必要的努力,用于保护和改进 web3 基础设施。 -## 🏗️ Essential Steps +## 🏗️ 必要步骤 -If you're considering creating a specification for Lava, here's the simplified flow: +如果您正在考虑为 Lava 创建specification,以下是简化流程: -- Create a Specification File 🖊️: Begin by creating a JSON file that meets Lava's specification standards. You can get a sense of what fields are required from our [reference guide](/spec-reference) or [cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs). -- Detail the Functions 📝: Within your spec file, specify any Imports, Add-Ons, and Extensions relevant to the chain or API you're considering. Make sure you review the importance of each of these [key concepts](/spec#key-concepts-) -- Submit a Proposal 📜: Once your spec is ready, submit it as a [governance proposal](#⌨️-command) to the Lava community. -- Community Decision 👩🏼‍⚖️🧑🏿‍⚖️ : If your proposal garners enough support, it will be accepted on-chain through a vote of validators. You can continue to provide support by submitting a [pull request (PR)](https://github.com/lavanet/lava/pulls) so your spec can be added to the Lava cookbook before any further updates. +- 创建spec文件 🖊️: 首先创建一个符合 Lava spec标准的 JSON 文件。您可以从我们的 [reference guide](/spec-reference) 或 [cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs) 了解需要哪些字段。 +- 详细说明功能📝: 在您的spec文件中,指定与您正在考虑的链或API相关的任何导入、加载项和扩展。请确保查看这些[key concepts](/spec#key-concepts-) +- 提交建议书📜: 一旦你的spec准备好了,就把它作为[governance proposal](#⌨️-command)到Lava社区。 +- 社区决策👩🏼‍⚖️🧑🏿‍⚖️ : 如果你的提案获得了足够的支持,它将通过验证人的投票在链上被接受。您可以通过提交[pull request (PR)](https://github.com/lavanet/lava/pulls)继续提供支持,因此,您的spec可以在任何进一步更新之前添加到Lava cookbook中。 -## ⌨️ Command +## ⌨️ 命令 ```bash lavad tx gov submit-legacy-proposal spec-add "{JSON_FILE_PATH}" -y --from "{ACCOUNT_NAME}" --gas-adjustment "1.5" --gas "auto" --node "{LAVA_RPC_NODE}" diff --git a/docs/intro/specs/spec-guide.md b/docs/intro/specs/spec-guide.md index 6a79232b..89bae267 100644 --- a/docs/intro/specs/spec-guide.md +++ b/docs/intro/specs/spec-guide.md @@ -1,44 +1,44 @@ --- slug: /spec-guide -title: Spec Proposal Guide 📜 +title: Spec 提案指南 📜 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Spec Proposal Guide (Walk-thru) +# Spec 提案指南 (Walk-thru) -:::caution UNDER CONSTRUCTION +:::caution 正在建设中 -This guide is a work-in-progress! Please forgive errors, inconsistencies, or incompleteness. +本指南正在编写中!如有错误、不一致或不完整之处,敬请见谅。 ::: -## Overview 🔎 {#overview} +## 概览 🔎 {#overview} -This guide is intended to assist someone with the process of writing and designing a spec proposal in a step-by-step way. The process of creating or maintaining a spec can seem overwhelming initially, but is actually a straightforward process once you understand the fundamentals. Follow along below to get through the entire process of making a specification. +本指南旨在帮助人们逐步完成撰写和设计spec提案的过程。创建或维护spec的过程一开始可能会让人不知所措,但一旦了解了基本原理,这个过程就会变得简单明了。请跟随下面的步骤,了解制作spec的整个过程。
-## Step 1: Create the Proposal/JSON {#create-proposal} +## Step 1: 创建proposal/JSON {#create-proposal} -> Create a specification `JSON` file -> +> 创建specification `JSON` 文件 +> -Creating a specification involves multiple steps and can be an involved process. One of the best exercises you can do to prepare yourself is to visit existing specs and inspect them. Looking at existing specs can give a future spec creator a feel for the standard structure and layout of a spec. +创建specification涉及多个步骤,是一个复杂的过程。为做好准备,您可以做的最好的练习之一就是访问现有specification并检查它们。查看现有specification可以让未来的specification创建者了解specification的标准结构和布局。 -There are three ways to start in the creation of a spec +创建spec有三种方法 -1. 📒**Cookbook** - All of the specs which are currently live on Lava can be found here - in [the Lava cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs). Use one of them to get started, changing fields as needed. -2. 📄**Template -** A blank template is available, right [here](/spec-reference#-file-structure) from the docs. Simply fill in the blanks as you progress. -3. ✏️**From Scratch -** Writing a spec completely from scratch gives the opportunity to avoid unnecessary messiness and superfluous fields. +1. 📒**Cookbook** - 所有目前在 Lava 上运行的specs都可以在这里找到 - [the Lava cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs). 请使用其中一个开始,根据需要更改字段。 +2. 📄**Template -** 你可以在[这里](/spec-reference#-file-structure)找到一个空白模板。只要在你编写的过程中填写空白即可。 +3. ✏️**From Scratch -** 完全从头开始编写spec可以避免不必要的混乱和多余的字段。
-### Define Proposal {#define-proposal} +### 定义 Proposal {#define-proposal} -The recommended approach is to start from scratch and go field by field. Let’s start with a blank JSON and create our top-level field. This key is called `proposal` and it describes the specifications we’re about to propose: +建议的方法是从零开始,逐个字段进行。让我们从一个空的 JSON 开始,创建我们的头部字段。 这个键称为 `proposal`,它描述了我们即将提出的specifications。 ```json { @@ -49,17 +49,17 @@ The recommended approach is to start from scratch and go field by field. Let’s } ``` -The format of it is pretty much standard, so you can copy the example above and replace `X` with the name of the API being created. +其格式基本符合标准,因此您可以复制上面的示例,并将 `X` 替换为正在创建的 API 的名称。 -🔖REFERENCE: [`Proposal`](/spec-reference#proposal) +🔖参考资料: [`Proposal`](/spec-reference#proposal)
-### Define Specs {#define-specs} +### 定义 Specs {#define-specs} -Each proposal introduces new `specs` to Lava. As mentioned elsewhere, specs are the minimum requirements that an API provider must meet in order to serve the API. Lava uses several fields to establish the initial parameters for a spec including an `index` , a `name`, the `data_reliability_enabled` marker, and the`minimum_stake_provider` must make. +每个提案向 Lava 引入新的 `specs`。如其他地方所述,`specs` 是 API 提供者必须满足的最低要求,以便提供 API 服务。Lava 使用几个字段来为一个规范建立初始参数,包括一个 `index`,一个 `name`,一个 `data_reliability_enabled` 标记,以及 `minimum_stake_provider` 必须达到的抵押金额。 -These fields combined with others make the first section of a spec: +这些字段与其他字段相结合,构成了spec的第一部分: ```json { @@ -91,95 +91,95 @@ These fields combined with others make the first section of a spec: ``` - 🔍 Let’s investigate these fields one-by-one: + 🔍 让我们逐一研究这些字段:
`index` -The index is the universal identifier for a spec. The index must not be shared by any other spec. It is what will be referenced anywhere else the spec is referenced or imported. The naming convention method for an index is to use all caps, no spaces. Shorter/more abbreviated indexes are preferred. Optionally, to truncate long indexes, many specs employ the strategy of dropping vowels or shortening words (e.g. `OPTM` for Optimism, `STRK` for Starknet, or`AGR` for Agoric) . +索引是spec的通用标识符。索引不得与任何其他spec共享。无论spec被引用或导入到何处,它都将被引用。索引的命名约定方法是使用全部大写字母,不包含空格。更短/更简略的索引更受欢迎。(可选)为了缩短长索引,许多spec采用省略元音或缩短单词的策略(例如,`OPTM` 代表 Optimism,`STRK` 代表 Starknet,或 `AGR` 代表 Agoric)。
`name` -The name is the longform descriptive identifier for a spec. The name should indicate what exactly the spec is/distinguish from specs which serve similar data. If it is a testnet or mainnet of a specific blockchain it should say so. +名称是spec的长形描述性标识符。名称应指明spec是什么/与提供类似数据的spec有所区别。如果它是特定区块链的测试网或主网,应明确说明。
`enabled` -The enabled field describes whether the spec is active. There are times when a spec is defined but not used - or when a spec is to be deactivated temporarily. In our case, this should default to `true`. +enabled字段描述了spec是否处于活跃状态。有时spec可能已定义但未被使用,或者spec可能需要暂时停用。一般情况下,默认值应为true。
`reliability threshhold` -Reliability threshold sets the frequency of reliability related messages. By default, we set this to `268435455` which is the minimum and efficient choice. If you’d like to set it higher - there are more details that can be learned here. [/spec-reference#terms] +可靠性阈值设置可靠性相关消息的频率。默认情况下,我们将其设置为 `268435455`,这是最小且高效的选择。如果您希望将其设置得更高 - 可以在这里[/spec-reference#terms]了解更多详细信息。
`data_reliability_enabled` -Data reliability should be enabled unless there is a compelling reason to disable it! The default value here is `true`. This means Lava protocol will work to ensure data is accurate by doing data reliability checks. Note that if you are creating a spec for something other than a blockchain - you will want to set this to `false`. +数据可靠性应该启用,除非有充分的理由禁用它!默认值为 `true`。这意味着 Lava 协议将通过进行数据可靠性检查来确保数据的准确性。请注意,如果您要为除区块链之外的其他内容创建spec,则应将其设置为 `false`。 -⚠️ As of `lava-testnet-2` support for data reliability on diverse APIs is work-in-progress. +⚠️ 截至 `lava-testnet-2`,对各种 API 的数据可靠性支持正在进行中。
`block_distance_for_finalized_data` -This field defines the number of blocks that should be considered safe from chain reorganization; it varies from chain to chain. Look to other similarly architected specs for suggested values. +这个字段定义了应该被视为安全免受链重组影响的区块数量;它因链而异。可以参考其他类似架构的specs,获取建议的数值。
`blocks_in_finalization_proof` -This field defines the number of blocks that should be found in a finality proof; this will vary from chain to chain. Look to other similarly architected specs fo suggested values. +这个字段定义了在最终性证明中应该包含的区块数量;这会因链而异。请查看其他类似架构的specs以获取建议的数值。
`average_block_time` -The amount of time, on average, that a block passes in milliseconds. This field is used in several algorithms by the protocol to ensure provider quality of service. +平均每个区块通过的时间(以毫秒为单位)。该字段由协议中的几个算法使用,以确保服务提供商的服务质量。
`allowed_block_lag_for_qos_sync` -This is the maximum amount of blocks that can pass before the data a provider serves is considered stale. For faster blockchains/data sources, more blocks will be allowed. For slower blockchains/data sources, less blocks is suitable. Look to other similarly architected specs for values. +这是在服务提供商提供的数据被视为过时之前可以经过的最大区块数。对于更快的区块链/数据源,将允许更多的区块。对于较慢的区块链/数据源,较少的区块更合适。查看其他类似架构的 specs 以获取数值参考。
`shares` -The default is `1`. This is a bonus multiplier for rewards at the end of each month. There should be no reason to change this unless diected otherwise. +默认为 `1`。这是每月月底奖励的奖金乘数。除非另有说明,否则没有必要更改。
`min_stake_provider` -This field defines the minimum amount that a provider must have staked to serve this API. This value can remain identical with default values supplied by all other specs during our testnet. As of `lava-testnet-2` ,the amount is `5000000` in denom `ulava`. +该字段定义了提供商为该 API 提供服务所必须持有的最低金额。该值可与测试网络中所有其他 spec 提供的默认值保持一致。从 `lava-testnet-2` 开始,该金额为 `5000000`,单位为 `ulava`。
-🔖REFERENCE: [`specs`](/spec-reference#specs) +🔖参考资料: [`specs`](/spec-reference#specs) -Once each of these fields has been dealt with, we’re ready to move onto setting up inheritance! +一旦处理完这些字段,我们就可以开始设置继承了!
-## Step 2: Inheritance {#inheritance} +## Step 2: 继承 {#inheritance} -> Inherit attributes from an existing spec. -> +> 从现有spec继承属性。 +> -Before defining any APIs, it’s wise to pull others that already exist to save work. Most APIs in Lava use common methods and can be created from specs already in use on-chain. In Lava, we call this process of borrowing from earlier specs **inheritance**. Specs use inheritance to eliminate redundancy, minimize size, and save time. An additional benefit - as inherited specs are updated - their descendent specs automatically pull in their updates! Inheritance makes things easy. +在定义任何 API 之前,从已存在的specs中提取specs是明智的做法,以节省工作量。Lava 中的大多数 API 使用共同的方法,并且可以根据已在链上使用的specs创建。在 Lava 中,我们称这个从先前specs中借用的过程为继承。specs使用继承来消除冗余,最小化大小,并节省时间。另一个好处是 - 当继承的specs更新时,它们的后代specs会自动拉取更新!继承使事情变得容易。 -### Imports {#imports} +### 导入 {#imports} -An import generically brings in all parse directives, verifications, API Collections, and APIs by default. To overwrite specific mandatory behavior - simply define the parse_directive, verification, API Collection, or API by its `name` ( or `function_tag` if editing a parse directive) in the spec which is inheriting. +导入一般会引入所有解析指令、验证、API集合和默认API。要重写特定的强制行为——只需在继承specs中定义parse_directive、verification、API集合或API的`name`(如果编辑的是parse指令,则是`function_tag`)。 -To inherit, a new spec, use the `imports` field: +要继承一个新specs,使用`imports`字段: ```json "specs": [ @@ -204,7 +204,7 @@ To inherit, a new spec, use the `imports` field: }, ``` -Common imports will include one of the following: +常见的导入将包括以下内容之一: ```json "COSMOSSDK" # Cosmos SDK Standard (i.e. Cosmos Chains) @@ -216,25 +216,25 @@ Common imports will include one of the following: ``` :::info -More often than not, a spec will only use one of the aforementioned imports. Specs are completely modular and can import any other specs. This modular design pattern comes in handy, for example, when designing a spec for mainnet and a spec for testnet. Usually, the testnet spec simply inherits the mainnet spec and requires no further configurations. +通常情况下,spec将只使用上述导入中的一种。spec是完全模块化的,可以导入任何其他spec。例如,在设计主网spec和测试网spec时,这种模块化设计模式会派上用场。通常,测试网spec只是简单地继承主网spec,不需要进一步的配置。 ::: -### Inheritance APIs {#inheritance-apis} +### 继承 APIs {#inheritance-apis} -If you’re picky about the imports you want to do, it is possible to specify individual APIs, using the `inheritance_apis` field under an `api_collection`. If you’re confused don’t worry - we’ll explain more about API Collections next. For now, it is strongly recommended that you use imports instead. Remember, you can always disable unused `apis` and `api_collections`. +如果你对想要导入的东西很挑剔,可以使用 `api_collection`下的`inheritance_apis` 字段来指定单个api。如果你对此感到困惑,不要担心——我们将在接下来解释更多关于API集合的内容。现在,强烈建议您使用导入。记住,你总是可以禁用未使用的 `apis` 和`api_collections`。 -🔖REFERENCE: [`imports`](/spec#imports) +🔖参考资料: [`imports`](/spec#imports)
-## Step 3: API Collections {#api-collections} +## Step 3: API集合 {#api-collections} -> Specify the API collections and interfaces which are mandatory for Providers. +> 指定提供商必须使用的API集合和接口。 -Each spec can contain several categories of API Collections. API Collections are split across different interfaces, although they are constructed similarly. If a spec only contains the APIs of another spec it imports, it may not be necessary to define API collections at all… +每个spec可以包含多个类别的 API 集合。尽管 API 集合的构造类似,但它们被分成不同的接口。如果一个spec只包含它导入的另一个spec的 API,那么可能根本不需要定义 API 集合... -Some example API Collections are defined (with differences *highlighted*) below: +下面定义了一些应用程序接口集合示例(差异*高亮显示*): @@ -353,15 +353,15 @@ Some example API Collections are defined (with differences *highlighted*) below: -Each API collection is composed of various pieces. These pieces collectively give definition to the APIs that a Provider will serve. It's important that we review these pieces in detail so that you're familiar with what goes where: +每个 API 集合都由不同的部分组成。这些部分共同定义了提供商将提供的 API。我们有必要详细回顾一下这些组件,以便您熟悉它们的用途: -🔖REFERENCE: [`api_collections`](/spec-reference#api_collections) +🔖参考资料: [`api_collections`](/spec-reference#api_collections) -🔖REFERENCE: [`collection_data`](/spec-reference#collection_data) +🔖参考资料: [`collection_data`](/spec-reference#collection_data)
-### Collection Data +### 数据集合
`api_interface` @@ -377,7 +377,7 @@ Each API collection is composed of various pieces. These pieces collectively giv
`internal_path` -This field gives the internal path of the node for this specific ApiCollection. This is **most likely unneeded** unless the API sets vary on internal paths on teh node. The best example is the [AVAX specification](https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_avalanche.json) which uses internal paths to distinguish between subnets with distinct ApiCollections. +这个字段给出了这个特定apiccollection的节点的内部路径。这很可能是不需要的,除非API集在节点的内部路径上有所不同。最好的例子是[AVAX规范](https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_avalanche.json),它使用内部路径来区分具有不同apiccollections的子网。
@@ -400,28 +400,27 @@ This field gives the internal path of the node for this specific ApiCollection.
`add_on` -Leaving this field as a blank string(`""`) is the default and expected input. If you add anything to the string, the API Collection will be processed as an addon with the name provided in the string. Under that condition, the collection will be treated as optional to providers. We cover addons in more detail in a [later section](/spec-guide#step-6-addonsextensions-optional-apis) of this guide. - +将此字段保留为空字符串(`""`)是默认和预期的输入。如果您向字符串中添加任何内容,API Collection将作为带有字符串中提供的名称的插件进行处理。在这种情况下,该集合将被视为提供者商可选集合。我们将在本指南的后面一节 [later section](/spec-guide#step-6-addonsextensions-optional-apis)中更详细地介绍插件。

-### Other Fields +### 其他字段 #### APIs -This is an array will contain all of the collection's APIs - outlined in such a manner that you can see the compute units. There is a [whole section](/spec-guide#new-apis) dedicated to adding APIs to an API Collection, so we can leave this blank for now, as well. +这个数组将包含集合的所有api——以一种您可以看到计算单元的方式进行概述。有一个[whole section](/spec-guide#new-apis)专门介绍向API Collection添加API,所以我们现在也可以把这个留作空白。
#### Headers -It is possible to specify headers to be used in the API using this array. Leave this blank for now: `[]` unless you want to identify headers that a consumer can send along with their request. +可以使用此数组指定要在API中使用的头。暂时将此项留空:`[]`,除非您想确定消费者可以随请求一起发送的标头。 -Each Header is composed of a `name` and a `kind` , optionally a `function_tag`. +每个Header由 `name` 和 `kind` 组成,`function_tag`是可选的。 -
An Example Header +
Header 示例 ```json { @@ -432,25 +431,25 @@ Each Header is composed of a `name` and a `kind` , optionally a `function_tag`.
-##### Kinds of Headers +##### header的种类 -| Header | Description | Example | -|-------------|--------------------------------------------------------------------------|-----------------------------------------------| -| pass_ignore | Relies on node-specific information and excludes header from reliability.| Time tag of reply on Aptos (varies per node). | -| pass_reply | Node returns header to user; user cannot request it. One-way. | Ledger version 0, e.g., x-aptos-echo from node. | -| pass_both | Two-way communication: Node and user can both send and receive headers. | Cosmos block. | -| pass_send | User can send to node, but node cannot send to user. One-way. | Instruction headers. | +| Header | 说明 | 示例 | +|-------------|-------------------------------------------|-------------------------------------------------| +| pass_ignore | 依赖于特定于节点的信息,排除了header的可靠性。 | Time tag of reply on Aptos (varies per node). | +| pass_reply | 节点将头返回给用户;用户无法请求。单向。 | Ledger version 0, e.g., x-aptos-echo from node. | +| pass_both | 双向通信:节点和用户都可以发送和接收header。 | Cosmos block. | +| pass_send | 用户可以发送到节点,但节点不能发送到用户。单向的 | Instruction headers. | -It is possible to use a `function_tag` to parse the header's response. The `function_tag` *must* correlate to an existing parse_directive. +我们可以使用`function_tag`来解析header的响应。`function_tag` **必须**与现有的parse_directive相关。
-#### Parse Directives +#### 解析指令 -Because every API returns data in a different format, Lava protocol establishes a standardized way to deal with data parsing. These standards are called `parse directives`. Parse directives are a critical part of how API responses are handled. Please take a moment to familiarize yourself with Lava parsing functions before continuing: +因为每个API都以不同的格式返回数据,所以Lava协议建立了一种处理数据解析的标准化方法。这些标准被称为`parse指令`。解析指令是处理API响应的关键部分。在继续下面的内容之前,请花点时间熟悉一下Lava解析函数: -🔖REFERENCE: [Parsing](/spec-reference#parsing) +🔖参考资料: [Parsing](/spec-reference#parsing) -If a spec is imported, then this is most likely already handled for you and does not require definition. However, in case it is not, there is a need for +如果导入了spec,那么很可能已经为您处理过了,不需要定义。但是,如果没有导入,则需要 ```json { @@ -481,28 +480,28 @@ If a spec is imported, then this is most likely already handled for you and does ```
`function_tag` - This is the global name and identification of the parse_directive. Anywhere else that a parse_directive is referenced it will be referenced by this name. +这是parse_directive的全局名称和标识。在其他任何地方引用parse_directive时,都会使用这个名称。
`function_template` -This is the (JSON) template from which the response will be parsed. It is used to identify the standard format of responses. +这是解析响应的(JSON)模板。它用于确定响应的标准格式。
`api_name` -The `api_name`` refers to the specific API that will be parsed by the parse_directive. It should correlate to a defined api in the `api_collections` or one inherited. +`api_name`指的是将被parse_directive解析的特定API。它应该与`api_collections`中定义的api或继承的api相关联。
:::warning -Get_BlockNum and Get_Block_by_Num must be defined for Lava data reliability checks to succeed. If your API does not support block numbers - please ensure that `data_reliability_enabled` is set to `false`. +Lava数据可靠性检查要成功,必须定义Get_BlockNum和Get_Block_by_Num。如果你的API不支持区块号——请确保将`data_reliability_enabled`设置为`false`。 :::
-## Step 4: New APIs {#new-apis} +## Step 4: 新 APIs {#new-apis} -> Design APIs which were not inherited from another spec. +> 设计不继承自其他spec的api。 @@ -527,64 +526,64 @@ Get_BlockNum and Get_Block_by_Num must be defined for Lava data reliability chec }, ``` -### Block Parsing +### 区块解析 -This area is used to describe how to extract the block number from the API request. Make sure to review the parsing reference and several spec examples to ensure it's defined correctly. +该区域用于描述如何从API请求中提取块号。一定要检查解析参考和几个spec示例,以确保它的定义是正确的。 -🔖REFERENCE: [`Block Parsing`](/spec-reference#block-parsing), [`Parsing`](/spec-reference#parsing-) +🔖参考资料: [`Block Parsing`](/spec-reference#block-parsing), [`Parsing`](/spec-reference#parsing-) -### Compute Units +### 计算单元 -Describes the number of compute units which each API call expends. This number is a proxy for the compute intensiveness/difficulty and therefore the cost of calling this API. Note: compute units are not just tethered to rewards - they also indirectly inform the protocol of the expected time to response; by default, each compute unit adds ~100 ms to the relay's timeout threshhold. +描述每个API调用消耗的计算单元的数量。这个数字代表了计算强度/难度,因此也代表了调用这个API的成本。注意:计算单元不仅与奖励挂钩——它们还间接告知协议预期的响应时间;默认情况下,每个计算单元将中继的超时阈值增加约100毫秒。 -There are a minimum of 10 CU per call - this should be sufficient for most calls. +每次调用至少有10个CU,这对大多数调用来说应该足够了。 -🚧 Note that `extra_compute_units` is presently not used, but will be useful for varying cost based upon consumer arguments. +🚧 备注 `extra_compute_units`目前没有使用,但可以根据消费者参数来改变成本。 -🔖REFERENCE: [`Compute Units`](/spec#cu) +🔖参考资料: [`Compute Units`](/spec#cu) -### Category +### 分类
`deterministic` -true if deterministic responses from API (default)
- false disables data reliability for non-deterministic responses. +true 如果应用程序接口作出确定性响应 (default)
+ false 对非确定性响应禁用数据可靠性。
`local` -true if local information from the node is returned through the API.
-false if the local information on the node is irrelevant to response. (default) +true 如果通过 API 返回节点的本地信息。
+false 如果节点上的本地信息与响应无关。 (默认)
🚧 `subscription` UNDER CONSTRUCTION => mark false
-subscription indicates when to open up a streaming API with the provider (wss is currently disabled. +subscription指示何时使用提供商打开流API (wss当前已禁用)。
`stateful` -Manages nonce consistency. Use 1 to propagate information to all providers, 0 for no propagation. +管理nonce一致性。使用1将信息传播到所有提供商,0表示不传播。
-🔖REFERENCE: [`Category`](/spec-reference#api_category) +🔖参考资料: [`Category`](/spec-reference#api_category) -### Other Fields +### 其他字段 -For other fields, please take a look at the reference(s) and observe other specs. +对于其他字段,请查看参考资料并观察其他specs。 -🔖REFERENCE: [`APIs`](/spec-reference#apis) +🔖参考资料: [`APIs`](/spec-reference#apis)
-## Step 5: Verifications {#verifications} +## Step 5: 验证 {#verifications} -> Define tests which confirm that a Provider is serving the proper data -> +> 定义测试,以确认提供商程序正在提供适当的数据 +> -Earlier, we looked at Parse Directives as a means for understanding the type of data that a relay returns. A verification is a `parse_directive` combined with an `expected value`. It provides a means for the protocol to intelligently check if the provider is serving the correct data. Each `API Collection` has its own set of verifications. Define verifications like below: +之前,我们将解析指令视为一种理解中继返回数据类型的方法。验证是一个`parse_directive`和一个`expected value`的组合。它为协议提供了一种智能检查提供商是否提供正确数据的方法。每个`API Collection` 都有自己的一套验证方法。定义如下验证: ```json "verifications": [ @@ -611,22 +610,22 @@ Earlier, we looked at Parse Directives as a means for understanding the type of ] ``` -The default behavior of verifications is to restrict a provider from serving the APIs if failed. This cna be altered with a field called `severity` but it is not recommended behavior unless specific to your usecase. +验证的默认行为是,如果失败,则限制提供商为 API 提供服务。这可以通过一个名为`severity`的字段来改变,但除非是针对您的特定用例,否则不建议采用这种行为。 -🔖REFERENCE: [`Verifications`](/spec-reference#verifications) +🔖参考资料: [`Verifications`](/spec-reference#verifications)
-## Step 6: Addons/Extensions (Optional APIs) {#addons-extensions} +## Step 6: 插件/扩展 (可选的 APIs) {#addons-extensions} -> Define optional API Collections which a Provider may choose to serve for more CU -> +> 定义可选的API集合,提供者可以选择为更多的CU提供服务 +> -Specs are both highly modular and composable. Sometimes, the minimum requirements of a provider may not be satisfactory for all consumers on the network. A great example is for archive nodes; not every Provider on a network needs to serve Archive data, but for those who want to opt-in you can define the rules and rewards using extensions. Addons are additional sets of API Collections that are not mandatory- a great example of an addon would be a node which answers debug APIs! +Specs是高度模块化和可组合的。有时,提供商的最低要求可能不能满足网络上的所有消费者。归档节点就是一个很好的例子;并不是网络上的每个提供商都需要提供存档数据,但是对于那些想要选择加入的人,您可以使用扩展来定义规则和奖励。插件是一组非强制性的附加API集合——一个很好的例子就是一个响应调试API的节点! -### Creating Addons +### 创建插件 -Making an Addon is very similar to making any other API Collection. The sole difference is that the `add_on` field must contain a unique name. +制作插件与制作任何其他API集合非常相似。唯一的区别是`add_on`字段必须包含一个唯一的名称。 ```json { @@ -641,12 +640,12 @@ Making an Addon is very similar to making any other API Collection. The sole dif }, ``` -🔖REFERENCE: [`Addons`](/spec#addon) +🔖参考资料: [`Addons`](/spec#addon) -### Creating Extensions +### 创建扩展 -Making an Extension follows a slightly different process than making an Addon. We define extensions as an array which is a child of an `api_collection` object: +与制作插件相比,制作扩展的过程略有不同。我们将扩展定义为一个数组,它是`api_collection`对象的子对象: #### Archive Example ```json @@ -661,10 +660,10 @@ Making an Extension follows a slightly different process than making an Addon. W ] ``` -`archive` Providers must return blocks from at least 254 blocks from latest, thus receiving 5x the CU. +`archive`提供商必须从latest返回至少254个块,从而接收5倍的CU(计算单元)。 -#### Censorship Example +#### 审查示例 ```json "extensions": [ { @@ -676,30 +675,30 @@ Making an Extension follows a slightly different process than making an Addon. W } ] ``` -`censorship` Providers may only return blocks 1 block away from the latest, thus receiving 2x the CU rewards. +`censorship`提供商可能只返回距离最近一个区块1个区块的数据,从而获得2倍的CU奖励。 :::info -Currently, rules and extensions are hard-coded. As of the time of this guide, "block" is the only rule defined in code and "archive" is the only recognized extension. +目前,规则和扩展是硬编码的。在编写本指南时,“block”是代码中定义的唯一规则,“archive”是唯一公认的扩展。 ::: -🔖REFERENCE: [`Extensions`](/spec#extensions) +🔖参考资料: [`Extensions`](/spec#extensions)
-## Step 7: Verifications for Optional APIs {#verifications-for-addons-extensions} +## Step 7: 可选 APIs 的验证 {#verifications-for-addons-extensions} -> Define tests for Providers who serves addons and extension API Collections +> 为提供插件和扩展API集合的提供商定义测试 -### Verifications for Addons +### 对插件的验证 -Verifications for addons are simple! They are defined in the [exact same way](#verifications) as they are for other api_collections; when defining an api_collection as an addon, populate `verifications` with your verifications. +验证插件很简单!它们的定义[完全相同](#verifications)与其他api_collection的定义相同;当定义一个api_collection作为插件时,用你的验证填充` verified `。 -### Verifications for Extensions +### 对扩展的验证 -Verifications for extensions are similarly simple. Within `verifications` , under the child `values`, create another entry with the `extension` name like so: +对扩展的验证也同样简单。在` verified `中,在子元素`values`下,创建另一个名为`extension`的条目,如下所示: ```json @@ -716,29 +715,29 @@ Verifications for extensions are similarly simple. Within `verifications` , unde
-## Step 8: Test with Local Blockchain {#test} +## Step 8: 使用本地区块链进行测试 {#test} -> Use the `test_spec_full.sh` script to automatically execute local tests. +> 使用`test_spec_full.sh`脚本自动执行本地测试。 -### Install Lava +### 安装 Lava -1. Install [Lava Binaries](/install-lava) on Your Local Machine -2. Check that the `test_spec_full.sh` exists in the `./scripts` folder of your install +1. 在本地机器上安装[Lava Binaries](/install-lava) +2. 检查`test_spec_full.sh`是否存在于`. /scripts` 文件夹 -### Run Command +### 运行命令 ``` ./scripts/test_spec_full.sh cookbook/specs/spec_add_X.json ``` -It will scaffold a local block chain and create a test network of several providers running the spec! You can see errors in real-time which will alert you to where you need to debug. Once you have debugged all issues- go on to the next step! +它将搭建一个本地区块链,并创建一个由几个运行该spec的提供商组成的测试网络!您可以实时看到错误,这将提醒您需要调试的地方。一旦您调试了所有问题-继续下一步!
-## Step 9: Push to your Repository & Share {#push-and-share} +## Step 9: 推送到您的仓库并分享 {#push-and-share} > Add your `JSON` file to your local `cookbook/spec/` directory. -Share your progress with the [Lava Team & Community!](https://discord.gg/Tbk5NxTCdA) +与[Lava团队和社区!](https://discord.gg/Tbk5NxTCdA)分享您的进展 diff --git a/docs/intro/specs/spec-reference.md b/docs/intro/specs/spec-reference.md index b8d7092c..ef5de626 100644 --- a/docs/intro/specs/spec-reference.md +++ b/docs/intro/specs/spec-reference.md @@ -1,18 +1,18 @@ --- slug: /spec-reference -title: Reference Guide 📐 +title: 参考指南 📐 --- -# Spec Reference Guide +# Spec 参考指南 -This guide provides a detailed reference to the various specifications within the Lava Network. It encompasses the structure and definitions of proposals, specs, API collections, service APIs, and associated extensions. The objective is to ensure that developers, validators, and other stakeholders have a clear and consistent understanding of the configurations and functionalities. +本指南详细参考了Lava网络中的各种规范。它包含了提案、specs、API集合、服务API和相关扩展的结构和定义。目标是确保开发人员、验证人员和其他涉众对配置和功能有一个清晰和一致的理解。

-## 📌 File Structure +## 📌 文件结构 -
🔝 Tree Structure +
🔝 树状结构 ``` Spec (JSON) @@ -159,74 +159,74 @@ Spec (JSON)
-## 📖 Section Reference +## 📖 章节参考 -Each section details specific fields with descriptions and examples. +每个部分都详细介绍了特定字段,并附有说明和示例。 -### Proposal (`proposal`) 📜 {#proposal} +### 提案 (`proposal`) 📜 {#proposal} -| Field | Description | Example | -|---------------|---------------------------------------------------------------|----------------------------------------------------------| -| `title` | Title of the proposal. | `Add Specs: Solana` | -| `description` | Brief description about the purpose of the proposal. | `Adding new specification support for relaying Solana data on Lava` | +| 字段 | 说明 | 示例 | +|---------------|-------------------------|--------------------------------------------------------------------| +| `title` | 提案的标题 | `Add Specs: Solana` | +| `description` | 简短的描述提案的目的 | `Adding new specification support for relaying Solana data on Lava`| ### Specifications (`specs`) 📘 {#specs} -| Field | Description | Example | -|-------|-------------|---------| -| `index` | A unique identifier for the spec. | `JUN1` | -| `name` | A human-readable name for the spec. | `juno mainnet` | -| `enabled` | Indicates if the spec is active. | `true` | -| `imports` | An array of other spec indices. Allows one spec to inherit settings from another. | `["COSMOSSDKFULL"]` | -| `reliability_threshold` | A system parameter for data reliability. | `268435455` | -| `data_reliability_enabled` | Flag indicating if data reliability is enabled. | `true` | -| `block_distance_for_finalized_data` | The number of blocks considered safe from chain reorganizations. | `0` | -| `blocks_in_finalization_proof` | Number of blocks in the finality proof. | `1` | -| `average_block_time` | The average time (in ms) taken for a block to be produced. | `6500` | -| `allowed_block_lag_for_qos_sync` | Number of blocks a quality of service sync can lag by. | `2` | -| `min_stake_provider` | Minimum amount a provider needs to stake to offer services. | `{"denom": "ulava", "amount": "50000000000"}` | -| `min_stake_client` | *(deprecated)* Minimum amount a client needs to stake to access services. | `{"denom": "ulava", "amount": "5000000000"}` | - -### API Collections (`api_collections`) 🗂️ {#api_collections} - -| Field | Description | Example | -|-------|-------------|---------| -| `enabled` | Indicates if the API collection is active. | `true` | -| `collection_data` | Contains data related to the collection. | `{"api_interface": "rest", "internal_path": "", "type": "GET", "add_on": ""}` | -| `apis` | An array containing details of each API in the collection. | Array of API objects | -| `headers` | Headers to be included in the API requests. | `[]` | -| `inheritance_apis` | An array of APIs inherited from imported specs. | `[]` | -| `parse_directives` | Directives to parse the API responses. | `[]` | -| `verifications` | Contains verification details. | `{"name": "chain-id", "values": [ { "expected_value": "juno-1" } ]}` | - -#### API Collection Data (`collection_data`) {#collection_data} - -| Field | Description | Example | -|-------|-------------|---------| -| `api_interface` | Interface of the API (e.g., `rest`, `grpc`). | `rest` | -| `internal_path` | Internal path for the API call. | `` | -| `type` | HTTP method for the API request. | `GET` | -| `add_on` | Name of add-on collection belongs to | `debug` | - - -### Service APIs (`apis`) ⚙️ {#apis} - -| Field | Description | Example | -|-------|-------------|---------| -| `name` | Name of the API. | `juno.mint.Query/AnnualProvisions` | -| `block_parsing` | Describes how block heights are derived from API requests. | `{"parser_arg": ["latest"], "parser_func": "DEFAULT"}` | -| `compute_units` | Number of compute units required for the API. | `10` | -| `enabled` | Indicates if the API is active. | `true` | -| `category` | Specifies the category of the API. | `{"deterministic": true, "local": false, "subscription": false, "stateful": 0}` | -| `extra_compute_units` | Additional compute units if required. | `0` | - - - -#### Block Parsing(`block_parsing`) {#block_parsing} - -Details on how block heights are derived from API requests. +| 字段 | 说明 | 示例 | +|-------------------------------------|---------------------------------------------------|-----------------------------------------------| +| `index` | spec的唯一标识符。 | `JUN1` | +| `name` | spec的可读名称。 | `juno mainnet` | +| `enabled` | 提示该spec是否处于活动状态。 | `true` | +| `imports` | 其他 spec索引的数组。允许一个 spec从另一个 spec继承设置。 | `["COSMOSSDKFULL"]` | +| `reliability_threshold` | 数据可靠性的系统参数。 | `268435455` | +| `data_reliability_enabled` | 表示是否启用数据可靠性的标志。 | `true` | +| `block_distance_for_finalized_data` | 被认为不受链重组影响的区块数量。 | `0` | +| `blocks_in_finalization_proof` | 最终证明的块数。 | `1` | +| `average_block_time` | 生成一个数据块所花费的平均时间(单位为ms)。 | `6500` | +| `allowed_block_lag_for_qos_sync` | 服务质量同步可能滞后的块数。 | `2` | +| `min_stake_provider` | 提供商提供服务所需的最少质押。 | `{"denom": "ulava", "amount": "50000000000"}` | +| `min_stake_client` | *(已弃用)*客户端访问服务所需支付的最小金额。 | `{"denom": "ulava", "amount": "5000000000"}` | + +### API 集合 (`api_collections`) 🗂️ {#api_collections} + +| 字段 | 说明 | 示例 | +|--------------------|----------------------------------------------|-------------------------------------------------------------------------------| +| `enabled` | 表明API集合是否处于活动状态。 | `true` | +| `collection_data` | 包含与集合相关的数据。 | `{"api_interface": "rest", "internal_path": "", "type": "GET", "add_on": ""}` | +| `apis` | 一个数组,包含集合中每个API的详细信息。 | Array of API objects | +| `headers` | 要包含在API请求中的标头。 | `[]` | +| `inheritance_apis` | 从导入的specs继承的API数组。 | `[]` | +| `parse_directives` | 解析API响应的指令。 | `[]` | +| `verifications` | 包含验证详细信息。 | `{"name": "chain-id", "values": [ { "expected_value": "juno-1" } ]}` | + +#### API 集合数据 (`collection_data`) {#collection_data} + +| 字段 | 说明 | 示例 | +|-----------------|----------------------------------------|---------| +| `api_interface` | API接口(e.g., `rest`, `grpc`). | `rest` | +| `internal_path` | API调用的内部路径。 | `` | +| `type` | API请求的HTTP方法。 | `GET` | +| `add_on` | 加载项集合的名称属于 | `debug` | + + +### 服务API (`apis`) ⚙️ {#apis} + +| 字段 | 说明 | 示例 | +|-----------------------|------------------|---------------------------------------------------------------------------------| +| `name` | API的名称。 | `juno.mint.Query/AnnualProvisions` | +| `block_parsing` | 描述如何从API请求解析块高度。 | `{"parser_arg": ["latest"], "parser_func": "DEFAULT"}` | +| `compute_units` | API所需的计算单元数量。 | `10` | +| `enabled` | 表明API是否激活。 | `true` | +| `category` | 指定API的类别。 | `{"deterministic": true, "local": false, "subscription": false, "stateful": 0}` | +| `extra_compute_units` | 如果需要额外的计算单元。 | `0` | + + + +#### 区块解析(`block_parsing`) {#block_parsing} + +关于如何从API请求中推导出区块高度的详细信息。 | Field | Description | Example | |-------|-------------|---------| diff --git a/docs/intro/specs/spec.md b/docs/intro/specs/spec.md index 7d57c090..e5609498 100644 --- a/docs/intro/specs/spec.md +++ b/docs/intro/specs/spec.md @@ -1,37 +1,37 @@ --- slug: /spec -title: Specifications +title: Specifications模块 --- -# Specifications (Specs) +# Specifications模块 (Specs) import RoadmapItem from '@site/src/components/RoadmapItem'; ![Specs Banner](/img/banner/Specifications-8d88fb7fab996d996b8927b5a133c541.jpg) -## 🔍 Overview +## 🔍 概览 -Specifications (specs) are the foundational blueprints for Lava's multichain support. Presented in JSON format, they detail the bare minimum requirements for an API to run on Lava. Through these specs, Lava determines which chains and methods are supported and enabled, as well as establishes the costs, requirements, and verifications for them. +Specifications(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈现,详细说明了在Lava上运行API的最低要求。通过这些规范,Lava确定支持和启用哪些链和方法,并为它们确定成本、需求和验证。 -Whenever the ecosystem demands a new API, a new spec is integrated. This dynamic approach incorporates modularity and extensibility directly into the protocol and ensures Lava remains current and adaptable. +每当生态系统需要新的API时,就会集成新的spec。这种动态方法将模块化和可扩展性直接合并到协议中,并确保Lava保持最新和可适应性。
-[](/add-spec) -[](/spec-reference) +[](/add-spec) +[](/spec-reference)

-## 📖 Key Concepts +## 📖 主要概念 -### Index 📑 {#index} -An `index` is the name of the spec. Any time a spec is referenced it will be through its `index`. +### 索引 📑 {#index} +`index`是spec的名称。 任何时候引用spec都将通过其`index`。 -
Example +
示例 -You can see the `EVMOS` spec live in production: +你可以在生产环境中看到`EVMOS`规范: ```json { @@ -46,12 +46,12 @@ You can see the `EVMOS` spec live in production: ```

-### Imports ⬇️ {#imports} -`imports` are references to borrowed functions from other sources. APIs/Chains of the same or similar architecture can import methods from an existing spec using its `index` and implementing any new logic. `imports` improve efficiency by eliminating the need to repeatedly integrate identical APIs. +### 导入 ⬇️ {#imports} +`imports`是对从其他源借用的函数的引用。相同或类似架构的api /chain 可以使用其`index`从现有规范中导入方法并实现任何新逻辑。`imports`通过消除重复集成相同api的需要来提高效率。 -
Example +
示例 -The following spec implements both Cosmos and Ethereum methods: +下面的spec同时实现了Cosmos和Ethereum的方法: ```json "imports": [ @@ -61,10 +61,10 @@ The following spec implements both Cosmos and Ethereum methods: ```

-### API Collection 🛠️ {#api_collections} -A specification always contains an `api_collection`. The `api_collection` contains the list of available methods or APIs that are activated and their respective `api_interfaces` (e.g. `"rest"`,`"grpc"`,`"jsonrpc"`,`"tendermintrpc"`, etc.). In other words, it outlines all the APIs or methods that must be active and operational to support a specific chain/API. Each method listed here must be served by providers and answerable to consumers. +### API集合 🛠️ {#api_collections} +specification总是包含一个`api_collection`。`api_collection`包含可用的激活方法或api的列表以及它们各自的`api_interface `(例如:“`"rest"`,`"grpc"`,`"jsonrpc"`,`"tendermintrpc"`”,等等)。换句话说,它概述了所有必须是活动的和可操作的API或方法,以支持特定的chain/API。这里列出的每个方法都必须由提供者提供服务,并对使用者负责。 -
Example +
示例 ```json "api_collections": [ @@ -83,10 +83,10 @@ A specification always contains an `api_collection`. The `api_collection` contai ```

-### Compute Units (CU) 🔢 {#cu} -Every API call has a computational overhead. To quantify this, Lava employs `"compute_units"` or CUs. They act as a metric, assigning a nominal "cost" to each API call. This ensures transparent resource allocation and utilization, allowing consumers to gauge the intensity of their calls, and providers, in turn, to be rewarded based upon the intensity of compute. +### 计算单元(CU) 🔢 {#cu} +每个API调用都有计算开销。为了量化这一点,Lava使用了`"compute_units"`或CUs。它们相当于一个指标,为每个API调用分配名义上的“成本”。这确保了透明的资源分配和利用,让消费者可以衡量他们的调用强度,而提供商则可以根据计算强度获得奖励。 -
Example +
示例 ```json "apis": [ @@ -112,13 +112,13 @@ Every API call has a computational overhead. To quantify this, Lava employs `"co

-### Add-Ons ➕ {#addons} +### 附加组件 ➕ {#addons} -Add-Ons (`"add-on"`) introduce optional new methods and APIs which are beyond the basic requirements for a chain/API. They are akin to plugins or modules that specific consumers may time-to-time request and providers may choose to serve for additional rewards. This allows for supplementary functionalities to be outlined inside a spec, giving both providers and consumers flexibility in customizing their experiences. +附加组件 (`"add-on"`)引入了可选的新方法和API,这些超出了chain/API的基本要求。它们类似于插件或模块,特定的使用者可以不时地请求,提供商可以选择提供服务以获得额外的奖励。这允许在spec中概述补充功能,使提供商和使用者都可以灵活地定制他们的体验。 -
Example +
示例 -The following is a snippet of the `debug` add-on for our `ETH1` spec: +下面是我们的`ETH1`spec的`debug`插件的代码片段: ```json @@ -142,13 +142,13 @@ The following is a snippet of the `debug` add-on for our `ETH1` spec:

-### Extensions 〰️ {#extensions} -`"extensions"` allow for the adjustment or enhancement of existing methods and APIs within a spec for special use cases. They provide the means to tweak, optimize, or expand current functions based on the needs of a subset of consumers who require more functionality from specified method calls. This allows for alternative functionalities to be outlined inside a spec, giving both providers and consumers flexibility to serve / request special functions. +### 扩展 〰️ {#extensions} +`"extensions"`允许针对特殊用例调整或增强规范中的现有方法和api。它们提供了根据用户子集的需求调整、优化或扩展当前函数的方法,这些用户子集需要通过指定的方法调用实现更多的功能。这允许在spec中概述替代功能,为提供商和使用者提供服务/请求特殊功能的灵活性。 -
Example +
示例 -The following is a snippet of the `"archive"` extension from our `ETH1` spec: +以下是我们的`ETH1`spec中的`"archive"`扩展片段: ```json @@ -164,22 +164,22 @@ The following is a snippet of the `"archive"` extension from our `ETH1` spec: ``` -This example specifies archive nodes who receive a "`cu_multiplier`" (hence more rewards) for returning earlier blocks. +这个例子指定了存档节点,当它们返回较早的块时,会收到一个“`cu_multiplier`”(因此会得到更多奖励)。


-## 💡 Examples +## 💡 示例 -### Blockchains ⛓️ +### 区块链 ⛓️ - [Lava](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_lava.json) - [Ethereum](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_ethereum.json) - [Axelar](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_axelar.json) - [Evmos](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_evmos.json) -### Rich APIs 🌟 +### 丰富的 APIs 🌟 - [IBC](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_ibc.json) - [CosmWasm](https://github.com/lavanet/lava/blob/main/cookbook/specs/spec_add_cosmoswasm.json) From 6da52c3d192998c6d5fe49f52f400983572a61b3 Mon Sep 17 00:00:00 2001 From: polibee <1244762327@qq.com> Date: Thu, 22 Feb 2024 23:04:57 +0800 Subject: [PATCH 3/5] Translate deployment documentation --- docs/chains/agoric-chain/agoric-dev.md | 22 ++-- docs/chains/agoric-chain/agoric-node.md | 70 +++++------ docs/chains/agoric-chain/agoric.md | 10 +- docs/chains/avalanche-chain/avalanche-dev.md | 20 +-- docs/chains/avalanche-chain/avalanche-node.md | 50 ++++---- docs/chains/avalanche-chain/avalanche.md | 10 +- docs/chains/axelar-chain/axelar-dev.md | 22 ++-- docs/chains/axelar-chain/axelar-node.md | 24 ++-- docs/chains/axelar-chain/axelar.md | 10 +- docs/chains/base-chain/base-dev.md | 18 +-- docs/chains/base-chain/base-node.md | 30 ++--- docs/chains/base-chain/base.md | 10 +- docs/chains/celo-chain/celo-dev.md | 18 +-- docs/chains/celo-chain/celo-node.md | 28 ++--- docs/chains/celo-chain/celo.md | 10 +- docs/chains/chains.mdx | 13 +- docs/chains/cosmoshub-chain/cosmoshub-dev.md | 16 +-- docs/chains/cosmoshub-chain/cosmoshub-node.md | 24 ++-- docs/chains/cosmoshub-chain/cosmoshub.md | 10 +- docs/chains/ethereum-chain/ethereum-dev.md | 14 +-- docs/chains/ethereum-chain/ethereum-node.md | 24 ++-- docs/chains/ethereum-chain/ethereum.md | 10 +- docs/chains/evmos-chain/evmos-dev.md | 22 ++-- docs/chains/evmos-chain/evmos-node.md | 25 ++-- docs/chains/evmos-chain/evmos.md | 8 +- docs/chains/filecoin-chain/filecoin-dev.md | 20 +-- docs/chains/filecoin-chain/filecoin-node.md | 64 +++++----- docs/chains/filecoin-chain/filecoin.md | 8 +- docs/chains/juno-chain/juno-dev.md | 22 ++-- docs/chains/juno-chain/juno-node.md | 34 +++--- docs/chains/juno-chain/juno.md | 8 +- docs/chains/koii-chain/koii-dev.md | 22 ++-- docs/chains/koii-chain/koii-node.md | 40 +++--- docs/chains/koii-chain/koii.md | 10 +- docs/chains/lava-chain/lava-dev.md | 24 ++-- docs/chains/lava-chain/lava-node.md | 26 ++-- docs/chains/lava-chain/lava.md | 10 +- docs/chains/near-chain/near-dev.md | 24 ++-- docs/chains/near-chain/near-node.md | 48 ++++---- docs/chains/near-chain/near.md | 10 +- docs/chains/optimism-chain/optimism-dev.md | 20 +-- docs/chains/optimism-chain/optimism-node.md | 26 ++-- docs/chains/optimism-chain/optimism.md | 8 +- docs/chains/solana-chain/solana-dev.md | 20 +-- docs/chains/solana-chain/solana-node.md | 36 +++--- docs/chains/solana-chain/solana.md | 8 +- docs/chains/starknet-chain/starknet-dev.md | 24 ++-- docs/chains/starknet-chain/starknet-node.md | 62 +++++----- docs/chains/starknet-chain/starknet.md | 8 +- docs/intro/specs/spec-reference.md | 115 +++++++++--------- 50 files changed, 606 insertions(+), 609 deletions(-) diff --git a/docs/chains/agoric-chain/agoric-dev.md b/docs/chains/agoric-chain/agoric-dev.md index 49bcbc08..49fcd0ff 100644 --- a/docs/chains/agoric-chain/agoric-dev.md +++ b/docs/chains/agoric-chain/agoric-dev.md @@ -1,16 +1,16 @@ --- slug: /agoric-dev -title: Getting Agoric RPC +title: 获取Agoric RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Agoric RPC +# 获取Agoric RPC ## Agoric ipRPC 🪙 -Lava🌋 offers incentivized public RPC for Agoric. Developers can get free, public endpoints for all. +LAVA🌋为Agoric提供奖励公共RPC。开发者可以获得免费的公共终端。 ### Mainnet 🌐 @@ -31,27 +31,27 @@ Lava🌋 offers incentivized public RPC for Agoric. Developers can get free, pub ## [Gateway](https://gateway.lavanet.xyz/?utm_source=agoric-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=agoric-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=agoric-dev&utm_medium=docs&utm_campaign=docs-to-docs)
## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useAgoricMainnet() { const agoricMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'AGOR', }); @@ -81,7 +81,7 @@ async function useAgoricMainnet() { const agoricMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'AGORT', @@ -106,14 +106,14 @@ async function useAgoricMainnet() { -### Output 📤 +### 输出 📤 :::caution -Certain features of Agoric spec may not be currently enabled. +Agoric spec 的某些功能目前可能没有启用。 ::: -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-agoric-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-agoric-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
diff --git a/docs/chains/agoric-chain/agoric-node.md b/docs/chains/agoric-chain/agoric-node.md index 0adeb37d..a239314b 100644 --- a/docs/chains/agoric-chain/agoric-node.md +++ b/docs/chains/agoric-chain/agoric-node.md @@ -1,103 +1,103 @@ --- slug: /agoric-node -title: Running a Agoric RPC Node +title: 运行 Agoric RPC 节点 --- -# Running a Agoric RPC Node +# 运行Agoric RPC节点 -## Requirements 📄 +## 配置要求 📄 :::caution -Users may experience issues when attempting to run instructions using versions >= 18.19.0 of `Node.js`. Node versions >=18.19 introduce a breaking change to AgoricSDK, and are not currently supported. +用户在尝试使用版本大于等于 18.19.0 的 `Node.js` 运行指令时可能会遇到问题。Node 版本 >=18.19 引入了对 AgoricSDK 的破坏性更改,目前不支持该版本。 ::: -There are notable minimum hardware requirements in order to run a Agoric RPC Nodes: +运行 Agoric RPC 节点的最低硬件要求并不高: 16 GB RAM 4-Cores x86_64 CPU High Performance/NVMe SSD (w/ ~6 GB+/month for Full Node or ~12 GB+/month for Archive) 1 GBPS up/down -To get started with your node, be sure that you have Go 1.20.2 or higher installed. +要开始运行节点,请确保已安装 Go 1.20.2 或更高版本。 -## Install & Run AgoricSDK 📥 +## 安装 & 运行 AgoricSDK 📥 -After you've gotten your requirements together you can proceed to installing! +在你准备好运行节点所需要的服务器之后,就可以开始安装了! -### 📦 Get Required Packages +### 📦 获取所需的包 ```bash sudo apt -qy install curl git jq lz4 build-essential nodejs=16.* yarn ``` -### 💾 Get the Agoric software +### 💾 获取Agoric软件 -Run the following install script: +运行下面的安装脚本: ```bash -# clone the repo +# 克隆仓库 git clone https://github.com/Agoric/agoric-sdk -b cd agoric-sdk -# Install and build Agoric Javascript packages +# 安装并构建Agoric Javascript包 yarn install yarn build -# Install and build Agoric Cosmos SDK support +# 安装和构建Agoric Cosmos SDK支持 (cd packages/cosmic-swingset && make) ``` -You'll need to select a `` to use. You can see the latest branch [here](https://github.com/Agoric/agoric-sdk/releases). +你需要选择一个``来使用。你可以在[这里](https://github.com/Agoric/agoric-sdk/releases)看到最新的分支。 -### 🛠️ Configure your node +### 🛠️ 配置你的节点 -Configuration involves a few steps: +配置包括以下几个步骤: ```bash -# First, get the network config for the current network. +# 首先,获取当前网络的网络配置 curl https://main.agoric.net/network-config > chain.json -# Set chain name to the correct value +# 将chain name设置为正确的值 chainName=`jq -r .chainName < chain.json` -# Confirm value: should be something like agoricdev-N. +# 确认值:应该类似于agoricdev-N。 echo $chainName -# Replace with the public name of your node. -# NOTE: The `--home` flag (or `AG_CHAIN_COSMOS_HOME` environment variable) determines where the chain state is stored. -# By default, this is `$HOME/.agoric`. +# 将替换为您的节点的公共名称。 +# 注意:`--home` 标志(或`AG_CHAIN_COSMOS_HOME`环境变量)决定链状态存储在哪里。 +# 默认值是`$HOME/.agoric`。 agd init --chain-id $chainName ``` -### 🔧 Adjust your Config +### 🔧 调整配置 ```bash -# Set peers variable to the correct value +# 将peers变量设置为正确值 peers=$(jq '.peers | join(",")' < chain.json) -# Set seeds variable to the correct value. +# 将seeds变量设置为正确的值。 seeds=$(jq '.seeds | join(",")' < chain.json) -# Confirm values, each should be something like "077c58e4b207d02bbbb1b68d6e7e1df08ce18a8a@178.62.245.23:26656,..." +# 确认值,每个值应该类似于"077c58e4b207d02bbbb1b68d6e7e1df08ce18a8a@178.62.245.23:26656,..." echo $peers echo $seeds -# Fix `Error: failed to parse log level` +# 修复`Error: failed to parse log level` sed -i.bak 's/^log_level/# log_level/' $HOME/.agoric/config/config.toml -# Replace the seeds and persistent_peers values +# 替换seeds和persistent_peers值 sed -i.bak -e "s/^seeds *=.*/seeds = $seeds/; s/^persistent_peers *=.*/persistent_peers = $peers/" $HOME/.agoric/config/config.toml ``` -### ⏳ Sync Your Node +### ⏳ 同步节点 ```bash agd start --log_level=warn ``` -If you want or need to use a genesis file - be aware that this includes [additional steps](https://github.com/Agoric/agoric-sdk/wiki/Validator-Guide-for-Devnet#apply-network-parameters). The official Agoric mainnet genesis file is available here: https://main.agoric.net/genesis.json +如果您想要或需要使用创始文件-请注意,这包括[额外步骤](https://github.com/Agoric/agoric-sdk/wiki/Validator-Guide-for-Devnet#apply-network-parameters)。官方的Agoric主网生成文件在这里:https://main.agoric.net/genesis.json -### 🔬 Check the Status of your Sync +### 🔬 检查同步状态 ```bash agd status | jq .SyncInfo ``` -Once you have fully synced, you're good to go. +一旦完全同步,就可以开始了。 -## Setup your Provider on Lava Network 🌋 +## 在 Lava Network 设置提供商🌋 -To set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. +要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 diff --git a/docs/chains/agoric-chain/agoric.md b/docs/chains/agoric-chain/agoric.md index 11834747..c5e8c316 100644 --- a/docs/chains/agoric-chain/agoric.md +++ b/docs/chains/agoric-chain/agoric.md @@ -20,7 +20,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -29,22 +29,22 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_agoric.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | tendermint/http | tendermint/wss | grpc | webgrpc | | --------- | -------- | ------------- | -----------------|---------|---------| | Gateway | ✅ | ✅ | ✅ | ✅ | ✅ | | SDK | ✅ | ✅ | | | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info AGR ``` -#### 📋 List : +#### 📋 列表 :
REST diff --git a/docs/chains/avalanche-chain/avalanche-dev.md b/docs/chains/avalanche-chain/avalanche-dev.md index e80d9807..02d1c0ab 100644 --- a/docs/chains/avalanche-chain/avalanche-dev.md +++ b/docs/chains/avalanche-chain/avalanche-dev.md @@ -1,35 +1,35 @@ --- slug: /avalanche-dev -title: Getting Avalanche RPC +title: 获取 Avalanche RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Avalanche RPC +# 获取 Avalanche RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=avalanche-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=avalanche-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=avalanche-dev&utm_medium=docs&utm_campaign=docs-to-docs) ## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useAvalancheMainnet() { const avalancheMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'AVAX', }); @@ -51,7 +51,7 @@ async function useAvalancheMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -59,7 +59,7 @@ async function useAvalancheMainnet() { const avalancheMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'AVAX', @@ -82,10 +82,10 @@ async function useAvalancheMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-avalanche-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-avalanche-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/avalanche-chain/avalanche-node.md b/docs/chains/avalanche-chain/avalanche-node.md index 91218b37..613613f8 100644 --- a/docs/chains/avalanche-chain/avalanche-node.md +++ b/docs/chains/avalanche-chain/avalanche-node.md @@ -1,13 +1,13 @@ --- slug: /avalanche-node -title: Running an Avalanche RPC Node +title: 运行 Avalanche RPC 节点 --- -# Running an Avalanche RPC Node +# 运行 Avalanche RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before you start, ensure that your machine meets the following [minimum requirements](https://docs.avax.network/nodes/build/set-up-node-with-installer#before-you-start): +在开始之前,请确保您的机器满足以下[最低要求](https://docs.avax.network/nodes/build/set-up-node-with-installer#before-you-start): CPU: Equivalent of 8 AWS vCPU RAM: 16 GiB @@ -16,34 +16,34 @@ Before you start, ensure that your machine meets the following [minimum requirem Network: sustained 5Mbps up/down bandwidth Go version >= 1.19.6 -## Install AvalancheGo 🚀 +## 安装 AvalancheGo 🚀 -AvalancheGo is a go implementation of an Avalanche node. This software is necessary to run a Avalanche RPC node. -AvalancheGo can be installed automatically on a local machine using a shell bash script or manually with some commands.There are detailed guides for both [automatic installation](https://docs.avax.network/nodes/build/set-up-node-with-installer) and [manual installation](https://docs.avax.network/nodes/build/run-avalanche-node-manually) available in the Avalanche docs. +AvalancheGo是Avalanche节点的一个go实现。这个软件是运行雪崩RPC节点所必需的。 +AvalancheGo可以使用bash脚本在本地机器上自动安装,也可以使用一些命令手动安装。雪崩文档中有[自动安装](https://docs.avax.network/nodes/build/set-up-node-with-installer)和[手动安装](https://docs.avax.network/nodes/build/run-avalanche-node-manually)的详细指南。 -### Automated Script +### 自动化脚本 -To do automated install using the AvalancheGo install script, input the following into a terminal: +要使用AvalancheGo install脚本进行自动化安装,请在终端中输入以下命令: ```bash wget -nd -m https://raw.githubusercontent.com/ava-labs/avalanche-docs/master/scripts/avalanchego-installer.sh;\ chmod 755 avalanchego-installer.sh;\ -# For Mainnet Installation, run the following command: +# 安装主网时,运行以下命令: ./avalanchego-installer.sh -# For Testnet Installation, run the following command: +# 安装测试网时,运行以下命令: ./avalanchego-installer.sh --fuji ``` -This will begin an automated script install with prompts that allow you to configure your node. When you're asked whether the RPC port should be private or public- be sure to select `public` ! -The node will start once the script completes. +这将开始一个自动化的脚本安装,并提示你配置你的节点。当你被问到RPC端口应该是private还是public时——确保选择`public` ! +该节点将在脚本完成后启动。 -### Manual Binary Build +### 手动构建二进制文件 -To manually build and install AvalancheGo, input the following into a terminal: +要手动构建和安装AvalancheGo,请在终端中输入以下命令: ```bash @@ -51,22 +51,22 @@ git clone https://github.com/ava-labs/avalanchego.git cd avalanchego ./scripts/build.sh -# To run your Node on the Mainnet, run the following command: +# 要在主网上运行你的节点,运行以下命令: ./build/avalanchego -# To run your Node on the Testnet, run the following command: +# 要在Testnet上运行你的节点,请运行以下命令: ./build/avalanchego --network-id=fuji ``` -Your node will take time to sync after it has been started. Please allow it time to sync to the latest block. +您的节点启动后需要一段时间才能同步。 请等待它同步到最新区块。 -# Configure your Provider +# 配置提供商 :::tip -Avalanche has a specific use case for adding websockets to their Provider Endpoints. This is because only C chains support websocket endpoints whereas X/P chains do not. To read about the differences between different Avalanche chain types, inspect their [documentation](https://docs.avax.network/learn/avalanche/avalanche-platform#c-chain)/ +Avalanche有一个将websocket添加到提供商端点的特殊用例。这是因为只有C链支持websocket端点,而X/P链不支持。要了解不同雪崩链类型之间的差异,请查看他们的[文档](https://docs.avax.network/learn/avalanche/avalanche-platform#c-chain)/ ::: -An example yaml is provided below. You can also find it in the Lava Monorepo [here](https://github.com/lavanet/lava/blob/main/config/provider_examples/avalanch_internal_paths_example.yml). +下面提供了一个yaml示例。你也可以在LavaMonorepo[这里](https://github.com/lavanet/lava/blob/main/config/provider_examples/avalanch_internal_paths_example.yml)找到它。 ```yaml endpoints: @@ -84,10 +84,10 @@ endpoints: internal-path: "/P" # p chain like specified in the spec ``` -## Apply to our Provider Incubation Program 📋 +## 申请我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-avalanche&utm_medium=docs&utm_campaign=avalanche-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供商之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-avalanche&utm_medium=docs&utm_campaign=avalanche-pre-grant)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-avalanche-rpc-node&utm_medium=docs&utm_campaign=avalanche-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node on the Lava Network. \ No newline at end of file +一旦你被接受-在Lava网络上设置你的提供商,你可以参考[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-avalanche-rpc-node&utm_medium=docs&utm_campaign=avalanche-pre-grant)可在我们的文档的其他地方。这将为您提供必要的信息,以便在Lava网络上配置和操作您的提供商节点。 \ No newline at end of file diff --git a/docs/chains/avalanche-chain/avalanche.md b/docs/chains/avalanche-chain/avalanche.md index 34a4829e..225e138d 100644 --- a/docs/chains/avalanche-chain/avalanche.md +++ b/docs/chains/avalanche-chain/avalanche.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_avalanche.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/websocket | --------- | -------- |--------------- @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_aval | SDK | ✅ | | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info AVAX ``` -#### 📋 List : +#### 📋 列表 :
diff --git a/docs/chains/axelar-chain/axelar-dev.md b/docs/chains/axelar-chain/axelar-dev.md index a8029313..6198fb8e 100644 --- a/docs/chains/axelar-chain/axelar-dev.md +++ b/docs/chains/axelar-chain/axelar-dev.md @@ -1,15 +1,15 @@ --- slug: /axelar-dev -title: Getting Axelar RPC +title: 获取 Axelar RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Axelar RPC +# 获取 Axelar RPC ## Axelar ipRPC 🪙 -Lava🌋 now offers incentivized public RPC for Axelar. Developers can get free, public endpoints for all. +Lava🌋现在为Axelar提供了激励的公共RPC。开发人员可以为所有人获得免费的公共端点。 ### Mainnet 🌐 @@ -33,26 +33,26 @@ Lava🌋 now offers incentivized public RPC for Axelar. Developers can get free, ## [Gateway](https://gateway.lavanet.xyz/?utm_source=axelar-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=axelar-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=axelar-dev&utm_medium=docs&utm_campaign=docs-to-docs) ## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useAxelarMainnet() { const AxelarMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'AXELAR', rpcInterface: 'rest', }); @@ -75,7 +75,7 @@ async function useAxelarMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -83,7 +83,7 @@ async function useAxelarMainnet() { const AxelarMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'AXELAR', @@ -106,10 +106,10 @@ async function useAxelarMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-axelar-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-axelar-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/axelar-chain/axelar-node.md b/docs/chains/axelar-chain/axelar-node.md index f02cf3a4..93237846 100644 --- a/docs/chains/axelar-chain/axelar-node.md +++ b/docs/chains/axelar-chain/axelar-node.md @@ -1,17 +1,17 @@ --- slug: /axelar-node -title: Running an Axelar RPC Node +title: 运行 Axelar RPC 节点 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Running an Axelar RPC Node +# 运行 Axelar RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before you start, ensure that your machine meets the following [minimum requirements](https://docs.avax.network/nodes/build/set-up-node-with-installer#before-you-start): +在开始之前,请确保您的机器满足以下[最低要求](https://docs.avax.network/nodes/build/set-up-node-with-installer#before-you-start): @@ -36,22 +36,22 @@ OS: Ubuntu 18.04 or MacOS(x86) -## Install 📥 +## 安装 📥 :::caution -Some users have reported issues with the Axelarate install script. If you encounter issues, please consider making an [issue](https://github.com/axelarnetwork/axelarate-community/issues) or trying to install manually. +一些用户报告了Axelarate安装脚本的问题。如果您遇到问题,请考虑制作一个[issue](https://github.com/axelarnetwork/axelarate-community/issues)或尝试手动安装。 ::: -Clone the Axelarate-Community Repo and then run the Node Setup Script. +克隆Axelarate-Community仓库,然后运行Node安装脚本。 ```bash git clone https://github.com/axelarnetwork/axelarate-community.git cd axelarate-community ./scripts/setup-node.sh -n [mainnet|testnet] ``` -### Start your Node! 🚀 +### 启动你的节点! 🚀 -Run the following command to initiate your node! +运行以下命令来初始化你的节点! ```bash $AXELARD_HOME/bin/axelard start [moniker] --home $AXELARD_HOME >> $AXELARD_HOME/logs/axelard.log 2>&1 & @@ -59,9 +59,9 @@ $AXELARD_HOME/bin/axelard start [moniker] --home $AXELARD_HOME >> $AXELARD_HOME/ ## Axelar ipRPC 🪙 -Want to reach more developers and get more rewards as a node runner? Axelar pays providers who're interested. Axelar offers Incentivized Public RPC (ipRPC) endpoints to developers in its ecosystem. By signing up here, you can become one of our premier providers contributing to decentralized public goods. [Sign up now!](https://lavanet.typeform.com/to/qQ1x6WJs?utm_source=becoming-a-lava-provider-for-axelar&utm_medium=docs&utm_campaign=axelar-post-grant) +想接触更多的开发人员并作为节点运运营商获得更多的奖励吗?Axelar向感兴趣的提供商付费。Axelar在其生态系统中为开发者提供激励公共RPC (ipRPC)端点。通过在这里注册,您可以成为我们的主要供应商之一,为去中心化的产品作出贡献。[现在报名吧!](https://lavanet.typeform.com/to/qQ1x6WJs?utm_source=becoming-a-lava-provider-for-axelar&utm_medium=docs&utm_campaign=axelar-post-grant) -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-axelar-rpc-node&utm_medium=docs&utm_campaign=axelar-post-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node on the Lava Network. \ No newline at end of file +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-axelar-rpc-node&utm_medium=docs&utm_campaign=axelar-post-grant)。这将为您提供在Lava网络上配置和操作provider节点所需的信息。 \ No newline at end of file diff --git a/docs/chains/axelar-chain/axelar.md b/docs/chains/axelar-chain/axelar.md index 94227f3a..6af2e447 100644 --- a/docs/chains/axelar-chain/axelar.md +++ b/docs/chains/axelar-chain/axelar.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,22 +25,22 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_axelar.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | uri/http | tendermint/http | tendermint/wss | grpc | web-grpc| | --------- | -------- |------------| ------------- | ---------------------|------|---------| | Gateway | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | SDK | ✅ | | ✅ | | | | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info AXELAR ``` -#### 📋 List : +#### 📋 列表 :
REST diff --git a/docs/chains/base-chain/base-dev.md b/docs/chains/base-chain/base-dev.md index 51cbcfda..fa211a6d 100644 --- a/docs/chains/base-chain/base-dev.md +++ b/docs/chains/base-chain/base-dev.md @@ -1,36 +1,36 @@ --- slug: /base-dev -title: Getting Base RPC +title: 获取 Base RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Base RPC +# 获取 Base RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=base-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=base-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=base-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useBaseMainnet() { const baseMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'BASE', }); @@ -50,7 +50,7 @@ async function useBaseMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -81,11 +81,11 @@ async function useBaseMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-base-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-base-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
diff --git a/docs/chains/base-chain/base-node.md b/docs/chains/base-chain/base-node.md index a282427e..80eab2f4 100644 --- a/docs/chains/base-chain/base-node.md +++ b/docs/chains/base-chain/base-node.md @@ -1,45 +1,45 @@ --- slug: /base-node -title: Running an Base RPC Node +title: 运行 Base RPC 节点 --- -# Running a Base RPC Node +# 运行 Base RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before you start, be sure to install [Docker](https://www.docker.com/get-started). Once you have docker installed, you can continue onto the next step. +在开始之前,请确保安装[Docker](https://www.docker.com/get-started)。安装好docker后,您可以继续下一步。 >16 GB RAM SSD, 2 TB free space -## Setup Your Base Node Image 📥 +## 设置Base节点镜像 📥 -### 💿 Setup a L1 Full Node RPC +### 💿 设置 L1 全节点 RPC -You need a Ethereum L1 Full Node running before you can use Base. Set `OP_NODE_L1_ETH_RPC` if you're using docker-compose. +在使用 Base 之前,你需要运行一个以太坊 L1 完整节点。如果使用 docker-compose,请设置 `OP_NODE_L1_ETH_RPC`。 -### ✨ Clone the Repo +### ✨ 克隆仓库 ```bash git clone https://github.com/base-org/node.git ``` -Uncomment the line(s) relevant to your network in the`docker-compose.yml` +取消`docker-compose.yml`中与网络相关的行注释 -### 🚀 Start your node +### 🚀 启动节点 ```bash docker compose up --build ``` -You're now ready to serve RPC! +现在RPC服务准备好了! -## Apply to our Provider Incubation Program 📋 +## 申请我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-base&utm_medium=docs&utm_campaign=base-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供者之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-base&utm_medium=docs&utm_campaign=base-pre-grant)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-base-rpc-node&utm_medium=docs&utm_campaign=base-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-base-rpc-node&utm_medium=docs&utm_campaign=base-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 \ No newline at end of file diff --git a/docs/chains/base-chain/base.md b/docs/chains/base-chain/base.md index 0b6fae2b..6f0ec16f 100644 --- a/docs/chains/base-chain/base.md +++ b/docs/chains/base-chain/base.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_base.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | -------- |--------------- @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_base | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info BASE ``` -#### 📋 List : +#### 📋 列表 :
JSONRPC diff --git a/docs/chains/celo-chain/celo-dev.md b/docs/chains/celo-chain/celo-dev.md index 58c06d3a..a043c8ff 100644 --- a/docs/chains/celo-chain/celo-dev.md +++ b/docs/chains/celo-chain/celo-dev.md @@ -1,12 +1,12 @@ --- slug: /celo-dev -title: Getting Celo RPC +title: 获取Celo RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Celo RPC +# 获取Celo RPC @@ -14,14 +14,14 @@ import TabItem from '@theme/TabItem'; ## [Gateway](https://gateway.lavanet.xyz/?utm_source=celo-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=celo-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=celo-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 @@ -34,7 +34,7 @@ const { LavaSDK } = require("@lavanet/lava-sdk") async function useCeloMainnet() { const celoMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'CELO', }); @@ -54,7 +54,7 @@ async function useCeloMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -62,7 +62,7 @@ async function useCeloMainnet() { const celoMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'CELO', @@ -85,9 +85,9 @@ async function useCeloMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-celo-rpc&utm_medium=docs&utm_campaign=docs-to-docs) \ No newline at end of file +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-celo-rpc&utm_medium=docs&utm_campaign=docs-to-docs) \ No newline at end of file diff --git a/docs/chains/celo-chain/celo-node.md b/docs/chains/celo-chain/celo-node.md index b85fc9cf..c199d059 100644 --- a/docs/chains/celo-chain/celo-node.md +++ b/docs/chains/celo-chain/celo-node.md @@ -1,18 +1,18 @@ --- slug: /celo-node -title: Running an Celo RPC Node +title: 运行Celo RPC节点 --- -# Running a Celo RPC Node +# 运行Celo RPC节点 -## Requirements 📄 +## 配置要求 📄 -Before you start, be sure to install [Docker](https://www.docker.com/get-started). Once you have docker installed, you can continue onto the next step. +在开始之前,请确保安装[Docker](https://www.docker.com/get-started)。安装好docker后,您可以继续下一步。 -## Install Celo Docker Image 📥 +## 安装Celo Docker镜像 📥 -Celo's node is built from a Docker image pulled using Docker CLI. This software is necessary to run a Celo RPC node. To get started, input the following in terminal: +Celo的节点是由使用Docker CLI获取的Docker镜像构建的。该软件是运行Celo RPC节点所必需的。首先,在终端中输入以下代码: ```bash export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet @@ -21,28 +21,28 @@ mkdir celo-data cd celo-data ``` -### Place your public address in an environmental variable 🪧 +### 将公共地址置于环境变量中 🪧 ```bash export CELO_ACCOUNT_ADDRESS= ``` -If you don't already have a Celo account address, create one using the following command: +如果您还没有 Celo 账户地址,请使用以下命令创建一个: ```bash docker run -v $PWD:/root/.celo --rm -it $CELO_IMAGE account new ``` -### Start your node 🚀 +### 启动节点 🚀 ```bash docker run --name celo-fullnode -d --restart unless-stopped --stop-timeout 300 -p 127.0.0.1:8545:8545 -p 127.0.0.1:8546:8546 -p 30303:30303 -p 30303:30303/udp -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --syncmode full --http --http.addr 0.0.0.0 --http.api eth,net,web3,debug,admin,personal --light.serve 90 --light.maxpeers 1000 --maxpeers 1100 --etherbase $CELO_ACCOUNT_ADDRESS --datadir /root/.celo ``` -You're now ready to serve RPC! +现在RPC服务准备好了! -## Apply to our Provider Incubation Program 📋 +## 申请我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-celo&utm_medium=docs&utm_campaign=celo-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在目前的 Testnet 状态下,您还需要通过一个额外的阶段,才能成为 Lava 网络的供应商。请填写[申请表](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-celo&utm_medium=docs&utm_campaign=celo-pre-grant),参加我们的供应商孵化计划。完成此步骤后,请随时在我们的[Discord](https://discord.gg/UxujNZbW) 留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-celo-rpc-node&utm_medium=docs&utm_campaign=celo-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-celo-rpc-node&utm_medium=docs&utm_campaign=celo-pre-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/celo-chain/celo.md b/docs/chains/celo-chain/celo.md index b6f4a6b4..0fb932af 100644 --- a/docs/chains/celo-chain/celo.md +++ b/docs/chains/celo-chain/celo.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_celo.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | -------- |--------------- @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_celo | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info CELO ``` -#### 📋 List : +#### 📋 列表 :
JSONRPC diff --git a/docs/chains/chains.mdx b/docs/chains/chains.mdx index 21f244d1..4aebf032 100644 --- a/docs/chains/chains.mdx +++ b/docs/chains/chains.mdx @@ -1,5 +1,5 @@ --- -title: Supported Chains +title: 支持的 Chains slug: /chains --- @@ -11,13 +11,12 @@ import DocCardList from '@theme/DocCardList'; -❓ Looking for a chain other than the ones listed here? -Make a [**blockchain integration request**](https://lavanet.upvoty.com/b/blockchain-integration-request/)! +❓ 你在寻找这里列出的其他链吗? +提出[**区块链集成请求**](https://lavanet.upvoty.com/b/blockchain-integration-request/)! -🔗 You can get RPC endpoints for these chains on our [*Gateway*](https://gateway.lavanet.xyz/?utm_source=chains-page&utm_medium=docs&utm_campaign=docs-to-gateway) and we host [*Public Endpoints*](/public-rpc#incentivized-public-rpc-) for some chains here. +🔗 你可以在我们的[* *网关* *](https://gateway.lavanet.xyz/?utm_source=chains-page&utm_medium=docs&utm_campaign=docs-to-gateway)上获取这些链的RPC端点,我们在这里托管一些链的[* *公共RPC* *](/public-rpc#incentivized-public-rpc-) 。 -:::caution Work in Progress - -Our `testnet` documentation is a work-in-progress. The following chains are LIVE (🔥) on Lava, but not yet documented: **Aptos**, **Arbitrum**, **Berachain**, **Canto**, **Fantom**, **Osmosis**, and **Polygon**. +:::caution 进行中的工作 +我们的 `testnet` 文档正在编写中。以下链已在 Lava 上运行 (🔥),但尚未记录: **Aptos**、**Arbitrum**、**Berachain**、**Canto**、**Fantom**、**Osmosis** 和 **Polygon**。 ::: \ No newline at end of file diff --git a/docs/chains/cosmoshub-chain/cosmoshub-dev.md b/docs/chains/cosmoshub-chain/cosmoshub-dev.md index a125595b..d20ab7e0 100644 --- a/docs/chains/cosmoshub-chain/cosmoshub-dev.md +++ b/docs/chains/cosmoshub-chain/cosmoshub-dev.md @@ -1,38 +1,38 @@ --- slug: /cosmoshub-dev -title: Getting CosmosHub RPC +title: 获取 CosmosHub RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting CosmosHub RPC +# 获取 CosmosHub RPC
## [Gateway](https://gateway.lavanet.xyz/?utm_source=cosmoshub-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=cosmoshub-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=cosmoshub-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useCosmoshubMainnet() { const cosmoshubMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'COS5', }); @@ -54,7 +54,7 @@ async function useCosmoshubMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -62,7 +62,7 @@ async function useCosmoshubMainnet() { const cosmoshubMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'COS5', diff --git a/docs/chains/cosmoshub-chain/cosmoshub-node.md b/docs/chains/cosmoshub-chain/cosmoshub-node.md index aeb27c9b..c2005312 100644 --- a/docs/chains/cosmoshub-chain/cosmoshub-node.md +++ b/docs/chains/cosmoshub-chain/cosmoshub-node.md @@ -1,14 +1,14 @@ --- slug: /cosmoshub-node -title: Running a Cosmoshub RPC Node +title: 运行 Cosmoshub RPC 节点 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Running a CosmosHub RPC Node +# 运行 Cosmoshub RPC 节点 -## Requirements 📄 +## 配置要求 📄 @@ -35,21 +35,21 @@ import TabItem from '@theme/TabItem'; -## Install `gaiad` +## 安装 `gaiad` -One of the prerequisites to running a node on CosmosHub is the use of `gaiad`. To get started ensure that you [install `gaiad`](https://hub.cosmos.network/main/getting-started/installation.html). +在 CosmosHub 上运行节点的前置条件之一是使用 `gaiad`。要开始使用,请确保您 [install 安装 `gaiad`](https://hub.cosmos.network/main/getting-started/installation.html)。 -## Configure and Start your Node! 🚀 +## 配置和启动节点 🚀 -Follow along with the official Cosmos guide on how to get your node started: +请跟随 Cosmos 官方指南了解如何启动您的节点: https://hub.cosmos.network/main/hub-tutorials/join-mainnet.html#general-configuration -You will make changes to both `~/.gaia/config/config.toml` and `~/.gaia/config/app.toml` before running `gaiad start` ! +在运行 `gaiad start` 之前,您需要修改 `~/.gaia/config/config.toml` 和 `~/.gaia/config/app.toml` ! -## Apply to our Provider Incubation Program 📋 +## 申请我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-cosmoshub&utm_medium=docs&utm_campaign=cosmoshub-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在目前的 Testnet 状态下,您还需要通过一个额外的阶段,才能成为 Lava 网络的供应商。请填写[申请表](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-cosmoshub&utm_medium=docs&utm_campaign=cosmoshub-pre-grant),参加我们的供应商孵化计划。完成此步骤后,请随时在我们的[Discord](https://discord.gg/UxujNZbW) 留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-cosmoshub-rpc-node&utm_medium=docs&utm_campaign=cosmoshub-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-cosmoshub-rpc-node&utm_medium=docs&utm_campaign=cosmoshub-pre-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/cosmoshub-chain/cosmoshub.md b/docs/chains/cosmoshub-chain/cosmoshub.md index 0202fdf3..c866c33f 100644 --- a/docs/chains/cosmoshub-chain/cosmoshub.md +++ b/docs/chains/cosmoshub-chain/cosmoshub.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_cosmoshub.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | uri/http | tendermint/http | tendermint/wss | grpc | webgrpc | | --------- | -------- |------------| ------------- | -----------------|---------|---------| @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_cosm | SDK | ✅ | | ✅ | | | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info COS5 ``` -#### 📋 List : +#### 📋 列表 :
REST diff --git a/docs/chains/ethereum-chain/ethereum-dev.md b/docs/chains/ethereum-chain/ethereum-dev.md index 7069bfb6..e48bf544 100644 --- a/docs/chains/ethereum-chain/ethereum-dev.md +++ b/docs/chains/ethereum-chain/ethereum-dev.md @@ -1,36 +1,36 @@ --- slug: /ethereum-dev -title: Getting Ethereum RPC +title: 获取 Ethereum RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Ethereum RPC +# 获取 Ethereum RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=ethereum-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=ethereum-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=ethereum-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## SDK -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useEthereumMainnet() { const ethereumMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'ETH1', }); @@ -51,7 +51,7 @@ async function useEthereumMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") diff --git a/docs/chains/ethereum-chain/ethereum-node.md b/docs/chains/ethereum-chain/ethereum-node.md index f1ac6e23..05913018 100644 --- a/docs/chains/ethereum-chain/ethereum-node.md +++ b/docs/chains/ethereum-chain/ethereum-node.md @@ -1,16 +1,16 @@ --- slug: /ethereum-node -title: Running an Ethereum RPC Node +title: 运行 Ethereum RPC 节点 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Running an Ethereum RPC Node +# 运行 Ethereum RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Ethereum nodes have some basic hardware requirements that must be met in order to proceed with the install process: +以太坊节点有一些基本的硬件要求,必须满足这些要求才能进行安装: @@ -35,19 +35,19 @@ Intel Core i5/i7 -## Choose your Path 🛣️ +## 选择管理方式 🛣️ -Current Ethereum recommended practice is to manage your node using DAppNode. You can follow along the very helpful guide provided by DAppNode [here](https://docs.dappnode.io/docs/user/getting-started/choose-your-path). +以太坊目前推荐的做法是使用DAppNode来管理你的节点。您可以在[这里](https://docs.dappnode.io/docs/user/getting-started/choose-your-path)遵循DAppNode提供的非常有用的指南。 -If you elect to go the more advanced route, you can setup your node using the command line or another recommended tool. A list of guided setups is available on the [Ethereum developer docs](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/#spinning-up-node). +如果你选择使用更高级的方法,可以使用命令行或其他推荐的工具来设置你的节点。[以太坊开发者文档](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/#spinning-up-node)上有一个设置指南列表。 -⚠️ Starting an Ethereum node can involve a wide variety of commands depending upon your chosen path! +⚠️ 启动以太坊节点可能涉及各种各样的命令,这取决于您选择的管理方式! -## Apply to our Provider Incubation Program 📋 +## 申请我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-ethereum&utm_medium=docs&utm_campaign=ethereum-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供者之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-ethereum&utm_medium=docs&utm_campaign=ethereum-pre-grant)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-ethereum-rpc-node&utm_medium=docs&utm_campaign=ethereum-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-ethereum-rpc-node&utm_medium=docs&utm_campaign=ethereum-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 \ No newline at end of file diff --git a/docs/chains/ethereum-chain/ethereum.md b/docs/chains/ethereum-chain/ethereum.md index a43dd1d8..c162ca48 100644 --- a/docs/chains/ethereum-chain/ethereum.md +++ b/docs/chains/ethereum-chain/ethereum.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_ethereum.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | -------- | ------------- | @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_ethe | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info ETH1 ``` -#### 📋 List : +#### 📋 列表 :
JSONRPC diff --git a/docs/chains/evmos-chain/evmos-dev.md b/docs/chains/evmos-chain/evmos-dev.md index 902b7d09..ec7da98f 100644 --- a/docs/chains/evmos-chain/evmos-dev.md +++ b/docs/chains/evmos-chain/evmos-dev.md @@ -1,15 +1,15 @@ --- slug: /evmos-dev -title: Getting Evmos RPC +title: 获取 Evmos RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Evmos RPC +# 获取 Evmos RPC ## Evmos ipRPC 🪙 -Lava🌋 now offers incentivized public RPC for Evmos. Developers can get free, public endpoints for all. +Lava🌋现在为Evmos提供奖励公共RPC。开发者可以获得免费的公共终端。 ### Mainnet 🌐 @@ -42,27 +42,27 @@ Lava🌋 now offers incentivized public RPC for Evmos. Developers can get free, ## [Gateway](https://gateway.lavanet.xyz/?utm_source=evmos-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=evmos-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=evmos-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useEvmosTestnet() { const evmosTestnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'EVMOST', }); @@ -82,7 +82,7 @@ async function useEvmosTestnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -90,7 +90,7 @@ async function useEvmosTestnet() { const evmosTestnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'EVMOST', @@ -112,10 +112,10 @@ async function useEvmosTestnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-evmos-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-evmos-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/evmos-chain/evmos-node.md b/docs/chains/evmos-chain/evmos-node.md index fa9257b0..82057cf9 100644 --- a/docs/chains/evmos-chain/evmos-node.md +++ b/docs/chains/evmos-chain/evmos-node.md @@ -1,11 +1,11 @@ --- slug: /evmos-node -title: Running an Evmos RPC Node +title: 运行 Evmos RPC 节点 --- -# Running an Evmos RPC Node +# 运行 Evmos RPC 节点 -## Requirements 📄 +## 配置要求 📄 ``` - 8 core CPU @@ -15,9 +15,9 @@ title: Running an Evmos RPC Node - ports 8545/8546 open & exposed ``` -## Install Evmos CLI 🚀 +## 安装 Evmos CLI 🚀 -This software is necessary to run an Evmos RPC node. +该软件是运行Evmos RPC节点所必需的。 ```bash @@ -28,12 +28,12 @@ git checkout make install ``` -It is necessary to replace `` with the name of the latest release which is visible [here](https://github.com/evmos/evmos/tags). +需要将``替换为[此处](https://github.com/evmos/evmos/tags)可见的最新版本的名称。 -## Start your Node ❗ +## 启动节点 ❗ -Starting a node with Evmos may require various configurations, but the commands are relatively simple: +使用Evmos启动节点可能需要各种配置,但命令相对简单: ```bash ./evmosd start \ @@ -42,12 +42,11 @@ Starting a node with Evmos may require various configurations, but the commands --grpc-web.enable \ --grpc.enable ``` -You can edit your `app.toml` file to change settings on your node. Within `app.toml` you can find gas cap, CORS, Pruning, and how to configure a WebSocket Server. For further information, consult the [Evmos documentation](https://docs.evmos.org/protocol/evmos-cli/configuration#running-the-json-rpc-server) - +您可以编辑 `app. toml` 文件来更改节点上的设置。 在 `app. toml` 文件中,您可以找到gas cap, CORS, Pruning以及如何配置 WebSocket 服务器。 如需更多信息,请查阅 [Evmos 文档](https://docs.evmos.org/protocol/evmos-cli/configuration#running-the-json-rpc-server) ## Evmos ipRPC 🪙 -Want to reach more developers and get more rewards as a node runner? Evmos pays providers who're interested. Evmos offers Incentivized Public RPC (ipRPC) endpoints to developers in its ecosystem. By signing up here, you can become one of our premier providers contributing to decentralized public goods. [Sign up now!](https://lavanet.typeform.com/to/qQ1x6WJs?utm_source=becoming-a-lava-provider-for-evmos&utm_medium=docs&utm_campaign=evmos-post-grant) +作为节点运行商,您想接触更多开发人员并获得更多奖励吗?Evmos 向感兴趣的提供商支付报酬。Evmos 向其生态系统中的开发者提供激励公共 RPC(ipRPC)端点。在这里注册,您就可以成为我们的主要提供商之一,为去中心化公共产品做出贡献。[立即注册!](https://lavanet.typeform.com/to/qQ1x6WJs?utm_source=becoming-a-lava-provider-for-evmos&utm_medium=docs&utm_campaign=evmos-post-grant) -## Setup your Provider on Lava Network 🌋 +## 在 Lava 网络上设置您的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-evmos-rpc-node&utm_medium=docs&utm_campaign=evmos-post-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-evmos-rpc-node&utm_medium=docs&utm_campaign=evmos-post-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/evmos-chain/evmos.md b/docs/chains/evmos-chain/evmos.md index acacb511..1b9a871c 100644 --- a/docs/chains/evmos-chain/evmos.md +++ b/docs/chains/evmos-chain/evmos.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_evmos.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | uri/http | tendermint/http | tendermint/wss | jsonrpc/http | jsonrpc/wss | --------- | -------- |------------| ------------- | ---------------------| ------------ | ----------------- @@ -33,9 +33,9 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_evmo | SDK | ✅ | | ✅ | | ✅ | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - /evmos/claims/v1/claims_records - /evmos/claims/v1/claims_records/{address} diff --git a/docs/chains/filecoin-chain/filecoin-dev.md b/docs/chains/filecoin-chain/filecoin-dev.md index e4a5df13..a32d9e4d 100644 --- a/docs/chains/filecoin-chain/filecoin-dev.md +++ b/docs/chains/filecoin-chain/filecoin-dev.md @@ -1,36 +1,36 @@ --- slug: /filecoin-dev -title: Getting Filecoin RPC +title: 获取 Filecoin RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Filecoin RPC +# 获取 Filecoin RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=filecoin-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=filecoin-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=filecoin-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useFilecoinMainnet() { const filecoinMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'FVM', }); @@ -51,7 +51,7 @@ async function useFilecoinMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -59,7 +59,7 @@ async function useFilecoinMainnet() { const filecoinMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'FVM', @@ -80,10 +80,10 @@ async function useFilecoinMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-filecoin-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关 SDK 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-filecoin-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/filecoin-chain/filecoin-node.md b/docs/chains/filecoin-chain/filecoin-node.md index 120e5509..b50d927c 100644 --- a/docs/chains/filecoin-chain/filecoin-node.md +++ b/docs/chains/filecoin-chain/filecoin-node.md @@ -1,32 +1,32 @@ --- slug: /filecoin-node -title: Running a Filecoin RPC Node +title: 运行 Filecoin RPC 节点 --- -# Running a Filecoin RPC Node +# 运行 Filecoin RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before getting started, Filecoin node setup requires many dependencies to setup correctly. These dependencies are commonly already installed on most modern linux machines, but include the following: +在开始之前,Filecoin 节点设置需要许多依赖项才能正确设置。这些依赖项通常已安装在大多数现代 Linux 机器上,但还包括以下内容: ``` mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget ``` -The list above is specific to Debian/Ubuntu-based OSes. For a different configuration, check out [Lotus docs](https://lotus.filecoin.io/lotus/install/linux/#system-specific). +上述列表仅适用于基于 Debian/Ubuntu 的操作系统。如需不同配置,请查阅 [Lotus docs](https://lotus.filecoin.io/lotus/install/linux/#system-specific)。 :::info - Note that you will also need [Go v1.19.7](https://go.dev/dl/) or higher for a successful install. +请注意,您还需要 [Go v1.19.7](https://go.dev/dl/) 或更高版本才能成功安装。 ::: -## Install Lotus Filecoin Node 🚀 +## 安装 Lotus Filecoin 节点 🚀 -Filecoin is a divers ecosystem with different node implementations. Each node implementation has different ways to generate and manage authentication tokens. This guide uses [Lotus Filecoin](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/), which is the reference node implementation for the Filecoin network. +Filecoin 是一个具有不同节点实现的多样化生态系统。每个节点实现都有不同的方法来生成和管理认证令牌。本指南使用[Lotus Filecoin](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/),它是 Filecoin 网络的参考节点实现。 -### Get Lotus -To get started, input the following into the terminal: +### 获取 Lotus +要开始操作,请在终端中输入以下内容: ```bash @@ -36,67 +36,67 @@ git checkout releases ``` -### Decide Mainnet or Testnet +### 决定加入 Mainnet 或 Testnet ```bash -# join mainnet +# 加入 mainnet make clean all -# Or to join a testnet or devnet: +# 或加入测试网或开发网: make clean calibnet # Calibration with min 32GiB sectors ``` -### Compile Lotus -Finalize the install by inputting `sudo make install` in the terminal. -You can run `lotus --version` to ensure that this process completed successfully. +### 编译 Lotus +在终端输入 `sudo make install` 完成安装。 +您可以运行 `lotus --version` 来确保该过程成功完成。 :::tip -Specific CPU architectures may require additional configuration. Consult the [Lotus Filecoin documentation](https://lotus.filecoin.io/lotus/install/linux/#build-and-install-lotus) for additional details if you encounter any errors. +特定的 CPU 架构可能需要额外的配置。如果遇到任何错误,请查阅 [Lotus Filecoin 文档](https://lotus.filecoin.io/lotus/install/linux/#build-and-install-lotus) 了解更多详情。 ::: -## Start your RPC Server 🖥️ +## 启动 RPC 服务器 🖥️ -### Configure your RPC node -1. Download & Import a Snapshot: +### 配置 RPC 节点 +1. 下载和导入快照 ```bash aria2c -x5 https://snapshots.mainnet.filops.net/minimal/latest.zst -# Replace the based on the snapshot you downloaded. +# 根据下载的快照替换 文件。 lotus daemon --import-snapshot --halt-after-import ``` -2. Edit the configuration file `./.lotus/config.toml` to run RPC. -You can do this by finding `EnableEthRPC` and ensuring it's set to `true`: +2. 编辑配置文件 `./.lotus/config.toml` 以运行 RPC。 + 为此,您可以找到 `EnableEthRPC`,并确保将其设置为 `true`: ```bash - # EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids. - # This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above. + # EnableEthRPC 可启用 eth_ rpc,并可存储 eth 交易哈希值与 filecoin 消息 Cids 的映射。 + # 默认情况下,这也将启用 RealTimeFilterAPI 和 HistoricFilterAPI,但可以通过上述配置选项禁用它们。 # # type: bool # env var: LOTUS_FEVM_ENABLEETHRPC EnableEthRPC = true ``` -### Launch +### 启动 -Run the following command: +运行以下命令 ```bash nohup lotus daemon > ~/lotus.log 2>&1 & ``` -Log messages can be found at `~/lotus.log` - it will take a moment for your node to get the latest blocks! -After that, you should be ready to serve RPC! +日志信息可在 `~/lotus.log` 中找到 - 您的节点需要稍等片刻才能获取最新块! +之后,您就可以为 RPC 提供服务了! -## Apply to our Provider Incubation Program 📋 +## 申请加入我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-filecoin&utm_medium=docs&utm_campaign=filecoin-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在目前的 Testnet 状态下,您还需要通过一个额外的阶段,才能成为 Lava 网络的供应商。请填写[申请表](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-filecoin&utm_medium=docs&utm_campaign=filecoin-pre-grant),参加我们的供应商孵化计划。完成此步骤后,请随时在我们的[Discord](https://discord.gg/UxujNZbW) 留言! ## Setup your Provider on Lava Network 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-filecoin-rpc-node&utm_medium=docs&utm_campaign=filecoin-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-filecoin-rpc-node&utm_medium=docs&utm_campaign=filecoin-pre-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/filecoin-chain/filecoin.md b/docs/chains/filecoin-chain/filecoin.md index c355fec1..fce82580 100644 --- a/docs/chains/filecoin-chain/filecoin.md +++ b/docs/chains/filecoin-chain/filecoin.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_fvm.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | -------- | ------------- | @@ -33,9 +33,9 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_fvm. | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - Filecoin.ChainGetBlock - Filecoin.ChainGetBlockMessages diff --git a/docs/chains/juno-chain/juno-dev.md b/docs/chains/juno-chain/juno-dev.md index 8f50a5c0..26752aba 100644 --- a/docs/chains/juno-chain/juno-dev.md +++ b/docs/chains/juno-chain/juno-dev.md @@ -1,18 +1,18 @@ --- slug: /juno-dev -title: Getting Juno RPC +title: 获取 Juno RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Juno RPC +# 获取 Juno RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=juno-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=juno-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=juno-dev&utm_medium=docs&utm_campaign=docs-to-docs)

@@ -21,24 +21,24 @@ To learn more about using the Lava Gateway visit the [Getting Started guide](htt :::caution -Lava SDK is currently in Alpha. Please observe the documentation on both [frontend](https://docs.lavanet.xyz/sdk-frontend?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs) and [backend](https://docs.lavanet.xyz/sdk-backend?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs) use before getting started. +Lava SDK 目前处于 Alpha 阶段。在开始使用前,请查看 [frontend](https://docs.lavanet.xyz/sdk-frontend?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs) 和 [backend](https://docs.lavanet.xyz/sdk-backend?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs) 的使用文档。 ::: -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useJunoTestnet() { const junoTestnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'JUNT1', }); @@ -59,7 +59,7 @@ async function useJunoTestnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -67,7 +67,7 @@ async function useJunoTestnet() { const junoTestnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", //或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'JUNT1', @@ -89,10 +89,10 @@ async function useJunoTestnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关 SDK 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-juno-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/juno-chain/juno-node.md b/docs/chains/juno-chain/juno-node.md index 92b738b0..679009e3 100644 --- a/docs/chains/juno-chain/juno-node.md +++ b/docs/chains/juno-chain/juno-node.md @@ -1,45 +1,45 @@ --- slug: /juno-node -title: Running a Juno RPC Node +title: 运行 Juno RPC 节点 --- -# Running a Juno RPC Node +# 运行 Juno RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before continuing please observe that your system meets the minimum requirements: +在继续之前,请检查您的系统是否满足最低要求: -### Software +### 软件 ``` gcc git jq chrony build-essential make go version 1.19.2+ ``` -### Hardware +### 硬件 ``` 4 Cores Modern CPU 32 GB RAM 1 TB storage (SSD or VME) ``` -## Install Junod 🚀 +## 安装 Junod 🚀 -Follow the instructions provided in the Juno Network documentation (https://docs.junonetwork.io/validators/getting-setup) to install the Junod software. This software is necessary to run a Juno RPC node. +按照 Juno 网络文档 (https://docs.junonetwork.io/validators/getting-setup) 中提供的说明安装 Junod 软件。该软件是运行 Juno RPC 节点所必需的。 -## Decide Juno Mainnet 🌐 or Testnet 🧪 +## 决定运行 Juno Mainnet 🌐 或 Testnet 🧪 -Choose whether you want to participate in the Juno Mainnet or the Testnet. The Mainnet is the live network where real transactions occur and you will incur real costs, while the Testnet is a separate network for testing and experimentation where you can operate free from concern about incurring costs. +选择参加 Juno 主网还是测试网。主网是真实的网络,在这里会发生真实的交易,您也会产生真实的成本;而测试网则是一个独立的网络,用于测试和实验,在这里您可以自由操作,不必担心产生成本。 -- If you’ve decided to join the Juno Mainnet, refer to the documentation here: https://docs.junonetwork.io/validators/joining-mainnet -- If you’ve decided to join the Juno Testnet, refer to the documentation here: https://docs.junonetwork.io/validators/joining-the-testnets +- 如果您已决定加入 Juno 主网,请参阅此处的文档: https://docs.junonetwork.io/validators/joining-mainnet +- 如果您已决定加入 Juno Testnet,请参阅此处的文档: https://docs.junonetwork.io/validators/joining-the-testnets -Once you’ve done that, all that’s left to do is register on Lava Network! +完成注册后,您只需在 Lava Network 上注册即可! -## Apply to our Provider Incubation Program 📋 +## 申请加入我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-juno&utm_medium=docs&utm_campaign=juno-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在目前的 Testnet 状态下,您还需要通过一个额外的阶段,才能成为 Lava 网络的供应商。请填写[申请表](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-juno&utm_medium=docs&utm_campaign=juno-pre-grant),参加我们的供应商孵化计划。完成此步骤后,请随时在我们的[Discord](https://discord.gg/UxujNZbW) 留言! -## Setup your Provider on Lava Network 🌋 +## 在 Lava 网络上设置您的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-juno-rpc-node&utm_medium=docs&utm_campaign=juno-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-juno-rpc-node&utm_medium=docs&utm_campaign=juno-pre-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/juno-chain/juno.md b/docs/chains/juno-chain/juno.md index 0aa0abbf..0e80a59a 100644 --- a/docs/chains/juno-chain/juno.md +++ b/docs/chains/juno-chain/juno.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_juno.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | uri/http | tendermint/http | tendermint/wss | @@ -34,9 +34,9 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_juno | SDK | ✅ | | ✅ | | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - juno.mint.Query/AnnualProvisions - juno.mint.Query/Inflation diff --git a/docs/chains/koii-chain/koii-dev.md b/docs/chains/koii-chain/koii-dev.md index 23f1128a..30f6840f 100644 --- a/docs/chains/koii-chain/koii-dev.md +++ b/docs/chains/koii-chain/koii-dev.md @@ -1,36 +1,36 @@ --- slug: /koii-dev -title: Getting Koii RPC +title: 获取 Koii RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Koii RPC +# 获取 Koii RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=koii-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=koii-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=koii-dev&utm_medium=docs&utm_campaign=docs-to-docs)
## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useKoiiTestnet() { const koiiTestnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'KOIIT', }); @@ -52,7 +52,7 @@ async function useKoiiTestnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -60,7 +60,7 @@ async function useKoiiTestnet() { const koiiTestnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'KOIIT', @@ -85,14 +85,14 @@ async function useKoiiTestnet() { -### Output 📤 +### 输出 📤 :::caution -Certain features of Koii spec may not be currently enabled. +目前可能无法启用 Koii spec 的某些功能。 ::: -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-koii-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关 SDK 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-koii-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
diff --git a/docs/chains/koii-chain/koii-node.md b/docs/chains/koii-chain/koii-node.md index e963dc29..fff60fef 100644 --- a/docs/chains/koii-chain/koii-node.md +++ b/docs/chains/koii-chain/koii-node.md @@ -1,32 +1,32 @@ --- slug: /koii-node -title: Running a Koii RPC Node +title: 运行 Koii RPC 节点 --- -# Running a Koii RPC Node +# 运行 Koii RPC 节点 -## Requirements 📄 +## 配置要求 📄 -There are notable minimum hardware requirements in order to run a Koii RPC Node: +运行 Koii RPC 节点的最低硬件要求并不高: >258 GB RAM or more 16 core 32-thread CPU 1 TB NVME SSD 1 GBPS up/down -## Install Koii 📥 +## 安装 Koii 📥 -After you've gotten your requirements together you can proceed to installing! +配置符合要求的话,您可以继续安装! -### 📦 Get Required Packages +### 📦 获取所需的包 ```bash sudo apt install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ``` -### 👤 Create a Separate User +### 👤 创建一个单独的用户 -Best practice is to create a non-root user for security reasons: +出于安全考虑,最佳实践是创建一个非root用户: ```bash sudo adduser koii @@ -34,29 +34,29 @@ sudo usermod -aG sudo koii sudo su koii ``` -### 💾 Get the Koii software +### 💾 使用Koii软件 -Run the following install script: +运行下面的安装脚本: ```bash sh -c "$(curl -sSfL https://raw.githubusercontent.com/koii-network/k2-release/master/k2-install-init_v1.14.19.sh)" ``` -Run the System Tuner: +运行System Tuner: ```bash koii-sys-tuner --user koii ``` -### 🛠️ Setup a Koii Validator with RPC Functions +### 🛠️ 使用RPC函数设置Koii验证器 -Generate a Keypair: +生成一个密钥对: ```bash koii-keygen new --outfile ~/validator-keypair.json ``` -Run the Validator command, with RPC options identified. You may need to play around to get the correct configuration. An example is given below: +运行Validator命令,指定RPC选项。你可能需要尝试一下才能获得正确的配置。下面给出一个例子: ```bash koii-validator \ @@ -76,12 +76,12 @@ koii-validator \ --entrypoint entrypoint3.testnet.solana.com:8001 \ ``` -### 🧪 Test Your Endpoints +### 🧪 测试端点 -There maybe additional configurations necessary to complete your setup. -You should consult the [Validator setup guide](https://docs.koii.network/run-a-node/k2-validators/validator-setup) for Koii and the [RPC Setup Guide](https://docs.solana.com/validator/get-started/setup-an-rpc-node) for Solana to ensure you've covered all necessary steps. +要完成设置,可能还需要额外的配置。 +你应该查看Koii的[验证器安装指南](https://docs.koii.network/run-a-node/k2-validators/validator-setup)和Solana的[RPC安装指南](https://docs.solana.com/validator/get-started/setup-an-rpc-node),以确保你已经涵盖了所有必要的步骤。 -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 diff --git a/docs/chains/koii-chain/koii.md b/docs/chains/koii-chain/koii.md index 8a1c56e2..d374ffb8 100644 --- a/docs/chains/koii-chain/koii.md +++ b/docs/chains/koii-chain/koii.md @@ -20,7 +20,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -29,22 +29,22 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_koii.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | ------------- | ----------- | Gateway | ✅ | ✅ | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info KOIIT ``` -#### 📋 List : +#### 📋 列表 :
JSONRPC diff --git a/docs/chains/lava-chain/lava-dev.md b/docs/chains/lava-chain/lava-dev.md index 06accbd9..983ef825 100644 --- a/docs/chains/lava-chain/lava-dev.md +++ b/docs/chains/lava-chain/lava-dev.md @@ -1,41 +1,41 @@ --- slug: /lava-dev -title: Getting Lava RPC +title: 获取 Lava RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Lava RPC +# 获取 Lava RPC -## Public RPC +## 公共 RPC -Lava offers self-served RPC as well as -⚠️ Use our [Official Endpoints](/public-rpc)! +Lava也提供自助式RPC +⚠️ 使用我们的 [Official Endpoints](/public-rpc)! ## [Gateway](https://gateway.lavanet.xyz/?utm_source=lava-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=lava-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=lava-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## SDK -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function uselavaMainnet() { const lavaMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'LAV1', rpcInterface: 'rest' }); @@ -57,7 +57,7 @@ async function uselavaMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -65,7 +65,7 @@ async function uselavaMainnet() { const lavaMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'LAV1', @@ -88,6 +88,6 @@ async function uselavaMainnet() { -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-lava-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-lava-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
diff --git a/docs/chains/lava-chain/lava-node.md b/docs/chains/lava-chain/lava-node.md index 916909de..0a4d153c 100644 --- a/docs/chains/lava-chain/lava-node.md +++ b/docs/chains/lava-chain/lava-node.md @@ -1,13 +1,13 @@ --- slug: /lava-node -title: Running a Lava RPC Node +title: 运行 Lava RPC 节点 --- -# Running a Lava RPC Node +# 运行 Lava RPC 节点 -## Requirements 📄 +## 配置要求 📄 -The current recommended [hardware prerequisites](/reqs) for running a Lava RPC node are the following: +当前推荐的运行Lava RPC节点的[硬件配置条件](/reqs)如下: ``` 16 GB RAM @@ -15,9 +15,9 @@ The current recommended [hardware prerequisites](/reqs) for running a Lava RPC n x64 2.0 GHz 4v CPU ``` -## Install Lava 🌋 +## 安装 Lava 🌋 -Using the [installation guide](/install-lava) , install all binaries, especially `lavad`: +使用[安装指南](/install-lava)安装所有二进制文件,特别是`lavad`: ```bash git clone https://github.com/lavanet/lava.git @@ -25,15 +25,15 @@ cd lava make install-all ``` -## Launch Your Node 🚀 +## 启动节点 🚀 -Set up and configure your node according to the [guides](/testnet) available. -You may use `Cosmovisor` (Recommended) or setup the node manually. +根据可用的[guides](/testnet)设置和配置您的节点。 +您可以使用`Cosmovisor`(推荐)或手动设置节点。 -## Apply to our Provider Incubation Program 📋 +## 申请我们的供应商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-lava&utm_medium=docs) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供者之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-lava&utm_medium=docs)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-lava-rpc-node&utm_medium=docs) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-lava-rpc-node&utm_medium=docs)。这将为您提供配置和操作provider节点所需的信息。 \ No newline at end of file diff --git a/docs/chains/lava-chain/lava.md b/docs/chains/lava-chain/lava.md index 4461703c..f24cc6d5 100644 --- a/docs/chains/lava-chain/lava.md +++ b/docs/chains/lava-chain/lava.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_lava.json -### Protocols 🔗 +### 协议 🔗 | Platform | rest/http | uri/http | tendermint/http | tendermint/wss | grpc | webgrpc | | --------- | -------- |------------| ------------- | -----------------|---------|---------| @@ -35,15 +35,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_lava -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info LAV1 ``` -#### 📋 List : +#### 📋 列表 :
REST diff --git a/docs/chains/near-chain/near-dev.md b/docs/chains/near-chain/near-dev.md index f83a0b1f..99f47265 100644 --- a/docs/chains/near-chain/near-dev.md +++ b/docs/chains/near-chain/near-dev.md @@ -1,16 +1,16 @@ --- slug: /near-dev -title: Getting NEAR RPC +title: 获取 NEAR RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting NEAR RPC +# 获取 NEAR RPC ## NEAR ipRPC 🪙 -Lava🌋 offers incentivized public RPC for NEAR. Developers can get free, public endpoints for all. +Lava🌋为NEAR提供激励公共RPC。开发者可以获得免费的公共终端。 ### Mainnet 🌐 @@ -28,27 +28,27 @@ Lava🌋 offers incentivized public RPC for NEAR. Developers can get free, publi ## [Gateway](https://gateway.lavanet.xyz/?utm_source=NEAR-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=NEAR-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=NEAR-dev&utm_medium=docs&utm_campaign=docs-to-docs) ## [SDK](https://github.com/lavanet/lava-sdk) -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-NEAR-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-NEAR-rpc&utm_medium=docs&utm_campaign=docs-to-docs) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useNEARMainnet() { const nearMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'NEAR', }); @@ -71,7 +71,7 @@ async function useNEARMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -79,7 +79,7 @@ async function useNEARMainnet() { const nearMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'NEAR', @@ -103,10 +103,10 @@ async function useNEARMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-near-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-near-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/near-chain/near-node.md b/docs/chains/near-chain/near-node.md index 575d62de..2dc7fb17 100644 --- a/docs/chains/near-chain/near-node.md +++ b/docs/chains/near-chain/near-node.md @@ -1,17 +1,17 @@ --- slug: /near-node -title: Running a NEAR RPC Node +title: 运行 NEAR RPC 节点 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Running a NEAR RPC Node +# 运行 NEAR RPC 节点 -## Requirements 📄 +## 配置要求 📄 -Before you start, ensure that your machine meets the following [minimum requirements](https://near-nodes.io/rpc/hardware-rpc): +在开始之前,请确保您的机器满足以下[最低要求](https://near-nodes.io/rpc/hardware-rpc): @@ -37,15 +37,15 @@ OS: MacOS / Linux :::tip -Installing NEAR will also require a current installation of [Rust](https://www.rust-lang.org/), [Git](https://git-scm.com/), as well as many common dev tools (`python`, `docker`, `awscli`, & `protobuf-compiler`). +安装NEAR还需要当前安装[Rust](https://www.rust-lang.org/)、[Git](https://git-scm.com/)以及许多常用的开发工具(`python`、`docker`、`awscli`和`protobuf-compiler`)。 ::: -## Install 📥 +## 安装 📥 -### Get `nearcore` +### 获取 `nearcore` -Clone the NEAR `nearcore` repo to your machine and switch to it. +克隆`nearcore`仓库到你的机器并切换到它。 ```bash git clone https://github.com/near/nearcore @@ -53,26 +53,26 @@ cd nearcore git fetch origin --tags ``` -Get the [latest release](https://github.com/near/nearcore/releases). +获取 [latest release](https://github.com/near/nearcore/releases). ```bash git checkout tags/ -b mynode ``` -### Compile the latest stable release +### 编译最新的稳定版本 -Ensure you're in the correct folder (`/nearcore/`) & run the following command: +确保你在正确的文件夹(`/nearcore/`)中,然后运行以下命令: ```bash make release ``` :::caution -`make release` will cause the `nearcore` to compile. Compilation is a time-intensive process and can take ~30 minutes or longer on recommmended hardware. +`make release`将编译`nearcore`。编译是一个时间密集型过程,在推荐的硬件上可能需要大约30分钟或更长时间。 ::: -### Configure the release folder -With one command you can create the required directory structure -- generating a config.json, node_key.json, and downloading a genesis.json for your respective chain-id choice. +### 配置release文件夹 +使用一个命令,您可以创建所需的目录结构——生成配置。json, node_key。Json,并下载一个生成器。你选择的chain-id对应的Json。 @@ -94,25 +94,25 @@ With one command you can create the required directory structure -- generating a -### Start your Node! 🚀 +### 启动你的节点! 🚀 -Run the following command to initiate your node! +运行以下命令来初始化你的节点! ```bash -# Get a data backup +# 获取备份数据 aws s3 --no-sign-request cp s3://near-protocol-public/backups/mainnet/rpc/latest . LATEST=$(cat latest) aws s3 --no-sign-request cp --no-sign-request --recursive s3://near-protocol-public/backups/mainnet/rpc/$LATEST ~/.near/data -# Start the Node! +# 启动节点! ./target/release/neard --home ~/.near run ``` -## Configure your Provider 🔧 +## 配置提供商 🔧 -After you've gotten things together with your node. You can set things in motion with a provider. -Use the following template(s) to set up your provider config file: +在你的节点准备就绪后,你可以使用provider来设置。 +使用以下模板设置提供程序配置文件: @@ -152,9 +152,9 @@ metrics-listen-address: ":port" ## NEAR ipRPC 🪙 -Want to reach more developers and get more rewards as a node runner? NEAR offers Incentivized Public RPC (ipRPC) endpoints to developers in its ecosystem. By signing up here, you can be first in line to being one of our premier providers contributing to decentralized public goods. [Sign up now!](https://lavanet.typeform.com/to/plCaDdVM?utm_source=becoming-a-lava-provider-for-near&utm_medium=docs&utm_campaign=near-post-grant) +作为节点运行者,想接触更多开发者并获得更多奖励?NEAR 为其生态系统中的开发者提供激励公共 RPC (ipRPC)端点。在这里注册,您就可以成为我们的主要供应商之一,为去中心化公共产品做出贡献。[立即注册!](https://lavanet.typeform.com/to/plCaDdVM?utm_source=becoming-a-lava-provider-for-near&utm_medium=docs&utm_campaign=near-post-grant) -## Setup your Provider on Lava Network 🌋 +## 在 Lava 网络上设置您的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-near-rpc-node&utm_medium=docs&utm_campaign=near-post-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node on the Lava Network. +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-near-rpc-node&utm_medium=docs&utm_campaign=near-post-grant)。这将为您提供在 Lava 网络上配置和运行提供商节点的必要信息。 diff --git a/docs/chains/near-chain/near.md b/docs/chains/near-chain/near.md index b23f9e9c..5820f217 100644 --- a/docs/chains/near-chain/near.md +++ b/docs/chains/near-chain/near.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_near.json -### Protocols 🔗 +### 协议 🔗 | Platform | json-rpc | | --------- | ----------| @@ -33,15 +33,15 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_near | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️ -#### ⌨️ Command: +#### ⌨️ 命令: ```bash lavad q spec show-chain-info NEAR ``` -#### 📋 List : +#### 📋 列表 :
JSONRPC diff --git a/docs/chains/optimism-chain/optimism-dev.md b/docs/chains/optimism-chain/optimism-dev.md index 93e5cb4a..5c845929 100644 --- a/docs/chains/optimism-chain/optimism-dev.md +++ b/docs/chains/optimism-chain/optimism-dev.md @@ -1,36 +1,36 @@ --- slug: /optimism-dev -title: Getting Optimism RPC +title: 获取 Optimism RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Optimism RPC +# 获取 Optimism RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=optimism-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=optimism-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=optimism-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useoptimismMainnet() { const optimismMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'OPTM', }); @@ -51,7 +51,7 @@ async function useoptimismMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -59,7 +59,7 @@ async function useoptimismMainnet() { const optimismMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'OPTM', @@ -81,10 +81,10 @@ async function useoptimismMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-optimism-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关 SDK 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-optimism-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/optimism-chain/optimism-node.md b/docs/chains/optimism-chain/optimism-node.md index ba112492..666109f8 100644 --- a/docs/chains/optimism-chain/optimism-node.md +++ b/docs/chains/optimism-chain/optimism-node.md @@ -1,11 +1,11 @@ --- slug: /optimism-node -title: Running an Optimism RPC Node +title: 运行 Optimism RPC 节点 --- -## Requirements 📄 +## 配置要求 📄 -Before beginning, verify that your computer meets the following [system requirements](https://github.com/smartcontracts/simple-optimism-node#recommended-hardware): +开始之前,请确认您的计算机符合以下 [系统要求](https://github.com/smartcontracts/simple-optimism-node#recommended-hardware): ``` docker installed @@ -15,11 +15,11 @@ Before beginning, verify that your computer meets the following [system requirem ``` -## Install Through Docker 🚀 +## 通过 Docker 安装 🚀 -Running a node on Optimism is best accomplished through Docker, however, if you want to take the steps to build manually, you can consult the guide available [here](https://community.optimism.io/docs/developers/build/run-a-node/#non-docker-configuration). +在 Optimism 上运行节点最好通过 Docker 来完成,不过,如果您想采取手动构建的步骤,可以参考 [此处](https://community.optimism.io/docs/developers/build/run-a-node/#non-docker-configuration) 提供的指南。 -### Clone the Repository +### 克隆存储库 ```bash git clone https://github.com/smartcontracts/simple-optimism-node.git @@ -27,12 +27,12 @@ cd simple-optimism-node cp .env.example .env ``` -### Configure the Node +### 配置节点 -You'll need to open `.env` file and change the environmental variables of the file to your liking. Note that you may need to spin up a legacy node for full historical blocks. Make sure to fill in all variables in the `REQUIRED` section. +您需要打开 `.env` 文件,并根据您的喜好更改文件的环境变量。请注意,您可能需要启动一个旧版节点以获取完整的历史区块数据。确保填写 `REQUIRED` 部分中的所有变量。 -### Start the node +### 启动节点 ```bash docker compose --profile current up -d @@ -40,10 +40,10 @@ docker compose --profile current up -d That's it! You're good to go. -## Apply to our Provider Incubation Program 📋 +## 申请加入我们的提供商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-optimism&utm_medium=docs&utm_campaign=optimism-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的 Testnet 状态下,您还需要通过一个额外的阶段才能成为 Lava 网络的供应商。请填写[申请表](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-optimism&utm_medium=docs&utm_campaign=optimism-pre-grant),参加我们的供应商孵化计划。完成此步骤后,请随时在我们的[Discord](https://discord.gg/UxujNZbW) 留言! -## Setup your Provider on Lava Network 🌋 +## 在 Lava 网络上设置您的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-optimism-rpc-node&utm_medium=docs&utm_campaign=optimism-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受--要在 Lava 网络上设置您的提供商,您可以参考我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-optimism-rpc-node&utm_medium=docs&utm_campaign=optimism-pre-grant)。这将为您提供配置和操作提供商节点的必要信息。 \ No newline at end of file diff --git a/docs/chains/optimism-chain/optimism.md b/docs/chains/optimism-chain/optimism.md index 6c136689..eac265da 100644 --- a/docs/chains/optimism-chain/optimism.md +++ b/docs/chains/optimism-chain/optimism.md @@ -16,7 +16,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -25,7 +25,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_optimism.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | ------------- | ------------- | @@ -33,9 +33,9 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_opti | SDK | ✅ | | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - eth_getAccounts - eth_getBlockRange diff --git a/docs/chains/solana-chain/solana-dev.md b/docs/chains/solana-chain/solana-dev.md index 9c60c149..79129af2 100644 --- a/docs/chains/solana-chain/solana-dev.md +++ b/docs/chains/solana-chain/solana-dev.md @@ -1,37 +1,37 @@ --- slug: /solana-dev -title: Getting Solana RPC +title: 获取 Solana RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Solana RPC +# 获取 Solana RPC ## [Gateway](https://gateway.lavanet.xyz/?utm_source=solana-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=solana-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用 Lava Gateway 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=solana-dev&utm_medium=docs&utm_campaign=docs-to-docs)

## [SDK](https://github.com/lavanet/lava-sdk) -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useSolanaMainnet() { const solanaMainnet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'SOLANA', }); @@ -53,7 +53,7 @@ async function useSolanaMainnet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装 lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -61,7 +61,7 @@ async function useSolanaMainnet() { const solanaMainnet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或您自己的徽章服务器 URL projectId: "enter_your_project_id_here" }, chainIds: 'SOLANA', @@ -86,10 +86,10 @@ async function useSolanaMainnet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-solana-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关 SDK 的更多信息,请访问 [入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-solana-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
diff --git a/docs/chains/solana-chain/solana-node.md b/docs/chains/solana-chain/solana-node.md index c80d7763..cc1d2ab4 100644 --- a/docs/chains/solana-chain/solana-node.md +++ b/docs/chains/solana-chain/solana-node.md @@ -1,48 +1,48 @@ --- slug: /solana-node -title: Running a Solana RPC Node +title: 运行 Solana RPC 节点 --- -# Running a Solana RPC Node +# 运行 Solana RPC 节点 -## 1. Install the Solana CLI +## 1. 安装 Solana CLI -In order to run a Solana node, you must first install Solana CLI. This software is necessary to run a Solana RPC node. The first step is to ensure that you've gotten the proper archive: +要运行 Solana 节点,必须先安装 Solana CLI。该软件是运行 Solana RPC 节点所必需的。第一步是确保获得正确的存档: ```bash -# For Testnet +# 对于 Testnet wget https://github.com/solana-labs/solana/archive/refs/tags/v1.16.5.tar.gz tar -xvf v1.16.5.tar.gz cd solana-1.16.5 -# For Mainnet +# 对于 Mainnet https://github.com/solana-labs/solana/archive/refs/tags/v1.14.20.tar.gz tar -xvf v1.14.20.tar.gz cd solana-1.14.20 ``` -Once you've switched to the unarchived directory, you'll need to run the `cargo-install-all` script and `solana-install` command as shown below: +切换到未归档目录后,你需要运行`cargo-install-all`脚本和`solana-install`命令,如下所示: ```bash ./scripts/cargo-install-all.sh . export PATH=$PWD/bin:$PATH solana-install init ``` -This should be sufficient to start your instance of SolanaCLI, but you will not be serving RPC until completing the additional steps listed below. +这应该足以启动SolanaCLI实例,但在完成下面列出的其他步骤之前,您不会提供RPC服务。 -## 2. Start the RPC Node +## 2. 启动RPC节点 -### Create a Validator Keypair +### 创建一个验证器密钥对 -Input the following command to generate validator keypair for use in the next step: +输入以下命令生成下一步使用的验证器密钥: ```bash solana-keygen new -o validator-keypair.json ``` -### Run the `solana-validator` command +### 运行`solana-validator`命令 -Take a moment to review the template below and make any changes as needed for your custom configuration. +花点时间查看下面的模板,并根据您的自定义配置进行必要的更改。 ```bash solana-validator \ @@ -71,12 +71,12 @@ solana-validator \ --limit-ledger-size ``` -Once the command returns successful, you're now ready to serve RPC! +一旦命令成功返回,就可以为RPC服务了! -## 3. Apply to our Provider Incubation Program 📋 +## 3. 申请我们的供应商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-solana&utm_medium=docs&utm_campaign=solana-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供者之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-solana&utm_medium=docs&utm_campaign=solana-pre-grant)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## 4. Setup your Provider on Lava Network 🌋 +## 4. 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-solana-rpc-node&utm_medium=docs&utm_campaign=solana-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 diff --git a/docs/chains/solana-chain/solana.md b/docs/chains/solana-chain/solana.md index ff0ab9fc..26d6f4c7 100644 --- a/docs/chains/solana-chain/solana.md +++ b/docs/chains/solana-chain/solana.md @@ -20,7 +20,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -29,16 +29,16 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_solana.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | jsonrpc/wss | --------- | ------------- | ----------- | Gateway | ✅ | ✅ | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - getAccountInfo diff --git a/docs/chains/starknet-chain/starknet-dev.md b/docs/chains/starknet-chain/starknet-dev.md index 15e4cd78..e5798372 100644 --- a/docs/chains/starknet-chain/starknet-dev.md +++ b/docs/chains/starknet-chain/starknet-dev.md @@ -1,14 +1,14 @@ --- slug: /starknet-dev -title: Getting Starknet RPC +title: 获取 Starknet RPC --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Getting Starknet RPC +# 获取 Starknet RPC -## Starknet Public RPC +## Starknet 公共 RPC ### Mainnet 🌐 @@ -24,31 +24,31 @@ import TabItem from '@theme/TabItem'; ## [Gateway](https://gateway.lavanet.xyz/?utm_source=starknet-dev&utm_medium=docs&utm_campaign=docs-to-gateway) -To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=starknet-dev&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关使用Lava网关的更多信息,请访问[入门指南](https://docs.lavanet.xyz/gateway-getting-started?utm_source=starknet-dev&utm_medium=docs&utm_campaign=docs-to-docs) ## [SDK](https://github.com/lavanet/lava-sdk) :::caution -Lava SDK is currently in Alpha. Please observe the documentation on both [frontend](https://docs.lavanet.xyz/sdk-frontend?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs) and [backend](https://docs.lavanet.xyz/sdk-backend?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs) use before getting started. +Lava SDK目前处于Alpha阶段。在开始之前,请观察[前端](https://docs.lavanet.xyz/sdk-frontend?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs)和[后端](https://docs.lavanet.xyz/sdk-backend?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs)的文档。 ::: -### Input 📥 +### 输入 📥 ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") async function useStarknet() { const starknet = await LavaSDK.create({ - privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable + privateKey: process.env.PRIVATE_KEY, //将私钥隐藏在环境变量中 chainIds: 'STRK', }); @@ -70,7 +70,7 @@ async function useStarknet() { ```jsx -// Install lavaSDK with the following command: +// 使用以下命令安装lavaSDK: // npm i @lavanet/lava-sdk const { LavaSDK } = require("@lavanet/lava-sdk") @@ -78,7 +78,7 @@ async function useStarknet() { const starknet = await LavaSDK.create({ badge: { - badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL + badgeServerAddress: "https://badges.lavanet.xyz", // 或者您自己的徽章服务器URL projectId: "enter_your_project_id_here" }, chainIds: 'STRK', @@ -103,10 +103,10 @@ async function useStarknet() { -### Output 📤 +### 输出 📤 -To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs) +要了解有关我们的SDK的更多信息,请访问[入门指南](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-starknet-rpc&utm_medium=docs&utm_campaign=docs-to-docs)
\ No newline at end of file diff --git a/docs/chains/starknet-chain/starknet-node.md b/docs/chains/starknet-chain/starknet-node.md index b5812756..bcc57f91 100644 --- a/docs/chains/starknet-chain/starknet-node.md +++ b/docs/chains/starknet-chain/starknet-node.md @@ -1,11 +1,11 @@ --- slug: /starknet-node -title: Running a Starknet RPC Node +title: 运行 Starknet RPC 节点 --- -# Running a Starknet RPC Node +# 运行 Starknet RPC 节点 -## Requirements 📄 +## 配置要求 📄 ### Minimum Requirements @@ -22,9 +22,9 @@ title: Running a Starknet RPC Node Connection Speed: 25+ mbps/sec -## Install the Starknet L1 Package 📦 +## 安装Starknet L1包 📦 -Docker abstracts the ETH L1 Node needs, but behind the scenes Starknet requires Lighthouse and Besu. Lighthouse handles consensus and Besu handles execution. Both of them can be installed with the following command: +Docker抽象了ETH L1节点的需求,但在幕后,Starknet需要Lighthouse和Besu。Lighthouse处理共识,Besu处理执行。它们都可以使用以下命令安装: ```bash git clone git@github.com:starknet-edu/starknet-stack.git @@ -32,17 +32,17 @@ cd starknet-stack docker compose -f dc-l1.yaml up -d ``` -To verify success, check to see the ports in the following command outputs: +为验证连接是否成功,可以在以下命令输出中查看端口信息: ```bash sudo netstat -lpnut | grep -E '30303|8551|854 sudo netstat -lpnut | grep -E '5054|9000' ``` -After you've seen success, your L1 client will take a moment to sync. You can check its status like so: +在您看到成功之后,您的L1客户端将需要一段时间来同步。你可以像这样检查它的状态: ```bash -# check goerli etherscan to make sure you have the latest block +# 检查goerli etherscan以确保您拥有最新的区块 curl --location --request POST 'http://localhost:8545' \ --header 'Content-Type: application/json' \ @@ -54,20 +54,20 @@ curl --location --request POST 'http://localhost:8545' \ }' ``` -Compare your numbers with Starknet's Testnet_1 before proceeding. +在继续之前,将您的数字与Starknet的Testnet_1进行比较。 -## Install the Starknet L2 Package 📦 +## 安装Starknet L2包 📦 -> There are three posible nodes avaliable for [Starknet](https://www.starknet.io/en/ecosystem/fullnodes-and-rpc-services) +> 有三个可能的节点可用于[Starknet](https://www.starknet.io/en/ecosystem/fullnodes-and-rpc-services) ### Pathfinder node -`Cd` into the starknet-stack project root and start the L2 execution client with this command: +`cd`到starknet-stack项目根目录,并使用以下命令启动L2执行客户端: ```bash docker compose -f dc-l2.yaml up -d ``` -It will take a while to sync, but you can always check it like so: +它需要一段时间来同步,但你可以随时检查它,像这样: ```bash @@ -81,13 +81,13 @@ curl --location --request POST 'http://localhost:9545' \ }' ``` -Inspect your output! Once `current_block_num` and `highest_block_num` are the same, you've accomplished sync. +检查你的输出!一旦`current_block_num`和`highest_block_num`相同,你就完成了同步。 -### Juno node -Juno is a golang Starknet node implementation by Nethermind with the aim of decentralising Starknet. +### Juno 节点 +Juno是Nethermind实现的golang Starknet节点,目的是去中心化Starknet。 -#### Run with Docker -To run Juno with Docker, use the following command. Make sure to create the $HOME/juno directory on your local machine before running the command. +#### 使用Docker运行 +要使用Docker运行Juno,请使用以下命令。在运行命令之前,请确保在本地计算机上创建了$HOME/juno目录。 ```bash docker run -d \ @@ -103,38 +103,38 @@ docker run -d \ --pending-poll-interval=3s ``` -You should replace `````` with your actual Ethereum node address. +您应该将``````替换为您实际的以太坊节点地址。 -The ```--pending-poll-interval``` parameter sets how frequently pending block will be updated. +参数```——pending-poll-interval```设置挂起的块被更新的频率。 -❗ _It is disabled by default, but should be enabled since lava version v0.27.0._ +❗ **默认情况下它是禁用的,但从lava v0.27.0开始应该启用** -To view logs from the Docker container, use the following command: +使用下面的命令查看Docker容器中的日志: ```docker logs -f juno``` -For more details, please visit [official docs](https://github.com/NethermindEth/juno) +更多详情,请访问[官方文档](https://github.com/NethermindEth/juno) -## Run the Indexer 🏃 +## 运行索引器 🏃 ```bash /indexer/indexer.sh ``` -## Do a Test Transaction 💸 +## 做一个测试交易 💸 -As part of the Starknet documentation, it is recommended that you perform a test transaction to verify all the levels of Starknet are working and valid. +作为Starknet文档的一部分,建议您执行一个测试事务来验证Starknet的所有级别都是正常工作和有效的。 ```bash https://book.starknet.io/chapter_4/node.html#layer_4_transport_layer ``` -That's it ! You're ready to serve RPC! +就是这样!你已经准备好为RPC服务了! -## Apply to our Provider Incubation Program 📋 +## 申请我们的供应商孵化计划 📋 -In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-starknet&utm_medium=docs&utm_campaign=starknet-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step! +在我们目前的Testnet状态中,在您可以成为Lava网络上的提供者之前,还需要通过一个额外的阶段。请填写[申请表格](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-starknet&utm_medium=docs&utm_campaign=starknet-pre-grant)。一旦你完成了这一步,请随时在我们的[Discord](https://discord.gg/UxujNZbW)中留言! -## Setup your Provider on Lava Network 🌋 +## 在Lava网络上设置你的提供商 🌋 -Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-starknet-rpc-node&utm_medium=docs&utm_campaign=starknet-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node. \ No newline at end of file +一旦您被接受-要在Lava网络上设置您的提供商,您可以参阅我们文档中其他地方的[提供商设置文档](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-starknet-rpc-node&utm_medium=docs&utm_campaign=starknet-pre-grant)。这将为您提供配置和操作provider节点所需的信息。 \ No newline at end of file diff --git a/docs/chains/starknet-chain/starknet.md b/docs/chains/starknet-chain/starknet.md index f50967c5..14992a15 100644 --- a/docs/chains/starknet-chain/starknet.md +++ b/docs/chains/starknet-chain/starknet.md @@ -20,7 +20,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem'
-## ⚙️ Supported APIs ⚙️ +## ⚙️ 支持的 APIs ⚙️
@@ -29,7 +29,7 @@ import RoadmapItem from '@site/src/components/RoadmapItem' https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_starknet.json -### Protocols 🔗 +### 协议 🔗 | Platform | jsonrpc/http | | --------- | -------- | @@ -37,9 +37,9 @@ https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_star | SDK | ✅ | -### Methods 🛠️ +### 方法 🛠️
- List + 列表 - starknet_blockNumber - starknet_blockHashAndNumber diff --git a/docs/intro/specs/spec-reference.md b/docs/intro/specs/spec-reference.md index ef5de626..c36bc1d5 100644 --- a/docs/intro/specs/spec-reference.md +++ b/docs/intro/specs/spec-reference.md @@ -226,152 +226,151 @@ Spec (JSON) #### 区块解析(`block_parsing`) {#block_parsing} -关于如何从API请求中推导出区块高度的详细信息。 +关于如何从API请求中解析出区块高度的详细信息。 -| Field | Description | Example | -|-------|-------------|---------| -| `parser_arg` | Arguments for the parser function. | `["latest"]` | -| `parser_func` | The function used for parsing. | `DEFAULT` | +| 字段 | 说明 | 示例 | +|---------------|-----------------------|--------------| +| `parser_arg` | 解析器函数的参数。 | `["latest"]` | +| `parser_func` | 用于解析的函数。 | `DEFAULT` | -#### Service API Categories(`category`) {#api_category} +#### 服务API类别(`category`) {#api_category} -| Field | Description | Example | -|-------|-------------|---------| -| `deterministic` | Indicates if the API's outcome is deterministic. | `true` | -| `local` | Specifies if the API call is local. | `false` | -| `subscription` | Indicates if the API supports subscription. | `false` | -| `stateful` | Describes the statefulness of the API. A value of `0` means it's stateless. | `0` | +| 字段 | 说明 | 示例 | +|-----------------|---------------------------------------|---------| +| `deterministic` | 表明API的结果是否确定。 | `true` | +| `local` | 表明API调用是否是本地的。 | `false` | +| `subscription` | 表明API是否支持订阅。 | `false` | +| `stateful` | 描述API的状态。值为`0`意味着它是无状态的。 | `0` | -#### Verification(`verifications`) {#verifications} +#### 验证(`verifications`) {#verifications} -Verification details used to validate the data. +用于验证数据的验证细节。 -| Field | Description | Example | -|---------|------------------------------------|------------------| -| `name` | Name of the verification. | `chain-id` | -| `values` | Array containing expected values. | `[ { "expected_value": "juno-1" } ]` | +| 字段 | 说明 | 示例 | +|----------|-------------------|--------------------------------------| +| `name` | 验证的名称。 | `chain-id` | +| `values` | 包含预期值的数组。 | `[ { "expected_value": "juno-1" } ]` | -#### Extensions (`extensions`) +#### 扩展 (`extensions`) -| Field | Description | Example | -|-----------------|--------------------------------------------|-----------| -| `name` | Name of the extension. | `archive` | -| `cu_multiplier` | Compute units multiplier for the extension.| `5` | -| `rule` | Specific rules associated with the extension. (e.g., block number)| `block: 254`| +| 字段 | 说明 | 示例 | +|-----------------|----------------------------------|--------------| +| `name` | 扩展名。 | `archive` | +| `cu_multiplier` | 计算扩展的单位乘数。 | `5` | +| `rule` | 与扩展相关的特定规则。(例如,区块编号) | `block: 254` | -### Deposit (`deposit`) 💰 {#deposit} +### 存款 (`deposit`) 💰 {#deposit} -Represents the amount deposited by the user for the proposal. +表示用户为提案存入的金额。 -| Field | Description | Example | -|---------|------------------------------------|------------------| -| `deposit` | Amount deposited for the proposal in a particular denomination. | `10000000ulava` | +| 字段 | 说明 | 示例 | +|-----------|--------------------------------|-----------------| +| `deposit` | 在特定货币单位中存入的提案金额。 | `10000000ulava` |

-## 📖 Glossary +## 📖 术语表 -### Terms 📚 +### 条款 📚
🗉 `average_block_time` -This value represents the typical duration, in milliseconds, between consecutive blocks being added to the blockchain. It's essential for quality of service (QoS) considerations, ensuring timely and efficient data relay without causing undue strain on the network or the nodes. +该值表示连续区块被添加到区块链之间的典型持续时间,以毫秒为单位。这对于质量服务(QoS)的考虑至关重要,确保及时高效地传输数据,而不会对网络或节点造成不必要的负担。
🗉 `allowed_block_lag_for_qos_sync` -This configuration determines how many blocks behind the latest block a provider can be before their QoS score begins to degrade. It essentially quantifies the maximum allowable "out-of-sync" state for a provider, beyond which their performance is deemed suboptimal. +该配置决定了提供商在其 QoS 分数开始下降之前可以落后最新数据块多少个数据块。它基本上量化了提供商可允许的最大 "out-of-sync"状态,超过这一状态,其性能将被视为不理想。 -For instance, if the network's latest block number is 1000 and a provider's latest block number is 995 with an "allowed_block_lag_for_qos_sync" of 5, their QoS score will start to be negatively impacted. +例如,如果网络的最新区块编号是 1000,而提供商的最新区块编号是 995,且 "allowed_block_lag_for_qos_sync "为 5,那么他们的 QoS 分数将开始受到负面影响。
🗉 `compares_hashes` -When set to true, it activates the data reliability features of the Lava network for the specified chain. This involves constantly comparing and validating block hashes from different nodes to guarantee data authenticity and prevent any malicious or erroneous data propagation. +设置为 "true "时,它将激活指定链的 Lava 网络数据可靠性功能。这包括不断比较和验证来自不同节点的区块哈希值,以保证数据的真实性,防止任何恶意或错误的数据传播。
🗉 `deposit` -In a decentralized setup, actions like adding or updating specs may need consensus or approval. The "deposit" specifies the amount of "ulava" (the native token of the Lava network) that must be deposited as a proposal spec admission fee. It's akin to a security deposit or stake, ensuring that only serious and genuine proposals are submitted, and potentially safeguarding against spam or malicious actions. +在去中心化设置中,添加或更新specs等操作可能需要共识或批准。“存款”指定了“ulava”(lava网络的本地令牌)的数量,必须作为提案specs入场费存入。它类似于保证金或质押,确保只有严肃和真正的提案被提交,并可能防止垃圾邮件或恶意行为。
🗉 `finalization_criteria` -This parameter addresses the issue of blockchain finality. In the context of blockchains, particularly Proof-of-Work chains like Ethereum, blocks can sometimes be "orphaned" due to network forks. The "finalization_criteria" value represents the number of blocks back from the current block number that we deem "finalized" or irreversible. - -For instance, with a "finalization_criteria" of 7, if the latest block number is 1000, blocks 993 and earlier are considered finalized. By doing so, the system safeguards against relaying data from blocks that might later get rejected or orphaned. +此参数解决了区块链终结性的问题。在区块链的背景下,特别是像以太坊这样的工作证明链,区块有时会因为网络分叉而“孤立”。“finalization_criteria”值表示从我们认为“已完成”或不可逆的当前块数返回的块数。 +例如,“finalization_criteria”为7,如果最新的区块号为1000,则认为993及更早的区块已完成。通过这样做,系统可以防止从块中中继数据,这些数据可能会在以后被拒绝或孤立。
🗉 `reliability_threshold` -This threshold determines the frequency at which free data reliability messages are broadcasted. At its essence, it dictates how resilient and trustworthy the data relayed is. The threshold is represented in hexadecimal format and functions as a mask to determine the frequency of reliability messages: +该阈值决定广播空闲数据可靠性消息的频率。从本质上讲,它决定了中继数据的弹性和可信度。该阈值以十六进制形式表示,用作掩码,用于确定可靠性消息的频率: - - **0x0FFFFFFF**: This implies that roughly 1 out of every 16 messages is a data reliability message. It's relatively infrequent, optimizing for efficiency over reliability. + - **0x0FFFFFFF**: 这意味着大约每16条消息中就有1条是数据可靠性消息。这种情况相对较少,优化的是效率而不是可靠性。 - - **0x8FFFFFFF**: Indicates a higher frequency – about 1 reliability message for every 2 standard messages. This is a middle-ground setting, balancing both efficiency and reliability. + - **0x8FFFFFFF**: 频率较高,大约每2条标准消息对应1条可靠性消息。这是一个平衡效率和可靠性的中间设置。 - - **0xFFFFFFFF**: The maximum setting where every message is a data reliability message. It prioritizes reliability above all, ensuring that data integrity is maintained at all times. + - **0xFFFFFFFF**: 每条消息都是数据可靠性消息的最大设置。它优先考虑可靠性,确保始终保持数据完整性。
🗉 `saved_blocks` -It corresponds to the number of previously finalized blocks (as determined by "finalization_criteria") that providers should retain and attach to their responses for enhanced reliability. By providing a history of previous blocks, it ensures data consistency and allows for cross-validation of data among different providers. +它对应于先前确定的块的数量(由“finalization_criteria”确定),提供者应该保留并附加到其响应中以增强可靠性。通过提供以前块的历史记录,它确保了数据的一致性,并允许不同提供者之间的数据交叉验证。

-### Parsing 🧩 +### 解析 🧩 -Parsing is a critical aspect when interacting with diverse chains, as each chain returns data in a different format. The Lava Network has established parsing protocols to handle these variations effectively. +解析是与不同链交互时的一个关键方面,因为每个链以不同的格式返回数据。Lava 网络已经建立了解析协议来有效地处理这些变化。 -
Parsing Functions +
解析函数 -The parsing functions define how the returned data is processed to extract the necessary information. +解析函数定义了如何处理返回的数据以提取必要的信息。 - **EMPTY:** - Description: The data is returned as it is without any parsing. + 说明:返回的数据没有任何解析。 - **PARSE_BY_ARG:** - Description: Assumes the returned data is an array. It takes an index as an argument and returns the element at that index in the returned data. + 说明:假定返回的数据是一个数组。它接受一个索引作为参数,并返回返回数据中位于该索引处的元素。 - **PARSE_CANONICAL:** - Description: Assumes the returned data is a canonically structured JSON. It receives key values as an argument and progresses through the JSON structure using the keys to fetch the desired element. + 说明:假设返回的数据是一个标准结构的JSON。它接收键值作为参数,并使用键在JSON结构中获取所需的元素。 - **PARSE_DICTIONARY:** - Description: Assumes the returned data is a string with a key-value structure (such as KEY=VAL). It receives a key and separator as arguments and returns the value corresponding to the key. + 说明:假设返回的数据是一个具有键值结构(如KEY=VAL)的字符串。它接收键和分隔符作为参数,并返回键对应的值。 - **PARSE_DICTIONARY_OR_ORDERED:** - Description: It first tries the PARSE_DICTIONARY method, and if that fails, then it resorts to the PARSE_BY_ARG method. + 说明:它首先尝试PARSE_DICTIONARY方法,如果失败,则求助于PARSE_BY_ARG方法。
-
Parsing Fields +
解析字段 ##### `block_parsing`: -Determines how to extract the block number associated with a request. This is essential for queries that are specific to certain block heights. +决定如何提取与请求相关的区块编号。这对特定于某些区块高度的查询至关重要。 ##### `result_parsing`: -Determines how to extract the desired data from the response. Depending on the structure of the data returned by the chain, the appropriate parsing method is chosen. +决定如何从响应中提取所需的数据。根据链返回的数据结构,选择适当的解析方法。 ##### `function_tag`: -This is crucial for the Lava network's features, such as reliability, which require fetching certain data from the chain, like the latest block number or block hashes. The function_tag marks an endpoint as being suitable to fetch specific types of information. Some examples include getBlockNumber and getBlockByNumber. +这对 Lava 网络的可靠性等功能至关重要,因为这些功能需要从链中获取某些数据,如最新的区块编号或区块哈希值。function_tag 标记一个端点适合获取特定类型的信息。例如 getBlockNumber 和 getBlockByNumber。 ##### `function_template`: -For endpoints with a defined function_tag, this template serves as a format string. It can be used by relayers to construct a query to an external chain. This ensures standardized queries across different relayers. +对于已定义 function_tag 的端点,该模板可用作格式字符串。中继器可以用它来构建对外部链的查询。这可确保不同中继器之间的查询标准化。

\ No newline at end of file From bfc02bca68087e4fd2cb8bde555701cae01a0b3d Mon Sep 17 00:00:00 2001 From: polibee <1244762327@qq.com> Date: Fri, 23 Feb 2024 22:08:49 +0800 Subject: [PATCH 4/5] Translate provider documentation --- docs/provider/provider-setup.md | 394 ++++++++++++++++---------------- docs/provider/provider-tls.md | 136 +++++------ 2 files changed, 265 insertions(+), 265 deletions(-) diff --git a/docs/provider/provider-setup.md b/docs/provider/provider-setup.md index 0367e5fe..81c03ea2 100644 --- a/docs/provider/provider-setup.md +++ b/docs/provider/provider-setup.md @@ -1,7 +1,7 @@ --- sidebar_position: 1 slug: /provider-setup -title: Setup +title: 设置 --- import Tabs from '@theme/Tabs'; @@ -9,83 +9,83 @@ import TabItem from '@theme/TabItem'; :::warning -With the launch of `lava-testnet-2`, aspects of our provider setup have changed. TLS Certificates are now a required part of Provider setup. [Lavavisor](/lavavisor) is now the recommended route for running the provider process. +随着 "lava-testnet-2 "的推出,我们提供商设置的各个方面都发生了变化。TLS 证书现在是提供程序设置的必要组成部分。[Lavavisor](/lavavisor) 现在是运行提供程序的推荐路径。 ::: -# Provider Setup +# 提供商设置 -After you have read the [Provider intro](/provider), This guide is designed to help node runners and DevOps professionals configure a multi-chain network provider, which supports various blockchain networks and their respective API interfaces. We'll walk you through the necessary steps to create a configuration file that covers multiple chains and API interfaces, and provide a brief background on providers and the stake command. +本指南旨在帮助节点运行人员和 DevOps 专业人员配置多链网络提供商,该提供商支持各种区块链网络及其各自的 API 接口。我们将指导您完成必要的步骤,创建涵盖多链和 API 接口的配置文件,并简要介绍提供商和 stake 命令的背景。 -## **Overview** +## **概览** -A multi-chain network provider allows you to manage and interact with multiple blockchain networks using a single entry point. By supporting various API interfaces, the provider can accommodate the specific needs and preferences of different blockchain networks. +多链网络提供商允许您使用单一入口点管理多个区块链网络并与之互动。通过支持各种 API 接口,提供商可以满足不同区块链网络的特定需求和偏好。 -In this guide, we'll create a configuration file that includes multiple chains (Ethereum Mainnet and Osmosis Mainnet) and their respective API interfaces (JSON-RPC, REST, gRPC, and Tendermint RPC). We'll also cover the stake command for providers, which allows you to stake a specific service. +在本指南中,我们将创建一个配置文件,其中包括多个链(以太坊主网和 Osmosis 主网)及其各自的 API 接口(JSON-RPC、REST、gRPC 和 Tendermint RPC)。我们还将介绍提供商的质押命令,该命令允许你质押特定服务。 -## **Prerequisites** +## **必要条件** -1. Go 1.20.5 or higher -2. `lavap` installed (build or install at [https://github.com/lavanet/lava](https://github.com/lavanet/lava)) -3. Account with enough LAVA for staking (learn about [creating Accounts](docs/lava-blockchain/wallet.mdx)) -4. Know which chains you want to provide ([how to query the latest list](https://docs.lavanet.xyz/provider/#chains)) +1. Go 1.20.5 或更高版本 +2. 已安装`lavap`(在 [https://github.com/lavanet/lava](https://github.com/lavanet/lava) 上构建或安装) +3. 拥有足够 LAVA 的账户,以便进行质押(了解 [创建账户](docs/lava-blockchain/wallet.mdx) +4. 了解您想提供哪些链([如何查询最新列表](https://docs.lavanet.xyz/provider/#chains) -## Step 1: Setup TLS -As part of good security practice, Lava protocol communicates with end-to-end encryption between providers and consumers of RPC. This requires some additional configuration steps on a provider, namely, the setup of TLS certification with a certification authority. +## Step 1: 设置 TLS +作为良好安全实践的一部分,Lava 协议在 RPC 的提供者和消费者之间采用端到端加密通信。这就要求提供者采取一些额外的配置步骤,即在认证机构设置 TLS 认证。 -❗❗ If you already use a **TLS Certificate signed by a Certifiying Authority**, you can continue onto step 2. Otherwise, you may want to check out our guide on [setting up TLS for Lava Providers](/provider-tls). +❗❗ 如果您已经使用了由认证机构**签署的**TLS 证书,则可以继续第 2 步。否则,您可能需要查看我们的[为 Lava 提供商设置 TLS](/provider-tls)指南。 -## Step 2: Run RPCProvider process +## Step 2: 运行RPCProvider进程 -**`rpcprovider`** is a command line tool for setting up an RPC server that listens for requests from Lava protocol RPC consumers, forwards them to a configured node, and responds with the reply. The configuration can be provided via a YAML configuration file or as command line arguments. +**`rpcprovider`**是一个用于设置RPC服务器的命令行工具,它监听来自Lava protocol RPC消费者的请求,将它们转发到已配置的节点,并返回响应。配置可以通过YAML配置文件提供,也可以作为命令行参数提供。 -**`rpcprovider`** is part of `lavap` and can run using the following syntax: +**`rpcprovider`**是`lavap`的一部分,可以使用以下语法运行: ```bash lavap rpcprovider [config-file] || { {listen-host:listen-port spec-chain-id api-interface node-url} ... } ``` -### Configuration -:::warning READ BEFORE CONTINUING -Configuration varies per chain. Some chains have steeper configuration requirements than others. If you're unsure, please visit the [chain page](/chains) of the specific endpoints you're attempting to setup and view our `Run an RPC Node` guide for that chain. +### 配置 +:::warning 继续之前请阅读 +每个链的配置不同。有些链比其他链有更高的配置要求。如果你不确定,请访问你正在尝试设置的特定端点的[chain page](/chains),并查看我们的`Run an RPC Node`指南。 ::: -:::info -For advanced configuration such as **authentication**, header **forwarding**, configurable **node-timeout**, see [Provider Features](/provider-features) +:::info +有关**身份验证**、**转发**、可配置**节点超时**等高级配置,请参阅[提供程序功能](/provider-features) ::: -You can either provide a single configuration file (YAML) or specify one or more endpoint configurations as command line arguments. +您可以提供单个配置文件(YAML),也可以指定一个或多个端点配置作为命令行参数。 -The default configuration file is named **`rpcprovider.yml`**. If a single argument is provided, it is assumed to be the name of the configuration file (without the extension). +默认配置文件名为 **`rpcprovider.yml`**。如果只提供一个参数,则默认为配置文件的名称(不含扩展名)。 -If no arguments are provided, the default configuration file is used. All configuration files should be located in the default node home directory (e.g., **`app.DefaultNodeHome/config`**) or the local running directory. +如果没有提供参数,则使用默认配置文件。所有配置文件都应位于默认节点主目录(如 **`app.DefaultNodeHome/config`**)或本地运行目录中。 -### Command Flags +### 命令参数 -**`rpcprovider`** accepts the following flags: +**`rpcprovider`**接受以下参数: -- **`--geolocation`** (required): Geolocation to run from (e.g., **`1`**) -- **`--from`** (required): Account name to use (e.g., **`alice`**) -- **`--chain-id`**: Lava Network chain ID (e.g.: **`lava-testnet-2`**) -- **`--pprof-address`**: pprof server address, used for code profiling (default: **`""`**) -- **`--cache`**: Address for a cache server to improve performance (default: **`""`**) -- **`--parallel-connections`**: Number of parallel connections (default: **`chainproxy.NumberOfParallelConnections`**) -- **`--reward-server-storage`**: The path to store reward server data (default **`".storage/rewardserver"`**) +- **`--geolocation`** (必填): 运行的地理位置(例如,**`1`**) +- **`-from`**(必填): 要使用的账户名称(例如,**`alice`**) +- **`--chain-id`**: Lava 网络链 ID(例如:**`lava-testnet-2`**) +- **`--pprof-address`**: pprof 服务器地址,用于代码剖析(默认:**`""`**) +- **`--cache`**: 缓存服务器地址,以提高性能(默认:**`""`**) +- **`--parallel-connections`**: 并行连接数(默认:**`chainproxy.NumberOfParallelConnections`**) +- **`--reward-server-storage`**: 存储奖励服务器数据的路径(默认为**`".storage/rewardserver"``**) -### Configuration Examples +### 配置示例 -Here are some example usages of **`rpcprovider`**: +下面是一些使用 **`rpcprovider`** 的示例: ```bash -# Using a custom configuration file and flags +# 使用自定义配置文件和标志 lavap rpcprovider path_to_my_config_file --geolocation 1 --from alice -# Providing endpoint configurations as command line arguments +# 以命令行参数的形式提供端点配置 lavap rpcprovider provider-host.com:1986 ETH1 jsonrpc https://localhost/eth/my_node_1 --geolocation 1 --from alice ``` -### Example: Multiple API Interfaces with Same Listen Address (ETH1 and COS3) +### 示例: 具有相同监听地址的多个 API 接口(ETH1 和 COS3) -In this example, the provider supports all the API interfaces for the Ethereum Mainnet (ETH1) and Osmosis Mainnet (COS3) networks. The listen address for all ETH1 interfaces and all COS3 interfaces is the same. +在本例中,提供程序支持以太坊主网 (ETH1) 和 Osmosis 主网 (COS3) 网络的所有 API 接口。所有 ETH1 接口和所有 COS3 接口的监听地址相同。 ```yaml endpoints: @@ -117,17 +117,17 @@ endpoints: ``` :::tip -If you're using `nginx` or another proxy as is recommended in our [TLS setup guide](/provider-tls), you will need to add `disable-tls: true` to each endpoint specified. This allows `nginx` to handle TLS directly. +如果您使用的是 `nginx` 或我们的 [TLS 设置指南](/provider-tls) 中推荐的其他代理,则需要在指定的每个端点添加 `disable-tls: true`。这将允许 `nginx` 直接处理 TLS。 ::: -### More Examples +### 更多范例 -The team constantly adds configurations, you can check examples on our [github](https://github.com/lavanet/lava/tree/main/config/provider_examples). +团队会不断添加配置,你可以在我们的 [github](https://github.com/lavanet/lava/tree/main/config/provider_examples) 上查看示例。 -## Step 3: Check Provider liveliness - before staking -To ensure the provider is up and running correctly `lavap` provides a command to setup the necessary clients and verify all parameters are well defined. -This command is used to test the basic flow for a provider is working, including stake and access, but with some additional arguments can be used prior to staking, as long as the rpcprovider process is up and running. -since we haven't staked yet we need to provide the command with the endpoints we are using -### Usage +## Step 3: 检查 Provider 的活度 - 质押前 +为确保提供程序正常运行,`lavap` 提供了一个命令来设置必要的客户端,并验证所有参数是否定义正确。 +该命令用于测试提供程序的基本流程是否正常,包括质押和访问,但只要 rpcprovider 进程启动并运行,在质押之前也可使用该命令,但需附加一些参数。 +因为我们还没有质押,所以需要向命令提供我们正在使用的端点 +### 使用 @@ -136,10 +136,10 @@ since we haven't staked yet we need to provide the command with the endpoints we ```bash lavap test rpcprovider --from {WALLET} --endpoints "{ENDPOINTS}" -# Example: checking if your provider, is staked correctly and listening on all staked services +# 例如:检查您的提供商是否被正确质押,并监听所有被质押的服务 # lavap test rpcprovider --from provider1_us --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ -# Expected output: +# 应该输出如下: # ...logs... # ----------------------------------------SUMMARY---------------------------------------- @@ -157,7 +157,7 @@ lavap test rpcprovider --from {WALLET} --endpoints "{ENDPOINTS}" ```bash lavap test rpcprovider --from {WALLET} --endpoints "{ENDPOINTS}"` -# Example: checking your provider that is not staked yet, or when you want to add a new chain support +# 例如:检查您的提供商是否还未被质押,或者当您想添加新的链支持时 # lavap test rpcprovider --from provider1_us --endpoints "provider-public-grpc:port,jsonrpc,ETH1 provider-public-grpc:port,rest,LAV1" --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ # Expected output: @@ -173,13 +173,13 @@ lavap test rpcprovider --from {WALLET} --endpoints "{ENDPOINTS}"` -you can use the provider public address instead of the wallet name, it can also be fetched easily using lavad +您可以使用提供商的公共地址代替钱包名称,也可以使用 lavad 轻松获取 ```bash lavad keys show -a {WALLET} ``` -testing with the public address +使用公共地址测试 ```bash lavap test rpcprovider {PROVIDER_ADDRESS} --endpoints "{ENDPOINTS}" @@ -188,29 +188,29 @@ lavap test rpcprovider {PROVIDER_ADDRESS} --endpoints "{ENDPOINTS}" -## Step 4: Stake as Provider +## Step 4: 作为提供商质押 -Before you can expose your multi-chain provider to rpc consumers, you need to stake a provider. You may have already taken this step and can move onto step 5. Otherwise, to stake a single service, use the following command: +在您可以将您的多链提供程序暴露给rpc消费者之前,您需要绑定一个提供商。你可能已经完成了这一步,可以继续进行第5步。否则,使用以下命令绑定单个服务: ```bash lavap tx pairing stake-provider [chain-id] [amount] [endpoint endpoint ...] [geolocation] {validator} [flags] ``` -*Check the output for the status of the staking operation. A successful operation will have a code **`0`**.* +*检查输出以了解质押操作的状态。一个成功的操作会有一个代码 **`0`**.* -:::info -Note that this TX can also be used to increase the provider's stake. To increase, the amount should be the sum of the current amount and the desired addition. For example, a provider is staked with `100ulava` and wants to increase its stake by `10ulava`. Then, the appropriate `amount` argument for the `stake-provider` command should be `110ulava`. +:::info +注意,此交易还可以用于增加提供者的质押。要增加股份,金额应为当前金额和所需增加金额的总和。例如,一个提供者的质押为`100ulava`,想要增加质押`10ulava`。那么,`stake-provider`命令的适当`amount`参数应为`110ulava`。 ::: -#### Parameters Description +#### 参数说明 -- **`chain-id`** - The ID of the serviced chain (e.g., **`COS4`** or **`FTM250`**). To get the full list of available chains use: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. -- **`amount`** - Stake amount for the specific chain (e.g., **`2010ulava`**). -- **`endpoint`** - Provider host listener, composed of `provider-host:provider-port,geolocation`. To define multiple endpoints do: `"host:port,geolocation host2:port2,geolocation2"`. To define advanced endpoint features like `trace`, `debug`, and more, ask the Lava team. -- **`geolocation`** - Indicates the geographical location where the process is located (e.g., **`1`** for US or **`2`** for EU). This argument must specify all the geolocations of the defined endpoints (see the "Ethereum Mainnet in US And Europe" below). -- **`validator`** - Validator address for staking (optional). Validator address is required when staking due to the dualstaking mechanism. If no validator is specified, the highest stake validator will be picked automatically. Note that the validator address should be in a sdk.ValAddress format (`lava@valoper...`). +- **`chain-id`** -服务链的 ID(例如,**`COS4`** 或 **`FTM250`**)。要获得可用链的完整列表,请使用:`lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. +- **`amount`** - 特定链的质押金额(e.g., **`2010ulava`**). +- **`endpoint`** - 提供商宿主监听器,由` Provider -host: Provider -port,geolocation`组成。定义多个端点:`"host:port,geolocation host2:port2,geolocation2"`。要定义诸如`trace`、`debug`等高级端点功能,请咨询Lava团队。 +- **`geolocation`** - 表示进程所在的地理位置(例如,**`1`**代表US,**`2`**代表EU)。此参数必须指定所定义端点的所有地理位置(参见下面的“美国和欧洲以太坊主网”)。 +- **`validator`** - 质押的验证器地址(可选)。由于双重锁定机制,锁定时需要验证器地址。如果没有指定验证器,将自动选择最高的质押验证器。注意,验证器地址应该在sdk中。ValAddress格式(`lava@valoper...`)。 -#### Geolocations +#### 地理位置 ```javascript USC = 1; // US-Center @@ -224,19 +224,19 @@ Note that this TX can also be used to increase the provider's stake. To increase ``` -#### Flags Details +#### Flags 细节 -- **`--from`** - The account to be used for the provider staking (e.g., **`my_account`**). -- **`--provider-moniker`** - Provider’s public name -- **`--keyring-backend`** - A keyring-backend of your choosing (e.g., **`test`**). -- **`--chain-id`** - The chain_id of the network (e.g., **`lava-testnet-2`**). -- **`--gas`** - The gas limit for the transaction (e.g., **`"auto"`**). -- **`--gas-adjustment`** - The gas adjustment factor (e.g., **`"1.5"`**). -- **`--node`** - A RPC node for Lava (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). +- **`--from`** - 用于提供商质押的帐户 (e.g., **`my_account`**). +- **`--provider-moniker`** - 提供商的公开名称 +- **`--keyring-backend`** - 您选择的密钥环后端 (e.g., **`test`**). +- **`--chain-id`** - 网络的chain_id (e.g., **`lava-testnet-2`**). +- **`--gas`** - 交易的燃料限额 (e.g., **`"auto"`**). +- **`--gas-adjustment`** - 燃料调节系数 (e.g., **`"1.5"`**). +- **`--node`** - Lava的RPC节点 (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). -### Stake Examples +### 质押示例 -#### Lava Testnet in US (with specified validator) +#### 美国的 Lava Testnet(使用指定的验证器) ```bash lavap tx pairing stake-provider LAV1 \ @@ -252,7 +252,7 @@ lavap tx pairing stake-provider LAV1 \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -#### Ethereum Mainnet in US (without specified validator) +#### 美国的以太坊主网(未指定验证器) Ethereum and other EVMs usually have only `jsonrpc` interface: ```bash @@ -268,7 +268,7 @@ lavap tx pairing stake-provider "ETH1" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -#### Ethereum Mainnet in US And Europe (multiple endpoints) +#### 美国和欧洲的以太坊主网(多个端点) ```bash lavap tx pairing stake-provider "ETH1" \ "50000000000ulava" \ @@ -282,8 +282,8 @@ lavap tx pairing stake-provider "ETH1" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -#### Ethereum Globally Load Balanced Array of Nodes -To be used if your endpoint is DNS load balanced for all covered geolocations. +#### 以太坊全局负载均衡节点阵列 +如果您的端点对所有覆盖的地理位置进行DNS负载均衡,则使用此选项。 ```bash lavap tx pairing stake-provider "ETH1" \ "50000000000ulava" \ @@ -297,8 +297,8 @@ lavap tx pairing stake-provider "ETH1" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -#### Cosmos Hub Testnet in US -Cosmos's usually have `rest`, `tendermintrpc` & `grpc` interface, all mandatory: +#### Cosmos Hub 测试网在美国 +Cosmos通常有`rest`、`tendermintrpc`和`grpc`接口,这些接口都是必须的: ```bash lavap tx pairing stake-provider "COS5T" \ @@ -313,9 +313,9 @@ lavap tx pairing stake-provider "COS5T" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -## Step 5: Verify stake +## Step 5: 验证质押 -To ensure that your account is successfully staked with the providers for a specific network, execute the following command. Make sure to check if your account's public address is present in the list generated by the command output: +为了确保您的帐户成功地与特定网络的提供商绑定,请执行以下命令。请确保检查你的账户的公共地址是否在命令输出生成的列表中: @@ -335,12 +335,12 @@ lavap query pairing account-info \ {provider_address} \ --node "{LAVA_RPC_NODE}" -# Example: seeing all relevant information for an account -# lavap query pairing account-info \ +# 示例:查看帐户的所有相关信息 +# lavap query pairing providers \ # lava@1e4vghfjertxq25l2vv56egkfkvdjk90t0c667v \ # --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ -# Expected output: +# 输出如下: # -------------------------------------------- # Active Provider Chains # -------------------------------------------- @@ -352,41 +352,41 @@ lavap query pairing account-info \ -#### Parameter Descriptions (with examples): +#### 参数说明(举例说明): -- **`provider_address`** - The public address of the provider beginning with the lava@ prefix. Examples: **`lava@1e4vghfjertxq25l2vv56egkfkvdjk90t0c667v`** -- **`LAVA_RPC_NODE`** - An RPC node for Lava. This can be omitted if the current node has already joined the Lava network. Example: **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`** +- **`provider_address`** - 提供商的公共地址,以lava@前缀开头。例子:**`lava@1e4vghfjertxq25l2vv56egkfkvdjk90t0c667v`** +- **`LAVA_RPC_NODE`** - Lava的RPC节点。如果当前节点已经加入了熔岩网络,则可以省略此操作。例子: **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`** -Another useful command to check all providers for a specific chain: +另一个用于检查特定链的所有provider的有用命令: ```bash lavap query pairing providers \ "{NETWORK_NAME}" \ --node "{LAVA_RPC_NODE}" -# Example: checking if your account is a paired provider for the ETH1 network, +# 例如:检查您的帐户是否是ETH1网络的配对提供商, # lavap query pairing providers \ # ETH1 \ # --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ -# Expected output: -# List of all providers, and your provider should be on of them +# 输出如下: +# 所有提供商的列表,你的提供商应该在其中 ``` -#### Parameter Descriptions (with examples): +#### 参数说明(举例说明): -- **`NETWORK_NAME`** - The ID of the chain. Examples: **`COS4`** or **`FTM250`**. To get the full list of available chains use: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. -- **`LAVA_RPC_NODE`** - An RPC node for Lava. This can be omitted if the current node has already joined the Lava network. Example: **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`** +- **`NETWORK_NAME`** - 链的ID。例如:**`COS4`**或**`FTM250`**。要获得可用链的完整列表,请使用:`lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. +- **`LAVA_RPC_NODE`** - Lava的RPC节点。如果当前节点已经加入了熔岩网络,则可以省略此操作。例子:**`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`** -:::info -Note, a new provider stake is only applied on the start of the next epoch. Currently, an epoch is defined as 30 blocks. With block time of 30sec, in the worst case scenario the stake will be applied after 15min. +:::info +注意,新的提供商权益只在下一个纪元开始时应用。目前,一个epoch被定义为30个块。阻塞时间为30秒,在最坏的情况下,质押将在15分钟后生效。 ::: -## Step 6: Check Provider liveliness - after staking +## Step 6:检查供应商的活跃情况-质押后 -Now that your provider is staked you can repeat the command, but this time, without specifying the endpoints, as the CLI will use the blockchain to fetch them, this verifies the data exists correctly on the blockchain. +现在您的提供商已经质押,您可以重复这个命令,但是这一次,没有指定端点,因为CLI将使用区块链来获取它们,这将验证数据是否正确存在于区块链上。 -### Usage +### 使用 @@ -395,10 +395,10 @@ Now that your provider is staked you can repeat the command, but this time, with ```bash lavap test rpcprovider --from {WALLET} -# Example: checking if your provider, is staked correctly and listening on all staked services +# 示例:检查您的提供商是否正确质押,并监听所有质押的服务 # lavap test rpcprovider --from provider1_us --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ -# Expected output: +# 输出如下: # ...logs... # ----------------------------------------SUMMARY---------------------------------------- @@ -415,7 +415,7 @@ lavap test rpcprovider --from {WALLET} ```bash lavap test rpcprovider {PROVIDER_ADDRESS} -# Example: checking if your provider, is staked correctly and listening on all staked services +# 示例:检查您的提供商是否正确质押,并监听所有质押的服务 # lavap test rpcprovider lava@myprovidersbech32pubaddress --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ ``` @@ -423,46 +423,46 @@ lavap test rpcprovider {PROVIDER_ADDRESS} -## Step 7: Provider Info and more features +## Step 7: 提供商信息和更多功能 -You can track your Provider rewards and transactions via [https://info.lavanet.xyz/providers](https://info.lavanet.xyz/providers) +您可以通过[https://info.lavanet.xyz/providers](https://info.lavanet.xyz/providers)跟踪您的供应商奖励和交易。 -And review the Providers Features page for more capabilities. +并查看提供商功能页面以了解更多功能。 -## Step 8: Create Provider Service +## Step 8: 创建提供商服务 :::tip -Please note that Lava has a dedicated binary in order to run and manage providers called `lavavisor`. make sure you are using either `lavavisor` OR a service file but not both. +请注意,Lava有一个专用的二进制文件来运行和管理名为`lavavisor`的提供商。确保你使用的是`lavavisor`或者一个服务文件,但不能同时使用两者。 ::: -Assuming the following: -- The `lavap` binary is located in ``/usr/bin`` -- The wallet responsible for the provider has a password -- A configuration file was made for the provider +假定你已完成如下工作: +- `lavap` 二进制文件位于 `/usr/bin` 目录中。 +- 负责提供商的钱包有密码。 +- 已为提供商创建了配置文件。 -First we need to set the following values: +首先,我们需要设置以下值: ```bash -TMP_PASSWORD= -TMP_CONFIG_FILE_PATH= -TMP_GEO_LOCATION= -TMP_PROVIDER_WALLET_ACCOUNT= -TMP_CHAIN_ID= # lava-testnet-2 +TMP_PASSWORD=<如果你有钱包密码的话> +TMP_CONFIG_FILE_PATH=<配置文件的路径> +TMP_GEO_LOCATION=<您希望使用的地理位置> +TMP_PROVIDER_WALLET_ACCOUNT=<您的提供商钱包帐户名称> +TMP_CHAIN_ID= # lava-testnet-2 ``` -Run the following to create the service file: +2 .执行如下命令创建服务文件。 ```bash sudo tee </dev/null /etc/systemd/system/lava-provider.service [Unit] Description=Lava Provider After=network-online.target [Service] -# the user that runs the service +# 运行服务的用户 User=root -# set the working directory so that its easier to note the config file +# 设置工作目录,以便更容易注意到配置文件。 WorkingDirectory=/root -# since we are using the wallet we must send in the password automatically +# 因为我们使用的是钱包,所以必须自动发送密码 ExecStart=/usr/bin/sh -c 'echo $TMP_PASSWORD | /usr/bin/lavap rpcprovider $TMP_CONFIG_FILE_PATH --geolocation $TMP_GEO_LOCATION --from $TMP_PROVIDER_WALLET_ACCOUNT --chain-id $TMP_CHAIN_ID' Restart=always @@ -472,47 +472,47 @@ WantedBy=multi-user.target EOF ``` -Finally enable and run the service: +最后启用并运行服务: ```bash sudo systemctl daemon-reload sudo systemctl enable lava-provider.service sudo systemctl start lava-provider.service ``` -View the logs: +查看日志: ```bash journalctl -f -u lava-provider.service -o cat ``` -## Step 9: Unstake -A provider can unstake to get its stake funds back to its wallet. The provider can unstake completely or partially. Note that the funds will be sent to the wallet after the Cosmos staking module's unbond period of time which is currently defined as 3 weeks. Also, if a provider fully unstakes, it's removed from the pairing list by the next epoch. +## Step 9: 解除质押 +提供商可以取消质押,将其质押资金返回钱包。 提供商可以完全或部分取消质押。 请注意,资金将在 Cosmos 质押模块的解绑时间(目前定义为 3 周)之后发送到钱包。 此外,如果提供商完全取消质押,它将在下一个纪元之前从配对列表中删除。 -### Complete Unstake -To unstake the full stake amount for a single service, use the following command: +### 完全取消质押 +要取消单个服务的全部质押金额,请使用以下命令: ```bash lavap tx pairing unstake-provider [chain-id] {validator} [flags] ``` -*Check the output for the status of the staking operation. A successful operation will have a code **`0`**.* +*检查输出,查看质押操作的状态。成功操作的代码为 **`0`**.* -#### Parameters Description +#### 参数说明 -- **`chain-id`** - The ID of the serviced chain (e.g., **`COS4`** or **`FTM250`**). To get the full list of available chains use: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. -- **`validator`** - Validator address for unstaking (optional). If no validator is specified, the highest stake validator on which the provider is delegated to will be picked automatically. To view all the provider's delegations with the validators addresses use: `lavap query staking delegations [provider] --node {LAVA_RPC_NODE}`. Note that the validator address should be in a sdk.ValAddress format (`lava@valoper...`). +- **`chain-id`** - 服务链的 ID(例如,**`COS4`** 或 **`FTM250`**)。 要获取可用链的完整列表,请使用: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. +- **`validator`** - 用于取消质押的验证者地址(可选)。 如果未指定验证者,将自动选择提供者委托的最高权益验证者。 要查看所有提供者的委托以及验证器地址,请使用:`lavap query stake delegates [provider] --node {LAVA_RPC_NODE}`。 请注意,验证器地址应采用 sdk.ValAddress 格式(`lava@valoper...`)。 -#### Flags Details +#### 标注详情 -- **`--from`** - The account to be used for the provider staking (e.g., **`my_account`**). -- **`--keyring-backend`** - A keyring-backend of your choosing (e.g., **`test`**). -- **`--chain-id`** - The chain_id of the network (e.g., **`lava-testnet-2`**). -- **`--gas`** - The gas limit for the transaction (e.g., **`"auto"`**). -- **`--gas-adjustment`** - The gas adjustment factor (e.g., **`"1.5"`**). -- **`--node`** - A RPC node for Lava (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). +- **`--from`** - 用于提供商质押的账户 (e.g., **`my_account`**). +- **`--keyring-backend`** - 您选择的keyring后端 (e.g., **`test`**). +- **`--chain-id`** - 网络的chain_id (e.g., **`lava-testnet-2`**). +- **`--gas`** - 交易的 Gas 限额 (e.g., **`"auto"`**). +- **`--gas-adjustment`** - 燃料调节系数 (e.g., **`"1.5"`**). +- **`--node`** - Lava 的 RPC 节点 (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). -### Unstake Examples +### 取消质押示例 -#### Unstake with specified validator +#### 使用指定验证人取消质押 ```bash lavap tx pairing unstake-provider LAV1 \ @@ -525,7 +525,7 @@ lavap tx pairing unstake-provider LAV1 \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -#### Unstake with unspecified validator +#### 使用未指定的验证者取消质押 ```bash lavap tx pairing unstake-provider LAV1 \ @@ -537,37 +537,37 @@ lavap tx pairing unstake-provider LAV1 \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -### Partial Unstake -To unstake some of the stake amount for a single service, use the following command: +### 部分解除质押 +要取消单个服务的部分质押金额,请使用以下命令: ```bash lavap tx dualstaking unbond [validator] [provider] [chain-id] [amount] [flags] ``` -*Check the output for the status of the staking operation. A successful operation will have a code **`0`**.* +*检查输出以了质押样操作的状态。 操作成功会有一个code **`0`**.* :::info -Note that the `unbond` command should be used because the proivder unbonds some of its funds from his self-delegation (which is its stake). +请注意,应使用`unbond`命令,因为提供商从其自我委托(即其质押)中解除了部分资金的绑定。 ::: -#### Parameters Description +#### 参数说明 -- **`validator`** - Validator address for unstaking. To view all the provider's delegations with the validators addresses use: `lavap query staking delegations [provider] --node {LAVA_RPC_NODE}`. Note that the validator address should be in a sdk.ValAddress format (`lava@valoper...`). -- **`provider`** - Provider lava address (of format `lava@...`). -- **`chain-id`** - The ID of the serviced chain (e.g., **`COS4`** or **`FTM250`**). To get the full list of available chains use: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. -- **`amount`** - Amount to unstake (for example: "`2010ulava`"). +- **`validator`** - 用于取消质押的验证人地址。 要查看所有提供者的委托以及验证器地址,请使用:`lavap query stake delegates [provider] --node {LAVA_RPC_NODE}`。 请注意,验证器地址应采用 sdk.ValAddress 格式(`lava@valoper...`)。 +- **`provider`** - 提供商Lava地址(格式为“lava@...”)。 +- **`chain-id`** - 服务链的 ID(例如,**`COS4`** 或 **`FTM250`**)。 要获取可用链的完整列表,请使用:`lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. +- **`amount`** - 取消质押的金额(例如:“`2010ulava`”)。 -#### Flags Details +#### 标注详情 -- **`--from`** - The account to be used for the provider staking (e.g., **`my_account`**). -- **`--keyring-backend`** - A keyring-backend of your choosing (e.g., **`test`**). -- **`--chain-id`** - The chain_id of the network (e.g., **`lava-testnet-2`**). -- **`--gas`** - The gas limit for the transaction (e.g., **`"auto"`**). -- **`--gas-adjustment`** - The gas adjustment factor (e.g., **`"1.5"`**). -- **`--node`** - A RPC node for Lava (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). +- **`--from`** - 用于提供商质押的账户 (e.g., **`my_account`**). +- **`--keyring-backend`** - 您选择的keyring后端 (e.g., **`test`**). +- **`--chain-id`** - 网络的chain_id (e.g., **`lava-testnet-2`**). +- **`--gas`** - 交易的 Gas 限额 (e.g., **`"auto"`**). +- **`--gas-adjustment`** - 燃料调节系数 (e.g., **`"1.5"`**). +- **`--node`** - Lava 的 RPC 节点 (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). -### Unbond Examples +### 解除绑定示例 ```bash lavap tx dualstaking unbond "validator_lava_address" \ @@ -582,43 +582,43 @@ lavap tx dualstaking unbond "validator_lava_address" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` -## Step 10: Modify stake entry -A provider can modify different properties of its stake entry using the `modify-provider` TX. The properties that can be changed using this TX include its stake amount, moniker, available endpoints, delegation commission and more. +## Step 10: 修改质押条目 +提供者可以使用`modify-provider` TX 修改其权益条目的不同属性。 使用此 TX 可以更改的属性包括其权益金额、名称、可用端点、委托佣金等。 -### Modify provider stake entry -To modify the provider's stake entry for a single service, use the following command: +### 修改提供商质押条目 +要修改单个服务的提供商的权益条目,请使用以下命令: ```bash lavap tx pairing modify-provider [chain-id] [flags] ``` -*Check the output for the status of the staking operation. A successful operation will have a code **`0`**.* +*检查输出以了解质押操作的状态。 操作成功会有一个code **`0`**.* :::tip -Note that most changes are defined using the optional flags listed below. +请注意,大多数更改是使用下面列出的可选标注定义的。 ::: -#### Parameters Description +#### 参数说明 -- **`chain-id`** - The ID of the serviced chain (e.g., **`COS4`** or **`FTM250`**). To get the full list of available chains use: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. +- **`chain-id`** - 服务链的 ID(例如,**`COS4`** 或 **`FTM250`**)。 要获取可用链的完整列表,请使用: `lavap query spec show-all-chains --node {LAVA_RPC_NODE}`. -#### Flags Details +#### 标注详情 -- **`--from`** - The account to be used for the provider staking (e.g., **`my_account`**). -- **`--keyring-backend`** - A keyring-backend of your choosing (e.g., **`test`**). -- **`--chain-id`** - The chain_id of the network (e.g., **`lava-testnet-2`**). -- **`--gas`** - The gas limit for the transaction (e.g., **`"auto"`**). -- **`--gas-adjustment`** - The gas adjustment factor (e.g., **`"1.5"`**). -- **`--node`** - A RPC node for Lava (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). -- **`--amount`** - Provider stake amount. This is equivalent to the stake modifications TXs, so the `--validator` flag should be considered. -- **`--delegate-commission`** - Provider delegation commission (optional). -- **`--delegate-limit`** - Provider delegation limit (optional). -- **`--endpoints`** - Provider endpoints (optional). Need to follow the endpoints definition format as in the `stake-provider` command. -- **`--geolocation`** - Provider geolocation (optional). Can be set with `int32` value or string value ("`EU,US`"). -- **`--provider-moniker`** - Provider moniker (optional). -- **`--validator`** - Validator address for staking/unstaking when using the `--amount` flag (optional). If no validator is specified, the highest stake validator on which the provider is delegated to will be picked automatically. To view all the provider's delegations with the validators addresses use: `lavap query staking delegations [provider] --node {LAVA_RPC_NODE}`. Note that the validator address should be in a sdk.ValAddress format (`lava@valoper...`). +- **`--from`** - 用于提供商质押的账户 (e.g., **`my_account`**). +- **`--keyring-backend`** - 您选择的keyring后端 (e.g., **`test`**). +- **`--chain-id`** - 网络的chain_id (e.g., **`lava-testnet-2`**). +- **`--gas`** - 交易的 Gas 限额 (e.g., **`"auto"`**). +- **`--gas-adjustment`** - 燃料调节系数 (e.g., **`"1.5"`**). +- **`--node`** - Lava 的 RPC 节点 (e.g., **`https://public-rpc-testnet2.lavanet.xyz:443/rpc/`**). +- **`--amount`** - 提供者质押金额。 这相当于权益修改 TX,因此应考虑 `--validator`标识。 +- **`--delegate-commission`** - 提供商委托佣金(可选)。 +- **`--delegate-limit`** - 提供商委托限制(可选)。 +- **`--endpoints`** - 提供商端点(可选)。 需要遵循`stake-provider` 命令中的端点定义格式。 +- **`--geolocation`** - 提供商地理位置(可选)。 可以使用`int32` 值或字符串值("`EU,US`")进行设置。 +- **`--provider-moniker`** - 提供商名称(可选)。 +- **`--validator`** - 使用`--amount` 标识(可选)时用于质押/取消质押的验证器地址。 如果未指定验证者,将自动选择提供商委托的最高权益验证者。 要查看所有提供商的委托以及验证器地址,请使用:`lavap query stake delegates [provider] --node {LAVA_RPC_NODE}`。 请注意,验证器地址应采用 sdk.ValAddress 格式(`lava@valoper...`)。 -### Example +### 示例 ```bash lavap tx pairing modify-provider ETH1 \ @@ -631,20 +631,20 @@ lavap tx pairing modify-provider ETH1 \ --validator lava@valoper13w... \ ``` -## **FAQ** ❓ +## **常问问题** ❓ #### `lavap` not found -Make sure you downloaded/built the binary, and it is located in the path you use to run `lavap` commands, or you have it under /usr/local/bin or under PATH. You can download/build the binary with `sudo make install-all` from your cloned folder. +确保您下载/构建了二进制文件,并且它位于您用于运行 `lavap` 命令的路径中,或者您将它置于/usr/local/bin或path下。你可以使用`sudo make install-all`命令从你的克隆文件夹中下载/构建二进制文件。 #### Received error `account sequence mismatch` -Try to wait for a block_time (current=30s) and then run the command again +尝试等待一个block_time (current=30s),然后再次运行该命令 -#### How do I make changes? -It is possible for a provider to make changes in his on chain stake entry at any time, it is possible to do so by sending the same stake-provider tx we have used when first joining the network with the updated parameters. +#### 我该如何做出改变配置? +提供商可以在任何时候对其on chain stake条目进行更改,这可以通过发送我们第一次使用更新的参数加入网络时使用的相同的stake-provider tx来实现。 -It is also possible to use a convenience cli command wrapping it: +也可以使用一个方便的cli命令来包装它: ```bash lavad tx pairing modify-provider {SpecID} --from {WALLET} @@ -655,9 +655,9 @@ lavad tx pairing modify-provider {SpecID} --from {WALLET} # --provider-moniker "my-new-nickname" ``` -#### How do I unstake? {#unstake} +#### 我如何取消质押?{#unstake} -Run the following command: +运行以下命令: ``` lavap tx pairing unstake-provider "{NETWORK_NAME}" \\ @@ -680,23 +680,23 @@ lavap tx pairing unstake-provider "{NETWORK_NAME}" \\ #### Received error `dial tcp 127.0.0.1:26657: connect: connection refused` -In case you got the following error: +如果您遇到以下错误: ``` Error: post failed: Post "": dial tcp 127.0.0.1:26657: connect: connection refused ``` -It is likely that your node is not running, or has not joined the network, you can either join the network, -or run the command with the `--node` flag to use an external Lava RPC node +很可能你的节点没有运行,或者还没有加入网络,你可以加入网络, +或使用`--node` 标志运行命令以使用外部 Lava RPC 节点 #### Received error `sentry init failure to initialize error="provider stake verification mismatch` -In case you got the following error: +如果您遇到以下错误: ``` ERR sentry init failure to initialize error="provider stake verification mismatch -- &map[ChainID:NETWORK_NAME spec name:NETWORK_FULL_NAME]" ChainID=CHAIN_ID apiInterface=PROTOCOL ``` -It is likely that the stake-provider command was not taken into effect yet, if running the `lavap server` option, please wait a few minutes and try running the command again. +很可能是stake-provider命令尚未生效,如果运行`lavap server`选项,请等待几分钟,然后再次尝试运行该命令。 diff --git a/docs/provider/provider-tls.md b/docs/provider/provider-tls.md index e6ee49ed..0a8ebecc 100644 --- a/docs/provider/provider-tls.md +++ b/docs/provider/provider-tls.md @@ -1,46 +1,46 @@ --- slug: /provider-tls -title: TLS Setup +title: 设置 TLS --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Provider TLS Setup Guide +# 提供商 TLS 设置指南 :::caution -All providers on `lava-testnet-2` must use a domain name and TLS (1.3). You must have a domain name to continue. If you have not already, please take a moment to purchase one! You can find cheap top-level domains [here](https://www.namecheap.com/) or [here](https://tld-list.com/). +`lava-testnet-2` 上的所有提供程序都必须使用域名和 TLS (1.3)。您必须拥有一个域名才能继续。如果还没有,请花点时间购买一个!您可以在 [此处](https://www.namecheap.com/) 或 [此处](https://tld-list.com/) 找到便宜的顶级域名。 ::: -## 📊 Diagram +## 📊 图表 ![Provider TLS Diagram](/img/tutorial/provider/provider-tls-diagram.png) -## 📋 Prerequisites +## 📋 必备条件 -| Required Setup | ? | +| 必要设置 | ? | | --------------------------|-----| -| acquired a domain name | ✅ | -| `lavap` is installed & configured | ✅ | -| account with `ulava` balance | ✅ | +| 获得域名 | ✅ | +| 已安装和配置 `lavap | ✅ | +| 有 "ulava "余额的账户 | ✅ | -## 📝 Written Guide (~45m) +## 📝 书面指南 (~45m)
-### 🅰️ Change the A Record on your Domain +### 🅰️ 更改域名的 A 记录 -The first step of establishing your Provider is to modify some of the DNS settings on the domain you purchased. In specific, you'll need to change the A Records on your domain. Changing your `A-Record` will create a subdomain that routes traffic to a specific provider process. Depending upon who you've purchased your domain through, A-Records may be visible under `Advanced DNS` or another label. +建立 Provider 的第一步是修改您所购买域名的一些 DNS 设置。具体来说,您需要更改域名上的 A 记录。更改 "A-Record "将创建一个子域,将流量路由到特定的提供商进程。A-Record可能在 "Advanced DNS"(高级 DNS)或其他标签下可见,具体取决于您通过谁哪个域名供应商购买域名。 -
🖧 Multiple Records (Recommended) +
🖧 多个记录 (Recommended) -We recommend you create a separate `A-Record` for each one of the chains that you plan to support. This is more secure, as the default behavior is to refuse connection unless a consumer connects on the correct subdomain. +我们建议您为计划支持的每个链创建一个单独的 "A-Record"。这样会更安全,因为默认行为是拒绝连接,除非消费者在正确的子域上进行连接。 -For each chain you want to support, add an `A-Record` with the desired chain name as the `Host`, the `Value` will be your server IP. -For example, if you wanted to support Ethereum & Lava Mainnets, Your DNS Settings should include the following : +为您要支持的每个链添加一个`A-Record`,将所需的链名作为`Host`,`Value`将是您的服务器 IP。 +例如,如果您想支持以太坊和 Lava 主网,您的 DNS 设置应包括以下内容 : | Record Type | Host | Value | | ------------------|-------| ----- | @@ -49,9 +49,9 @@ For example, if you wanted to support Ethereum & Lava Mainnets, Your DNS Setting
-
⚀ Single Record +
⚀ 单个记录 -Alternatively, you can create one `A-Record` that captures traffic to all sub-domains. If you are supporting a large number of chains that frequently changes, doing this may somewhat simplify your process. +或者,您也可以创建一个 `A-Record` 来捕获所有子域的流量。如果您要支持大量经常变化的链,这样做可能会在一定程度上简化流程。 | Record Type | Host | Value | |-------------------|------|-------| @@ -60,11 +60,11 @@ Alternatively, you can create one `A-Record` that captures traffic to all sub-do

-### 📂 Install Required Dependencies +### 📂 安装所需的依赖项 -We will guide you on setting up and configuring Nginx to use a TLS certificate and handle connections to different provider processes. It is also possible to use alternative solutions for these two tasks, such as Caddy, Envoy or your preferred solution. +我们将指导您设置和配置 Nginx,使其使用 TLS 证书并处理与不同提供商进程的连接。您也可以使用其他解决方案来完成这两项任务,如 Caddy、Envoy 或您喜欢的解决方案。 -Run the following commands to install the required packages: +运行以下命令安装所需的软件包: ```bash sudo apt update @@ -73,29 +73,29 @@ sudo apt install certbot net-tools nginx python3-certbot-nginx -y
-### 📮 Generate Certificate +### 📮 创建证书 -Next, we need to actually create the `TLS certificate` via the certifying authority. This process is automated by `certbot`. +接下来,我们需要通过认证机构实际创建`TLS certificate` 。这个过程由 `certbot` 自动完成。 -Use `certbot` to create a certificate: +使用 `certbot` 创建证书: ``` sudo certbot certonly -d you.xyz -d lava.you.xyz -d eth.you.xyz ``` -Note, you will need one `-d` flag for each subdomain you created as an `A-Record`. Even if you opted to create a Single Record, you still need to indicate a subdomain for each provider process you will run. We use the filler `you.xyz` as an example above. +请注意,您将需要为作为`A-Record`创建的每个子域添加一个`-d` 标志。即使您选择创建单个记录,您仍需要为将要运行的每个提供程序指明一个子域。我们以上面的填充程序 `you.xyz` 为例。 -You may be met with several prompts. Use `nginx` or Nginx Web Server Plugin when asked. +你可能会遇到几个提示。在出现提示时,请使用 `nginx` 或 Nginx 网络服务器插件。
-### 💻 Validate Certificate +### 💻 验证证书 -Let's make sure your certificate successfully installed! ✅ Input the following command: +确保证书安装成功!✅ 输入以下命令: ```sudo certbot certificates``` -Keep track of your output. If your certificate generation was successful, it should look as following: +跟踪输出结果。如果证书生成成功,它应该如下所示: ``` Found the following certs: @@ -107,16 +107,16 @@ Found the following certs: ``` -You'll need both `Certificate Path` and `Private Key Path` for your next step. +下一步需要`Certificate Path`和`Private Key Path` 。
-### 🗃️ Add an Nginx Config for Each Domain +### 🗃️ 为每个域添加 Nginx 配置 -Lava recommends running each chain under a separate provider process. This will separate error logs and protect against complete provider failure in the case of a problematic provider process. The first step of this is to create different nginx routes for each chain. +Lava 建议在单独的提供程序进程下运行每个链。这将分离错误日志,并在提供程序出现问题时防止提供程序完全失效。第一步是为每个链创建不同的 nginx 路由。 -For each chain that you want to support, you will need to create a separate `nginx` config file. -`cd` into `/etc/nginx/sites-available/` and create a `server` file for each chain. You will need to select an open port for each chain. `Nginx` will use these config files to create your routes. +对于要支持的每个链,都需要创建单独的 `nginx` 配置文件。 +`cd`到`/etc/nginx/sites-available/`,并为每个链创建一个`server`文件。你需要为每个链选择一个开放端口。Nginx会使用这些配置文件创建路由。 @@ -167,7 +167,7 @@ server { :::warning -The below caddy example is to provide guidance only. The recommended route is through `nginx`. Although making a provider functional with Caddy is possible you are proceeding at your own risk and with your own expertise. +以下caddy示例仅供参考。推荐路线是通过 `nginx`。虽然可以使用 Caddy 实现提供商功能,但风险和专业知识需自行承担。 ::: @@ -189,27 +189,27 @@ https://your-site.com:443 { -In most cases, after creating a configuration file in accessible sites, you need to create a symbolic link to this file in the enabled sites directory. This can be done with a command like: +大多数情况下,在可访问站点中创建配置文件后,需要在启用站点目录中创建该文件的符号链接。可以使用以下命令来完成 ``` sudo ln -s /etc/nginx/sites-available/lava_server /etc/nginx/sites-enabled/lava_server ``` :::caution -The above examples use ports `443` for external listening and `2223` / `2224` for internal comms, respectively. Using ports other than `443` for external listening means that some users will not be able to connect to your provider. This can result in less rewards and poorer quality of service. For internal listening, be aware that some ports on your OS may be used for internal communication and should be avoided. +上述示例分别使用端口 `443` 进行外部监听,使用端口 `2223` / `2224` 进行内部通信。将端口 `443` 以外的端口用于外部监听意味着一些用户将无法连接到您的提供商。这会导致奖励减少和服务质量下降。对于内部监听,请注意操作系统上的某些端口可能用于内部通信,应避免使用。 :::
-### 🧪 Test Nginx Configuration +### 🧪 测试 Nginx 配置 -Now, ensure that your `nginx` setup is working! ✅ +现在,请确保您的 `nginx` 设置正常运行! ✅ ```bash sudo nginx -t ``` -🖳 Expected Output: +🖳 预期输出: ``` nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -217,23 +217,23 @@ nginx: configuration file /etc/nginx/nginx.conf test is successful
-### ♻️ Restart Nginx +### ♻️ 重启 Nginx -You will need to refresh the Nginx server: +您需要刷新 Nginx 服务器: ```bash sudo systemctl restart nginx ```
-### ⚙️ Create the Provider Configuration +### ⚙️ 创建提供商配置 :::tip -Need a template? A default `rpcprovider.yml` configuration is available in `~/lava/config` +需要模板?默认的 `rpcprovider.yml` 配置位于 `~/lava/config` 中。 ::: -Per earlier advisement, we'll create one `.yml` per chain we plan to support. Each one of these `.yml` files will function as the configuration for a distinct provider process. In case of our example, we'll create a `lava-provider.yml` and a `eth-provider.yml`. +根据之前的建议,我们将为计划支持的每个链创建一个 `.yml`。每个 `.yml` 文件都将作为不同提供程序的配置文件。在我们的示例中,我们将创建一个 `lava-provider.yml` 和一个 `eth-provider.yml` 。 @@ -288,50 +288,50 @@ endpoints: -Once we've created these files we can move onto starting the processes! +创建完这些文件后,我们就可以开始启动进程了!
-### 🏁 Start the Provider Process(es) +### 🏁 启动提供商进程 -In this example, we use the built-in terminal multiplexer `screen` to run multiple provider processes. Begin by typing `screen`. But you can also use a different multiplexer, e.g. `tmux`. +在这个例子中,我们使用内置的终端多路复用器`screen`来运行多个provider进程。首先输入`screen`。但是你也可以使用不同的多路复用器,例如 `tmux`。 -⏫ To start the Ethereum process +⏫ 启动以太坊进程 ```bash screen -S eth-provider -# This will take us to a separate terminal where we can start the provider process: +# 这将把我们带到一个单独的终端,在这里我们可以启动provider进程: lavap rpcprovider eth-provider.yml --from your_key_name_here --geolocation 1 --chain-id lava-testnet-2 --log_level debug ``` -Press `CTRL+ad` to detach from the `eth-provider` screen.
-⏫ To start the Lava provider process +按`CTRL+ad`从`eth-provider`Screen分离。
+⏫ 启动 Lava provider 进程 ```bash screen -S lava-provider -# This will take us to a separate terminal where we can start the provider process: +# 这将把我们带到一个单独的终端,在这里我们可以启动provider进程: lavap rpcprovider lava-provider.yml --from your_key_name_here --geolocation 1 --chain-id lava-testnet-2 --log_level debug ``` -Some notes: -* `--from` should be followed by the key name of your funded account that you will use to stake your provider -* `--log_level debug` gives us verbose output so we can diagnose any issues that may arise -* `--chain-id` may or may not be necessary, depending upon your setup, but we can default to `--lava-testnet-2` -* `--node` may or may not be necessary +一些注意事项: +* `——from`后面应该跟着您的资金账户的名称,您将使用该名称来质押您的提供商 +* `——log_level debug`为我们提供详细的输出,以便我们可以诊断可能出现的任何问题 +* `——chain-id`可能是必要的,也可能不是,这取决于你的设置,但我们可以默认为`——lava-testnet-2` +* `——node`可能是也可能不是必需的 :::caution -The syntax on your `.yml` files must be precise. Misplaced or invisible characters or inconsistent indentation can cause errors. +您的 `.yml` 文件语法必须精确。错位、隐形字符或缩进不一致都可能导致错误。 :::
-### ☑️ Test the Provider Process! +### ☑️ 测试提供商进程 -Run the following commands one at a time! +逐次运行以下命令! `lavap test rpcprovider --from your_key_name_here --endpoints "your-site:443,LAV1"` -🖳 Expected output: +🖳 预期输出: ``` 📄----------------------------------------✨SUMMARY✨----------------------------------------📄 @@ -352,7 +352,7 @@ Run the following commands one at a time! `lavap test rpcprovider --from your_key_name_here --endpoints "your-site:443,ETH1"` -🖳 Expected output: +🖳 预期输出: ``` 📄----------------------------------------✨SUMMARY✨----------------------------------------📄 @@ -369,9 +369,9 @@ Run the following commands one at a time! ``` -### 🔗‍💥 Stake the Provider on Chain +### 🔗‍💥 链上质押提供商 -Use a variation of the following command to stake on chain; the minimum stake is `50000000000ulava` +使用以下命令对链进行质押;最小质押为 `50000000000ulava` ```bash lavap tx pairing stake-provider ETH1 "50000000000ulava" "eth.your-site:443,1" 1 -y --from your_key_name_here --provider-moniker your-provider-moniker-1 --gas-adjustment "1.5" --gas "auto" --gas-prices "0.0001ulava" @@ -381,18 +381,18 @@ lavap tx pairing stake-provider ETH1 "50000000000ulava" "eth.your-site:443,1" 1 lavap tx pairing stake-provider LAV1 "50000000000ulava" "lava.your-site:443,1" 1 -y --from your_key_name_here --provider-moniker your-provider-moniker-1 --gas-adjustment "1.5" --gas "auto" --gas-prices "0.0001ulava" ``` -### ☑️ Test the Providers again! +### ☑️ 再次测试供应商! ```bash lavap test rpcprovider --from your_key_name_here --endpoints "lava.your-site:443,LAV1" lavap test rpcprovider --from your_key_name_here --endpoints "eth.your-site:443,ETH1" ``` -You can also get useful information on the setup using: +您还可以通过以下方式获取有关设置的有用信息: ```bash lavap q pairing account-info --from your_key_name ``` -❗ If you have any further issues, do not hesitate to venture to our [discord](https://discord.com/invite/Tbk5NxTCdA) where you can get better assistance! +❗ 如果您还有其他问题,请随时访问我们的 [discord](https://discord.com/invite/Tbk5NxTCdA),在那里您可以获得更好的帮助! From e8464b3da5ce23a8365ac8f8f34a6c2f07e24237 Mon Sep 17 00:00:00 2001 From: polibee <1244762327@qq.com> Date: Mon, 26 Feb 2024 13:55:51 +0800 Subject: [PATCH 5/5] Translation review --- CONTRIBUTING.md | 88 ++++---- README.md | 57 +++-- docs/chains/chains.mdx | 4 +- docs/developer/developer.md | 32 +-- docs/developer/endpoints/iprpc.md | 6 +- docs/developer/endpoints/public-rpc.md | 12 +- docs/developer/gateway/gateway-access.md | 22 +- .../gateway/gateway-getting-started.md | 34 +-- docs/developer/integrations/cosmjs.md | 2 +- docs/developer/integrations/ethersjs5.md | 2 +- docs/developer/integrations/ethersjs6.md | 2 +- .../integrations/sdk-integrations.md | 62 ++--- docs/developer/integrations/viem.md | 2 +- docs/developer/integrations/web3js.md | 2 +- docs/developer/sdk/access-sdk.md | 24 +- docs/developer/sdk/examples/all-blocks-app.md | 8 +- docs/developer/sdk/examples/lava-bazaar.md | 84 +++---- .../sdk/examples/lava-sdk-gallery.md | 42 ++-- .../sdk/examples/sdk-multichain-example.md | 2 +- docs/developer/sdk/sdk-backend.md | 41 ++-- docs/developer/sdk/sdk-frontend.md | 36 +-- docs/developer/sdk/sdk-getting-started.md | 54 ++--- docs/developer/sdk/sdk-prerequisites.md | 4 +- .../developer/server-kit/access-server-kit.md | 18 +- docs/intro/about.md | 2 +- docs/intro/faq.md | 2 +- docs/intro/specs/add-spec.md | 18 +- docs/intro/specs/spec-guide.md | 66 +++--- docs/intro/specs/spec-reference.md | 4 +- docs/intro/specs/spec.md | 22 +- docs/lava-blockchain/badge-server.md | 64 +++--- docs/lava-blockchain/faucet.mdx | 22 +- docs/lava-blockchain/hardware-requirements.md | 48 ++-- docs/lava-blockchain/install-lava.md | 54 ++--- docs/lava-blockchain/join-testnet-auto.md | 51 +++-- .../join-testnet-manual-cosmovisor.md | 121 +++++----- docs/lava-blockchain/join-testnet-manual.md | 159 +++++++------ docs/lava-blockchain/join-testnet.md | 6 +- docs/lava-blockchain/subscriptions.md | 83 ++++--- docs/lava-blockchain/wallet.mdx | 142 ++++++------ docs/provider/lavavisor/lavavisor-services.md | 78 +++---- docs/provider/lavavisor/lavavisor-wrap.md | 55 ++--- docs/provider/lavavisor/lavavisor.md | 32 ++- docs/provider/provider-features.mdx | 166 +++++++------- docs/provider/provider-improve-service.md | 212 +++++++++--------- docs/provider/provider-setup.md | 6 +- docs/provider/provider-tls.md | 6 +- docs/provider/provider.md | 55 +++-- docs/validator/validator-auto.md | 58 ++--- docs/validator/validator-manual.md | 53 ++--- docs/validator/validator-rejoin.md | 58 ++--- docs/validator/validator.md | 20 +- 52 files changed, 1145 insertions(+), 1158 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 074bd168..39be2e70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,77 +1,77 @@ -# Welcome to Lava docs contributing guide +# 欢迎来到Lava文档贡献指南 -> First of all - THANK YOU for taking the time to contribute! 🌋👍 +> 首先-感谢您花时间贡献! 🌋👍 -This website is built using [Docusaurus 2](https://docusaurus.io/), all your changes will be reflected on Lava Docs @ [docs.lavanet.xyz](https://docs.lavanet.xyz) +本网站是使用[Docusaurus 2](https://docusaurus.io/)建立的,您的所有更改将反映在Lava Docs @ [docs.lavanet.xyz](https://docs.lavanet.xyz)上。 -### How can you help 💪? -1. Report an issue/mistake you found -2. Suggest a fix via PR (read below) -3. Want to add new content/tutorials? Please propose it first via a new issue, and only then write it up, to save you time +### 你能帮什么忙? 💪? +1. 报告你发现的问题/错误 +2. 通过PR提出修复建议(请阅读下文) +3. 想要添加新的内容/教程?请先通过New issue提出,然后再写出来,这样可以节省时间 -In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. +在本指南中,您将获得从打开问题,创建PR,审查和合并PR的贡献工作流程的概述。 -## New contributor guide +## 新贡献者指南 -To get an overview of Lava, read the [Docs Intro](/docs/intro.md). +要获得Lava的概述,请阅读[Docs简介](/docs/intro.md)。 -This repository aligns with best practices for contributing to open source as you will find in many repositories on GitHub. If you are not familiar with these, please start with these great resources: +这个存储库符合为开源做出贡献的最佳实践,就像你在GitHub上的许多存储库中发现的那样。如果你不熟悉这些,请从这些伟大的资源开始: - [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) - [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) - [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) - [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) -## Styleguide -Lava docs serves multiple user types in different lifecycle steps. -We want to create a doc resource that will fit all, but have a common denominator of style. +## 格式指南 +Lava docs在不同的生命周期步骤中为多种用户类型提供服务。 +我们想创建一个文档资源,它将适合所有人,但有一个共同的风格。 -Styleguides are guidance and not a restriction, good articles we picked for this purpose are: -- When it comes to git opeartions, we recommend https://cbea.ms/git-commit/ -- When it is docs actual content, we recommend https://medium.com/larimaza-en/how-to-write-good-documentation-e19c70dc67f0 +风格指南是指导而不是限制,为此我们挑选的好文章有: +- 当涉及到git操作时,我们建议 https://cbea.ms/git-commit/ +- 当它是文档实际内容时,我们推荐 https://medium.com/larimaza-en/how-to-write-good-documentation-e19c70dc67f0 -## Getting started +## 开始 ### Issues -#### Create a new issue +#### 创建 new issue -If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/lavanet/docs/issues/new/choose). +如果你发现了文档中的问题,[如果问题已经存在,请搜索](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments)。如果相关的问题不存在,您可以使用相关的[问题表单](https://github.com/lavanet/docs/issues/new/choose)打开一个新问题。 -#### Solve an issue +#### 解决 issue -Scan through our [existing issues](https://github.com/lavanet/docs/issues) to find one that interests you. You can narrow down the search using `labels` as filters. If you find an issue to work on, you are welcome to open a PR with a fix. +浏览我们的[现有问题](https://github.com/lavanet/docs/issues),找到一个您感兴趣的。你可以使用`labels`作为过滤器来缩小搜索范围。如果你发现了一个需要解决的问题,欢迎你打开一个修复的PR。 -### Make Changes +### 做出更改 -#### Make changes to content +#### 修改内容 -Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and create a pull request for a review. +点击任何文档页面底部的**贡献代码** (**Make a contribution**),进行一些小的更改,例如拼写错误、句子修复或链接损坏。这将带你到`。Md `文件,您可以在其中进行更改并创建一个pull request以进行审查。 -#### Make changes locally +#### 在本地进行修改 -1. Install Git -2. Fork the repository -3. Clone it to your working space -4. Run a local version using `$ yarn start` -5. Create a working branch and start with your changes! +1. 安装 Git +2. Fork仓库 +3. 克隆到你的工作空间 +4. 使用`$ yarn start`运行本地版本 +5. 创建一个工作分支并开始修改! ### Commit & Pull Request -Commit the changes once you are happy with them. +一旦你对修改感到满意,就提交修改。 -When you're finished with the changes, create a pull request, also known as a PR. -- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request. -- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one. -- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. -Once you submit your PR, a team member will review your proposal. We may ask questions or request for additional information. -- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. -- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). -- If you run into any merge issues, checkout this [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) to help you resolve merge conflicts and other issues. +当你完成更改时,创建一个pull request,也称为PR。 +- 请填写“Ready for review”模板,以便我们审查你的PR。该模板可以帮助审查人员了解你的更改以及你的pull request的目的。 +- 如果你正在解决一个问题,不要忘记[链接PR到issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)。 +- 将复选框启用为[允许维护者编辑](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork),以便可以更新分支以进行合并。 + 一旦你提交了你的PR,团队成员将审查你的提案。我们可能会问问题或要求更多的信息。 +- 我们可以使用[建议更改](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request)或pull request注释要求在合并PR之前进行更改。您可以直接通过UI应用建议的更改。您可以在分支中进行任何其他更改,然后将它们提交到分支。 +- 当您更新PR并应用更改时,将每个对话标记为[resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations)。 +- 如果您遇到任何合并问题,请查看[git教程](https://lab.github.com/githubtraining/managing-merge-conflicts),以帮助您解决合并冲突和其他问题。 -### Your PR is merged! +### 你的 PR 已被 merged! -Congratulations 🦸 Lava thanks you 🌋🙏. +祝贺🦸,Lava感谢你🌋🙏。 -Once your PR is merged, your contributions will be publicly visible on the [Lava Docs](https://docs.lavanet.xyz) +一旦你的PR被合并,你的贡献将在[Lava Docs](https://docs.lavanet.xyz)上公开可见。 -_Thanks goes to [GitHub Docs](https://github.com/github/docs) for inspiration on writing this contribution text_ \ No newline at end of file +_感谢[GitHub Docs](https://github.com/github/docs)获取撰写本文的灵感_ \ No newline at end of file diff --git a/README.md b/README.md index 06f43a3b..fa2c63c0 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,41 @@ ![Banner](static/img/banner/Chains.jpg) -# Lava Documentation 📕 +# Lava 文档 📕 [![Website](https://img.shields.io/badge/WEBSITE-https%3A%2F%2Fdocs.lavanet.xyz-green?style=for-the-badge)](https://docs.lavanet.xyz)   [![Discord](https://img.shields.io/discord/963778337904427018?color=green&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/EKzbc6bx) -## Overview 🔎 +## 概览 🔎 -This repository (**@lavanet/docs**) contains technical documentation for the Lava ecosystem. The most recent version of this repository is deployed to the Lava docs [website](https://docs.lavanet.xyz/) and is viewable there. If you're averse to rich formatting, Lava Documentation can also be browsed as plain source in the markdown files available in the [docs folder](/docs/) of this repository. The Lava docs website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator, and deployed using the [Netlify Web Platform](https://www.netlify.com/). +这个仓库 (**@lavanet/docs**) 包含了 Lava 生态系统的技术文档。该仓库的最新版本已部署到 Lava 文档 [网站](https://docs.lavanet.xyz/) 并可在那里查看。如果你不喜欢丰富的格式,Lava 文档也可以在该仓库的 [docs 文件夹](/docs/) 中的 markdown 文件中以纯源码形式浏览。Lava 文档网站是使用 [Docusaurus 2](https://docusaurus.io/),一种现代静态网站生成器构建的,并使用 [Netlify Web 平台](https://www.netlify.com/) 部署的。 -Contents include: +内容包括: -- Information on Lava's supported chains -- Installation & Setup Guides for Validators, Providers, and Developers -- Network & Protocol Details on Lava's Unique Features -- Links to in-demand RPC & Web3 APIs +-Lava支持链的信息 +-针对验证者、提供者和开发人员的安装和设置指南 +-关于Lava独特功能的网络和协议细节 +-到需要的RPC和Web3 api的链接 -## Contribution 👥 +## 贡献 👥 -Contributing to the documentation of Lava is a rewarding way to give back to the ecosystem. We always welcome contributors with love & kindness. After reviewing this README, please read the [contribution](CONTRIBUTING.md) guide to help you get started. +对Lava的记录做出贡献是回报生态系统的一种有益的方式。我们总是以爱心和善意欢迎贡献者。在审阅完这个自述文件后,请阅读[contribution](CONTRIBUTING.md)指南以帮助您开始。 -## Deployment 🚀 +## 部署 🚀 -### Status +### 状态 [![Netlify Status](https://api.netlify.com/api/v1/badges/58c0a448-7af0-48d3-8e29-86fc4a6f4868/deploy-status)](https://app.netlify.com/sites/sage-swan-13ac7b/deploys) -### Process -The `main` branch of this repository is automatically deployed to our docs site, and other branches and pull requests leverage Netlify deploy. Please note that unless you are a recognized contributor of this repository, each attempted PR generates a Netlify approval that will prevent your pull request from being merged. Once the request is approved and a Netlify deploy preview is generated, a Netlify deploy preview will appear in the body of your PR as `😎 Deploy Preview`. This deploy preview will be audited by a docs maintainer before merging your pull request. +### 处理 +这个仓库的`main`分支自动部署到我们的文档站点,其他分支和pull请求利用Netlify deploy。请注意,除非您是此存储库的公认贡献者,否则每次尝试PR都会生成一个Netlify批准,以防止您的pull request被合并。一旦请求被批准并生成一个Netlify部署预览版,一个Netlify部署预览版将出现在你的PR主体中,名为 `😎 Deploy Preview`。这个部署预览将由文档维护者在合并你的pull request之前进行审计。 +## 本地开发 🔧 -## Local Development 🔧 +### 1. 分叉该版本库! -### 1. Fork this repository! +我们建议将您的 fork 命名为 `lava-docs`,以区别于其他可能有类似命名约定的项目。 -We recommend naming your fork `lava-docs` to distinguish from other projects which might have similar naming conventions. - -### 2. Clone your fork +### 2. 克隆你的分叉 SSH **(recommended)** @@ -50,14 +49,14 @@ HTTPS git clone https://github.com/Your-User-Name-Here/lava-docs.git ``` -### 3. Set up environmental variables +### 3. 设置环境变量 ```bash cd lava-docs/ cp .env.example .env ``` -Change the contents of your environmental variables(`.env`) file to the following: +将环境变量(`.env`)文件的内容更改为以下内容: ``` ALGOLIA_APP_ID=demo @@ -65,33 +64,33 @@ ALGOLIA_API_KEY=demo ALGOLIA_INDEX_NAME=demo ``` -Algolia search needs values assigned to these in order to start. For local docs instances (w/ non-functional search), any dummy values will work. +Algolia 搜索需要为这些值赋值才能启动。对于本地文档实例(无功能搜索),任何虚值都可以使用。 -### 4. Install all packages +### 4. 安装所有软件包 ``` yarn install ``` -### 5. Host a local preview of the docs (*Optional*) +### 5. 在本地预览文档(*可选*)。 ``` yarn start ``` -Your preview will dynamically change/hotload as you make changes to files. +当你对文件进行修改时,预览会动态更改/热载。 -### 6. Build a local deployment of the docs (*Optional*) +### 6. 构建文档的本地部署(*可选*)。 ``` yarn build ``` -Your build will appear in the `./build/` folder of your docs directory. +您的构建将出现在文档目录下的 `./build/` 文件夹中。 -### 7. Deploy to Github (*Optional*) +### 7. 部署到 Github(*可选*)。 -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. +如果使用 GitHub 页面托管,该命令可以方便地构建网站并推送到 `gh-pages` 分支。 ``` $ GIT_USER= yarn deploy diff --git a/docs/chains/chains.mdx b/docs/chains/chains.mdx index 4aebf032..8d7ad1ca 100644 --- a/docs/chains/chains.mdx +++ b/docs/chains/chains.mdx @@ -12,9 +12,9 @@ import DocCardList from '@theme/DocCardList'; ❓ 你在寻找这里列出的其他链吗? -提出[**区块链集成请求**](https://lavanet.upvoty.com/b/blockchain-integration-request/)! +提交[**区块链集成请求**](https://lavanet.upvoty.com/b/blockchain-integration-request/)! -🔗 你可以在我们的[* *网关* *](https://gateway.lavanet.xyz/?utm_source=chains-page&utm_medium=docs&utm_campaign=docs-to-gateway)上获取这些链的RPC端点,我们在这里托管一些链的[* *公共RPC* *](/public-rpc#incentivized-public-rpc-) 。 +🔗 你可以在我们的[**网关**](https://gateway.lavanet.xyz/?utm_source=chains-page&utm_medium=docs&utm_campaign=docs-to-gateway)上获取这些链的RPC端点,我们在这里托管一些链的[**公共RPC**](/public-rpc#incentivized-public-rpc-) 。 :::caution 进行中的工作 diff --git a/docs/developer/developer.md b/docs/developer/developer.md index 1705ddb4..830b827f 100644 --- a/docs/developer/developer.md +++ b/docs/developer/developer.md @@ -1,35 +1,35 @@ --- slug: /developer -title: Developers 💻 +title: 开发者 💻 --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Developers 💻 +# 开发者 💻 ![Web3 APIs Banner](/img/banner/Web3-APIs-80ba1f766f734b558f0b6d6bff488630.jpg) -## Role 👤 +## 角色 👤 -The role of **Developers** in the Lava Network: -- consume APIs on the network via the Lava Gateway -- making contributions by maintaining and developing specifications for new blockchains and APIs -- writing code or debugging issues that contributes to the Lava blockchain (based in CosmosSDK) -- building dApps and platforms which use LavaSDK or ServerKit (`RPCConsumer`) +Lava 网络中**开发人员**的角色: +- 通过 Lava 网关在网络上消耗 API +- 通过维护和开发新的区块链和 API 规范来做出贡献 +- 编写代码或调试问题,为 Lava 区块链(基于 CosmosSDK)做出贡献 +- 构建使用 LavaSDK 或 ServerKit (`RPCConsumer`) 的 dApps 和平台 -## Use-Cases 🧩 +## 用例 🧩 -| App Type | Intention | Recommended Interface | -|--------------|-----------|------------| -| Front-End | building a dApp, smart contract, or NFT project | [Lava Gateway](/gateway-access), [Lava SDK](/access-sdk) | -| Back-End | creating microservices, clients, daemons, or tooling | [Lava SDK](/access-sdk) or [Server Kit](/access-server-kit)| -Gateway / Portal | self-hosting a centralized point for high throughput Lava P2P network access | [Server Kit](/access-server-kit) +| App 类型 | Intention | 推荐接口 | +|------------------|------------------------------------|----------------------------------------| +| Front-End | 构建dApp,智能合约或者NFT项目 | [Lava Gateway](/gateway-access), [Lava SDK](/access-sdk) | +| Back-End | 创建微服务、客户端、守护进程或工具 | [Lava SDK](/access-sdk) or [Server Kit](/access-server-kit) | + Gateway / Portal | 自我托管高吞吐量 Lava P2P 网络访问的集中点 | [Server Kit](/access-server-kit) -## Quick Start +## 快速开始 -### 🌋 Gateway +### 🌋 网关 [](https://gateway.lavanet.xyz/) diff --git a/docs/developer/endpoints/iprpc.md b/docs/developer/endpoints/iprpc.md index 111f47df..2da226cf 100644 --- a/docs/developer/endpoints/iprpc.md +++ b/docs/developer/endpoints/iprpc.md @@ -3,11 +3,11 @@ slug: /iprpc title: ipRPC 🔥 --- -# Incentivized Public RPC (ipRPC) +# 受激励的公共 RPC(ipRPC) -## Overview 🔎 +## 概览 🔎 -Lava works with various blockchains to establish **Incentivized Public RPC (ipRPC) endpoints**. ipRPC endpoints are given unified URLs serviced by diverse providers of each chain's ecosystem. Providers are paid by those respective ecosystems to offer their services and developers benefit from the availability of highly-serviced endpoints unified through a single URL. +Lava 与各种区块链合作,建立**激励公共 RPC (ipRPC)端点**。ipRPC 端点被赋予统一的 URL,由各链生态系统的不同提供商提供服务。提供商由各自的生态系统付费提供服务,开发人员则可从通过单个 URL 统一的高服务端点中获益。
diff --git a/docs/developer/endpoints/public-rpc.md b/docs/developer/endpoints/public-rpc.md index aad8ef0d..c8713350 100644 --- a/docs/developer/endpoints/public-rpc.md +++ b/docs/developer/endpoints/public-rpc.md @@ -1,11 +1,11 @@ --- slug: /public-rpc -title: Lava Public RPC 🌋 +title: Lava 公共 RPC 🌋 --- -# Lava Public RPC (Testnet-2) +# Lava 公共 RPC (Testnet-2) -## Official Endpoints ⭕ +## 官方端点 ⭕ | Service 🔌 | URL 🔗 | Protocol | |--------|-------|-------- | @@ -13,16 +13,16 @@ title: Lava Public RPC 🌋 | 🟢 rest | https://rest-public-rpc.lavanet.xyz:443 | HTTP/1.1 | | 🟢 grpc | public-rpc-testnet2.lavanet.xyz:9090 | HTTP/2 | -## Incentivized Public RPC 💫 +## 激励公共 RPC 💫 ✴️[**Starknet**](https://www.lavanet.xyz/get-started/starknet?utm_source=public-rpc-page&utm_medium=docs&utm_campaign=starknet-iprpc-dev) ✴️[**Axelar**](https://www.lavanet.xyz/get-started/axelar?utm_source=public-rpc-page&utm_medium=docs&utm_campaign=axelar-iprpc-dev) ✴️[**Evmos**](https://www.lavanet.xyz/get-started/evmos?utm_source=public-rpc-page&utm_medium=docs&utm_campaign=evmos-iprpc-dev) -## Community / Testnet Services 🧑🏾‍🤝‍🧑🏾 +## 社区 / 测试网服务 🧑🏾‍🤝‍🧑🏾 :::info -Community Pages are provided by members of our community and not monitored/managed by Lava. +社区页面由社区成员提供,并非由 Lava 监控/管理。 ::: - ✨[AKNodes](https://services.aknodes.com/testnet/lava) diff --git a/docs/developer/gateway/gateway-access.md b/docs/developer/gateway/gateway-access.md index 312c206f..ccda3808 100644 --- a/docs/developer/gateway/gateway-access.md +++ b/docs/developer/gateway/gateway-access.md @@ -1,21 +1,21 @@ --- slug: /gateway-access -title: Gateway +title: 网关 --- -# Lava Gateway +# Lava 网关 -🌋 **Easy, self-serve access to any Web3 API, straight from the web browser, the Lava way 😉** +**🌋 通过 Lava 方式,直接从 Web 浏览器轻松自助访问任何 Web3 API 😉** -The **Lava Gateway** is a simplified web interface that gives developers instant access to blockchain data. The Gateway uses our Server Kit to provide a hosted point of access for developers looking for RPC through the Lava Network. This allows users to manage and configure Web3 APIs through an intuitive controls directly from the browser. While the Lava Server Kit and SDK give greater control and permissionlessness, the Lava Gateway provides the same access to our underlying network with additional niceties such as project management tools and user accounts. This means anyone, regardless of technical acumen, can easily use Lava. +**Lava Gateway** 是一个简化的网络接口,可让开发人员即时访问区块链数据。该网关使用我们的服务器工具包(Server Kit),为通过 Lava 网络寻找 RPC 的开发人员提供托管访问点。这样,用户就可以直接从浏览器通过直观的控件管理和配置 Web3 API。Lava Server Kit 和 SDK 可提供更强的控制能力和无权限性,而 Lava Gateway 则可提供与我们的底层网络相同的访问权限,并提供项目管理工具和用户账户等附加功能。这意味着任何人,无论技术能力如何,都可以轻松使用 Lava。 -### Features +### 功能 -1. Easy and intuitive interface for API access -2. Organize access by project -3. Example calls for each supported chain +1. 简单直观的 API 访问界面 +2. 按项目组织访问 +3. 各支持链的调用示例 --- -Hop on to our [gateway](https://gateway.lavanet.xyz/login?utm_source=gateway-access-page&utm_medium=docs&utm_campaign=docs-to-gateway) and access one of these chains now: +请登录我们的 [网关](https://gateway.lavanet.xyz/login?utm_source=gateway-access-page&utm_medium=docs&utm_campaign=docs-to-gateway),现在就访问这些链之一: ![Gateway Chains](/img/supportedchains.png) @@ -23,6 +23,6 @@ Hop on to our [gateway](https://gateway.lavanet.xyz/login?utm_source=gateway-acc -:::tip Missing a chain? -Lava is built to quickly scale to many new chains, and the team is constantly working on that. Please help us prioritize by telling us what you need on our Discord. +:::tip 缺少链? +Lava 可以快速扩展到许多新链,团队一直在为此努力。请在 Discord 上告诉我们您的需求,帮助我们确定优先级。 ::: \ No newline at end of file diff --git a/docs/developer/gateway/gateway-getting-started.md b/docs/developer/gateway/gateway-getting-started.md index 7e0e79bb..127e433e 100644 --- a/docs/developer/gateway/gateway-getting-started.md +++ b/docs/developer/gateway/gateway-getting-started.md @@ -1,12 +1,12 @@ --- slug: /gateway-getting-started -title: Getting Started ⚡ +title: 开始 ⚡ --- -# Getting Started with Lava Gateway 🔥 +# 开始使用 Lava Gateway 🔥 -Getting started with our Lava gateway is simple! You can access our Lava gateway at any time: [gateway.lavanet.xyz](https://accounts.lavanet.xyz/register?utm_source=getting-started-with-lava-gateway&utm_medium=docs&utm_campaign=docs-to-gateway). You are only a few clicks away from fast, available, and accountable RPC. +开始使用我们的 Lava 网关非常简单!您可以随时访问我们的 Lava 网关: [gateway.lavanet.xyz](https://accounts.lavanet.xyz/register?utm_source=getting-started-with-lava-gateway&utm_medium=docs&utm_campaign=docs-to-gateway)。您只需点击几下,就能获得快速、可用和负责任的 RPC。 -## 🎥 Video Demonstration (~7m) +## 🎥 视频演示 (~7m) @@ -14,44 +14,44 @@ Getting started with our Lava gateway is simple! You can access our Lava gateway

-## 📝 Written Guide (~5m) +## 📝 书面指南 (~5m) -### Create an Account +### 创建账户 -If you’re stumped about how to get started — don’t worry at all! It’s as simple as putting in your credentials or creating an account at [gateway.lavanet.xyz/](https://accounts.lavanet.xyz/register?utm_source=getting-started-with-lava-gateway&utm_medium=docs&utm_campaign=docs-to-gateway) . +如果您不知道如何开始,完全不用担心!只需在 [gateway.lavanet.xyz/](https://accounts.lavanet.xyz/register?utm_source=getting-started-with-lava-gateway&utm_medium=docs&utm_campaign=docs-to-gateway) 上输入您的证书或创建账户即可。 ![CreateAccountScreenshot](/img/tutorial/gateway/create_account_screenshot.png) -### Create a Project +### 创建项目 -Once logged in you will be able to create a project! Here the gateway will prompt you to give a Project name for your project and select which APIs are to be used. You can select any and all that will be needed for RPC calls in your project. +登录后,您就可以创建一个项目!网关将提示您为项目命名,并选择要使用的 API。您可以选择项目中 RPC 调用所需的所有 API。 ![CreateProjectScreenshot](/img/tutorial/gateway/create_project_screenshot.png) -### Select your API Access (RPC) +### 选择您的 API 访问 (RPC) -After filling in the Project Name and desired API access - your RPC node endpoints will be available for use on the respective networks you selected. As in the example below, you can see that new API access can be added at any time, or API access can be revoked by simply clicking the trashcan next to the one you want to get rid of - it’s that easy! +填写项目名称和所需的 API 访问权限后,您的 RPC 节点端点就可以在您选择的各个网络上使用了。如下面的示例所示,您可以随时添加新的 API 访问权限,或者只需单击要取消的 API 访问权限旁边的垃圾桶即可取消该访问权限--就是这么简单! ![APIAccessScreenshot](/img/tutorial/gateway/api_access_screenshot.png) -### Set your Security Controls +### 设置安全控制 -Of course, safety first! Once you have access to the endpoints, it would be wise to secure them. You can select Settings at the top of the Project Management screen and enable a Secret Key or JWT Tokens to limit who can access your endpoints. This will ensure that they are not wrongly accessed or hit too many times. It should be noted that, because these endpoints are available for free, they are rate-limited. +当然,安全第一!一旦可以访问端点,最好确保其安全。您可以选择 "项目管理 "屏幕顶部的 "设置",启用秘钥或 JWT 标记来限制谁可以访问端点。这将确保端点不会被错误访问或访问次数过多。需要注意的是,由于这些端点是免费提供的,因此有速率限制。 ![SecurityControlsScreenshot](/img/tutorial/gateway/security_controls_screenshot.png) -### Pull your Endpoint +### 推送你的端点 -By the way, each network has a different number of interfaces that can be queried. As seen below, the Ethereum RPC can accept calls from both JSONRPC through HTTP and JSONRPC through WebSockets, whereas Lava accepts REST, URI, Tendermint and Tendermint using Websockets. You will notice that on Lava gateway, no matter which chains you select, we support a multitude of interfaces. +顺便说一下,每个网络都有不同数量的接口可以查询。如下图所示,以太坊RPC可以通过HTTP和WebSockets接受来自JSONRPC的调用,而Lava使用WebSockets接受REST、URI、Tendermint和Tendermint。你会注意到,在熔岩网关上,无论你选择哪个链,我们都支持多种接口。 ![EthereumAccessScreenshot](/img/tutorial/gateway/eth_access_screenshot.png) ![LavaAccessScreenshot](/img/tutorial/gateway/lava_access_screenshot.png) -We even support Cosmos Hub on multiple interfaces!!🚀 +我们甚至在多个接口上支持Cosmos Hub !!🚀 ![CosmosAccessScreenshot](/img/tutorial/gateway/cosmoshub_access_screenshot.png) -The magic is that all of these endpoint addresses are plug-and-play! You can take any address, plug it into Web3.js, Ether.js, and Gaia, and use it seamlessly. Enjoy fast and free RPC! \ No newline at end of file +神奇的是,所有这些端点地址都是即插即用的!你可以选择任何地址,将其插入Web3.js、Ether.js和Gaia,然后无缝地使用它。享受快速和免费的RPC! \ No newline at end of file diff --git a/docs/developer/integrations/cosmjs.md b/docs/developer/integrations/cosmjs.md index bd841329..a79987d3 100644 --- a/docs/developer/integrations/cosmjs.md +++ b/docs/developer/integrations/cosmjs.md @@ -113,4 +113,4 @@ async function getAbciInfo() { -❓ Looking for more examples? Check out the [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/cosmjs/examples) folder on our repository. \ No newline at end of file +❓ 想要更多的例子吗?查看我们的仓库中的[examples](https://github.com/lavanet/lava-sdk-providers/tree/main/cosmjs/examples)文件夹。 \ No newline at end of file diff --git a/docs/developer/integrations/ethersjs5.md b/docs/developer/integrations/ethersjs5.md index 3e3aa314..7aa87031 100644 --- a/docs/developer/integrations/ethersjs5.md +++ b/docs/developer/integrations/ethersjs5.md @@ -97,4 +97,4 @@ const blockNumber = await ethersProvider.getBlockNumber(); -❓ Looking for more examples? Check out the [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/ethersjs/v5/examples) folder on our repository. \ No newline at end of file +❓ 想要更多的例子吗?查看我们的仓库中的[examples](https://github.com/lavanet/lava-sdk-providers/tree/main/ethersjs/v5/examples)文件夹。 \ No newline at end of file diff --git a/docs/developer/integrations/ethersjs6.md b/docs/developer/integrations/ethersjs6.md index a628d429..212ecf89 100644 --- a/docs/developer/integrations/ethersjs6.md +++ b/docs/developer/integrations/ethersjs6.md @@ -96,4 +96,4 @@ const blockNumber = await ethersProvider.getBlockNumber(); -❓ Looking for more examples? Check out the [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/ethersjs/v6/examples) folder on our repository. \ No newline at end of file +❓ 想要更多的例子吗?查看我们的仓库中的[examples](https://github.com/lavanet/lava-sdk-providers/tree/main/ethersjs/v6/examples)文件夹。 \ No newline at end of file diff --git a/docs/developer/integrations/sdk-integrations.md b/docs/developer/integrations/sdk-integrations.md index c62c0cd2..7dc3103a 100644 --- a/docs/developer/integrations/sdk-integrations.md +++ b/docs/developer/integrations/sdk-integrations.md @@ -1,28 +1,28 @@ --- slug: /sdk-integrations -title: Library Integrations +title: 库集成 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Integrations 🔌 +# 集成 🔌 -## Overview 🔎 +## 概览 🔎 -It is possible and even encouraged to use Lava with popular web3 development libraries such as [ethers.js](/ethersjs6), [web3.js](/web3js), [cosmjs](/cosmjs) and [viem](/viem). Lava integrations allow for developers to build decentralized applications (dApps) with their favorite development tools while harnessing Lava's decentralized peer-to-peer network of high quality RPC providers. There is no need to sacrifice the functionality of frequently used APIs, simply install and use the specified Lava integration while building! +可以甚至鼓励将Lava与流行的web3开发库一起使用,例如[ethers.js](/ethersjs6), [web3.js](/web3js), [cosmjs](/cosmjs)和[viem](/viem)。Lava集成允许开发人员使用他们最喜欢的开发工具构建分散的应用程序(dApps),同时利用Lava的高质量RPC提供商的分散点对点网络。不需要牺牲常用api的功能,只需在构建时安装和使用指定的Lava集成! -## Usage 🏗️ +## 使用 🏗️ -Taking advantage of integrations is an important way to multi-chain and decentralize your application. Due to differences in architecture, each Lava integration has its idiosyncracies. However, all of them follow the same general flow: +利用集成是实现多链和去中心化应用的重要方式。由于架构的差异,每个 Lava 集成都有其特点。然而,它们都遵循相同的一般流程: -1. Install the supported web3 development package (i.e. `npm i viem`) in your project. -2. Install the Lava integration package into your project (i.e. `npm i @lavanet/lava-viem`) -3. Initialize the respective SDK integration object using the proper [parameters](#parameters). A chart is provided below for your reference. You must provide either a subscribed *privateKey* or a valid *badge*, but not both. +1. 在您的项目中安装支持的 web3 开发包(例如 `npm i viem`)。 +2. 在您的项目中安装 Lava 集成包(例如 `npm i @lavanet/lava-viem`)。 +3. 使用正确的 [参数](#parameters) 初始化相应的 SDK 集成对象。下面提供了一个图表供您参考。您必须提供已订阅的 *privateKey* 或有效的 *badge*,但不能同时提供两者。 -### ✔️ Required Parameters{#parameters} +### ✔️ 必要参数{#parameters} -The two primary fields that are necessary are a `badge`/`privateKey` to cover the cost of API calls and `chainIds` to let Lava know which chains to target. If you haven't already, you should sign up from the [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=library-integrations&utm_medium=docs&utm_campaign=lava-phase-2), where you can acquire both of these with ease! +必须填写的两个主要字段是:用于支付 API 调用费用的 `badge`/`privateKey`和用于让 Lava 知道目标链的`chainIds` 。如果您还没有注册,应从 [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=library-integrations&utm_medium=docs&utm_campaign=lava-phase-2) 注册,在那里您可以轻松获得这两个信息! ```javascript badge: { @@ -39,41 +39,41 @@ privateKey: process.env.PRIVATE_KEY chainIds: "ETH1" ``` -### 📋 All Options +### 📋 所有选项 -There are numerous other options that can be configured while creating and initializing the Lava integration object. An exhaustive list follows: +在创建和初始化 Lava 集成对象时,还可以配置许多其他选项。下面是一个详尽的列表: -| Option | Required/Optional | Description | -| ---------------------------| --------------------------------------------| ---------------------------------------------------------------------------------------------------------------- | -| `privateKey` | **Required** | The private key with active subscription to be used in lieu of a `badge.` | -| `badge` | **Required** | Public URL of badge server and ID of the project you want to connect. Remove `privateKey` if badge is provided. | -| `chainIds` | **Required** | The ID of the chain you want to query or an array of chain IDs (e.g., "ETH1" or ["ETH1", "LAV1"]) | -| `pairingListConfig` | Optional | The Lava pairing list config used for communicating with the Lava network. Default is [Lava-providers](https://github.com/lavanet/lava-providers) | -| `network` | Optional | The network from pairingListConfig to be used (e.g., ["mainnet", "testnet"] ) | -| `geolocation` | Optional | The geolocation to be used (e.g., "1" for North America, "2" for Europe -> "1" is default) | -| `lavaChainId` | Optional | The Lava chain ID (default value is `lava-testnet-2' for Lava Testnet) | -| `secure` | Optional | Communicates through HTTPS (temporary flag that will be disabled once the chain uses HTTPS by default) | -| `allowInsecureTransport` | Optional | Indicates to use an insecure transport when connecting the provider, for testing purposes only | -| `logLevel` | Optional | Log level settings (e.g., "debug", "info", "warn", "error", "success", "NoPrints") | -| `transport` | Optional | Transport settings for changing the method of transport | -| `providerOptimizerStrategy`| Optional | The strategy to use to pick providers (default: balanced) | -| `maxConcurrentProviders` | Optional | The maximum number of providers to use concurrently (default: 3) | +| 选项 | 必要/可选 | 说明 | +|-----------------------------|--------------|---------------------------------------------------------------------------------------------| +| `privateKey` | **Required** | 用于代替`badge`的有效订阅的私人密钥。 | +| `badge` | **Required** | 徽章服务器的公共 URL 和要连接的项目 ID。如果提供了徽章,请移除 `privateKey`。 | +| `chainIds` | **Required** | 要查询的链的 ID 或链 ID 数组 (e.g., "ETH1" or ["ETH1", "LAV1"]) | +| `pairingListConfig` | Optional | 用于与 Lava 网络通信的 Lava 配对列表配置。默认为 [Lava-providers](https://github.com/lavanet/lava-providers)。 | +| `network` | Optional | 要使用的配对列表配置中的网络(例如,["mainnet", "testnet"] ) | +| `geolocation` | Optional | 使用的地理位置(例如,"1 "表示北美,"2 "表示欧洲-->"1 "为默认值) | +| `lavaChainId` | Optional | Lava 链 ID(Lava Testnet 的默认值为 "lava-testnet-2")。 | +| `secure` | Optional | 通过 HTTPS 通信(临时标记,一旦链默认使用 HTTPS,该标记将被禁用) | +| `allowInsecureTransport` | Optional | 表示在连接提供商时使用不安全传输协议,仅供测试之用 | +| `logLevel` | Optional | 日志级别设置(e.g., "debug", "info", "warn", "error", "success", "NoPrints") | +| `transport` | Optional | 用于更改传输方式的传输设置 | +| `providerOptimizerStrategy` | Optional | 用于选择提供商的策略(default: balanced) | +| `maxConcurrentProviders` | Optional | 同时使用的最大提供商数量(默认值:3) | :::tip -You can optionally pull in an object containing all of these fields with the following code: +您可以选择使用以下代码调入一个包含所有这些字段的对象: ```javascript import { LavaSDKOptions } from "@lavanet/lava-sdk" ``` -This will require installing `@lavanet/lava-sdk` as a dependency! +这需要安装 `@lavanet/lava-sdk` 作为依赖项! ::: -## Repository 🛠️ +## 仓库 🛠️ ![github](/img/github_favicon.ico) [github](https://github.com/lavanet/lava-sdk-providers/): diff --git a/docs/developer/integrations/viem.md b/docs/developer/integrations/viem.md index c43b4b53..7a918ee2 100644 --- a/docs/developer/integrations/viem.md +++ b/docs/developer/integrations/viem.md @@ -48,4 +48,4 @@ async function printLatestBlock() { -❓ Looking for more examples? Check out the [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/viem/examples) folder on our repository. \ No newline at end of file +❓ 寻找更多示例?请查看我们仓库中的 [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/viem/examples) 文件夹。 \ No newline at end of file diff --git a/docs/developer/integrations/web3js.md b/docs/developer/integrations/web3js.md index b4ef0be6..5554c20f 100644 --- a/docs/developer/integrations/web3js.md +++ b/docs/developer/integrations/web3js.md @@ -99,4 +99,4 @@ async function createWeb3Instance { -❓ Looking for more examples? Check out the [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/web3js/examples) folder on our repository. \ No newline at end of file +❓ 寻找更多示例?请查看我们仓库中的 [examples](https://github.com/lavanet/lava-sdk-providers/tree/main/web3js/examples) 文件夹。 \ No newline at end of file diff --git a/docs/developer/sdk/access-sdk.md b/docs/developer/sdk/access-sdk.md index f9598016..9e23f229 100644 --- a/docs/developer/sdk/access-sdk.md +++ b/docs/developer/sdk/access-sdk.md @@ -5,9 +5,9 @@ title: SDK # Lava SDK (Beta) -## Overview 🔎 +## 概览 🔎 -The **Lava-SDK** is a powerful JavaScript/TypeScript library designed for developers. It enables decentralized access to all chains supported by the Lava ecosystem and can be used both in server and browser environments. By importing Lava-SDK into a project, developers can easily interact with multiple blockchains and build decentralized applications. +Lava-SDK**是一个功能强大的JavaScript/TypeScript库,专为开发人员设计。它实现了对 Lava 生态系统支持的所有链的去中心化访问,可在服务器和浏览器环境中使用。通过将 Lava-SDK 导入项目,开发人员可以轻松地与多个区块链进行交互,并构建去中心化应用程序。 ![github](/img/github_favicon.ico) [github](https://github.com/lavanet/lava/tree/main/ecosystem/lava-sdk): @@ -22,23 +22,23 @@ lavanet/lava/ecosystem/lava-sdk @lavanet/lava-sdk ``` -## Prerequisites 📋 +## 必要准备 📋 -Lava SDK setup requires additional steps at the moment, but we're working on minimizing prerequisites as we progress towards Mainnet. The recommended flow is as follows: +Lava SDK 设置目前需要额外的步骤,但我们正在努力减少先决条件,以迈向 Mainnet。建议流程如下 -1. Create an account on the [Lava Gateway](https://gateway.lavanet.xyz?utm_source=access-sdk-page&utm_medium=docs) 🎫 +1. 在 [Lava Gateway](https://gateway.lavanet.xyz?utm_source=access-sdk-page&utm_medium=docs) 上创建一个账户 🎫 -2. Install `@lavanet/lava-sdk` into your local project repository ! 📥 +2. 将 `@lavanet/lava-sdk` 安装到本地项目库中!📥 -4. Decide whether you'll be doing [frontend](/sdk-frontend) or [backend](/sdk-backend) 🏭 +3. 决定是做 [frontend](/sdk-frontend) 还是 [backend](/sdk-backend) 🏭 -3. Add a public key to the Lava Gateway or use your auto-generated badge from Lava's badge server! 🔑 📛 +4. 向 Lava Gateway 添加公钥,或使用 Lava 徽章服务器自动生成的徽章!🔑 📛 -## Repositories 🔧 +## 仓库 🔧 -📦 [Lava-SDK](https://github.com/lavanet/lava-sdk): implementation of the Lava SDK library. This repository provides the core functionality for developers to interact with multiple blockchain networks in a decentralized manner. +📦 [Lava-SDK](https://github.com/lavanet/lava-sdk):Lava SDK 库的实现。该库为开发人员以去中心化方式与多个区块链网络交互提供核心功能。 -📦 [Lava-SDK-providers](https://github.com/lavanet/lava-sdk-providers/tree/feature/implement_ethersjs_provider): contains implementations of providers for various third-party libraries used for accessing blockchains using Lava SDK's underlying functionality. Lava-SDK-providers currently supports ethers.js, web3.js, cosmjs, and viem integrations and we plan to add support for even more blockchain libraries and web3 APIs in the future. +📦 [Lava-SDK-providers](https://github.com/lavanet/lava-sdk-providers/tree/feature/implement_ethersjs_provider):包含用于使用 Lava SDK 底层功能访问区块链的各种第三方库的提供程序实现。Lava-SDK-providers 目前支持 ethers.js、web3.js、cosmjs 和 viem 集成,我们计划在未来添加对更多区块链库和 web3 API 的支持。 -📦 [Lava-providers](https://github.com/lavanet/lava-providers): contains `sdkSeedProviders.json`, a resource for LavaSDK to discover the first providers to connect to access initial Pairing data. +📦 [Lava-providers](https://github.com/lavanet/lava-providers):包含 `sdkSeedProviders.json`,这是 LavaSDK 用来发现第一个连接以访问初始配对数据的提供商的资源。 diff --git a/docs/developer/sdk/examples/all-blocks-app.md b/docs/developer/sdk/examples/all-blocks-app.md index e9679cd2..a5f6c3ee 100644 --- a/docs/developer/sdk/examples/all-blocks-app.md +++ b/docs/developer/sdk/examples/all-blocks-app.md @@ -5,17 +5,17 @@ title: 🧱 All Blocks (Vercel App) # All Blocks (Vercel App) -**All Blocks** is a [Next.js](https://nextjs.org/) project bootstrapped with `create-next-app` that grabs the latest block from multiple supported chains on Lava, measuring and reporting latency and uptime info in real-time. +**All Blocks**是一个使用 "create-next-app "启动的[Next.js](https://nextjs.org/)项目,可从 Lava 上多个受支持的链中抓取最新区块,实时测量并报告延迟和正常运行时间信息。 ![All Blocks Image](/img/tutorial/sdk/demo_app/all_blocks_ui.png) -## Live Application 📱 +## 实时应用 📱 > https://allblocks.vercel.app/ -## Repository 🧰 +## 仓库 🧰 -For more detailed information and updates, visit the All Blocks repository: +有关更多详细信息和更新,请访问 All Blocks 仓库: > 📦 [All Blocks](https://github.com/gilxgil/allblocks) diff --git a/docs/developer/sdk/examples/lava-bazaar.md b/docs/developer/sdk/examples/lava-bazaar.md index 5af36c04..7ac29f5b 100644 --- a/docs/developer/sdk/examples/lava-bazaar.md +++ b/docs/developer/sdk/examples/lava-bazaar.md @@ -2,46 +2,46 @@ slug: /lava-bazaar --- -# 🔨 Building The Lava Bazaar: A P2P Cross-Chain Asset Checker +# 🔨 构建Lava Bazaar: P2P 跨链资产检查器 ![Lava Bazaar UI](/img/tutorial/sdk/demo_app/lava_bazaar_ui.png) -**The Lava Bazaar** is a simple cross-chain asset checker. It works by leveraging the power of LavaSDK’s P2P RPC integration with viem ([`lava-viem`](/viem)) to provide users with a React frontend to check wallet balances across different blockchains. Under the hood, Lava replaces viem’s [`PublicClient`](https://viem.sh/docs/clients/public.html) with its entire decentralized network of RPC providers providing many benefits for dApp developers. The Lava Bazaar is a basic example that can be modified to interact with any blockchain that is supported by both LavaSDK and viem. +**Lava Bazaar** 是一个简单的跨链资产检查器。它利用 LavaSDK 与 viem 的 P2P RPC 集成([`lava-viem`](/viem)),为用户提供一个 React 前端来检查不同区块链上的钱包余额。在引擎盖下,Lava 将 viem 的 [`PublicClient`](https://viem.sh/docs/clients/public.html) 替换为其整个去中心化的 RPC 提供商网络,为 dApp 开发者带来了许多好处。Lava Bazaar 是一个基本示例,可以进行修改,以便与 LavaSDK 和 viem 支持的任何区块链进行交互。 :::tip -Check out the complete project on ![Github](/img/github_favicon.ico) [Github](https://github.com/KagemniKarimu/lava-bazaar)❗ +查看完整项目,请访问 ![Github](/img/github_favicon.ico) [Github](https://github.com/KagemniKarimu/lava-bazaar)❗ ::: -## Overview 🔎 +## 概览 🔎 -The tutorial explores how to use `lava-viem` to build a fully decentralized cross-chain asset checker which works across all chains mutually supported by LavaSDK and viem. Being able to check balances across multiple chains with a single credential is a building block to many web3 tools including wallets, indexers, and exchanges. +这个教程探讨了如何使用 `lava-viem` 构建一个完全去中心化的跨链资产检查器,它可以在所有由 LavaSDK 和 viem 共同支持的链上运行。能够使用单个凭证跨多个链检查余额是许多 Web3 工具的基础,包括钱包、索引器和交易所。 -This tutorial will guide you through creating a simple app that can: +本教程将引导你创建一个简单的应用程序,可以实现以下功能: -- Fetch and display current wallet balances and transaction counts from Ethereum, Arbitrum, FileCoin, Avalanche, Celo, Optimism, and Polygon mainnets. -- Dynamically add/remove support for new blockchains with the simple editing of two arrays! -- Access P2P RPC on viem without a single RPC URL +- 从以太坊、Arbitrum、FileCoin、Avalanche、Celo、Optimism 和 Polygon 主网获取并显示当前钱包余额和交易数量。 +- 通过简单编辑两个数组,动态添加/删除对新区块链的支持! +- 在没有单个 RPC URL 的情况下访问 viem 上的 P2P RPC。 -## Prerequisites 📦 +## 必备条件 📦 -- Basic understanding of [Node.js](https://nodejs.org/en), [Express](https://expressjs.com/), and [React](https://react.dev/learn). -- Node.js and npm installed. -- Familiarity with using APIs / routing structures! +- 基本了解 [Node.js](https://nodejs.org/en)、[Express](https://expressjs.com/) 和 [React](https://react.dev/learn)。 +- Node.js and npm 已下载。 +- 熟悉使用应用程序接口/路由结构! -## Backend Setup 🔙 +## 后端设置 🔙 -We'll begin by setting up an Express.js server to interact with the blockchain networks via viem's client instances. In a normal dApp, we wouldn’t need to separate out a backend from a frontend, but due to network conditions at the time of this tutorial - this is a decent setup to avoid CORS issues with certain providers. +首先,我们将设置一个 Express.js 服务器,通过 viem 的客户端实例与区块链网络交互。在普通的 dApp 中,我们不需要将后端与前端分开,但由于本教程编写时的网络条件,这是一个不错的设置,可以避免与某些提供商发生 CORS 问题。 -### 📥 Install dependencies +### 📥 安装依赖项 ```bash npm install @lavanet/lava-viem express viem ``` -### ⚒️ Build a Constructor +### ⚒️ 构建构造器 ```jsx // viemclient.js @@ -82,9 +82,9 @@ module.exports = { createClientForChain, clientList }; ``` -In `viemclient.js`, we define a function to create viem clients for various chains and store them in `clientList`. We’ll want to export this so that we incorporate this logic in our server. We’ll also write a small async function `getClient()` which allows us to select which chain to use for a given request! 🧠 +在 `viemclient.js` 中,我们定义了一个函数,用于为各种链创建 viem 客户端并将其存储在 `clientList` 中。我们需要导出该函数,以便将这一逻辑整合到服务器中。我们还将编写一个小的异步函数 `getClient()`,它允许我们为给定请求选择要使用的链!🧠 -### 🧭 Write Initialization Function +### 🧭 写入初始化函数 ```jsx // server.js @@ -105,12 +105,12 @@ for (const chain of supportedChains) { ``` -In `server.js`, we import the functions from `viemclient.js` and use them to initialize clients and set up API endpoints. We pack this away in an anonymous asynchronous function… Later, we’ll put some API endpoints here! +在 `server.js` 中,我们从 `viemclient.js` 中导入函数,用它们来初始化客户端并设置 API 端点。我们将这些功能打包到一个匿名异步函数中......稍后,我们将在这里放置一些 API 端点! -### 🌐 Create APIs +### 🌐 创建 APIs -Before building routes, we need to revisit `viemclient.js`. We need to add functions that get the latest block number, get the wallet balance of a wallet in question, and get the number of transactions for a given address. All of these will use the `getClient()` function to determine which instance we will communicate to… In `viemclient.js` put the following: +在构建路由之前,我们需要重新访问 `viemclient.js`。我们需要添加一些函数,用于获取最新的区块编号、获取相关钱包的钱包余额,以及获取给定地址的交易次数。所有这些都将使用 `getClient()` 函数来确定我们将与哪个实例通信...... 在 `viemclient.js` 中加入以下内容: ```jsx //viemclient.js (cont'd) @@ -150,7 +150,7 @@ async function getWalletTxNumber(addressInput, chainInput) { }; ``` -In `server.js` we’ll need to add some routes, so that these can be called from our frontend without issue. That means our `server.js` can include something like this: +在 `server.js` 中,我们需要添加一些路由,这样就可以顺利地从前端调用这些路由。这意味着我们的 `server.js` 可以包含如下内容: ```jsx //server.js (cont'd) @@ -219,17 +219,17 @@ app.listen(PORT, () => { }); ``` -These 3 basic routes will form the basis of our application! Once you have constructed them correctly, go ahead and give them a test with `node server.js` . We should get something like the following (give or take a few lines ;) ✨ +这 3 个基本路由将构成我们应用程序的基础!正确构建后,请使用 `node server.js` 对其进行测试。我们应该会得到类似下面的结果(或多或少有几行;) ✨ ![Lava Bazaar Backend Successful Launch](/img/tutorial/sdk/demo_app/lava_bazaar_be.png)
-## Frontend Setup 🪟 +## 前端设置 🪟 -Now, we’re ready to move onto building our interfaces, if you’re familiar with React, this should be a breeze. If not, please ensure that you’ve setup your `index.js`, `index.html` , and `App.js` . We deliberately avoid using `create-react-app` because of a few configuration issues it has with common web3 dependencies. If you’re not used to it, setting up a React environment without using `create-react-app` is not trivial! So take your time and consult a separate [tutorial](https://react.dev/learn/add-react-to-an-existing-project) or [two](https://dev.to/underscorecode/creating-your-react-project-from-scratch-without-create-react-app-the-complete-guide-4kbc). +现在,我们可以开始构建界面了,如果您熟悉 React,这应该是轻而易举的。如果不熟悉,请确保已设置好 `index.js`、`index.html` 和 `App.js`。我们特意避免使用 `create-react-app`,因为它与常见的 web3 依赖关系存在一些配置问题。如果你不习惯使用它,在不使用 `create-react-app` 的情况下设置 React 环境并非易事!因此,请慢慢来,并查阅单独的 [tutorial](https://react.dev/learn/add-react-to-an-existing-project) 或 [two](https://dev.to/underscorecode/creating-your-react-project-from-scratch-without-create-react-app-the-complete-guide-4kbc) 。 -You may use any of these dependencies or more, depending on your setup: +您可以使用这些依赖项中的任何一个或更多,具体取决于您的设置: > Dependency Tree (`npm ls`) > @@ -246,7 +246,7 @@ You may use any of these dependencies or more, depending on your setup: > └── webpack@5.89.0
-### 💼 Set up a WalletInfo Component +### 💼 设置 WalletInfo 组件 ```jsx //WalletInfo.js @@ -302,7 +302,7 @@ function WalletInfo() { }; ``` -The basic logic of the `WalletInfo.js` component is above. We have `fetch` functions that call the APIs we created and grab the proper responses and set state with them; we also outlined our `chainOptions` for when we build our interface. Each time a button we’ll create is called, we’ll activate each of these functions so as to update the interface, hence `fetchWalletData()`. Before worrying about all that, we will also need to add a `return` statement detailing the layout of the component before closing our final bracket! +上面是 `WalletInfo.js` 组件的基本逻辑。我们有 `fetch` 函数,用于调用我们创建的 API,获取适当的响应并设置状态;我们还概述了我们的 `chainOptions` 函数,用于在构建界面时使用。每次我们创建的按钮被调用时,我们都会激活这些函数,以便更新界面,这就是 `fetchWalletData()`。在担心这些之前,我们还需要在最后的括号中添加一个 `return` 语句,详细说明组件的布局! ```jsx //WalletInfo.js (cont'd) @@ -363,7 +363,7 @@ The basic logic of the `WalletInfo.js` component is above. We have `fetch` funct export default WalletInfo; ``` -And we have a complete UI! Let’s be sure to add it to the `App.js` main `App()` function: +这样我们就有了一个完整的用户界面!请务必将其添加到 `App.js` 主 `App()` 函数中: ```jsx //App.js @@ -379,26 +379,26 @@ function App() { export default App; ``` -Once you’re certain you’ve plugged up all the holes in your frontend - go ahead and give your new Lava Bazaar application a spin with `npm start` command. if all is well, you should get output similar to the following: +如果一切正常,你应该会得到类似下面的输出结果: ![Lava Bazaar Successful FrontEnd Launch](/img/tutorial/sdk/demo_app/lava_bazaar_fe.png) -## Test your might! 🗳️ +## 测试🗳️ -Give it a test! Does it work? Take a look at a final version here! +测试一下!能用吗?点击这里查看最终版本! ``` https://github.com/KagemniKarimu/lava-bazaar ``` -## Challenges 🧩 +## 挑战 🧩 -Need a way to turn up the difficulty? Want to practice your web3 dev skills and learn more about the integration? Try the following: +需要提高难度?想练习 web3 开发技能并了解更多集成知识?试试下面的方法: -- ⛓️Add support for more chains -- 🦜Parse the Balances to Make Them more Human Readable -- 📏Add Validation for Address Input(s) -- 🕐Implement Real-Time Balance Watching -- 💾Cache Responses for More Speed -- 🔃Parallelize the Initialization Process for all Chains -- 🔎 Add Tx LookUp in Addition to Address Lookup on the same Text Input \ No newline at end of file +- ⛓️ 增加对更多链的支持 +- 🦜解析余额,使其更易于人阅读 +- 📏添加地址输入验证 +- 实施实时余额监控 +- 💾缓存响应以提高速度 +- 并行化所有链的初始化过程 +- 🔎在同一文本输入的地址查找之外增加 Tx 查找 \ No newline at end of file diff --git a/docs/developer/sdk/examples/lava-sdk-gallery.md b/docs/developer/sdk/examples/lava-sdk-gallery.md index 5bc9d404..236313e7 100644 --- a/docs/developer/sdk/examples/lava-sdk-gallery.md +++ b/docs/developer/sdk/examples/lava-sdk-gallery.md @@ -5,28 +5,28 @@ title: 🌌 Lava SDK Beta Gallery # 🌌 Lava SDK Beta Gallery -## Introduction 🌟 +## 介绍 🌟 -This section of the documentation is dedicated to guiding you through the capabilities and features of the Lava SDK Beta Gallery. This tool is an essential resource for developers looking to harness the power of LavaSDK in a straightforward and interactive way. +本节文档专门指导您了解Lava SDK Beta Gallery的功能和特性。对于希望以直接和交互式的方式利用LavaSDK功能的开发人员来说,这个工具是一个必不可少的资源。 ![Lava SDK Gallery](/img/tutorial/sdk/demo_app/lava_sdk_gallery.png) -## Overview 🔍 +## 概览 🔍 -The Lava SDK Beta Gallery is a Node.js application that serves as a repository of examples demonstrating various RPC fetching techniques using the LavaSDK. It provides a user-friendly terminal interface to interact with different blockchain networks supported by Lava, allowing users to experiment with and understand the intricacies of blockchain interactions. +LavaSDK Beta Gallery是一个Node.js应用程序,它是演示使用LavaSDK获取各种RPC技术的示例仓库。它提供了一个用户友好的终端界面,可以与Lava支持的不同区块链网络进行交互,使用户可以实验和理解区块链交互的复杂性。 -## Key Features ✨ +## 关键特性 ✨ -- ⛏️ **Custom Relay Creation**: Users can build and execute custom relay requests using LavaSDK's sendRelay function. -- 🪛 **Prebuilt Examples**: The gallery includes numerous prebuilt examples across multiple chains, showcasing real-time relay execution and results. -- 🎓 **Interactive Learning**: The command-line interface offers an engaging way to learn about LavaSDK and blockchain technology. -- 🔗 **Cross-Chain Support**: Experiment with various blockchains and explore their unique functionalities. +-⛏️**自定义中继创建**:用户可以使用LavaSDK的sendRelay函数构建和执行自定义中继请求。 +-🪛**预构建示例**:Gallery包含了跨多个链的大量预构建示例,展示了实时中继执行和结果。 +-🎓**交互式学习**:命令行界面提供了一种引人入胜的方式来学习LavaSDK和区块链技术。 +-🔗**跨链支持**:尝试各种区块链并探索它们独特的功能。 -# Getting Started 🚀 +# 开始 🚀 -1. 📥 **Installation**: Clone the Lava SDK Beta Gallery repository and install dependencies. +1. 📥 **安装**:克隆Lava SDK Beta库并安装依赖项。 ```bash git clone https://github.com/your-repo/lava-sdk-gallery.git @@ -34,12 +34,12 @@ cd lava-sdk-gallery npm install ``` -2. 💥 **Running the Gallery**: Start the application to access the interactive menu. +2. 💥 **运行Gallery**:启动应用程序以访问交互式菜单。 ```bash npm start ``` -3. 🔦 **Exploration**: Navigate through the menu to build your own relays or explore prebuilt examples. +3. 🔦 **探索**:通过菜单导航来构建自己的relay或探索预构建的示例。 ``` Up, Down, Space, Enter, to Navigate @@ -47,18 +47,18 @@ Ctrl + C - to Quit ``` -## Usage Scenarios 📈 +## 使用场景 📈 -- 🧠 **Learning Blockchain Interactions**: For newcomers, the gallery provides a hands-on approach to learning how blockchain transactions and queries work. -- 🛠️ **Testing and Debugging**: Developers can use the gallery to test out different RPC calls and understand the responses from various chains. -- 🎤 **Demonstration Purposes**: Showcase the capabilities of LavaSDK in educational or presentation settings. +-🧠**学习区块链交互**:对于新手,Gallery提供了一种学习区块链事务和查询如何工作的动手方法。 +-🛠️**测试和调试**:开发人员可以使用Gallery来测试不同的RPC调用,并了解来自不同链的响应。 +-🎤**演示目的**:展示LavaSDK在教育或演示设置中的功能。 -## Contributing 🫂 +## 贡献 🫂 -The Lava SDK Beta Gallery is an open-source project, and contributions are highly welcomed. Whether it's adding new examples, improving the documentation, or suggesting features, your input helps make the gallery more valuable for everyone. +Lava SDK Beta Gallery是一个开源项目,欢迎大家的贡献。无论是添加新示例,改进文档,还是建议功能,您的输入都有助于使画廊对每个人都更有价值。 -## Repository 🧰 +## 仓库 🧰 -For more detailed information and updates, visit the Lava SDK Beta Gallery repository: +有关更多详细信息和更新,请访问Lava SDK Beta Gallery存储库: > 📦 [Lava-SDK-Beta-Gallery](https://github.com/kagemnikarimu/lava-sdk-gallery) \ No newline at end of file diff --git a/docs/developer/sdk/examples/sdk-multichain-example.md b/docs/developer/sdk/examples/sdk-multichain-example.md index 818e1140..7c53313d 100644 --- a/docs/developer/sdk/examples/sdk-multichain-example.md +++ b/docs/developer/sdk/examples/sdk-multichain-example.md @@ -1,6 +1,6 @@ --- slug: /sdk-multichain-example -title: 🌈 Multi Chain Example +title: 🌈 多链示例 --- import Tabs from '@theme/Tabs'; diff --git a/docs/developer/sdk/sdk-backend.md b/docs/developer/sdk/sdk-backend.md index aa57e3ae..94fd682b 100644 --- a/docs/developer/sdk/sdk-backend.md +++ b/docs/developer/sdk/sdk-backend.md @@ -1,50 +1,51 @@ --- slug: /sdk-backend -title: Backend Use 🛡️ +title: 后端使用 🛡️ --- -# Using LavaSDK +# 使用 LavaSDK -## 🛡️ The Backend +## 🛡️ 后端 -☠️ **The Problem**: Making calls to API providers is computationally expensive. Creating a backend application requires generating a private key locally and maintaining a sufficient balance to make calls on multiple chains. +☠️ **问题**:调用 API 提供商的计算成本很高。创建后端应用程序需要在本地生成私钥并保持足够的余额,以便在多个链上进行调用。 -✅ **The Solution**: Lava simplifies multi-chain backend development with free [subscriptions](/subscriptions) on all projects through our gateway. Lava allows any user to sign up to the gateway. A default subscription is provided courtesy of Lava and requires no additional configurations. This subscription is rate-limited but should be substantial enough for many use cases. +✅ **解决方案**:Lava 通过我们的网关为所有项目提供免费 [订阅](/subscriptions),简化了多链后端开发。Lava 允许任何用户注册网关。默认订阅由 Lava 提供,无需额外配置。此订阅有速率限制,但对许多用例来说足够大。 -🚀 **Get Started**: You can get started right from the [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=sdk-backend-page&utm_medium=docs&utm_campaign=docs-to-gateway)! We recognize that a hosted solution for project/subscription management is not ideal for all users and some may want more granular control of subscriptions or limits. Users who are interested in self-custodial project management should learn more about [subscriptions](/subscriptions). +🚀 **开始**:您可以从 [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=sdk-backend-page&utm_medium=docs&utm_campaign=docs-to-gateway)直接开始使用!我们认识到,项目/订阅管理的托管解决方案并不适合所有用户,有些用户可能希望对订阅或限制进行更精细的控制。对自我托管项目管理感兴趣的用户应了解有关 [subscriptions](/subscriptions) 的更多信息。 -## ↪️ Recommended Flow +## ↪️ 建议流程 -Although you can subscribe your private key from the commandline, the easiest way to get started is through Lava's Gateway. -1. Sign up to the Gateway. 👉🏿[Register now](https://gateway.lavanet.xyz/?utm_source=sdk-backend-page&utm_medium=docs&utm_campaign=docs-to-gateway) if you haven’t already! +虽然可以通过命令行订阅私钥,但最简单的方法还是通过 Lava 的网关: -2. Create a Project and Select your APIs! +1. 注册网关。👉🏿[立即注册](https://gateway.lavanet.xyz/?utm_source=sdk-backend-page&utm_medium=docs&utm_campaign=docs-to-gateway) 。 -3. Go to Settings -> Project Keys +2. 创建一个项目并选择您的 API! -4. Click `Add New Key` and decide whether you want to `Generate a new Key` or `Add a public Key` +3. 进入设置 -> 项目密钥 -5. Give a moment for your key to sync! +4. 点击 "添加新密钥 "并决定是 "生成新密钥 "还是 "添加公钥 + +5. 稍等片刻让密钥同步! ![SynchingKey](/img/tutorial/sdk/SynchingKey.png) -6. Install the SDK into your project -> `npm install @lavanet-lava-sdk` +6. 将 SDK 安装到项目中 -> `npm install @lavanet-lava-sdk`. -7. Select any of your API accesses (LavaSDK -> `Use in BackEnd`) & copy & paste your code snippet into your code. +7. 选择任何 API 访问(LavaSDK -> `Use in BackEnd`)并将代码片段复制粘贴到代码中。
-## 🔑 Manual Key Creation +## 🔑 手动创建密钥 - A private-key, public-key pair can also be generated using our [`lavad`](https://github.com/lavanet/lava) binary. The [installation guide](/install-lava) can be very helpful for users looking to use `lavad`.For more information on how to create a lava address consult the [existing documentation](https://docs.lavanet.xyz/wallet#account). +私钥和公钥对也可以使用[' lavad '](https://github.com/lavanet/lava)二进制文件生成。[安装指南](/install-lava)对想要使用`lavad`的用户非常有帮助。有关如何创建熔岩地址的更多信息,请参阅[现有文档](https://docs.lavanet.xyz/wallet#account)。 -If you already have `lavad` installed - you can easily generate a lava address by entering the following command: `lavad keys add ` +如果你已经安装了`lavad `-你可以很容易地通过输入以下命令生成熔岩地址: `lavad keys add ` - If you have an address that exists and no longer remember its private key, you can alwasy use `lavad keys export --unarmored-hex --unsafe` to see your privatekey printed as a string. Do not share the output with anyone! +如果您有一个存在的地址,并且不再记住它的私钥,您可以使用`lavad keys export --unarmored-hex --unsafe` 来查看您的私钥作为字符串打印。不要与任何人分享输出! -🚀 Your private-key, public-key pair can be used for backend development provided you have a subscription! \ No newline at end of file +🚀您的私钥和公钥对可以用于后端开发,只要您有订阅! \ No newline at end of file diff --git a/docs/developer/sdk/sdk-frontend.md b/docs/developer/sdk/sdk-frontend.md index 72208ec9..1b6dacad 100644 --- a/docs/developer/sdk/sdk-frontend.md +++ b/docs/developer/sdk/sdk-frontend.md @@ -1,16 +1,16 @@ --- slug: /sdk-frontend -title: Frontend Use 🛡️ +title: 前端使用 🛡️ --- -# Using LavaSDK +# 使用 LavaSDK -## 🛡️ The Frontend +## 🛡️ 前端 -☠️ **The Problem**: Using private keys on the frontend without special provisions is inherently unsafe. In ordinary development scenarios, private keys from a user can be leaked through the browser. +☠️**问题**:在没有特殊规定的情况下在前端使用私钥本质上是不安全的。在一般的开发场景中,用户的私钥可能会通过浏览器泄露。 -✅ **The Solution**: Lava uses a unique solution called `badges` to solve these limitations. A `badge` consists of several parts and is used in lieu of a private key. It must, however, be signed by an external server that holds the relevant authorizing party's private key. The [default Badge Server](/badge-server#lava-badge-server-) is hosted by Lava and requires no additional configurations. +✅**解决方案**:Lava使用了一种名为`badge`的独特解决方案来解决这些限制。`badge`由几个部分组成,用来代替私钥。但是,它必须由持有相关授权方私钥的外部服务器进行签名。[默认的徽章服务器](/badge-server#lava-badge-server-)由Lava托管,不需要额外的配置。 -🚀 **Get Started**: You can get started right from the [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway)! We recognize that a hosted solution is not ideal for every use case. Users who are interested in accomplishing the highest levels of decentralization may run their own [badge server](/badge-server#running-a-badge-server-experimental-). +🚀**开始**:你可以开始从[Lava门户](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway)!我们认识到托管解决方案并不适合所有用例。对实现最高级别的去中心化感兴趣的用户可以运行他们自己的[徽章服务器](/badge-server#running-a-badge-server-experimental-)。
@@ -19,25 +19,25 @@ title: Frontend Use 🛡️
-## ↪️ Recommended Flow +## ↪️ 推荐流程 -Although you can host your own badge server, the easiest way to get started is through Lava's Gateway. -1. Sign up to the Gateway. 👉🏿[Register now](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway) if you haven’t already! +虽然你可以托管自己的徽章服务器,但最简单的方法是通过Lava的网关开始。 -2. Create a Project and Select your APIs! +1. 注册到网关。👉🏿[现在注册](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway)。 -3. Open an API and click LavaSDK. +2. 创建一个项目并选择你的api ! -3. Install the SDK into your project -> `npm install @lavanet-lava-sdk` +3. 打开API,单击“LavaSDK”。 -4. Copy & paste your code snippet into your code. +3. 安装SDK到你的项目-> ' npm Install @lavanet-lava-sdk ' +4. 复制和粘贴你的代码片段到你的代码。 ## 📛 Badges -### Usage ⚙️ +### 使用 ⚙️ -Badges are objects passed to the SDK instance which allow a user to forgo the usage of private keys. A badge has the following format: +徽章是传递给SDK实例的对象,它允许用户放弃使用私钥。徽章的格式如下: ```jsx const myBadge = { @@ -46,7 +46,7 @@ const myBadge = { }; ``` -A user can initialize the SDK using a badge instead of a privatekey +用户可以使用badge而不是privatekey初始化SDK ```jsx const lavaSDK = await LavaSDK.create({ @@ -56,7 +56,7 @@ const lavaSDK = await LavaSDK.create({ }); ``` -And make calls all the same - no privatekeys exposed! +调用也一样,不会暴露私钥! ```jsx const info = await lavaSDK.sendRelay({ @@ -65,4 +65,4 @@ const info = await lavaSDK.sendRelay({ }); ``` -🚀 That's it. For most users, there is no additional information required to successfully use LavaSDK on the front end! \ No newline at end of file +🚀 就是这样。对于大多数用户来说,在前端成功使用 LavaSDK 不需要其他信息! \ No newline at end of file diff --git a/docs/developer/sdk/sdk-getting-started.md b/docs/developer/sdk/sdk-getting-started.md index c315acc0..658ccdd5 100644 --- a/docs/developer/sdk/sdk-getting-started.md +++ b/docs/developer/sdk/sdk-getting-started.md @@ -1,14 +1,14 @@ --- slug: /sdk-getting-started -title: Getting Started ⚡ +title: 开始 ⚡ --- -# 🔥 Getting Started with Lava SDK +# 🔥 Lava SDK 入门 import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## 🎥 Video Demonstration (~11m) +## 🎥 视频演示 (~11m) @@ -16,14 +16,14 @@ import TabItem from '@theme/TabItem';

-## 📝 Written Guide (~5m) +## 📝 书面指南 (~5m) -### 0. Sign up for an Account on the Gateway! +### 0. 在网关上注册账户! -While not a strict prerequisite for using the SDK - using the [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway) gives an easy and free way to get a `privateKey` and/or `badge`, which LavaSDK requires to initialize. We recommend deciding whether you're going to use Lava on the [backend](/sdk-backend) or [frontend](/sdk-frontend) and starting there. LavaSDK is peer-to-peer (p2p) and executes relays in a decentralized manner. +使用 [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=sdk-frontend-page&utm_medium=docs&utm_campaign=docs-to-gateway)不是使用 SDK 的严格先决条件,但它提供了一种简单、免费的方法来获取 LavaSDK 初始化所需的`privateKey`或 `badge`。我们建议您决定是在 [backend](/sdk-backend) 还是 [frontend](/sdk-frontend) 上使用 Lava,然后从那里开始。LavaSDK 是点对点(p2p)的,以分散的方式执行中继。 -### 1. Set up a new Node.JS project using Node Package Manager -To get started, we'll opt for a simple node application. +### 1. 使用 Node 包管理器创建新的 Node.JS 项目 +首先,我们将选择一个简单的node应用。 ```bash mkdir sdk-project/ @@ -31,7 +31,7 @@ cd sdk-project npm init -y ``` -### 2. Install the SDK using yarn or NPM +### 2. 使用 yarn 或 NPM 安装 SDK ```bash npm i @lavanet/lava-sdk @@ -43,7 +43,7 @@ or yarn add @lavanet/lava-sdk ``` -### 3. Create a new `index.js` file and import the Lava SDK +### 3. 创建新的 `index.js` 文件并导入 Lava SDK ```jsx import { LavaSDK } from "@lavanet/lava-sdk"; @@ -55,13 +55,13 @@ OR const { LavaSDK } = require("@lavanet/lava-sdk") ``` -### 4. Initialize an instance of the SDK! +### 4. 初始化 SDK 实例! :::info -When developing on the [backend](/sdk-backend), it is currently best practice to hide the privatekey in an environmental variable instead of putting it in plain text in your code. For now, we’ll use `privKey` as a stand-in! +在 [backend](/sdk-backend)上开发时,目前的最佳做法是将私钥隐藏在环境变量中,而不是以纯文本形式写入代码。现在,我们将使用 `privKey` 作为代替! -When developing on the [frontend](/sdk-frontend), you don't need to use privatekeys at all. Simply input a badge! +在 [frontend](/sdk-frontend) 上开发时,根本不需要使用私钥。只需输入一个badge即可! ::: @@ -100,26 +100,26 @@ async function useSDK() { -There is no limit to the amount of chains you can handle simultaneously! In addition to those shown in the example above, there are a number of [optional parameters](/sdk-integrations#-all-options) that you can view. +同时处理的链数量没有限制!除了上述示例中显示的参数外,您还可以查看许多 [可选参数](/sdk-integrations#-all-options)。 -A full list of supported chains, their respective IDs, and supported interfaces can be found using `lavad` +使用 `lavad` 可以查看支持的链的完整列表、各自的 ID 和支持的接口。 ```bash lavad q spec show-all-chains ``` -For a short list of just chainIDs run it as follows: +如需查看链 ID 的简短列表,请按以下步骤运行: ```bash lavad q spec show-all-chains | grep chainID ``` -### 5. Make your queries or requests -We'll do so by sending relays within our `useSDK()` function! +### 5. 制作您的查询或请求 +我们将通过在`useSDK()`函数中发送中继来实现! ```jsx -//Example Juno Query - Grab an arbitrary block from Juno! +//示例Juno查询——从Juno获取任意块! const junoBlockResponse = await lavaNetwork.sendRelay({ method: "block", params: ["82500"], @@ -129,7 +129,7 @@ const junoBlockResponse = await lavaNetwork.sendRelay({ console.log("Juno Block: ", junoBlockResponse); -//Example Cosmos Query - Get the latest block from CosmosHub! +//示例Cosmos查询-从CosmosHub获取最新的块! const cosmosBlockResponse = await lavaNetwork.sendRelay({ method: "GET", url: "/cosmos/base/tendermint/v1beta1/blocks/latest", @@ -139,7 +139,7 @@ const cosmosBlockResponse = await lavaNetwork.sendRelay({ console.log("Cosmos Block: ",cosmosBlockResponse) -//Example Polygon Query - Get the most recent block from Polygon! +//示例多边形查询-从Polygon获取最近的块! const polygonBlockResponse = await lavaNetwork.sendRelay({ method: "eth_blockNumber", params: [], @@ -150,9 +150,9 @@ const polygonBlockResponse = await lavaNetwork.sendRelay({ console.log("Polygon Block: ", polygonBlockResponse) ``` -### 6. Now let’s implement the program logic! +### 6. 现在让我们实现程序逻辑! -We want to call `useSDK()` to run asynchronously. +我们想要调用`useSDK()`来异步运行。 ```jsx (async () => { @@ -166,15 +166,15 @@ We want to call `useSDK()` to run asynchronously. node index.js ``` -You should get 3 responses like so: +你将得到3个类似这样的响应: ![Success1](/img/tutorial/sdk/SucccesfulSDKCall1.png) ![Success2](/img/tutorial/sdk/SucccesfulSDKCall2.png) ![Success3](/img/tutorial/sdk/SucccesfulSDKCall3.png) -### **That’s it! You’ve successfully used LavaSDK.** +### **就是这样!您已经成功地使用了LavaSDK。** -For more information look around the rest of our documentation! +有关更多信息,请查看我们的其他文档! -Having trouble? Head to our [Discord!](https://discord.gg/Tbk5NxTCdA) \ No newline at end of file +有困难吗?前往我们的[Discord!](https://discord.gg/Tbk5NxTCdA) \ No newline at end of file diff --git a/docs/developer/sdk/sdk-prerequisites.md b/docs/developer/sdk/sdk-prerequisites.md index 710c1939..bab9397b 100644 --- a/docs/developer/sdk/sdk-prerequisites.md +++ b/docs/developer/sdk/sdk-prerequisites.md @@ -1,11 +1,11 @@ --- slug: /sdk-prerequisites -title: Looking for our SDK? +title: 寻找我们的SDK? --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Looking for our SDK? 🔎 +# 寻找我们的SDK?🔎 ![SDK Install Example](/img/tutorial/sdk/sdk-install.gif) diff --git a/docs/developer/server-kit/access-server-kit.md b/docs/developer/server-kit/access-server-kit.md index f7a2b363..2cc3612d 100644 --- a/docs/developer/server-kit/access-server-kit.md +++ b/docs/developer/server-kit/access-server-kit.md @@ -1,22 +1,22 @@ --- slug: /access-server-kit -title: Server Kit +title: 服务器工具包 --- -# Lava Server Kit +# Lava 服务器工具包 :::note 🧪 -The Lava Server Kit (referenced in code as `RPCConsumer`) is currently in an experimental phase. There may be major and breaking changes during this phase. If you are looking for simple RPC access, consider using the Gateway or SDK instead. If you're looking to tinker, source code is available on our [Github repository](https://github.com/lavanet/lava/tree/main/protocol/rpcconsumer)). +Lava 服务器工具包(代码中称为 `RPCConsumer`)目前处于试验阶段。在这一阶段,可能会有重大的、破坏性的更改。如果您需要简单的 RPC 访问,请考虑使用网关或 SDK。如果您想修修补补,我们的 [Github 代码库](https://github.com/lavanet/lava/tree/main/protocol/rpcconsumer)) 提供了源代码。 ::: -🌋 **Enterprise-grade self-hosted and secure gateway access to Web3 APIs, the Lava way 😉** +🌋 **企业级自托管安全网关访问 Web3 API,Lava 方式😉** -The **Lava Server Kit** is a GO language reference implementation that provides self-hosted gateway access to blockchain APIs, designed as a solution for running as a backend server. It is capable of accepting raw RPC queries, wrapping them up with the protocol layer, and sending them directly to providers on our network in a decentralized manner. The Lava Server Kit is highly concurrent and performant and is used in enterprise-grade applications which require high throughput and efficiency in scaling. +**Lava服务器套件**是GO语言的参考实现,提供区块链应用程序接口的自托管网关访问,旨在作为后端服务器运行的解决方案。它能够接受原始 RPC 查询,用协议层对其进行封装,并以去中心化的方式将其直接发送给我们网络上的提供者。Lava 服务器套件具有高并发性和高性能,适用于需要高吞吐量和高效扩展的企业级应用。 -### Features +### 特点 -1. Serve multiple blockchain RPC endpoints -2. High throughput with multiple sessions -3. Easy setup process \ No newline at end of file +1. 为多个区块链 RPC 端点提供服务 +2. 多个会话的高吞吐量 +3. 设置过程简单 \ No newline at end of file diff --git a/docs/intro/about.md b/docs/intro/about.md index 186268bf..dcdf6225 100644 --- a/docs/intro/about.md +++ b/docs/intro/about.md @@ -21,7 +21,7 @@ flowchart LR Lava是区块链的第一个模块化数据访问层。它引入了 [`specs`](/spec):一种模块化原语,让贡献者无需权限即可向基础协议添加对新链和数据服务的支持。RPC是协议支持的第一个服务,但我们很快将通过与索引和API合作伙伴(例如 Subsquid)进行集成,为用户带来更多选择。 -数据消费者向 Lava 的数据提供商(节点运营商)网络发送请求,后者加入 Lava 以满足数据需求。Lava 围绕任何区块链数据服务创建动态、可扩展的市场。该协议还围绕服务质量(速度、运行时间和数据准确性)创建了加密经济保证。 +数据消费者向 Lava 的数据提供商(节点运营商)发送网络请求,后者加入 Lava 以满足数据需求。Lava 围绕任何区块链数据服务创建动态、可扩展的市场。该协议还围绕服务质量(速度、运行时间和数据准确性)创建了加密经济保证。 通过利用模块化架构和节点运营商的对等网络,Lava创建了一个访问多链世界的统一平台。 diff --git a/docs/intro/faq.md b/docs/intro/faq.md index aa384926..01b86bb1 100644 --- a/docs/intro/faq.md +++ b/docs/intro/faq.md @@ -16,7 +16,7 @@ title: ❓ 常见问题 ## 节点、验证器和提供商 ⏫ {#nodes-validators-providers} ### 🟡 specification是什么?它能让我做什么? {#specs} -specification("spec")是您可以添加到 Lava 的模块,它扩展了提供商网络可提供的数据服务范围。RPC specs是首批添加到 Lava ,我们将很快提供subgraph specs。 +specification("spec")是您可以添加到 Lava 的参数模块,它扩展了提供商网络可提供的数据服务范围。RPC specs是首批添加到 Lava ,我们将很快提供subgraph 参数。 ### 🟡 我在运行安装脚本时有问题。 {#install-troubleshooting} diff --git a/docs/intro/specs/add-spec.md b/docs/intro/specs/add-spec.md index d330ab60..963a298c 100644 --- a/docs/intro/specs/add-spec.md +++ b/docs/intro/specs/add-spec.md @@ -1,26 +1,26 @@ --- slug: /add-spec -title: 添加 Specifications 🔧 +title: 添加参数 🔧 --- -# 向Lava添加Specification +# 向Lava添加参数 ## ℹ️ 内容 -在 Lava 生态系统中创建新的 specification 对于那些希望在网络中扩展或引入新功能的人来说至关重要。Lava 是模块化的;可以支持全新的 API、额外的链和索引器,而无需修改 Lava 协议。在 Lava 中,规范通常被称为 'spec',作为一个基础蓝图,详细描述了特定链或应用程序相关的 API、所需方法、计算单元成本和预期行为。 +在 Lava 生态系统中创建新的参数对于那些希望在网络中扩展或引入新功能的人来说至关重要。Lava 是模块化的;可以支持全新的 API、额外的链和索引器,而无需修改 Lava 协议。在 Lava 中,参数通常被称为 `spec`,作为一个基础蓝图,详细描述了特定链或应用程序相关的 API、所需方法、计算单元成本和预期行为。 -贡献者通过添加新的specs在 Lava 中扮演着至关重要的角色。成为 Lava 的贡献者是整个生态系统中最重要的角色之一。在主网上,计划通过协议的经济机制来奖励贡献者。创建新的规范不仅是扩展 Lava 的一种方式,还具有许多其他好处:它建立了一个针对需求 API 的提供者社区,它允许根据需要以模块化的方式更改 API 集合,并为维护者和规范创建者提供了可能获得奖励的机会。贡献新的规范是非常受欢迎和必要的努力,用于保护和改进 web3 基础设施。 +贡献者通过添加新的参数在 Lava 中扮演着至关重要的角色。成为 Lava 的贡献者是整个生态系统中最重要的角色之一。在主网上,计划通过协议的经济机制来奖励贡献者。创建新的参数不仅是扩展 Lava 的一种方式,还具有许多其他好处:它建立了一个针对需求 API 的提供者社区,它允许根据需要以模块化的方式更改 API 集合,并为维护者和参数创建者提供了可能获得奖励的机会。贡献新的参数是非常受欢迎和必要的努力,用于保护和改进 web3 基础设施。 ## 🏗️ 必要步骤 -如果您正在考虑为 Lava 创建specification,以下是简化流程: +如果您正在考虑为 Lava 创建参数,以下是简化流程: -- 创建spec文件 🖊️: 首先创建一个符合 Lava spec标准的 JSON 文件。您可以从我们的 [reference guide](/spec-reference) 或 [cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs) 了解需要哪些字段。 -- 详细说明功能📝: 在您的spec文件中,指定与您正在考虑的链或API相关的任何导入、加载项和扩展。请确保查看这些[key concepts](/spec#key-concepts-) -- 提交建议书📜: 一旦你的spec准备好了,就把它作为[governance proposal](#⌨️-command)到Lava社区。 -- 社区决策👩🏼‍⚖️🧑🏿‍⚖️ : 如果你的提案获得了足够的支持,它将通过验证人的投票在链上被接受。您可以通过提交[pull request (PR)](https://github.com/lavanet/lava/pulls)继续提供支持,因此,您的spec可以在任何进一步更新之前添加到Lava cookbook中。 +- 创建参数文件 🖊️: 首先创建一个符合 Lava 参数标准的 JSON 文件。您可以从我们的 [reference guide](/spec-reference) 或 [cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs) 了解需要哪些字段。 +- 详细说明功能📝: 在您的参数文件中,指定与您正在考虑的链或API相关的任何导入、加载项和扩展。请确保查看这些[key concepts](/spec#key-concepts-) +- 提交建议书📜: 一旦你的参数准备好了,就把它作为[governance proposal](#⌨️-command)到Lava社区。 +- 社区决策👩🏼‍⚖️🧑🏿‍⚖️ : 如果你的提案获得了足够的支持,它将通过验证人的投票在链上被接受。您可以通过提交[pull request (PR)](https://github.com/lavanet/lava/pulls)继续提供支持,因此,您的参数可以在任何进一步更新之前添加到Lava cookbook中。 ## ⌨️ 命令 diff --git a/docs/intro/specs/spec-guide.md b/docs/intro/specs/spec-guide.md index 89bae267..683841a9 100644 --- a/docs/intro/specs/spec-guide.md +++ b/docs/intro/specs/spec-guide.md @@ -1,12 +1,12 @@ --- slug: /spec-guide -title: Spec 提案指南 📜 +title: 参数提案指南 📜 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Spec 提案指南 (Walk-thru) +# 参数提案指南 (Walk-thru) :::caution 正在建设中 @@ -17,28 +17,28 @@ import TabItem from '@theme/TabItem'; ## 概览 🔎 {#overview} -本指南旨在帮助人们逐步完成撰写和设计spec提案的过程。创建或维护spec的过程一开始可能会让人不知所措,但一旦了解了基本原理,这个过程就会变得简单明了。请跟随下面的步骤,了解制作spec的整个过程。 +本指南旨在帮助人们逐步完成撰写和设计参数提案的过程。创建或维护参数的过程一开始可能会让人不知所措,但一旦了解了基本原理,这个过程就会变得简单明了。请跟随下面的步骤,了解制作参数的整个过程。
## Step 1: 创建proposal/JSON {#create-proposal} -> 创建specification `JSON` 文件 +> 创建技术参数 `JSON` 文件 > -创建specification涉及多个步骤,是一个复杂的过程。为做好准备,您可以做的最好的练习之一就是访问现有specification并检查它们。查看现有specification可以让未来的specification创建者了解specification的标准结构和布局。 +创建技术参数涉及多个步骤,是一个复杂的过程。为做好准备,您可以做的最好的练习之一就是访问现有技术参数并检查它们。查看现有技术参数可以让未来的技术参数创建者了解技术参数的标准结构和布局。 -创建spec有三种方法 +创建参数有三种方法 -1. 📒**Cookbook** - 所有目前在 Lava 上运行的specs都可以在这里找到 - [the Lava cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs). 请使用其中一个开始,根据需要更改字段。 +1. 📒**Cookbook** - 所有目前在 Lava 上运行的技术参数都可以在这里找到 - [the Lava cookbook](https://github.com/lavanet/lava/tree/main/cookbook/specs). 请使用其中一个开始,根据需要更改字段。 2. 📄**Template -** 你可以在[这里](/spec-reference#-file-structure)找到一个空白模板。只要在你编写的过程中填写空白即可。 -3. ✏️**From Scratch -** 完全从头开始编写spec可以避免不必要的混乱和多余的字段。 +3. ✏️**From Scratch -** 完全从头开始编写参数可以避免不必要的混乱和多余的字段。
### 定义 Proposal {#define-proposal} -建议的方法是从零开始,逐个字段进行。让我们从一个空的 JSON 开始,创建我们的头部字段。 这个键称为 `proposal`,它描述了我们即将提出的specifications。 +建议的方法是从零开始,逐个字段进行。让我们从一个空的 JSON 开始,创建我们的头部字段。 这个键称为 `proposal`,它描述了我们即将提出的技术参数。 ```json { @@ -55,11 +55,11 @@ import TabItem from '@theme/TabItem';
-### 定义 Specs {#define-specs} +### 定义参数 {#define-specs} -每个提案向 Lava 引入新的 `specs`。如其他地方所述,`specs` 是 API 提供者必须满足的最低要求,以便提供 API 服务。Lava 使用几个字段来为一个规范建立初始参数,包括一个 `index`,一个 `name`,一个 `data_reliability_enabled` 标记,以及 `minimum_stake_provider` 必须达到的抵押金额。 +每个提案向 Lava 引入新的 `specs`。如其他地方所述,`specs` 是 API 提供者必须满足的最低要求,以便提供 API 服务。Lava 使用几个字段来为一个规范建立初始技术参数,包括一个 `index`,一个 `name`,一个 `data_reliability_enabled` 标记,以及 `minimum_stake_provider` 必须达到的质押金额。 -这些字段与其他字段相结合,构成了spec的第一部分: +这些字段与其他字段相结合,构成了参数的第一部分: ```json { @@ -96,19 +96,19 @@ import TabItem from '@theme/TabItem';
`index` -索引是spec的通用标识符。索引不得与任何其他spec共享。无论spec被引用或导入到何处,它都将被引用。索引的命名约定方法是使用全部大写字母,不包含空格。更短/更简略的索引更受欢迎。(可选)为了缩短长索引,许多spec采用省略元音或缩短单词的策略(例如,`OPTM` 代表 Optimism,`STRK` 代表 Starknet,或 `AGR` 代表 Agoric)。 +索引是参数的通用标识符。索引不得与任何其他参数共享。无论参数被引用或导入到何处,它都将被引用。索引的命名约定方法是使用全部大写字母,不包含空格。更短/更简略的索引更受欢迎。(可选)为了缩短长索引,许多参数采用省略元音或缩短单词的策略(例如,`OPTM` 代表 Optimism,`STRK` 代表 Starknet,或 `AGR` 代表 Agoric)。
`name` -名称是spec的长形描述性标识符。名称应指明spec是什么/与提供类似数据的spec有所区别。如果它是特定区块链的测试网或主网,应明确说明。 +名称是参数的长形描述性标识符。名称应指明参数是什么/与提供类似数据的参数有所区别。如果它是特定区块链的测试网或主网,应明确说明。
`enabled` -enabled字段描述了spec是否处于活跃状态。有时spec可能已定义但未被使用,或者spec可能需要暂时停用。一般情况下,默认值应为true。 +enabled字段描述了参数是否处于活跃状态。有时参数可能已定义但未被使用,或者参数可能需要暂时停用。一般情况下,默认值应为true。
@@ -120,7 +120,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义
`data_reliability_enabled` -数据可靠性应该启用,除非有充分的理由禁用它!默认值为 `true`。这意味着 Lava 协议将通过进行数据可靠性检查来确保数据的准确性。请注意,如果您要为除区块链之外的其他内容创建spec,则应将其设置为 `false`。 +数据可靠性应该启用,除非有充分的理由禁用它!默认值为 `true`。这意味着 Lava 协议将通过进行数据可靠性检查来确保数据的准确性。请注意,如果您要为除区块链之外的其他内容创建参数,则应将其设置为 `false`。 ⚠️ 截至 `lava-testnet-2`,对各种 API 的数据可靠性支持正在进行中。 @@ -128,13 +128,13 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义
`block_distance_for_finalized_data` -这个字段定义了应该被视为安全免受链重组影响的区块数量;它因链而异。可以参考其他类似架构的specs,获取建议的数值。 +这个字段定义了应该被视为安全免受链重组影响的区块数量;它因链而异。可以参考其他类似架构的参数,获取建议的数值。
`blocks_in_finalization_proof` -这个字段定义了在最终性证明中应该包含的区块数量;这会因链而异。请查看其他类似架构的specs以获取建议的数值。 +这个字段定义了在最终性证明中应该包含的区块数量;这会因链而异。请查看其他类似架构的参数以获取建议的数值。
@@ -146,7 +146,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义
`allowed_block_lag_for_qos_sync` -这是在服务提供商提供的数据被视为过时之前可以经过的最大区块数。对于更快的区块链/数据源,将允许更多的区块。对于较慢的区块链/数据源,较少的区块更合适。查看其他类似架构的 specs 以获取数值参考。 +这是在服务提供商提供的数据被视为过时之前可以经过的最大区块数。对于更快的区块链/数据源,将允许更多的区块。对于较慢的区块链/数据源,较少的区块更合适。查看其他类似架构的参数以获取数值参考。
@@ -158,7 +158,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义
`min_stake_provider` -该字段定义了提供商为该 API 提供服务所必须持有的最低金额。该值可与测试网络中所有其他 spec 提供的默认值保持一致。从 `lava-testnet-2` 开始,该金额为 `5000000`,单位为 `ulava`。 +该字段定义了提供商为该 API 提供服务所必须持有的最低金额。该值可与测试网络中所有其他参数提供的默认值保持一致。从 `lava-testnet-2` 开始,该金额为 `5000000`,单位为 `ulava`。
@@ -170,16 +170,16 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义 ## Step 2: 继承 {#inheritance} -> 从现有spec继承属性。 +> 从现有参数继承属性。 > -在定义任何 API 之前,从已存在的specs中提取specs是明智的做法,以节省工作量。Lava 中的大多数 API 使用共同的方法,并且可以根据已在链上使用的specs创建。在 Lava 中,我们称这个从先前specs中借用的过程为继承。specs使用继承来消除冗余,最小化大小,并节省时间。另一个好处是 - 当继承的specs更新时,它们的后代specs会自动拉取更新!继承使事情变得容易。 +在定义任何 API 之前,从已存在的参数中提取参数是明智的做法,以节省工作量。Lava 中的大多数 API 使用共同的方法,并且可以根据已在链上使用的参数创建。在 Lava 中,我们称这个从先前参数中借用的过程为继承。参数使用继承来消除冗余,最小化大小,并节省时间。另一个好处是 - 当继承的参数更新时,它们的后代参数会自动拉取更新!继承使事情变得容易。 ### 导入 {#imports} -导入一般会引入所有解析指令、验证、API集合和默认API。要重写特定的强制行为——只需在继承specs中定义parse_directive、verification、API集合或API的`name`(如果编辑的是parse指令,则是`function_tag`)。 +导入一般会引入所有解析指令、验证、API集合和默认API。要重写特定的强制行为——只需在继承参数中定义parse_directive、verification、API集合或API的`name`(如果编辑的是parse指令,则是`function_tag`)。 -要继承一个新specs,使用`imports`字段: +要继承一个新参数,使用`imports`字段: ```json "specs": [ @@ -216,7 +216,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义 ``` :::info -通常情况下,spec将只使用上述导入中的一种。spec是完全模块化的,可以导入任何其他spec。例如,在设计主网spec和测试网spec时,这种模块化设计模式会派上用场。通常,测试网spec只是简单地继承主网spec,不需要进一步的配置。 +通常情况下,参数将只使用上述导入中的一种。参数是完全模块化的,可以导入任何其他长春市。例如,在设计主网参数和测试网参数时,这种模块化设计模式会派上用场。通常,测试网参数只是简单地继承主网参数,不需要进一步的配置。 ::: ### 继承 APIs {#inheritance-apis} @@ -232,7 +232,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义 > 指定提供商必须使用的API集合和接口。 -每个spec可以包含多个类别的 API 集合。尽管 API 集合的构造类似,但它们被分成不同的接口。如果一个spec只包含它导入的另一个spec的 API,那么可能根本不需要定义 API 集合... +每个参数可以包含多个类别的 API 集合。尽管 API 集合的构造类似,但它们被分成不同的接口。如果一个参数只包含它导入的另一个参数的 API,那么可能根本不需要定义 API 集合... 下面定义了一些应用程序接口集合示例(差异*高亮显示*): @@ -449,7 +449,7 @@ enabled字段描述了spec是否处于活跃状态。有时spec可能已定义 🔖参考资料: [Parsing](/spec-reference#parsing) -如果导入了spec,那么很可能已经为您处理过了,不需要定义。但是,如果没有导入,则需要 +如果导入了参数,那么很可能已经为您处理过了,不需要定义。但是,如果没有导入,则需要 ```json { @@ -501,7 +501,7 @@ Lava数据可靠性检查要成功,必须定义Get_BlockNum和Get_Block_by_Num ## Step 4: 新 APIs {#new-apis} -> 设计不继承自其他spec的api。 +> 设计不继承自其他参数的api。 @@ -528,7 +528,7 @@ Lava数据可靠性检查要成功,必须定义Get_BlockNum和Get_Block_by_Num ``` ### 区块解析 -该区域用于描述如何从API请求中提取块号。一定要检查解析参考和几个spec示例,以确保它的定义是正确的。 +该区域用于描述如何从API请求中提取块号。一定要检查解析参考和几个参数示例,以确保它的定义是正确的。 🔖参考资料: [`Block Parsing`](/spec-reference#block-parsing), [`Parsing`](/spec-reference#parsing-) @@ -572,7 +572,7 @@ subscription指示何时使用提供商打开流API (wss当前已禁用)。 ### 其他字段 -对于其他字段,请查看参考资料并观察其他specs。 +对于其他字段,请查看参考资料并观察其他参数。 🔖参考资料: [`APIs`](/spec-reference#apis) @@ -621,7 +621,7 @@ subscription指示何时使用提供商打开流API (wss当前已禁用)。 > 定义可选的API集合,提供者可以选择为更多的CU提供服务 > -Specs是高度模块化和可组合的。有时,提供商的最低要求可能不能满足网络上的所有消费者。归档节点就是一个很好的例子;并不是网络上的每个提供商都需要提供存档数据,但是对于那些想要选择加入的人,您可以使用扩展来定义规则和奖励。插件是一组非强制性的附加API集合——一个很好的例子就是一个响应调试API的节点! +参数是高度模块化和可组合的。有时,提供商的最低要求可能不能满足网络上的所有消费者。归档节点就是一个很好的例子;并不是网络上的每个提供商都需要提供存档数据,但是对于那些想要选择加入的人,您可以使用扩展来定义规则和奖励。插件是一组非强制性的附加API集合——一个很好的例子就是一个响应调试API的节点! ### 创建插件 @@ -730,14 +730,14 @@ Specs是高度模块化和可组合的。有时,提供商的最低要求可能 ./scripts/test_spec_full.sh cookbook/specs/spec_add_X.json ``` -它将搭建一个本地区块链,并创建一个由几个运行该spec的提供商组成的测试网络!您可以实时看到错误,这将提醒您需要调试的地方。一旦您调试了所有问题-继续下一步! +它将搭建一个本地区块链,并创建一个由几个运行该参数的提供商组成的测试网络!您可以实时看到错误,这将提醒您需要调试的地方。一旦您调试了所有问题-继续下一步!
## Step 9: 推送到您的仓库并分享 {#push-and-share} -> Add your `JSON` file to your local `cookbook/spec/` directory. +> 将您的 `JSON` 文件添加到本地的 `cookbook/spec/` 目录中。 与[Lava团队和社区!](https://discord.gg/Tbk5NxTCdA)分享您的进展 diff --git a/docs/intro/specs/spec-reference.md b/docs/intro/specs/spec-reference.md index c36bc1d5..d9b2ff61 100644 --- a/docs/intro/specs/spec-reference.md +++ b/docs/intro/specs/spec-reference.md @@ -5,7 +5,7 @@ title: 参考指南 📐 # Spec 参考指南 -本指南详细参考了Lava网络中的各种规范。它包含了提案、specs、API集合、服务API和相关扩展的结构和定义。目标是确保开发人员、验证人员和其他涉众对配置和功能有一个清晰和一致的理解。 +本指南详细参考了Lava网络中的各种规范。它包含了提案、参数、API集合、服务API和相关扩展的结构和定义。目标是确保开发人员、验证人员和其他涉众对配置和功能有一个清晰和一致的理解。

@@ -297,7 +297,7 @@ Spec (JSON)
🗉 `deposit` -在去中心化设置中,添加或更新specs等操作可能需要共识或批准。“存款”指定了“ulava”(lava网络的本地令牌)的数量,必须作为提案specs入场费存入。它类似于保证金或质押,确保只有严肃和真正的提案被提交,并可能防止垃圾邮件或恶意行为。 +在去中心化设置中,添加或更新参数等操作可能需要共识或批准。“存款”指定了“ulava”(lava网络的本地令牌)的数量,必须作为提案参数入场费存入。它类似于保证金或质押,确保只有严肃和真正的提案被提交,并可能防止垃圾邮件或恶意行为。
diff --git a/docs/intro/specs/spec.md b/docs/intro/specs/spec.md index e5609498..f4f1e46d 100644 --- a/docs/intro/specs/spec.md +++ b/docs/intro/specs/spec.md @@ -1,9 +1,9 @@ --- slug: /spec -title: Specifications模块 +title: 技术参数模块 --- -# Specifications模块 (Specs) +# 技术参数模块 (Specs) import RoadmapItem from '@site/src/components/RoadmapItem'; @@ -11,9 +11,9 @@ import RoadmapItem from '@site/src/components/RoadmapItem'; ## 🔍 概览 -Specifications(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈现,详细说明了在Lava上运行API的最低要求。通过这些规范,Lava确定支持和启用哪些链和方法,并为它们确定成本、需求和验证。 +技术参数(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈现,详细说明了在Lava上运行API的最低要求。通过这些技术参数,Lava确定支持和启用哪些链和方法,并为它们确定成本、需求和验证。 -每当生态系统需要新的API时,就会集成新的spec。这种动态方法将模块化和可扩展性直接合并到协议中,并确保Lava保持最新和可适应性。 +每当生态系统需要新的API时,就会集成新的技术参数。这种动态方法将模块化和可扩展性直接合并到协议中,并确保Lava保持最新和可适应性。
@@ -27,11 +27,11 @@ Specifications(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈 ## 📖 主要概念 ### 索引 📑 {#index} -`index`是spec的名称。 任何时候引用spec都将通过其`index`。 +`index`是技术参数的名称。 任何时候引用技术参数都将通过其`index`。
示例 -你可以在生产环境中看到`EVMOS`规范: +你可以在生产环境中看到`EVMOS`参数: ```json { @@ -47,11 +47,11 @@ Specifications(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈

### 导入 ⬇️ {#imports} -`imports`是对从其他源借用的函数的引用。相同或类似架构的api /chain 可以使用其`index`从现有规范中导入方法并实现任何新逻辑。`imports`通过消除重复集成相同api的需要来提高效率。 +`imports`是对从其他源借用的函数的引用。相同或类似架构的api /chain 可以使用其`index`从现有技术参数中导入方法并实现任何新逻辑。`imports`通过消除重复集成相同api的需要来提高效率。
示例 -下面的spec同时实现了Cosmos和Ethereum的方法: +下面的参数同时实现了Cosmos和Ethereum的方法: ```json "imports": [ @@ -62,7 +62,7 @@ Specifications(specs)是Lava多链支持的基础蓝图。它们以JSON格式呈

### API集合 🛠️ {#api_collections} -specification总是包含一个`api_collection`。`api_collection`包含可用的激活方法或api的列表以及它们各自的`api_interface `(例如:“`"rest"`,`"grpc"`,`"jsonrpc"`,`"tendermintrpc"`”,等等)。换句话说,它概述了所有必须是活动的和可操作的API或方法,以支持特定的chain/API。这里列出的每个方法都必须由提供者提供服务,并对使用者负责。 +参数总是包含一个`api_collection`。`api_collection`包含可用的激活方法或api的列表以及它们各自的`api_interface `(例如:“`"rest"`,`"grpc"`,`"jsonrpc"`,`"tendermintrpc"`”,等等)。换句话说,它概述了所有必须是活动的和可操作的API或方法,以支持特定的chain/API。这里列出的每个方法都必须由提供者提供服务,并对使用者负责。
示例 @@ -114,7 +114,7 @@ specification总是包含一个`api_collection`。`api_collection`包含可用 ### 附加组件 ➕ {#addons} -附加组件 (`"add-on"`)引入了可选的新方法和API,这些超出了chain/API的基本要求。它们类似于插件或模块,特定的使用者可以不时地请求,提供商可以选择提供服务以获得额外的奖励。这允许在spec中概述补充功能,使提供商和使用者都可以灵活地定制他们的体验。 +附加组件 (`"add-on"`)引入了可选的新方法和API,这些超出了chain/API的基本要求。它们类似于插件或模块,特定的使用者可以不时地请求,提供商可以选择提供服务以获得额外的奖励。这允许在参数中概述补充功能,使提供商和使用者都可以灵活地定制他们的体验。
示例 @@ -143,7 +143,7 @@ specification总是包含一个`api_collection`。`api_collection`包含可用

### 扩展 〰️ {#extensions} -`"extensions"`允许针对特殊用例调整或增强规范中的现有方法和api。它们提供了根据用户子集的需求调整、优化或扩展当前函数的方法,这些用户子集需要通过指定的方法调用实现更多的功能。这允许在spec中概述替代功能,为提供商和使用者提供服务/请求特殊功能的灵活性。 +`"extensions"`允许针对特殊用例调整或增强参数中的现有方法和api。它们提供了根据用户子集的需求调整、优化或扩展当前函数的方法,这些用户子集需要通过指定的方法调用实现更多的功能。这允许在参数中概述替代功能,为提供商和使用者提供服务/请求特殊功能的灵活性。
示例 diff --git a/docs/lava-blockchain/badge-server.md b/docs/lava-blockchain/badge-server.md index ea6cebfb..1c27ef54 100644 --- a/docs/lava-blockchain/badge-server.md +++ b/docs/lava-blockchain/badge-server.md @@ -1,32 +1,32 @@ --- slug: /badge-server -title: Badge Server +title: 徽章服务器 --- -# Badge Server +# 徽章服务器 -## Overview 🔎 +## 概览 🔎 -The badge server's primary function is to generate badges. Badges allow a user to make calls to any supported API without providing their private key. To do so, each badge server requires access to a valid private key associated with a project that is registered on-chain. This server is purposefully designed to be versatile, supporting multiple project configurations tailored for various decentralized applications (dApps). It achieves this flexibility through the use of several highly configurable environment variables. This approach ensures that the badge server can adapt to the specific needs of different dApps while maintaining a seamless and organized system for badge generation. +徽章服务器的主要功能是生成徽章。徽章允许用户调用任何支持的 API 而无需提供其私钥。为此,每个徽章服务器都需要访问与链上注册的项目相关联的有效私钥。该服务器被专门设计为通用性强,支持多个专为不同去中心化应用(dApps)定制的项目配置。它通过使用几个高度可配置的环境变量来实现这种灵活性。这种方法确保了徽章服务器能够适应不同 dApps 的特定需求,同时保持了徽章生成的无缝和有序系统。 -When the badge server receives a request to generate a badge, it performs the following check: If the project specified in the request exists in the server's configuration, it uses the private key associated with that project to sign the badge. However, if the project is not found in the configuration, the server defaults to using a predefined default configuration for the badge signing process. +当徽章服务器收到生成徽章的请求时,它执行以下检查:如果请求中指定的项目在服务器的配置中存在,则使用与该项目关联的私钥来签署徽章。但是,如果在配置中未找到该项目,则服务器将默认使用预定义的默认配置来进行徽章签名过程。 -## Lava Badge Server 🌋 +## Lava 徽章服务器 🌋 -Lava provides a hosted solution so that users do not have to spin up their own badge server! Lava's default badge server is reachable at `https://badges.lavanet.xyz`. A user can generate badges for use with Lava's badge server by creating projects on the [Lava Gateway](https://gateway.lavanet.xyz/?utm_source=badge-server&utm_medium=docs&utm_campaign=lava-phase-2). +Lava提供了托管解决方案,使用户无需自行启动徽章服务器!Lava的默认徽章服务器可通过 `https://badges.lavanet.xyz` 访问。用户可以通过在[Lava网关](https://gateway.lavanet.xyz/?utm_source=badge-server&utm_medium=docs&utm_campaign=lava-phase-2)上创建项目来生成与Lava徽章服务器一起使用的徽章。 -## Running a Badge Server *(Experimental)* 🧪 +## 运行徽章服务器 *(实验性)* 🧪 :::warning -Running a badge server is advanced and requires a lot more setup than using Lava's default badge server. We recommend using the [Lava Gateway!](https://gateway.lavanet.xyz/?utm_source=sdk-frontend&utm_medium=docs&utm_campaign=docs-to-gateway) instead. +运行徽章服务器比较复杂,需要比使用 Lava 默认徽章服务器更多的设置。我们建议使用 [Lava Gateway!](https://gateway.lavanet.xyz/?utm_source=sdk-frontend&utm_medium=docs&utm_campaign=docs-to-gateway)。 ::: -### 📥 Install `lavap` +### 📥 下载 `lavap` -Follow instructions at the [install page](/install-lava) to setup `lavap` +按照[安装页面](/install-lava) 的说明设置 `lavap ```bash git clone https://github.com/lavanet/lava.git @@ -37,27 +37,27 @@ LAVA_BINARY=lavap make install
-### 🪛 Configure Environmental Variables -`lavap` uses a `badgegenerator` command to set up the badge server. `badgegenerator` command takes a series of inputs from environmental variables. Some of these variables have default values, but others will be required to be configured to successfully run a badge server. To get started, you'll need to configure the environmental variables properly. +### 🪛 配置环境变量 +`lavap` 使用 `badgegenerator` 命令来设置徽章服务器。徽章生成器 "命令从环境变量中获取一系列输入。其中一些变量有默认值,但要成功运行徽章服务器,还需要对其他变量进行配置。要开始使用,你需要正确配置环境变量。
#### `PORT` -This specifies the port that the badge server will run on. +指定徽章服务器运行的端口。 ```bash -#default value +#默认端口 PORT=8080 ```
#### `METRICS_PORT` -The Metrics Port is used by Prometheus to track three metrics: - - Total Requests - - Failed Requests - - Successful Processed Requests +指标端口用于Prometheus跟踪三个指标: +- 总请求数 +- 失败请求 +- 成功处理的请求 ```bash @@ -70,7 +70,7 @@ METRICS_PORT=8081 #### `USER_DATA` -Within this variable, lies a mapping structure, where each entry connects a geolocation # to a project ID complete with the relevant keys and settings. It is in JSON format and used for the encryption mechanism of the badge server. +在这个变量内,存在一个映射结构,其中每个条目将一个地理位置 # 与一个项目 ID 相连接,包含相关的密钥和设置。它采用 JSON 格式,并用于徽章服务器的加密机制。 ```json { @@ -100,7 +100,7 @@ Within this variable, lies a mapping structure, where each entry connects a geol #### `GRPC_URL` -This specifies the URL of the node with exposed gRPC port. Badge servers require access to a node with gRPC in order to function correctly. +这指定了具有暴露 gRPC 端口的节点的 URL。徽章服务器需要访问具有 gRPC 的节点才能正常运行。 ```bash GRPC_URL=public-rpc-testnet2.lavanet.xyz:9090 @@ -108,7 +108,7 @@ GRPC_URL=public-rpc-testnet2.lavanet.xyz:9090
#### `CHAIN_ID` -This specifies the chain that will be used for providing badges. +这指定将用于提供徽章的链。 ```bash #default value @@ -118,7 +118,7 @@ CHAIN_ID=lava-tesnet-2
#### `DEFAULT_GEOLOCATION` -This holds importance as it serves as a fallback mechanism in cases where the user's country of origin cannot be determined for any reason. In such instances, the system defaults to the value specified in this variable. +这一点非常重要,因为它在用户的原籍国无法确定的情况下充当备用机制。在这种情况下,系统将默认使用该变量中指定的值。 ```bash #default value @@ -129,24 +129,24 @@ DEFAULT_GEOLOCATION=1 #### `COUNTRIES_FILE_PATH` -This is the path-to-file for a CSV (Comma-Separated Values) file containing essential data about various countries, along with their corresponding links to Lava-geolocation information. This file structure consists of four columns: `country-code`, `country-name`, `continent code`, and `lava-geolocation`. +这是一个 CSV(逗号分隔值)文件的路径,其中包含各个国家的基本数据,以及它们对应的 Lava 地理位置信息的链接。该文件结构包括四列:`country-code`、`country-name`、`continent code` 和 `lava-geolocation`。 -You can download the file needed [here](https://storage.googleapis.com/lavanet-public-asssets/countries.csv). +您可以下载所需的文件 [此处](https://storage.googleapis.com/lavanet-public-asssets/countries.csv)。
#### `IP_FILE_PATH` -This is the path-to-file for a TSV (Tab-Separated Values) document containing IP address ranges and their corresponding country codes. The file consists of five columns: `range_start`, `range_end`, `AS_number`, `country_code`, and `AS_description`. +这是一个包含 IP 地址范围及其对应国家代码的 TSV(制表符分隔值)文档的文件路径。该文件包括五列:`range_start`、`range_end`、`AS_number`、`country_code` 和 `AS_description`。 -It is available for download at the following location: [ip2asn-v4.tsv](https://iptoasn.com/) +可从以下位置下载: [ip2asn-v4.tsv](https://iptoasn.com/)

-### 🔨 Run the `badgegenerator` command +### 🔨 运行 `badgegenerator` 命令 -Once you've taken the time to configure environmental variables, there is less need to use flags. The magic happens all with a single command: +一旦你花时间配置了环境变量,就不再需要使用flags了。只需一条命令,就能实现神奇的效果: ``` lavap badgegenerator --log_level debug @@ -154,15 +154,15 @@ lavap badgegenerator --log_level debug :::tip -`log_level` should be set to `debug`. Setting to `debug` ensures that errors are caught in this experimental phase! +`log_level` 应设置为 `debug`。将其设置为 `debug` 可确保在这个实验阶段捕获错误! :::
-### 📏 Create and use a `badge` with LavaSDK +### 📏 使用 LavaSDK 创建和使用 `badge` -You can test the functionality of your badge server by asking it to sign a self-generated badge! +您可以让徽章服务器签署一个自己生成的徽章,以此来测试徽章服务器的功能! ```javascript const lavaSDK = await LavaSDK.create({ diff --git a/docs/lava-blockchain/faucet.mdx b/docs/lava-blockchain/faucet.mdx index 3016ab7b..f93aab12 100644 --- a/docs/lava-blockchain/faucet.mdx +++ b/docs/lava-blockchain/faucet.mdx @@ -1,25 +1,25 @@ --- sidebar_position: 11 -title: Faucet +title: 水龙头 slug: /faucet --- import RoadmapItem from '@site/src/components/RoadmapItem'; -### Faucet community guidelines +### 水龙头社区指南 -As a member of the Lava community, we ask that you follow these guidelines when using the testnet faucet: +作为 Lava 社区的一员,我们要求您在使用测试网水龙头时遵循以下准则: -- Use the faucet responsibly. The testnet faucet is provided for testing purposes only, and is not intended for excessive or abusive usage. Please use the faucet only when necessary for testing and development. -- Do not share your testnet faucet tokens with others. The testnet faucet is for the use per user, and we ask that you respect the resources provided by not sharing access with others. -- Report any issues or bugs. If you encounter any issues or bugs while using the testnet faucet, please report them to our team in Discord so that we can address them as soon as possible. +- 负责使用水龙头。测试网水龙头仅供测试目的使用,不应用于过度或滥用。请仅在测试和开发时必要时使用水龙头。 +- 不要与他人分享您的测试网水龙头令牌。测试网水龙头是每个用户使用的,我们要求您尊重提供的资源,不要与他人分享访问权限。 +- 报告任何问题或错误。如果您在使用测试网水龙头时遇到任何问题或错误,请在 Discord 中向我们的团队报告,以便我们尽快解决。 -By following these guidelines, you will help ensure that the testnet faucet remains a valuable resource for the Lava community. Thank you for your cooperation! +通过遵循这些准则,您将帮助确保测试网水龙头对 Lava 社区保持有价值的资源。感谢您的合作! -## Discord Faucet -The Discord faucet is the recommended method for obtaining testnet LAVA, as it offers a larger dispense amount compared to the API faucet. Please note that the Discord faucet has a verification process in place to ensure fair usage. +## Discord 水龙头 +Discord 龙头是获取测试网 LAVA 的推荐方法,因为与 API 龙头相比,它的分配数量更大。请注意,Discord 龙头有一个验证程序,以确保公平使用。 [](https://discord.gg/5VcqgwMmkA) -## API Faucet -_API faucet is paused until further notice, please use the Discord faucet_. +## API 水龙头 +_在另行通知之前,API 龙头已暂停,请使用 Discord 龙头_。 diff --git a/docs/lava-blockchain/hardware-requirements.md b/docs/lava-blockchain/hardware-requirements.md index 591c5ee8..7c6ae580 100644 --- a/docs/lava-blockchain/hardware-requirements.md +++ b/docs/lava-blockchain/hardware-requirements.md @@ -1,23 +1,23 @@ --- sidebar_position: 1 slug: /reqs -title: Hardware requirements +title: 硬件要求 --- -## Deployment options -- VPS instance (on any cloud provider) - recommended ⭐️ -- Shared compute instance (e.g. AWS EC2 instance) -- Your personal station +## 部署选项 +- VPS 实例(任何云提供商)--建议使用 ⭐️ +- 共享计算实例(如 AWS EC2 实例) +- 您的个人工作站 -**Docker** container are available at [Lava's repository on GitHub](https://github.com/lavanet/lava/tree/main/docker) +**Docker**容器可从[Lava 在 GitHub 上的存储库](https://github.com/lavanet/lava/tree/main/docker) 获取。 -## Hardware requirements +## 硬件要求 -As the network grows, bandwidth, CPU, and memory requirements rise. Large hard drives are recommended for storing years of blockchain history, as well as significant RAM to process the increasing amount of transactions. +随着网络的增长,带宽、CPU 和内存需求也会增加。建议使用大容量的硬盘来存储多年的区块链历史记录,并且需要足够的RAM来处理不断增加的交易量。 -Also, running on testnet and mainnet will feature different requirements. +此外,在测试网和主网上运行将具有不同的要求。 -**Recommended for Testnet** +**推荐用于测试网** | Node Type | RAM | Storage | CPU | ----------- | --------------------- | ----------- | --- @@ -25,30 +25,30 @@ Also, running on testnet and mainnet will feature different requirements. | Full (Recommended)| 16GB | 512GB SSD | x64 2.0 GHz 4v CPU
-Running on AWS? +AWS上运行? -Settings: +设置: -- Minimum `Instance Type` - **`c4.xlarge`** +- 最小`Instance Type` - **`c4.xlarge`** - `Configure storage` - **`GP2 drive`**
-### Operating system -- For using the prebuilt `lavad` - you need to run **`Ubuntu` - `20`** or newer. -- sudo permissions on your machine (e.g. can run `sudo hostname`) +### 操作系统 +- 对于使用预构建的 `lavad` - 您需要运行 **`Ubuntu` - `20`** 或更新版本。 +- 您的计算机需要具有 sudo 权限(例如,可以运行 `sudo hostname`)。 :::info -Need to run a different OS? Let us know in Discord. +需要运行不同的操作系统?请在 Discord 告诉我们。 ::: -## Network configurations -- Outbound - allow all traffic -- Inbound - open the following ports: +## 网络配置 +- 出站流量 - 允许所有流量 +- 入站流量 - 打开以下端口: - 1317 - REST - 26657 - TENDERMINT_RPC - 26656 - Cosmos - - *Running as a Provider? Add these specific ports*: - - 22221 - provider port - - 22231 - provider port - - 22241 - provider port + - *作为提供者运行?添加以下特定端口*: + - 22221 - 提供者端口 + - 22231 - 提供者端口 + - 22241 - 提供者端口 \ No newline at end of file diff --git a/docs/lava-blockchain/install-lava.md b/docs/lava-blockchain/install-lava.md index 590328ba..4c61ded9 100644 --- a/docs/lava-blockchain/install-lava.md +++ b/docs/lava-blockchain/install-lava.md @@ -1,50 +1,50 @@ --- sidebar_position: 2 slug: /install-lava -title: Build & Install +title: 构建 & 安装 --- -# Build & Install Lava Binaries +# 构建 & 安装 Lava 二进制文件 -## 🔍 Overview +## 🔍 概览 -Lava has three binaries which fulfill different functions: +Lava 有三个不同功能的二进制文件: -- `lavad` - consensus mechanisms, node running, genesis files, key creation / management +- `lavad` - 共识机制、节点运行、创世文件、密钥创建/管理 -- `lavap` - protocol services, rpcconsumer, rpcprovider, badge server +- `lavap` - 协议服务、RPC 消费者、RPC 提供者、徽章服务器 -- [`lavavisor`](/lavavisor) - automated rpcprovider & rpcconsumer initialization and updating / synchronization of `lavap` +- [`lavavisor`](/lavavisor) - 自动化的 RPC 提供者和 RPC 消费者初始化以及 `lavap` 的更新/同步 -## 📋 Prerequisites +## 📋 必要准备 -### Operating System 💾 +### 操作系统 💾 -Lava is designed to run on ***nix style operating systems**. While running in other setups is possible, it is generally discouraged as it may produce unexpected behavior. +Lava 设计用于在 ***nix 风格操作系统** 上运行。虽然在其他设置中运行是可能的,但通常不建议,因为它可能会产生意外。 ### Go 📇 -Lava requires `go` version `1.20.3` or greater. Run `go version` to confirm your version. +Lava 需要 `go` 1.20.3 或更高版本。运行 `go version` 确认您的版本。 -Get the [latest release](https://go.dev/doc/install)! +获取 [latest release](https://go.dev/doc/install)! ### Packages 📦 -The following packages are known dependencies of the install process: +以下软件包是安装程序的已知依赖包: `make` `gcc` `jq` `unzip` `coreutils` `git`

-## 🗄️ Installation Options +## 🗄️ 安装选项 -### Install all Binaries 🛠️ **(Recommended)** +### 安装所有二进制文件 🛠️ **(Recommended)** -Enter the following commands: +输入以下命令: ```bash git clone https://github.com/lavanet/lava.git @@ -52,13 +52,13 @@ cd lava make install-all ``` -✅ Run `lavad version && lavap version` to ensure you've gotten the [latest releases](https://github.com/lavanet/lava/releases)! +✅ 运行 `lavad version && lavap version` 以确保获得 [最新版本](https://github.com/lavanet/lava/releases)!
-### Install a Specific Binary 🔧 +### 安装指定二进制文件 🔧 -Select between `lavad`, `lavap`, and `lavavisor` and enter the following: +在 `lavad`, `lavap`, 和`lavavisor`之间选择,然后输入以下内容: ```bash git clone https://github.com/lavanet/lava.git @@ -66,13 +66,13 @@ cd lava LAVA_BINARY= make install ``` -✅ Run ` --help` to ensure it installed properly. +✅ 运行` --help`以确保正确安装。
-### Build all Binaries Locally 🗜️ +### 在本地编译所有二进制文件 🗜️ -Enter the following commands: +输入以下命令: ```bash git clone https://github.com/lavanet/lava.git @@ -80,16 +80,16 @@ cd lava make build-all ``` -📁 You will now have all three binaries (`lavad`,`lavap`,`lavavisor`) in `./build/` +📁 现在,三个二进制文件(`lavad`,`lavap`,`lavisor`)都在`./build/`中了。 -✅ Run `lavad version && lavap version` to ensure you've gotten the [latest releases](https://github.com/lavanet/lava/releases)! +✅ 运行 `lavad version && lavap version` 以确保获得 [最新版本](https://github.com/lavanet/lava/releases)!
-### Build a Specific Binary Locally 🔨 +### 在本地构建特定二进制文件 🔨 -Select between `lavad`, `lavap`, and `lavavisor` and enter the following: +在 `lavad`, `lavap`,和 `lavavisor`之间选择,然后输入以下内容: ```bash git clone https://github.com/lavanet/lava.git @@ -97,6 +97,6 @@ cd lava LAVA_BINARY= make build ``` -📁 You will now have the binary of your choice in `./build/` +📁 现在,您可以在 `./build/` 中选择二进制文件。
\ No newline at end of file diff --git a/docs/lava-blockchain/join-testnet-auto.md b/docs/lava-blockchain/join-testnet-auto.md index 855aa528..e6117ee4 100644 --- a/docs/lava-blockchain/join-testnet-auto.md +++ b/docs/lava-blockchain/join-testnet-auto.md @@ -1,21 +1,20 @@ --- sidebar_position: 2 slug: /testnet-auto -title: Option A - Automatic (Cosmovisor) +title: 选项 A - 自动(Cosmovisor) --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Join testnet - Automatic setup with Cosmovisor +# 加入测试网 - 使用 Cosmovisor 进行自动设置 -This section will help you onboard Lava network with the "automatic scripts" flow: installing a node and joining the network. -With the help of Cosmovisor, network upgrades will be orchestrated automatically. +这一部分将帮助您通过“自动脚本”流程加入 Lava 网络:安装节点并加入网络。借助 Cosmovisor,网络升级将自动进行调度。 -Before starting, verify [hardware requirements](reqs) are met. +在开始之前,请验证[硬件要求](reqs)是否满足。 -### 1. Install node (`lavad`) & Join network +### 1. 安装节点 (`lavad`) 并加入网络 -**Prepare** +**准备** ```bash sudo apt update ``` @@ -24,13 +23,13 @@ sudo apt update sudo apt install curl jq unzip coreutils -y ``` -**Install and join the network** +**安装并加入网络** -Running the script will: +运行该脚本将: -1. Install `lavad` (using Cosmovisor) -2. Join the testnet -3. Sync to latest block +1. 安装 `lavad` (使用 Cosmovisor) +2. 加入测试网络 +3. 同步到最新区块 ```bash curl -s --location \ @@ -40,39 +39,39 @@ chmod +x 00_join_network.sh && \ ./00_join_network.sh ``` -### 2. Verify +### 2. 验证 -#### Verify `cosmovisor` setup +#### 验证 `cosmovisor` 设置 -Make sure `cosmovisor` is running by checking the state of the cosmovisor service: +通过检查 cosmovisor 服务的状态,确保 `cosmovisor` 正在运行: ```bash -# Check the service status - you should expect the service to be "Active", if you see errors connecting to peers, that is normal +# 检查服务状态--你应该希望服务处于 "激活 "状态,如果你看到连接到对等设备时出现错误,那是正常的。 sudo systemctl status cosmovisor -# To view the service logs - verify that you can see the blocks height advancing +# 要查看服务日志,请确认您可以看到正在推进的区块高度。 sudo journalctl -u cosmovisor -f ``` -#### Verify node status +#### 验证节点状态 -Note the location of `lavad` now exists under cosmovisor path: +注意 `lavad` 的位置现在存在于 cosmovisor 路径下: ```bash -# Check if the node is currently in the process of catching up +# 检查节点当前是否处于追赶最新区块过程中 $HOME/.lava/cosmovisor/current/bin/lavad status | jq ``` -🛟 Problems? Head over to our [FAQ's section](./faq#i-have-problems-running-the-install-scripts) +🛟 有问题?请访问我们的 [常见问题](./faq#i-have-problems-running-the-install-scripts) 部分。 -## Welcome to Lava Testnet 🌋 +## 欢迎访问 Lava Testnet 🌋 -:::tip Joined Testnet? Be a validator! -You are now running a Node in the Lava network 🎉🥳! +:::tip 已加入 Testnet?成为验证者 +您现在正在 Lava 网络中运行一个节点🎉🥳! -Congrats, happy to have you here 😻 Celebrate it with us on Discord. +祝贺您,很高兴您来到这里 😻 在 Discord 上与我们一起庆祝。 -When you're ready, start putting the node to use **as a validator**: +准备就绪后,开始将节点用作**验证器**: [](/validator-auto#account) ::: \ No newline at end of file diff --git a/docs/lava-blockchain/join-testnet-manual-cosmovisor.md b/docs/lava-blockchain/join-testnet-manual-cosmovisor.md index 1b55c642..070f1a17 100644 --- a/docs/lava-blockchain/join-testnet-manual-cosmovisor.md +++ b/docs/lava-blockchain/join-testnet-manual-cosmovisor.md @@ -1,17 +1,17 @@ --- sidebar_position: 2 slug: /testnet-manual-cosmovisor -title: Option A - With Cosmovisor +title: 方案 A - 带 Cosmovisor --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Join testnet - Manual setup with Cosmovisor -## Prerequisites +# 加入测试网 - 使用 Cosmovisor 进行手动设置 +## 必要准备 -1. Verify [hardware requirements](reqs) are met -2. Install package dependencies - - Note: You may need to run as `sudo` - - Required packages installation +1. 验证[硬件要求](reqs)是否满足 +2. 安装软件包依赖项 + - 注意:可能需要以 `sudo` 身份运行 + - 安装所需软件包 ```bash ### Packages installations @@ -37,38 +37,37 @@ import RoadmapItem from '@site/src/components/RoadmapItem'; source ~/.profile ``` - - Installation verifications + - 安装验证 - 1. You can verify the installed go version by running: `go version` + 1. 您可以运行: `go version` 来验证已安装的 go 版本。 - 2. The command `go env GOPATH` should include `$HOME/go` - If not, then, `export GOPATH=$HOME/go` - - 3. PATH should include `$HOME/go/bin` - To verify PATH, run `echo $PATH` + 2. `go env GOPATH` 命令应包括 `$HOME/go` 。 + 如果没有,则执行 `export GOPATH=$HOME/go` 命令。 + 3. PATH 应包括`$HOME/go/bin`。 + 要验证 PATH,请运行 `echo $PATH` -## 1. Set up a local node +## 1. 创建本地节点 -### Download app configurations +### 下载应用程序配置 -- Download setup configuration - - Download the configuration files needed for the installation +- 下载设置配置 + + 下载安装所需的配置文件 ```bash - # Download the installation setup configuration + # 下载安装设置配置 git clone https://github.com/lavanet/lava-config.git cd lava-config/testnet-2 - # Read the configuration from the file - # Note: you can take a look at the config file and verify configurations + # 从文件中读取配置 + # 注意:您可以查看配置文件并验证配置 source setup_config/setup_config.sh ``` -- Set app configurations - - Copy lavad default config files to config Lava config folder +- 设置应用程序配置 + + 将 lavad 默认配置文件复制到 config Lava 配置文件夹中 ```bash echo "Lava config file path: $lava_config_folder" @@ -78,35 +77,35 @@ import RoadmapItem from '@site/src/components/RoadmapItem'; ``` -### Set the genesis file +### 设置创世文件 -- Set the genesis file in the configuration folder +- 在配置文件夹中设置创世文件 ```bash - # Copy the genesis.json file to the Lava config folder + # 将 genesis.json 文件复制到 Lava 配置文件夹中 cp genesis_json/genesis.json $lava_config_folder/genesis.json ``` -## 2. Join the Lava Testnet +## 2. 加入Lava测试网 -The following sections will describe how to install Cosmovisor for automating the upgrades process. +下文将介绍如何安装 Cosmovisor 以实现自动升级。 -### Set up Cosmovisor {#cosmovisor} +### 设置 Cosmovisor {#cosmovisor} -- Set up cosmovisor to ensure any future upgrades happen flawlessly. To install Cosmovisor: +- 设置 Cosmovisor 以确保将来的升级完美无瑕。安装 Cosmovisor ```bash go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0 - # Create the Cosmovisor folder and copy config files to it + # 创建 Cosmovisor 文件夹并将配置文件复制到其中 mkdir -p $lavad_home_folder/cosmovisor/genesis/bin/ - # Download the genesis binary + # 下载创世二进制文件 wget -O $lavad_home_folder/cosmovisor/genesis/bin/lavad "https://github.com/lavanet/lava/releases/download/v0.21.1.2/lavad-v0.21.1.2-linux-amd64" chmod +x $lavad_home_folder/cosmovisor/genesis/bin/lavad ``` ```bash - # Set the environment variables + # 设置环境变量 echo "# Setup Cosmovisor" >> ~/.profile echo "export DAEMON_NAME=lavad" >> ~/.profile echo "export CHAIN_ID=lava-testnet-2" >> ~/.profile @@ -119,7 +118,7 @@ The following sections will describe how to install Cosmovisor for automating th ``` ```bash - # Initialize the chain + # 初始化链 $lavad_home_folder/cosmovisor/genesis/bin/lavad init \ my-node \ --chain-id lava-testnet-2 \ @@ -128,19 +127,19 @@ The following sections will describe how to install Cosmovisor for automating th cp genesis_json/genesis.json $lava_config_folder/genesis.json ``` - :::caution Please note that cosmovisor will throw an error ⚠️ This is ok. - The following error will be thrown, - lstat /home/ubuntu/.lava/cosmovisor/current/upgrade-info.json: no such file or directory - ::: +:::caution 请注意,cosmovisor 会提示错误 ⚠️。 + +将出现以下错误,lstat /home/ubuntu/.lava/cosmovisor/current/upgrade-info.json: no such file or directory(没有此类文件或目录) +::: ```bash cosmovisor version ``` - - Create the systemd unit file + + 创建 systemd 运行单元文件 ```bash - # Create Cosmovisor unit file + # 创建 Cosmovisor 单元文件 echo "[Unit] Description=Cosmovisor daemon @@ -164,15 +163,15 @@ The following sections will describe how to install Cosmovisor for automating th sudo mv cosmovisor.service /lib/systemd/system/cosmovisor.service ``` -### Download the latest Lava data snapshot (_optional_) {#snapshots} +### 下载最新的 Lava 数据快照 (_optional_) {#snapshots} -_Coming soon_ +_即将到来_ -### Enable and start the Cosmovisor service +### 激活并启动 Cosmovisor 服务 -- Configure the Cosmovisor service to run on boot, and start it +- 配置 Cosmovisor 服务在启动时运行,并启动它 ```bash - # Enable the cosmovisor service so that it will start automatically when the system boots + # 启用 cosmovisor 服务,使其在系统启动时自动启动 sudo systemctl daemon-reload sudo systemctl enable cosmovisor.service sudo systemctl restart systemd-journald @@ -180,39 +179,39 @@ _Coming soon_ ``` -## 3. Verify +## 3. 验证 -### Verify `cosmovisor` setup +### 验证 `cosmovisor` 设置 -Make sure `cosmovisor` is running by checking the state of the cosmovisor service: +通过检查 cosmovisor 服务的状态,确保 `cosmovisor` 正在运行: -- Check the status of the service +- 检查服务状态 ```bash sudo systemctl status cosmovisor ``` -- To view the service logs - to escape, hit CTRL+C +- 要查看服务日志 - 要退出,请点击 CTRL+C ```bash sudo journalctl -u cosmovisor -f ``` -### Verify node status +### 验证节点状态 -Note the location of `lavad` now exists under `cosmovisor` path: +注意 `lavad` 现在存在于 `cosmovisor` 路径下: ```bash -# Check if the node is currently in the process of catching up +# 检查节点当前是否处于同步区块过程中 $HOME/.lava/cosmovisor/current/bin/lavad status | jq .SyncInfo.catching_up ``` -## Welcome to Lava Testnet 🌋 +## 欢迎来到 Lava Testnet🌋 -:::tip Joined Testnet? Be a validator! -You are now running a Node in the Lava network 🎉🥳! +:::tip 已加入 Testnet?成为验证者! +您现在正在 Lava 网络中运行一个节点 🎉🥳!! -Congrats, happy to have you here 😻 Celebrate it with us on Discord. +祝贺你,很高兴你能来到这里 😻 在 Discord 上与我们一起庆祝。 -When you're ready, start putting the node to use **as a validator**: +准备就绪后,开始将节点用作**验证器**: [](/validator-manual#account) ::: diff --git a/docs/lava-blockchain/join-testnet-manual.md b/docs/lava-blockchain/join-testnet-manual.md index 65292841..f4801b44 100644 --- a/docs/lava-blockchain/join-testnet-manual.md +++ b/docs/lava-blockchain/join-testnet-manual.md @@ -1,25 +1,25 @@ --- sidebar_position: 2 slug: /testnet-manual -title: Option B - Without Cosmovisor +title: 方案 B - 不带 Cosmovisor --- import RoadmapItem from '@site/src/components/RoadmapItem'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Join testnet - Manual setup +# 加入测试网 - 手动设置 -This page will walk you through the manual installation of the node and joining the network. +本页将指导你手动安装节点并加入网络。 -Note that it does **not** include the "Cosmovisor" tool, hence once you install the first genesis binary, you will need to incrementally upgrade your node, as described in [upgrades](#upgrades). +请注意,它不包括 "Cosmovisor "工具,因此一旦安装了第一个创世二进制文件,就需要按照[upgrades](#upgrades)中的说明逐步升级节点。 -## Prerequisites +## 必要准备 -1. Verify [hardware requirements](reqs) are met -2. Install package dependencies - - Note: You may need to run as `sudo` - - Required packages installation +1. 验证[硬件要求](reqs)是否满足 +2. 安装软件包依赖项 + - 注意:可能需要以 `sudo` 身份运行 + - 安装所需软件包 ```bash ### Packages installations @@ -29,7 +29,7 @@ Note that it does **not** include the "Cosmovisor" tool, hence once you install temp_folder=$(mktemp -d) && cd $temp_folder ``` - - Go installation + - Go 安装 ```bash ### Configurations @@ -45,38 +45,38 @@ Note that it does **not** include the "Cosmovisor" tool, hence once you install source ~/.profile ``` - - Installation verifications + - 安装验证 - 1. You can verify the installed go version by running: `go version` + 1. 您可以运行: `go version` 来验证已安装的 go 版本。 - 2. The command `go env GOPATH` should include `$HOME/go` - If not, then, `export GOPATH=$HOME/go` + 2. 命令 `go env GOPATH` 应包括`$HOME/go`。 + 如果没有,则`export GOPATH=$HOME/go` - 3. PATH should include `$HOME/go/bin` - To verify PATH, run `echo $PATH` + 3.PATH 应包括`$HOME/go/bin`。 + 要验证 PATH,请运行 `echo $PATH` -## 1. Set up a local node +## 1. 创建本地节点 -### Download app configurations +### 下载应用程序的配置 -- Download setup configuration - - Download the configuration files needed for the installation +- 下载安装配置 + + 下载安装所需的配置文件 ```bash - # Download the installation setup configuration + # 下载安装设置配置 git clone https://github.com/lavanet/lava-config.git cd lava-config/testnet-2 - # Read the configuration from the file - # Note: you can take a look at the config file and verify configurations + # 从文件中读取配置 + # 注意:您可以查看配置文件并验证配置 source setup_config/setup_config.sh ``` -- Set app configurations - - Copy lavad default config files to config Lava config folder +- 设置应用程序配置 + + 将 lavad 默认配置文件复制到 config Lava 配置文件夹中 ```bash echo "Lava config file path: $lava_config_folder" @@ -86,40 +86,40 @@ Note that it does **not** include the "Cosmovisor" tool, hence once you install ``` -### Set the genesis file +### 设置创世文件 -- Set the genesis JSON file in the configuration folder +- 在配置文件夹中设置创世 JSON 文件 ```bash - # Copy the genesis.json file to the Lava config folder + # 将 genesis.json 文件复制到 Lava 配置文件夹中 cp genesis_json/genesis.json $lava_config_folder/genesis.json ``` -## 2. Join the Lava Testnet +## 2. 加入Lava测试网 -### Copy the genesis binary +### 复制创世二进制文件 -- Set the lavad binary location and copy the genesis binary to it +- 设置 lavad 二进制文件的位置,并将创世二进制文件复制到该位置 ```bash - # Set and create the lavad binary path + # 设置并创建 lavad 二进制路径 lavad_binary_path="$HOME/go/bin/" mkdir -p $lavad_binary_path - # Download the genesis binary to the lava path + # 下载创世二进制到Lava路径 wget -O ./lavad "https://github.com/lavanet/lava/releases/download/v0.21.1.2/lavad-v0.21.1.2-linux-amd64" chmod +x lavad - # Lavad should now be accessible from PATH, to verify, try running + # 现在应该可以从 PATH 访问 Lavad 了,要验证这一点,请尝试运行 cp lavad /usr/local/bin - # In case it is not accessible, make sure $lavad_binary_path is part of PATH (you can refer to the "Go installation" section) + # 如果无法访问,请确保 $lavad_binary_path 是 PATH 的一部分(请参阅 "Go 安装 "部分)。 lavad --help # Make sure you can see the lavad binary help printed out ``` -### Start running the node using the genesis binary +### 使用创世二进制文件开始运行节点 -- Create a systemd service to run the Lava node +- 创建运行 Lava 节点的 systemd 服务 ```bash - # Create systemd unit file with logrotate + # 使用 logrotate 创建 systemd 单元文件 echo "[Unit] Description=Lava Node After=network-online.target @@ -135,55 +135,54 @@ Note that it does **not** include the "Cosmovisor" tool, hence once you install sudo mv lavad.service /lib/systemd/system/lavad.service ``` -### Download the latest Lava data snapshot (_optional_) {#snapshots} +### 下载最新的 Lava 数据快照(_可选项) {#snapshots} -_Coming soon_ +_即将到来_ -### Service start and validation +### 启动和验证服务 -- Configure the lavad service to run on boot, and start it +- 配置 lavad 服务在启动时运行,并启动它 ```bash - # Enable the lavad service so that it will start automatically when the system boots + # 启用 lavad 服务,使其在系统启动时自动启动 sudo systemctl daemon-reload sudo systemctl enable lavad.service sudo systemctl restart systemd-journald sudo systemctl start lavad ``` -- Check the state of the lavad service +- 检查 lavad 服务的状态 ```bash sudo systemctl status lavad - # To view the service logs + # 查看服务日志 sudo journalctl -u lavad -f ``` -## 3. Upgrades {#upgrades} -Lava blockchain upgrades requires you to update `lavad`. This guide covers the manual steps for doing so, assuming you do not use Cosmovisor. +## 3. 升级 {#upgrades} +Lava 区块链升级需要更新 `lavad`。假设您不使用 Cosmovisor,本指南将介绍手动更新步骤。 -### How to know there's an upgrade? +### 如何知道要进行升级? -Once you have joined the Lava testnet, and your node has started syncing, you may have noticed an error message such as: +加入 Lava 测试网后,您的节点开始同步时,您可能会发现一条错误信息,例如 ```bash panic: UPGRADE "XYZ" NEEDED at height: 12345 ``` -This message specifies that it was agreed to upgrade to a new version at a certain height of the network. Note: When using a cosmovisor setup, the upgrade is being taken care of automatically for you. - -This situation requires a different binary (`lavad`) to work with, the process is as specified below: +此消息指定已同意在网络的某个高度升级到新版本。注意:当使用 cosmovisor 设置时,升级将自动为您处理。 -1. You have joined the network using the genesis binary -2. The node has started to sync -3. **An error of a needed upgrade** 👈 You are here -4. Manually upgrade the node to work with the new binary -5. Node continues to sync with the new binary +这种情况需要使用不同的二进制文件 (`lavad`) 进行工作,过程如下: -### Upgrades list history +1. 您已使用创世二进制文件加入了网络 +2. 节点已开始同步 +3. **需要升级的错误** 👈 您现在处于此步骤 +4. 手动升级节点以使用新的二进制文件 +5. 节点继续使用新的二进制文件同步 +### 升级列表历史记录 -Below, you can find tracking of the required upgrade for block height. -Versions are tracked in [Lava git](https://github.com/lavanet/lava) (build from source or use the release page). +下面是块高度所需的升级跟踪。 +版本跟踪在 [Lava git](https://github.com/lavanet/lava) 中(从源代码构建或使用发布页面)。 @@ -221,61 +220,61 @@ Versions are tracked in [Lava git](https://github.com/lavanet/lava) (build from -### Steps for upgrading your node +### 升级节点的步骤 -1. Set up the configurations required for the process +1. 设置进程所需的配置 ```bash -# Upgrade configurations +# 升级配置 temp_folder=$(mktemp -d) && cd $temp_folder required_upgrade_name="v0.21.1.2" # CHANGE THIS upgrade_binary_url="https://github.com/lavanet/lava/releases/download/$required_upgrade_name/lavad-$required_upgrade_name-linux-amd64" ``` -2. Kill all current lavad processes +2.杀死所有当前的 lavad 进程 ```bash source ~/.profile -# If using lavad as a service, run +# 如果将 lavad 作为服务使用,请运行 sudo systemctl stop lavad ``` -3. Download the binary and replace the current `lavad` +3.下载二进制文件并替换当前的 `lavad ```bash -# Download the binary and replace it with the current one +# 下载二进制文件并替换为当前文件 wget "$upgrade_binary_url" -q -O $temp_folder/lavad chmod +x $temp_folder/lavad -# Replace the current lava binary with the upgraded binary +# 用升级后的二进制文件替换当前的 lava 二进制文件 sudo cp $temp_folder/lavad $(which lavad) ``` -4. Run the lava node +4. 运行 lava 节点 ```bash -# Re-start the stopped lavad service +# 重新启动已停止的 lavad 服务 sudo systemctl start lavad ``` -5. Verify the node continues to sync from the latest block height +5. 验证节点是否继续从最新区块高度同步 ```bash -# Check if the node is currently in the process of catching up +# 检查节点当前是否处于追赶最新区块过程中 lavad status | jq .SyncInfo.catching_up -# Check the lavad process logs +# 检查 lavad 进程日志 sudo journalctl -u lavad -f ``` -## Welcome to Lava Testnet 🌋 +## 欢迎来到 Lava Testnet 🌋 -:::tip Joined Testnet? Be a validator! -You are now running a Node in the Lava network 🎉🥳! +:::tip 已加入 Testnet?成为验证者! +您现在正在 Lava 网络中运行一个节点 🎉🥳!! -Congrats, happy to have you here 😻 Celebrate it with us on Discord. +祝贺你,很高兴你能来到这里 😻 在 Discord 上与我们一起庆祝。 -When you're ready, start putting the node to use **as a validator**: +准备就绪后,开始将节点用作**验证器**: [](/validator-manual#account) ::: diff --git a/docs/lava-blockchain/join-testnet.md b/docs/lava-blockchain/join-testnet.md index ea8ac354..f77cbdbf 100644 --- a/docs/lava-blockchain/join-testnet.md +++ b/docs/lava-blockchain/join-testnet.md @@ -1,14 +1,14 @@ --- sidebar_position: 2 slug: /testnet -title: Join testnet +title: 加入测试网 --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Join testnet +# 加入测试网 -The next pages will cover how to join Lava's testnet, manually or automatically. When you're done, you can continue to start your validator. +接下来的几页将介绍如何手动或自动加入 Lava 测试网。完成后,您就可以继续启动验证器了。 [](/testnet-manual-cosmovisor) [](/testnet-manual) diff --git a/docs/lava-blockchain/subscriptions.md b/docs/lava-blockchain/subscriptions.md index 77092e6b..6620d757 100644 --- a/docs/lava-blockchain/subscriptions.md +++ b/docs/lava-blockchain/subscriptions.md @@ -1,66 +1,66 @@ --- slug: /subscriptions -title: Subscription Plans +title: 订阅计划 --- -# Subscription Plans +# 订阅计划 :::info -❗ Lava network offers various subscription plans for consumers to access its services. While the network remains in testnet, subscriptions should be used primarily for testing purposes. +❗ Lava network为消费者提供各种订阅计划以访问其服务。虽然网络仍然在testnet中,但订阅应该主要用于测试目的。 ::: -## Overview 🔍 +## 概览 🔍 -A subscription in Lava allows consumers to access services for a specified time period based on the chosen plan (e.g., 1, 3, 6, or 12 months). Plans advertise per-month cost and per-month Compute Unit (CU) allowance. Subscriptions enable consumers to select a plan and duration in months, creating a seamless, predictable experience. If a subscription for the same plan already exists, the subscription is extended by the designated period, allowing for flexibility in extending service access. The maximum duration for a subscription is 12 months, with a total maximum duration of 13 months. +Lava 中的订阅允许消费者根据选择的计划(例如,1、3、6 或 12 个月)在指定的时间段内访问服务。计划以每月成本和每月计算单元(CU)配额进行宣传。订阅使消费者可以选择计划和月份,创建无缝、可预测的体验。如果已存在相同计划的订阅,则订阅将被延长指定的期限,以灵活地延长服务访问时间。订阅的最长持续时间为 12 个月,总最长持续时间为 13 个月。 -Subscriptions have several advantages over pay-as-you-go systems, including familiarity, sustainability, and simplicity. They foster a healthier Lava ecosystem by encouraging long-term relationships between consumers and providers while ensuring predictable revenue for providers and stable access to services for consumers. +与按需付费系统相比,订阅具有几个优点,包括熟悉性、可持续性和简单性。它们通过鼓励消费者和提供者之间的长期关系,为提供者提供可预测的收入,为消费者提供稳定的服务访问,促进了更健康的 Lava 生态系统。 -Lava network offers optional yearly discount rates for plans, which are applied to the cost of subscription transactions for 12 months. This encourages long-term commitment and benefits both consumers and providers. +Lava 网络为计划提供了可选的年度折扣率,该折扣率适用于为 12 个月的订阅交易成本。这鼓励长期承诺,使消费者和提供者都受益。 -Consumers can create projects under their subscriptions, which can have different policies and usage keys. Lava network uses a flexible system for its plans via governance, allowing the network to react to market dynamics and maintain a competitive edge. +消费者可以在他们的订阅下创建项目,这些项目可以具有不同的策略和使用密钥。Lava 网络通过治理采用灵活的计划系统,使网络能够对市场动态做出反应并保持竞争优势。

-## Preparing an Account 👛 -Consumers need to have an address on-chain to manage their subscription and consume p2p relays. -To create an account, please refer to [accounts & wallets](/docs/lava-blockchain/wallet.mdx) +## 准备账户 👛 +消费者需要在链上拥有一个地址,以便管理订阅和使用 p2p 中继。 +要创建账户,请参阅 [accounts & wallets](/docs/lava-blockchain/wallet.mdx)。

-## Interacting with Subscriptions 💱 +## 与订阅交互 💱 :::tip -📖 Using the CLI? Add this flag to access a remote node: +📖 使用CLI?添加此标志以访问远程节点: ``` --node https://public-rpc-testnet2.lavanet.xyz:443/ ``` ::: -Interaction with a subscription is currently done through the use of `lavad` binary. +与订阅的交互目前是通过使用 `lavad` 二进制来完成的。
-### 📊 List Available Plans +### 📊 列出可用的计划 -To view the list of available plans using the CLI: +使用 CLI 查看可用计划列表: ```bash lavad q plan list ``` -To view a specific plan in detail: +查看具体计划的详细信息: ```bash lavad q plan info ```
..

-### 💸 Buy a Subscription Plan +### 💸 购买订阅计划 -The **`subscription buy`** command allows users to purchase a subscription to a service plan, either for themselves or another user. The duration is specified in months (default: 1 month). +订阅购买`subscription buy`命令允许用户为自己或其他用户购买服务计划订阅。期限以月为单位(默认为 1 个月)。 ```bash lavad tx subscription buy [] [] \ @@ -68,10 +68,10 @@ lavad tx subscription buy [] [ ..

-### 👓 Check a Subscription Plan +### 👓 检查订阅计划 -The **`current`** command queries the current subscription of a consumer to a service plan: +**`current`**命令查询消费者当前订购服务计划的情况: ```bash lavad query subscription current ``` -This outputs a summary of the consumer's current subscription. Here's a simplified explanation of the key details: +这输出了消费者当前订阅的摘要。以下是关键细节的简化解释: -- **consumer** and **creator**: These represent the addresses of the consumer benefiting from the subscription and the user who created (paid for) the subscription, respectively. -- **duration_left** and **duration_total**: These values indicate the number of months remaining in the subscription and the total number of months the subscription was purchased for, respectively. -- **month_cu_left** and **month_cu_total**: These values show the number of Compute Units (CU) remaining for the current month and the total number of Compute Units allocated for each month in the subscription plan, respectively. +- **消费者** 和 **创建者**:这些分别表示受益于订阅的消费者和创建(付款)订阅的用户的地址。 +- **剩余时长** 和 **总时长**:这些值分别表示订阅中剩余的月数和订阅购买的总月数。 +- **本月剩余 CU** 和 **总 CU**:这些值分别显示当前月份剩余的计算单元 (CU) 数量和订阅计划中为每月分配的计算单元总数。 -Other information provided in the output, such as block numbers and expiry times, can be helpful for tracking the subscription's history and understanding when resources expire or refresh. By understanding these essential details, consumers can effectively manage their subscription and make informed decisions about future plans or resource consumption. +输出中提供的其他信息,如区块号和到期时间,可用于跟踪订阅的历史记录,并了解资源何时到期或刷新。通过了解这些重要细节,消费者可以有效管理他们的订阅,并对未来计划或资源消耗做出明智的决策。
..


-## Managing Projects 📈 +## 管理项目 📈
-### ➕ Adding a Project from a Subscription +### ➕ 从订阅中添加项目 -Once a consumer has purchased a subscription, it is reasonable to add a project on the subscription. Projects can be used to limit consumption of compute units (CUs), specify permitted APIs (including addons and extensions), limit provider pairings, and designate specific providers to interact with. To create a project: +消费者购买订阅后,就可以在订阅中添加项目。项目可用于限制计算单元 (CU) 的消耗、指定允许的 API(包括附加组件和扩展)、限制提供商配对以及指定与之交互的特定提供商。创建项目: ```bash lavad tx subscription add-project [project-name] --from ``` -#### Options: -- **Policy** - To specify a policy, add a policy-file using the `--policy-file ` flag. For an example policy-file please see the Lava Cookbook: - - [simple policy](https://github.com/lavanet/lava/blob/main/cookbook/projects/example_policy.yml) - - [policy with addons](https://github.com/lavanet/lava/blob/main/cookbook/projects/policy_all_chains_with_addon.yml) - - [policy with extensions](https://github.com/lavanet/lava/blob/main/cookbook/projects/policy_all_chains_with_extension.yml) -- **Keys** - If a project specifies authorized users' keys, specify them while adding a project with `--project-keys `. For an example project-key file, see the Lava Cookbook: - - [example project key YAML](https://github.com/lavanet/lava/blob/main/cookbook/projects/example_project_keys.yml) -- **Disable** - Ultimately, a consumer may want to add a project but have it disabled by default. Do so with the `--disable` flag. - +#### 选项: +- **策略** - 要指定策略,请使用 `--policy-file <文件路径>` 标志添加一个策略文件。有关示例策略文件,请参阅 Lava Cookbook: + - [简单策略](https://github.com/lavanet/lava/blob/main/cookbook/projects/example_policy.yml) + - [具有附加项的策略](https://github.com/lavanet/lava/blob/main/cookbook/projects/policy_all_chains_with_addon.yml) + - [具有扩展的策略](https://github.com/lavanet/lava/blob/main/cookbook/projects/policy_all_chains_with_extension.yml) +- **密钥** - 如果项目指定了授权用户的密钥,请在添加项目时使用 `--project-keys <项目密钥文件路径>` 指定它们。有关示例项目密钥文件,请参阅 Lava Cookbook: + - [示例项目密钥 YAML](https://github.com/lavanet/lava/blob/main/cookbook/projects/example_project_keys.yml) +- **禁用** - 最终,消费者可能希望添加一个项目,但默认情况下禁用它。请使用 `--disable` 标志来实现。
-### ➖ Deleting a Project from a Subscription +### ➖从订阅中删除项目 -Deleting a project is simple and irrevocable. Once a project is deleted, it can only be added back using the `add-project` command. To delete a project: +删除项目非常简单,而且不可撤销。项目删除后,只能使用 `add-project` 命令将其添加回来。删除项目: ```bash lavad tx subscription del-project --from diff --git a/docs/lava-blockchain/wallet.mdx b/docs/lava-blockchain/wallet.mdx index bbdaef56..f211c7f9 100644 --- a/docs/lava-blockchain/wallet.mdx +++ b/docs/lava-blockchain/wallet.mdx @@ -1,33 +1,33 @@ --- sidebar_position: 10 -title: Setting Up a Wallet +title: 设置钱包 slug: /wallet --- -Lava leverages the Cosmos SDK's bank and account modules for seamless integration with existing Cosmos wallets. +Lava 利用 Cosmos SDK 的 bank 和 account 模块与现有的 Cosmos 钱包进行无缝集成。 -**Recommendation**: After setting up your wallet, it's crucial to test its functionality. Utilize the [faucet](/faucet#discord-faucet) to acquire testnet tokens. Then, execute a transaction by transferring these tokens to another account and back. +**建议**:在设置好您的钱包之后,测试其功能至关重要。使用[水龙头](/faucet#discord-faucet)获取测试网络代币。然后,通过将这些代币转账到另一个账户再转回来,执行一笔交易来测试。 -## Choosing a Wallet +## 选择钱包 -For your convenience, here are some popular wallet options: +为了您的方便,这里有一些流行的钱包选项: * [Keplr](#keplr) * [Leap](#leap) -* For Advanced Users: [CLI Wallet](#cli) -* For Advanced Users: [Other Wallets](#other) +* 对于高级用户:[CLI 钱包](#cli) +* 对于高级用户:[其他钱包](#other) -### Keplr Usage {#keplr} +### Keplr 使用 {#keplr} -:::info experimental -Keplr wallet support in Lava is currently experimental. +:::info 试验性 +在Lava中对Keplr钱包的支持目前是实验性的。 ::: -1. Download and install Keplr from [here](https://www.keplr.app/). -2. Follow the setup instructions in the Keplr extension. (Note: Hardware wallet support, tested with Ledger, is available.) -3. Access the Keplr extension. -

-4. **Refresh this page.** -5. Click the button below and then select `Approve`. +1. 从 [此处](https://www.keplr.app/)下载并安装 Keplr。 +2. 按照 Keplr 扩展中的设置说明进行操作。(注:支持硬件钱包,已通过 Ledger 测试)。 +3. 访问 Keplr 扩展。 +

4. +4. **刷新**此页面。 +5. 点击下面的按钮,然后选择`Approve`。

@@ -93,29 +93,29 @@ window.keplr.experimentalSuggestChain({

-6. Navigate to `Settings` -> `General` -> `Manage Chain Visibility`. Search for `Lava Testnet`, enable it, and click `Save`. +6. 导航至 "设置"->"常规"->"管理链可见性"。搜索 "Lava Testnet",启用并单击 "保存"。

-7. Return to the Keplr extension, copy the Lava testnet address. +7. 返回 Keplr 扩展,复制 Lava 测试网地址。

-8. You will now have a Lava address copied to your clipboard, resembling: `lava@11223344556677889900aabbccddeeff1122334`. +8.现在,您将在剪贴板中复制一个 Lava 地址,类似于:`lava@11223344556677889900aabbccddeeff1122334`。 -### Leap Wallet {#leap} +### Leap 钱包 {#leap} -:::info experimental -Lava's support for the Leap wallet is experimental. +:::info 试验性 +Lava 对 Leap 钱包的支持是试验性的。 ::: -1. Download and install Leap from [here](https://www.leapwallet.io/). -2. Complete the setup instructions in the Leap extension. (Hardware wallet support, tested with Ledger, is available.) -3. Open the Leap extension. +1. 从[此处](https://www.leapwallet.io/)下载并安装 Leap。 +2. 完成 Leap 扩展中的设置说明。(支持硬件钱包,已通过 Ledger 测试)。 +3. 打开 Leap 扩展。

-4. **Refresh this page** -5. Click the button below and then select `Approve`. +4. **刷新此页面** +5. 点击下面的按钮,然后选择 "批准"。

@@ -182,30 +182,30 @@ window.leap.experimentalSuggestChain({

-6. Open the extension and copy your wallet address. +6. 打开扩展,复制你的钱包地址。

-7. Your Lava address will be copied to the clipboard, looking like: `lava@11223344556677889900aabbccddeeff1122334` +7. 您的 Lava 地址将被复制到剪贴板,看起来就像这样: `lava@11223344556677889900aabbccddeeff1122334` -## CLI Wallet {#cli} +## CLI 钱包 {#cli} -:::warning experimental -This section is intended for advanced users. +:::warning 实验性 +本节面向高级用户。 ::: -The CLI wallet provides various backends, including support for hardware wallets. +CLI 钱包提供各种后端,包括对硬件钱包的支持。 -## Account Preparation using CLI {#account} -Choose your preferred keyring backend... ([What is a keyring?](/key-terms#accounts--wallets)). +## 使用 CLI 准备账户 {#account} +选择您喜欢的keyring backend... ([What is a keyring?](/key-terms#accounts--wallets)). ```bash lavad config keyring-backend [os|file|kwallet|pass|test|memory] ``` -### Adding a Key +### 添加密钥 :::caution -Ensure you understand the implications of storing your private key in your chosen keyring. +确保您理解将私钥存储在所选keyring中的含义。 ::: -1. Substitute $ACCOUNT_NAME with your desired account name: +1. 将$ACCOUNT_NAME替换为您想要的帐户名: ```bash current_lavad_binary="$HOME/.lava/cosmovisor/current/bin/lavad" ACCOUNT_NAME="name_here" @@ -213,58 +213,58 @@ $current_lavad_binary keys add $ACCOUNT_NAME ``` :::danger -Securely store your mnemonic in a safe location, as it cannot be retrieved once lost. +将您的助记符妥善存放在安全的地方,因为一旦丢失就无法找回。 ::: -2. Verify and locate your account in the keys list: +2. 验证并在密钥列表中找到您的账户: ```bash $current_lavad_binary keys show $ACCOUNT_NAME $current_lavad_binary keys list ``` :::caution Pencils out 📝 -Your public address begins with lava@. +您的公共地址以 lava@ 开头。 ::: -#### Account Recovery +#### 账户恢复 -1. Recover an existing account using your mnemonic: +1. 使用助记词恢复现有账户: ```bash lavad keys add $NEW_NAME --recover ``` -After entering your seed phrase: +输入助记词短语后: ```bash $current_lavad_binary keys show $ACCOUNT_NAME ``` -### Using a Hardware Wallet with CLI +### 通过 CLI 使用硬件钱包 :::info -These steps are specifically for Ledger hardware wallets, which should be updated and have the Cosmos application installed. +这些步骤专门针对 Ledger 硬件钱包,它们应已更新并安装了 Cosmos 应用程序。 ::: -Register your Ledger wallet: +注册您的 Ledger 钱包: ```bash $current_lavad_binary keys add $ACCOUNT_NAME --ledger ``` :::info -Always include the --ledger flag in transaction commands when using a Ledger. +在使用分类账时,务必在事务命令中包含 --ledger 标志。 ::: ```bash $current_lavad_binary tx bank send $ACCOUNT_NAME 10000ulava --from $ACCOUNT_NAME --ledger ``` -For detailed information, visit [Cosmos Ledger Documentation](https://github.com/cosmos/gaia/blob/main/docs/resources/ledger.md) (replace the command with `$current_lavad_binary`). +详细信息请访问 [Cosmos Ledger Documentation](https://github.com/cosmos/gaia/blob/main/docs/resources/ledger.md)(将命令替换为 `$current_lavad_binary`)。 -## Multisig Wallets -### Creating a Multisig Wallet +## 多签钱包 +### 创建多签钱包 -1. Import public keys of signers: +1. 导入签名者的公钥 ```bash $current_lavad_binary keys add multisig_imported_alice --pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"data1..."}' $current_lavad_binary keys add multisig_imported_bob --pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"data2..."}' ``` -2. Verify the imported keys: +2. 验证导入的密钥: ```bash $current_lavad_binary keys show wallet_imported - address: lava@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... @@ -279,19 +279,19 @@ $current_lavad_binary keys show wallet_generated_keyring type: local ``` -3. Create a multisig account with imported keys: +3. 使用导入的密钥创建多重签名账户: ```bash $current_lavad_binary keys add $MULTISIG_ACCOUNT_NAME --multisig multisig_imported_alice,multisig_imported_bob --multisig-threshold $THRESHOLD ``` -* **$THRESHOLD** - defines the number of signers required for a valid signature +* **$THRESHOLD** - 定义了有效签名所需的签名人数 -4. Retrieve the multisig public address: +4. 读取多签公钥 ```bash $current_lavad_binary keys show $MULTISIG_ACCOUNT_NAME ``` -* Example output: +* 输出示例: ```bash $current_lavad_binary keys add multisig2_of_3 --multisig wallet1,wallet2,wallet3 --multisig-threshold 2 @@ -301,38 +301,38 @@ $current_lavad_binary keys add multisig2_of_3 --multisig wallet1,wallet2,wallet3 type: multi ``` -### Signing Transactions -For multisig transactions, each signer independently signs the transaction offline. +### 签署交易 +对于多签名交易,每个签名者都独立进行离线签名。 -#### Transaction Generation -Create a multisig transaction on a shared machine: +#### 生成交易 +在共享计算机上创建多重签名事务: ```bash $current_lavad_binary tx bank send $(lavad keys show alice-bob-multisig -a) lava@destination-address 10000000ulava --generate-only --chain-id lava-testnet-2 > tx_bank.json ``` -#### Signing the Transaction -Each signer signs the transaction in their environment: +#### 签署交易 +每个签名者在各自的环境中签署交易: ```bash lavad tx sign --from $(lavad keys show -a alice-ledger) --multisig lava@multisig-address tx.json --sign-mode amino-json --chain-id lava-testnet-2 >> tx-signed-alice.json or lavad tx sign --from $(lavad keys show -a alice-ledger) --multisig lava@multisig-address tx.json --sign-mode amino-json --chain-id lava-testnet-2 --account-number X --sequence X >> tx-signed-alice.json ``` -A second signer follows a similar process. +第二位签名者也遵循类似的程序。 -#### Broadcasting the Transaction -1. Create the signed multisig transaction. -2. Broadcast the transaction. +#### 广播交易 +1. 创建已签名的多重签名交易。 +2. 广播交易。 ```bash lavad tx multisign --from alice-bob-multisig tx.json alice-bob-multisig tx-signed-alice.json tx-signed-bob.json --chain-id lava-testnet-2 > tx_ms.json lavad tx broadcast ms/tx_ms.json --chain-id lava-testnet-2 ``` -### Other Wallets {#other} +### 其他钱包 {#other} -:::warning experimental -This section is for advanced users. +:::warning 实验性 +本节针对高级用户。 ::: -Use the following parameters to set up a wallet not described in this manual: +使用以下参数设置本手册未描述的钱包: * **coinType** - 118 (standard cosmos wallet type) * **minimal denom** - ulava diff --git a/docs/provider/lavavisor/lavavisor-services.md b/docs/provider/lavavisor/lavavisor-services.md index 7ad7df65..55f54b2e 100644 --- a/docs/provider/lavavisor/lavavisor-services.md +++ b/docs/provider/lavavisor/lavavisor-services.md @@ -7,35 +7,35 @@ title: Service Manager import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# **LavaVisor Service Manager** +# **LavaVisor 服务管理器** -## 📄 Overview -Lavavisor Service Manager is a feature to enable the users to run one lavavisor service to manage multiple `lavap` services. -The benefit of using this approach is that running only one lavavisor instance can save on some rpc calls as opposed to the lavavisor wrap command -that each lavavisor instance would query once every 30 seconds. +## 📄 概览 +Lavavisor服务管理器是一个功能,使用户可以运行一个Lavavisor服务来管理多个lavap服务。 +使用这种方法的好处是,与lavavisor wrap命令相比,只运行一个lavavisor实例可以节省一些rpc调用。 +每个lavavisor实例每30秒查询一次。 -:::info -We improved the rpc calls intervals in recent patches so we recommend using the [`lavavisor wrap` or `pod` commands](/lavavisor-wrap#services) instead of the service manager command. This is still applicable even for multiple services. +:::info +我们在最近的补丁中改进了rpc调用间隔,所以我们建议使用[`lavavisor wrap` or `pod` commands](/lavavisor-wrap#services)代替service manager命令。这仍然适用于多个服务。 :::

-## ♨️ Commands +## ♨️ 命令 ### > `lavavisor init` -LavaVisor `init` command initializes the environment for LavaVisor. It is generally the first command run when using LavaVisor. +LavaVisor `init`命令用来初始化LavaVisor的环境。它通常是使用LavaVisor时运行的第一个命令。 -**Optional Flags:** +**可选标识:** -`--directory` - specifies the protocol flags directory (default "~/") +`--directory` - 指定协议目录 (default "~/") -`--auto-download` - automatically downloads missing binaries +`--auto-download` - 自动下载缺少的二进制文件 -`--auto-start` - automatically issues `start` after the the `init` command completes +`--auto-start` - 在`init`命令完成后自动发出`start` 命令 -**Example usage:** +**用法示例:** ```bash lavavisor init --auto-download --chain-id lava-testnet-2 @@ -45,11 +45,11 @@ lavavisor init --auto-download --chain-id lava-testnet-2
### > `lavavisor create-service` -LavaVisor uses service files for each provider/consumer at play. LavaVisor `create-service` command creates these files according to the supplied consumer / provider config file and flags. +LavaVisor 为每个正在运行的提供程序/消费者使用服务文件。LavaVisor `create-service`命令根据提供的消费者/提供者配置文件和标志创建这些文件。 -You must specify whether you are creating a `provider` or `consumer` and the location of the config file. +您必须指定创建的是`provider`还是`consumer` 以及配置文件的位置。 -**Example usage:** +**用法示例:** ```bash # Provider Example @@ -63,20 +63,20 @@ lavavisor create-service consumer ./config --geolocation 1 --from user2 --log_le
### > `lavavisor start` -LavaVisor starts the specified services using the linked binary. It also starts the LavaVisor version monitor. The simplest way to activate this is by running the command `lavavisor init --auto-download --auto-start`. Secondarily, you can use the `start` command on your own, to further configure your provider/consumer or create services. +LavaVisor 使用链接的二进制文件启动指定的服务。它还会启动 LavaVisor 版本监视器。最简单的激活方法是运行 `lavavisor init --auto-download --auto-start` 命令。其次,您可以自行使用 `start` 命令进一步配置提供程序/用户或创建服务。

-## 🗜️ Test +## 🗜️ 测试 -1. First of all, LavaVisor should run in a node which is connected to a running Lava Network (local or public). +1. 首先,LavaVisor 应在连接到运行中的 Lava 网络(本地或公共网络)的节点上运行。 -2. Run `lavavisor init --auto-download` → This will setup LavaVisor directory and link the protocol binary +2. 运行 `lavavisor init --auto-download` → 这将设置 LavaVisor 目录并链接协议二进制文件 ![lavavisor init](/img/tutorial/lavavisor/lavavisor1.png) -3. Instead of creating service files manually, execute `lavavisor create-service` command to generate the service files. Let’s say we want to start one consumer and two provider processes, then we need to execute total of three commands like this: +3. 与其手动创建服务文件,不如执行 `lavavisor create-service` 命令来生成服务文件。假设我们要启动一个消费者进程和两个提供者进程,那么我们总共需要执行以下三条命令: - `lavavisor create-service consumer /home/ubuntu/config/consumer-ETH1.yml --geolocation 1 --from user1 --log_level info --keyring-backend test --chain-id lava-testnet-2 --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/` @@ -84,7 +84,7 @@ LavaVisor starts the specified services using the linked binary. It also starts - `lavavisor create-service provider /home/ubuntu/config/provider1-LAV1.yml --geolocation 1 --from servicer2 --log_level info --keyring-backend test --chain-id lava-testnet-2 --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/` -4. Check the `~/.lavavisor/` dir and validate `config.yml` . It should look like this (adjust the service names according to your process): +4. 检查 `~/.lavavisor/` 目录并验证 `config.yml` 。它应该是这样的(根据进程调整服务名称): ```yaml @@ -94,10 +94,10 @@ services: - provider1-LAV1 ``` -5. The `create-service` command should also create a `service_configs` folder within the `.lavavisor/services` directory and copy the configuration files provided as command arguments (e.g., provider1-ETH1.yml). Ensure the directory and configuration files exist. +5. `create-service`命令还应该在目录下创建一个 `service_configs`文件夹。并复制作为命令参数提供的配置文件(例如,provider1-ETH1.yml)。确保目录和配置文件存在。 - + ```yaml @@ -112,7 +112,7 @@ endpoints: - + ```yaml @@ -125,13 +125,13 @@ metrics-listen-address: ":7779" -6. Execute `lavavisor start`, and you should observe all services running. Additionally, the version monitor will begin validating versions. +6. 执行`lavavisor start`,你应该可以看到所有服务都在运行。此外,版本监控器将开始验证版本。 ![lavavisor start](/img/tutorial/lavavisor/lavavisor2.png) -7. Now we need to make an upgrade proposal by using `/gov` module, so that protocol version will change in the consensus and LavaVisor will detect & initiate auto-upgrade. +7. 现在我们需要使用`/gov`模块来做一个升级建议,这样协议版本将在共识中发生变化,LavaVisor将检测并启动自动升级。 - 🔽 Here is an example `proposal.json` file: + 🔽 下面是一个示例`proposal. json` 文件:
📄 proposal.json @@ -158,16 +158,16 @@ metrics-listen-address: ":7779"
- 🔽 Here is the script for sending version update proposal transaction (for Cosmos SDK v0.47.0): + 🔽 以下是发送版本更新建议事务的脚本(适用于Cosmos SDK v0.47.0):
📄 upgrade_chain.sh ```bash #!/bin/bash - # upgrade script (upgrade_chain.sh) + # 升级脚本 (upgrade_chain.sh) - # function to wait for next block (should be used when proposing on chains with Cosmos SDK 0.47 or higher) + # 等待下一个区块的功能(建议使用Cosmos SDK 0.47或更高版本的链时应该使用) function wait_next_block { current=$( lavad q block | jq .block.header.height) echo "Waiting for next block $current" @@ -182,7 +182,7 @@ metrics-listen-address: ":7779" done } - # The software upgrade proposal command. This only proposes a software upgrade. To apply the upgrade, you need to vote "yes" (like below). + # 软件升级建议命令。这只建议软件升级。要应用升级,您需要投票"yes"(如下所示)。 lavad tx gov submit-legacy-proposal param-change proposal.json \ --gas "auto" \ --from alice \ @@ -193,21 +193,21 @@ metrics-listen-address: ":7779" wait_next_block - # The vote command. Use vote ID 4 (like here) if you used the init_chain_commands.sh script. If the vote doesn't work because of a bad - # vote ID, use the 'lavad q gov proposals' query to check the latest proposal ID, and put here the latest ID + 1. + # 投票命令。如果使用init_chain_commands.sh脚本,则使用投票ID 4(如这里所示)。如果投票失败是因为一个坏的 + # 投票 ID,使用 "lavad q gov proposals "查询查看最新提案 ID,并将最新 ID + 1 放在此处。 lavad tx gov vote 4 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices "0.000000001ulava" ```
- (Fix proposal ID 4 according to your state - if you didn’t run ‘init_chain_commands’ you should put 1 there) + (根据您的状态修正建议 ID 4 - 如果您没有运行 "init_chain_commands",则应在此处置 1) -8. After the proposal passed, LavaVisor will detect the event and update the binaries. Then, it will reboot the processes with the new established symbolic link: +8. 提议通过后,LavaVisor 将检测事件并更新二进制文件。然后,它会使用新建立的符号链接重新启动进程: ![Update detected](/img/tutorial/lavavisor/lavavisor3.png) - ❗ Update detected + ❗ 已检测到更新 ![Upgrade successful](/img/tutorial/lavavisor/lavavisor4.png) - ✔️ Upgrade successful + ✔️ 升级成功 diff --git a/docs/provider/lavavisor/lavavisor-wrap.md b/docs/provider/lavavisor/lavavisor-wrap.md index e08cd04e..b0a8eba6 100644 --- a/docs/provider/lavavisor/lavavisor-wrap.md +++ b/docs/provider/lavavisor/lavavisor-wrap.md @@ -10,36 +10,37 @@ import TabItem from '@theme/TabItem'; # **LavaVisor Process Wrapper** -## 📄 Overview -Lavavisor's Process Wrapping commands were designed with Dockerized and Kubernetes environments in mind, offering solutions for different scenarios: +## 📄 概述 +Lavavisor 的 Process Wrapping 命令在设计时考虑了 Docker 化和 Kubernetes 环境,为不同的场景提供了解决方案: -1. For a virtual machine (VM) capable of downloading and compiling the Lavap binary, use the `lavavisor wrap` command. -2. In cases where resources are limited, such as in a pod environment, you can use the `lavavisor pod` command. +1. 对于能够下载和编译 Lavap 二进制文件的虚拟机 (VM),请使用以下`lavavisor wrap`命令。 +2. 在资源有限的情况下(例如在 Pod 环境中),您可以使用该`lavavisor pod`命令。 -The key distinction between the two is that `lavavisor wrap` validates Golang installation and locally downloads and builds the Lavap codebase. Conversely, the `pod` command fetches the pre-compiled binary from the [official Lava Network repository](https://github.com/lavanet/lava/releases/latest), as it lacks the capability to compile binaries locally. +两者之间的主要区别在于验证`lavavisor wrap`Golang 安装并在本地下载和构建 Lavap 代码库。相反,该`pod`命令从官方 Lava Network 存储库获取预编译的二进制文件,因为它缺乏在本地编译二进制文件的能力。 +两者之间的关键区别在于,`lavavisor wrap`验证Golang安装,并在本地下载和构建Lavap代码库。相反,`pod`命令从[官方熔岩网络存储库](https://github.com/lavanet/lava/releases/latest)获取预编译的二进制文件,因为它缺乏本地编译二进制文件的能力。 :::tip -Please make sure you are using the right `chainId` this document was written during testnet, and the active `chainId` was `lava-testnet-2` at time of composition. +请确保您使用了正确的`chainId`,本文档是在测试网期间编写的,并且在撰写时活动的`chainId`是`lava-testnet-2`。 :::

-## ♨️ Commands +## ♨️ 命令 ### > `lavavisor init` -LavaVisor `init` command initializes the environment for LavaVisor. It is generally the first command run when using LavaVisor. -If you're using [`lavavisor pod`](#-lavavisor-pod) this command is unnecesary and can be skipped. +LavaVisor `init`命令用来初始化LavaVisor的环境。它通常是使用LavaVisor时运行的第一个命令. +如果你使用的是[' lavavisor pod '](#-lavavisor-pod),那么这个命令就不必要了,可以跳过。 -**Optional Flags:** +**可选 Flags:** -`--directory` - specifies the protocol flags directory (default "~/") +`--directory` - 指定协议目录(默认为"~/") -`--auto-download` - automatically downloads missing binaries +`--auto-download` - 自动下载丢失的二进制文件 -**Example usage:** +**用法示例:** ```bash lavavisor init --auto-download --chain-id lava-testnet-2 @@ -48,10 +49,10 @@ lavavisor init --auto-download --chain-id lava-testnet-2
### > `lavavisor wrap` -The `wrap` command is used for wrapping a single process in environment that cannot run with `systemd` (services) such as k8s or some containers. -The `wrap` command doesn't require a config for itself, it just takes the lavap command the user provides and uses that as a sub command. +`wrap`命令用于在无法使用`systemd`(服务)运行的环境中包装单个进程,例如k8s或某些容器。 +`wrap`命令本身不需要配置,它只需要接收用户提供的lavap命令并将其用作子命令。 -**Example usage:** +**用法示例:** ```bash lavavisor wrap --cmd 'lavap rpcprovider ./config/my_rpcprovider_config.yml --from --log_level debug --geolocation 1 --chain-id lava-testnet-2' --auto-download @@ -61,15 +62,15 @@ lavavisor wrap --cmd 'lavap rpcprovider ./config/my_rpcprovider_config.yml --fro ### > `lavavisor pod` -When running this command in a lightweight pod environment that lacks Golang or build dependencies, Lavavisor will automatically fetch the binary from the GitHub release page. This means you can obtain the binary without the need to build it or have a Golang setup on your virtual machine (VM) +当在缺乏Golang或构建依赖项的轻量级pod环境中运行此命令时,Lavavisor将自动从GitHub发布页面获取二进制文件。这意味着您无需在虚拟机(VM)上构建或设置Golang即可获得二进制文件。 :::info -`lavavisor pod` does not require `lavavisor init`. as it will initialize everything automatically. +`lavavisor pod`不需要`lavavisor init`。因为它会自动初始化所有东西。 ::: -**Example usage:** +**用法示例** ```bash lavavisor pod --cmd 'lavap rpcprovider ./config/my_rpcprovider_config.yml --from --log_level debug --geolocation 1 --chain-id lava-testnet-2' @@ -78,23 +79,23 @@ lavavisor pod --cmd 'lavap rpcprovider ./config/my_rpcprovider_config.yml --from

-## ❓ Considerations +## ❓ 注意事项 -### Running multiple wrap commands on the same VM 🎲 -If you would like to run multiple wrappers on the same machine, you can set up one `--auto-download` process while the others are running with `--auto-download` disabled (default behavior) this will result with one process managing downloading and building while others just wait for the task to be completed. +### 在同一个虚拟机上运行多个wrap命令🎲 +如果你想在同一台机器上运行多个wrappers,可以设置一个`--auto-download` 进程,而其他进程在运行时禁用`--auto-download` (默认行为),这将导致一个进程管理下载和构建,而其他进程只是等待任务完成。 -### Using keyring-backend os 🔑 -If you are using keyring-backend os you will need to provide the lavavisor (wrap/pod commands only) with a keyring-backend password so it can use it to start the lavap process and read from the keyring os. +### 使用 keyring-backend os 🔑 +如果使用keyring-backend os,则需要向 lavavisor(仅限 wrap/pod 命令)提供keyring-backend密码,以便它启动 lavap 进程和读取keyring os。 -In order to do that add the `--enter-keyring-password` flag to the lavavisor command line. when the lavavisor bootstrap it will request the password from the user with the following prompt: +为此,请在 lavavisor 命令行中添加`--enter-keyring-password`标记: ```bash INF [Lavavisor] Please enter the keyring password: ``` -Lavavisor doesn't check if the password is correct; it will try to use it when starting the process. If the password is incorrect, it will keep retrying to revive the process, so make sure you are using the right password and validating the process started properly. +Lavavisor 不会检查密码是否正确,而是在启动进程时尝试使用密码。如果密码不正确,它会不断重试以恢复进程,因此请确保使用正确的密码并验证进程已正确启动。 -### Example Use ⚙️ +### 使用示例 ⚙️ ```bash lavavisor wrap --cmd 'lavap rpcprovider ./config/my_rpcprovider_config.yml --geolocation 1 --log_level debug --from prod_client --chain-id lava-testnet-2 --keyring-backend os --node ""' --auto-download --node "" --chain-id lava-testnet-2 --enter-keyring-password diff --git a/docs/provider/lavavisor/lavavisor.md b/docs/provider/lavavisor/lavavisor.md index 51a7b978..78d74c9d 100644 --- a/docs/provider/lavavisor/lavavisor.md +++ b/docs/provider/lavavisor/lavavisor.md @@ -10,37 +10,35 @@ import TabItem from '@theme/TabItem'; # **LavaVisor** -## 📄 Overview -LavaVisor acts as a service manager for the Lava protocol application binaries. Its duty is to manage protocol versioning and coordinate seamless transitions to updated protocol versions. +## 📄 概述 +LavaVisor是Lava协议应用程序二进制文件的服务管理器。它的职责是管理协议版本,并协调无缝过渡到更新的协议版本。 -When an upgrade becomes necessary, either because the current protocol version has dropped below the minimum version or not compliant with the recommended target version, LavaVisor’s responsibilities begin. LavaVisor orchestrates the necessary upgrade process in an automated manner, ensuring that the protocol version is aligned with the current standards and capabilities set by the minimum and target versions. - -## 🧰 Setup +当需要升级时,无论是因为当前协议版本低于最低版本,还是不符合推荐的目标版本,LavaVisor的责任就开始了。LavaVisor以自动化方式协调必要的升级过程,确保协议版本与最低版本和目标版本设置的当前标准和功能保持一致。 +## 🧰 设置 :::tip -Some older versions of the `lava-protocol` binary (now `lavap`) lack the version command, which LavaVisor employs to validate binary versions. Please ensure you've updated to the most recent version of LavaVisor or you may face errors. +一些老版本的`lava-protocol`二进制文件(现在的`lavap`)缺少version命令,LavaVisor使用它来验证二进制文件的版本。请确保您已经更新到最新版本的LavaVisor,否则您可能会遇到错误。 ::: -Lavavisor is added as a `LAVA_ALL_BINARIES` parameter in the Makefile. As such, any script that executes `install-all` such as `start_env_dev.sh` will automatically install Lavavisor binary. +Lavavisor作为`LAVA_ALL_BINARIES`参数添加到Makefile中。因此,任何执行`install-all`命令的脚本,例如`start_env_dev.sh`,都会自动安装Lavavisor二进制文件。 -To ensure that a LavaVisor binary is created, navigate to your local `/lava` directory and run **`make install-all`** +为了确保创建了LavaVisor二进制文件,请导航到本地`/lava`目录并运行**`make install-all`** -### Prerequisites ✅ +### 必要准备 ✅ 1. Go version above than 1.19 -### Getting Started 🔥 - -To configure your Lavavisor properly, you have two options to choose from: +### 开始 🔥 -- [**Process Wrapper**](/lavavisor-wrap): This option offers advanced capabilities, including compatibility with keyring-based operating systems and enhanced control over your processes. +要正确配置Lavavisor,你有两个选择: -- [**Service Manager**](/lavavisor-services): If you are managing multiple services on a single machine, the service manager may be a suitable choice. It maintains a single Lavavisor instance, resulting in fewer queries. +- [**Process Wrapper**](/lavavisor-wrap): 此选项提供高级功能,包括与基于密钥环的操作系统的兼容性以及对进程的增强控制。 -### Recommended Route ⤵️ +- [**Service Manager**](/lavavisor-services): 如果要在一台计算机上管理多个服务,则服务管理器可能是合适的选择。它维护一个 Lavavisor 实例,从而减少查询。 -We recommend the **process wrapper** for its extensive feature set, making it ideal for scenarios that require compatibility with keyring-based operating systems and greater process control. +### 推荐路线 ⤵️ +我们推荐使用**process wrapper**,因为它具有广泛的功能集,非常适合需要与基于密钥环的操作系统兼容和加强进程控制的方案。 -The **service manager** is beneficial when you have numerous services on a single machine, as it manages a single Lavavisor instance, reducing query overhead. However, please note that it may not be the best choice for environments using keyring-backend operating systems or for those working with Docker or Kubernetes services. +当您在一台计算机上拥有大量服务时,**service manager**非常有用,因为它管理单个 Lavavisor 实例,从而减少查询开销。但是,请注意,对于使用密钥环后端操作系统的环境或使用 Docker 或 Kubernetes 服务的环境,它可能不是最佳选择。 diff --git a/docs/provider/provider-features.mdx b/docs/provider/provider-features.mdx index f9675865..ba247201 100644 --- a/docs/provider/provider-features.mdx +++ b/docs/provider/provider-features.mdx @@ -1,12 +1,12 @@ --- sidebar_position: 2 slug: /provider-features -title: Features +title: 功能 --- -# Provider Features 🧰 +# 提供商功能 🧰 -This page details the various features available to providers in the Lava network, along with instructions on how to operate them: +本页面详细介绍了Lava网络中提供的各种功能,以及如何操作它们的说明: - [💰 Rewards Tracking](#rewards-tracking) - [⚡ Caching](#caching) @@ -20,23 +20,23 @@ This page details the various features available to providers in the Lava networ --- -## 💰 Rewards Tracking{#rewards-tracking} +## 💰 奖励追踪{#rewards-tracking} -Once a provider is up and running, consumers will request relay services from the provider. Once the provider provides the service, they will be eligible to get rewards from the consumer they served. The provider can receive rewards when a consumer's monthly plan expires. +一旦提供商启动并运行,消费者将向提供商请求中继服务。一旦提供商提供服务,他们将有资格从他们所服务的消费者那里获得奖励。当消费者的月度计划到期时,提供商可以获得奖励。 -Providers can query the estimated amount they will receive with the query: +提供商可以通过以下查询查询来查询他们将收到的估计金额: ```bash lavad q pairing provider-monthly-payout ``` -Claimable rewards can be queried with: +可领取的奖励可以通过以下方式查询: ```bash lavad q dualstaking delegator-rewards ``` -and can be claimed to the provider balance with: +并且可以通过以下方式向提供商余额认领: ```bash lavad tx dualstaking claim-rewards --from @@ -44,11 +44,11 @@ lavad tx dualstaking claim-rewards --from
-## ⚡ Caching{#caching} +## ⚡ 缓存{#caching} -Lava's caching service is used to cut costs and improve the overall performance of the network. Both provider and consumer processes benefit from the caching service. Providers who enable caching may be able to return responses faster than providers who do not have caching enabled. +Lava 的缓存服务用于降低成本并提高网络的整体性能。提供者和使用者进程都受益于缓存服务。启用缓存的提供程序可能比未启用缓存的提供程序更快地返回响应。 -In order to use the caching service, run the following process: +要使用缓存服务,请运行以下命令: ``` ListenAddress="127.0.0.1:7777" @@ -56,7 +56,7 @@ ListenMetricsAddress="127.0.0.1:5747" lavap cache $ListenAddress --metrics_address $ListenMetricsAddress --log_level debug ``` -The cache service will run in the background. Plug in the caching service with the consumer or provider process as applicable: +缓存服务将在后台运行。根据情况将缓存服务插入消费者或提供者进程:
rpcprovider @@ -75,36 +75,34 @@ lavap rpcconsumer --cache-be $ListenAddress
-## 🔌 Addons and Extensions{#addonsextensions} +## 🔌 插件和扩展{#addonsextensions} -Addons and Extensions are services that can be offered *in addition* to the basic spec on a provider service. -**Addons** are APIs exposed in addition to existing APIs, while **Extensions** are changes to existing API responses. +插件和扩展是除了提供程序服务的基本规范之外还可以提供的服务。插件是除了现有 API 之外公开的 API,而扩展是对现有 API 响应的更改。 -A few examples: -- `"archive"` - an extension providing valid responses for older blocks than the current pruning definition in the basic spec -- `"debug" `- an addon that offers debug apis in addition to basic rpc calls +举几个例子: +- `"archive"` - 一个扩展,为比基本规范中当前修剪定义更旧的块提供有效的响应 +- `"debug" `- 除了基本的 RPC 调用之外,还提供调试 API 的插件 -### Why Addons and Extensions ❔ +### 为什么选择插件和扩展程序 ❔ -Servicing Addons and Extensions can be a good way to generate additional traffic to your endpoints and higher rewards. +服务插件和扩展程序是为您的端点带来额外流量和更高奖励的好方法。 -#### ⛗ Additional Traffic +#### ⛗ 其他流量 -Consumers can easily use addons and extensions without any client configuration. They're included in the consumer subscription. The Lava Protocol automatically routes requests to providers that support desired services, which may result in increased traffic for those providers supporting specific addons, while providers without support won't receive such requests. +消费者无需任何客户端配置即可轻松使用插件和扩展程序。它们包含在使用者订阅中。Lava 协议会自动将请求路由到支持所需服务的提供商,这可能会导致支持特定插件的提供商的流量增加,而不支持的提供商将不会收到此类请求。 -#### 💱 Higher Rewards +#### 💱 更高的奖励 -Extensions can also provide a CU boost on the regular API, meaning modified calls may be more highly rewarded. `"archive"` calls, for example, will have a big multiplier on CU for each API request. -Only API requests to the `"archive"` endpoint will award these additional CUs, and Lava knows which calls are `"archive"` or not according to the pruning of the regular spec defined by governance. +扩展还可以在常规 API 上提供 CU 提升,这意味着修改后的调用可能会获得更高的奖励。`"archive"` 例如,对于每个 API 请求,调用在 CU 上都会有一个很大的乘数。只有对端点的 `"archive"` API 请求才会授予这些额外的 CU,并且 Lava 根据治理定义的常规规范的修剪知道哪些调用是`"archive"` 或不是。 -### Set up Addons and Extensions ⚙️ +### 设置插件和扩展程序 ⚙️ -Addons and Extensions are configured both in the provider service config, and then staked for on chain. 💡 For simplicity's sake, both Addons and Extensions are defined using the `addons:` field. For a reference, please see this [example provider config file](https://raw.githubusercontent.com/lavanet/lava/main/config/provider_examples/evmos_provider_with_archive.yml). +插件和扩展在提供者服务配置中配置,然后在链上质押。💡 为简单起见,插件和扩展都是使用该`addons:`字段定义的。有关参考,请参阅此[示例](https://raw.githubusercontent.com/lavanet/lava/main/config/provider_examples/evmos_provider_with_archive.yml)提供程序配置文件。 -#### 🗒️ Addon (Config File) +#### 🗒️ 插件 (配置文件) -In order to add an addon to the service the yaml must be configured with the addon command: +为了将插件添加到服务中,必须使用 addon 命令配置 yaml: ```yaml endpoints: @@ -120,11 +118,11 @@ endpoints: // highlight-end ``` -#### 🗒️ Extension (Config File) +#### 🗒️ 扩展名 (配置文件) -Since extensions must offer consumers the regular spec function and the possibility of extended functionality, both must be present. +由于扩展必须为消费者提供常规规范功能和扩展功能的可能性,因此两者都必须存在。 -Therefore, extensions unlike addons, must be configured in a new url entry: +因此,与插件不同的扩展必须在新的 url 条目中配置: ```yaml endpoints: @@ -142,9 +140,7 @@ endpoints: ``` -Although this configuration offers you the chance to load balance different extension calls, -if you run only a single archive node and do not want to automatically load balance archive calls to a pruned node, -you can set both urls to point to the the archive node: +尽管此配置为您提供了对不同扩展调用进行负载均衡的机会,但如果您只运行单个存档节点,并且不希望自动对已修剪的节点的存档调用进行负载均衡,则可以将两个 URL 设置为指向存档节点: ```yaml endpoints: @@ -161,9 +157,11 @@ endpoints: // highlight-end ``` -#### 🗒️ Multiple Extensions (Config File) +#### 🗒️ 多个扩展名(配置文件) + +必须使用所有可能的组合定义其他扩展,例如,合规性 + 存档将如下所示: + -Additional extensions must be defined with all possible combinations, for example compliance + archive will look like this: ```yaml endpoints: @@ -187,9 +185,9 @@ endpoints: // highlight-end ``` -#### 🗒️ Combination (Config File) +#### 🗒️ 组合(配置文件) -A combination of an extension and addons will look like this: +扩展和插件的组合如下所示: ```yaml endpoints: - api-interface: jsonrpc @@ -205,15 +203,15 @@ endpoints: - debug ``` -#### ⛏️ Staking +#### ⛏️ 质押 -Before staking, make sure your process works correctly. If addons or extensions fail to verify, the entire service for that spec and api interface will fail. Please use the `lavap test rpcprovider` command to verify that your setup is correct. +在质押之前,请确保您的进程正常运行。如果插件或扩展无法验证,则该规范和 api 接口的整个服务将失败。请使用该 lavap test rpcprovider 命令验证您的设置是否正确。 -Staking with an addon or an extensions is very similar to the normal staking command. Simply modify it by adding the list of addons and extensions separated by comma: +使用插件或扩展进行质押与普通的质押命令非常相似。只需通过添加以逗号分隔的插件和扩展列表来修改它: -**Staking Example: `stake-provider` ⌨️ ** +**质押示例:`stake-provider` ⌨️ ** -Ethereum Mainnet in US with archive and debug +在美国地区的以太坊主网,具有存档和调试功能 ```bash lavap tx pairing stake-provider "ETH1" \ @@ -227,13 +225,13 @@ lavap tx pairing stake-provider "ETH1" \ --gas-adjustment "1.5" \ --node "https://public-rpc-testnet2.lavanet.xyz:443/rpc/" ``` +请注意,如果存在多个端点,则需要**`,archive,debug`**在支持它的每个端点中添加 。在事务中设置这些终结点会替换任何现有终结点,因此请确保提供终结点的完整列表。 -Do note the required addition of **`,archive,debug`** in each of the endpoints that support it if several exist. Setting these in a transaction replaces any existing endpoints, so make sure to give the full list of endpoints. -** Staking Example: `modify-provider` ⌨️ ** +** 质押示例: `modify-provider` ⌨️ ** +也可以使用以下`modify-provider`命令将这些添加到现有条目中: -It is also possible to add these to an existing entry with the `modify-provider` command: ```bash lavap tx pairing modify-provider "ETH1" --endpoints "provider-host.com:443,USC,archive,debug" --geolocation "USC" ... @@ -241,13 +239,13 @@ lavap tx pairing modify-provider "ETH1" --endpoints "provider-host.com:443,USC,a
-## 🧊 Freeze and Unfreeze{#freeze} +## 🧊 冻结和解冻{#freeze} -The **`freeze`** command allows a provider to freeze its service, effective next epoch. This enables providers to pause their services without the impact of a bad QoS rating. While frozen, the provider won't be paired with consumers. To unfreeze, the provider must use the **`unfreeze`** transaction, effective next epoch. This feature can be useful in cases like a provider needing to halt its services during maintenance. +该**`freeze`**命令允许提供者冻结其服务,在下一个纪元生效。这使提供商能够暂停其服务,而不会受到不良 QoS 评级的影响。冻结时,提供商不会与使用者配对。要解冻,提供商必须使用**`unfreeze`**交易,在下一个纪元生效。此功能在提供商需要在维护期间停止其服务等情况下非常有用。 -### Usage 🔨 +### 使用 🔨 -#### ❄️ Freeze: +#### ❄️ 冻结: ```bash # required flags: --from alice. optional flags: --reason @@ -255,27 +253,28 @@ lavap tx pairing freeze [chain-ids] --from lavap tx pairing freeze [chain-ids] --from --reason lavap tx pairing freeze ETH1,COS3 --from alice --reason "maintenance" ``` -The **`freeze`** command requires the **`--from`** flag to specify the provider address. Optionally, you can provide a **`--reason`** flag to give a reason for the freeze. +该**`freeze`**命令需要该**`--from`**标志来指定提供程序地址。(可选)您可以提供一个**`--reason`**标志来说明冻结的原因。 -#### 🌡️ Unfreeze: +#### 🌡️ 解冻: ```bash # required flags: --from alice lavap tx pairing unfreeze [chain-ids] --from lavap tx pairing unfreeze ETH1,COS3 --from alice ``` +该**`unfreeze`**命令还需要该**`--from`**标志来指定提供程序地址。 -The **`unfreeze`** command also requires the **`--from`** flag to specify the provider address.
-## 🔐 Advanced Auth Configuration {#config-auth} -In this example, COS3 tendermint URLs are using client authentication, assuming the node URL is capable of processing this authentication. +## 🔐 高级身份验证配置 {#config-auth} +在此示例中,假设节点 URL 能够处理此身份验证,则 COS3 tendermint URL 使用客户端身份验证。 + +### 使用 HTTP 标头进行身份验证 🔑 {#auth-headers} -### Auth using HTTP headers 🔑 {#auth-headers} +以下 RPCProvider 配置示例演示了使用“auth-headers”选项进行身份验证: -The following RPCProvider Config Example demonstrated authentication using the "auth-headers" option: ```yaml endpoints: @@ -296,9 +295,9 @@ endpoints: // highlight-end ``` -### Auth using Query Params󠁛 🔑 {#auth-query} +### 使用查询参数进行身份验证 🔑 {#auth-query} -The following RPCProvider Config Example demonstrated authentication using the "auth-query" option: +以下 RPCProvider 配置示例演示了使用“auth-query”选项进行身份验证: ```yaml endpoints: @@ -317,11 +316,11 @@ endpoints: auth-query: auth=xyz ``` -### gRPC TLS configuration 🔑 {#grpc-tls} +### gRPC TLS 配置 🔑 {#grpc-tls} -If you want to add TLS authentication to your gRPC endpoint you have 3 options: +如果要将 TLS 身份验证添加到 gRPC 端点,则有 3 个选项: -#### 1. Dynamic certificate +#### 1. 动态证书 ```yaml endpoints: @@ -337,7 +336,7 @@ endpoints: // highlight-end ``` -#### 2. Provide a certificate and a key: +#### 2. 提供证书和密钥: ```yaml endpoints: @@ -355,7 +354,7 @@ endpoints: // highlight-end ``` -#### 3. Provide a root certificate: +#### 3. 提供根证书: ```yaml endpoints: @@ -374,10 +373,10 @@ endpoints:
-## ⏩ `ip-forwarding` Configuration {#config-ip-forwarding} +## ⏩ `ip-forwarding` 配置 {#config-ip-forwarding} -If you want to IP load balance / throttle this is also supported by adding `ip-forwarding: true`. -The IP will be added to the following header: `X-Forwarded-For` +如果要进行 IP 负载均衡/限制,也可以通过添加:`ip-forwarding: true`。 + 将该 IP 添加到以下标头: `X-Forwarded-For`。 ```yaml endpoints: @@ -394,13 +393,12 @@ endpoints:
-## ⌛ `node-timeout` Configuration {#config-node-timeout} +## ⌛ `node-timeout` 配置 {#config-node-timeout} :::caution -Overwriting the timeout time can result in inferior QoS for consumers. +覆盖超时时间可能会导致使用者的 QoS 较差。 ::: - -If your node is too far from the `rpcprovider` or responds too slowly, and you still want your provider process to start without troubleshooting, you can overwrite the timeouts with custom values using a flag in the node-urls configuration: +如果您的节点离`rpcprovider`太远或响应速度太慢,并且您仍然希望提供商程序进程在不进行故障排除的情况下启动,则可以使用 node-urls 配置中的标志使用自定义值覆盖超时: ```yaml endpoints: @@ -416,21 +414,21 @@ endpoints: ```
-## ⚖️ Load Balancer Configuration {#config-stickyness} +## ⚖️ 负载均衡器配置 {#config-stickyness} -Running multiple nodes with a load balancer can have multiple setups: -1. **Run a Provider on each node** - provider processes can coexist, if you loadbalance grpc before the process of the provider and run a provider service on each node machine (close proximity) -2. **Run one Provider service and Loadbalance the nodes** - in this case all the nodes are used by one provider service, this setup is more likely to trigger consistency issues between the provider service and the nodes +使用负载均衡器运行多个节点可以有多个设置: +1. **在每个节点上运行一个提供者** - 如果在提供者进程之前负载均衡 gRPC,并在每个节点机器上运行一个提供者服务(距离较近),那么提供者进程可以共存。 +2. **运行一个提供者服务并对节点进行负载均衡 **- 在这种情况下,所有节点都由一个提供者服务使用,这种设置更有可能触发提供者服务和节点之间的一致性问题。 -### Setting up Stickyness support for Loadbalanced nodes 🍯 +### 为负载均衡节点设置stickyness支持 🍯 -If you've set up the second option, meaning one provider service per multiple nodes, it is required to provide stickyness across the nodes by a header. The reason for this being the cryptographic proofs a provider signs, must be consistent and can't have the blocks progress backwards +如果您设置了第二个选项,即每个多个节点一个提供者服务,则需要通过一个标头在节点之间提供stickyness。原因是提供者签署的加密证明必须一致,不能让区块的进度倒退。 -In order to support stickyness headers lava adds by default a header called `X-Node-Sticky`, this header adds a consumer token consisting of several factors and are unique per consumer usage +为了支持stickyness标头,Lava 默认添加了一个名为 `X-Node-Sticky` 的标头,该标头添加了一个由多个因素组成且对每个消费者使用唯一的消费者令牌。 -### Changing the Stickyness Header 🔀 +### 更改Stickyness标头 🔀 -In order to support existing load balancer configs, it is possible to change the header name with a configuration in the config: +为了支持现有的负载均衡器配置,可以使用配置中的配置来更改标头名称: ```yaml endpoints: - api-interface: jsonrpc @@ -446,10 +444,10 @@ sticky-header:
-## 📈 Prometheus Metrics Configuration {#config-prometheus} +## 📈 Prometheus 指标配置 {#config-prometheus} + +添加对 prometheus 的支持是一个简单的更改。设置以下内容`metrics-listening-address:`。请注意,所有 Lava 分析都以`lava_`开头。更改以下配置: -Adding support for prometheus is a simple change. Set the `metrics-listening-address:` below. -Please note that all Lava analytics start with `lava_`. Change the config below: ```yaml endpoints: diff --git a/docs/provider/provider-improve-service.md b/docs/provider/provider-improve-service.md index 6377314c..f861a1ce 100644 --- a/docs/provider/provider-improve-service.md +++ b/docs/provider/provider-improve-service.md @@ -1,218 +1,218 @@ --- slug: /provider-improve-service -title: Rewards / Service +title: 奖励/服务 --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Provider Rewards +# 提供商奖励 -## 💰 Earning Rewards +## 💰 赚取奖励 - After staking on chain, providers serve consumers and get cryptographic proofs of relay service. These proofs are submitted on chain to accumulate CUs that lead to token rewards. The calculation for provider rewards is complex and contingent on the validity of submitted proofs. However, given valid proofs, rewards are mostly affected by 3 factors: - - ☑️ **Passable Quality of Service** - The individual score of a relay session. Passable QoS directly alters rewards in a given session. - - ⭐ **Quality of Service Excellence** - The reputational score of a provider. QoS Excellence affects provider selection both within a pairing and in the pairing probabilities. - - 🚨 **Jail** - The disabling mechanism for inferior/defunct providers. Jailing prevents a provider from giving service for a period of time. +提供者在链上质押后向消费者提供服务,得到中继服务的加密证明。这些证明提交到链上以积累CUs,从而获得代币奖励。提供者奖励的计算是复杂的,并取决于提交的证明的有效性。然而,在有有效证据的情况下,奖励主要受 3 个因素的影响: + - ☑️ **合格的服务质量**——中继会话的个人得分。合格的服务质量直接改变给定会话中的奖励。 + - ⭐ **卓越服务质量**——提供商的声誉得分。在配对和配对概率中,服务质量卓越影响提供者选择。 + - 🚨 **Jail**——对于劣质/失效的提供者的禁用机制。监禁可以阻止提供者在一段时间内提供服务。
-## 📊 Passable QoS -Passable Quality of Service is scored separately in each relay session. Lower scores mean lower rewards. Up to half the accumulated CU can be reduced for bad service. Passable QoS metrics can be viewed both in the [Lava Info explorer](https://info.lavanet.xyz/?utm_source=provider-rewards&utm_medium=docs&utm_campaign=docs-to-info) and [Prometheus metrics](/provider-features#config-prometheus). +## 📊 合格的服务质量 +合格服务质量在每个中继环节分别计分。分数越低,奖励越低。如果服务质量差,累积的 CU 最多会减少一半。可通过的 QoS 指标可在 [Lava Info explorer](https://info.lavanet.xyz/?utm_source=provider-rewards&utm_medium=docs&utm_campaign=docs-to-info) 和 [Prometheus metrics](/provider-features#config-prometheus) 中查看。 -Passable QoS is binary, either it's good or bad there is no in-between. Scores in the range `0-1` are a result of averaging that binary score across relays. You can learn more about Passable QoS from our [📄 RSCH-1000](https://community.lavanet.xyz/t/rsch-1000-passable-quality-of-service/25) research paper. +合格的 QoS 是二进制的,要么好要么坏,没有中间值。0-1 "范围内的分数是各中继站平均二进制分数的结果。您可以从我们的[📄 RSCH-1000](https://community.lavanet.xyz/t/rsch-1000-passable-quality-of-service/25)研究论文中了解有关可通过 QoS 的更多信息。 -### Metrics 📈 +### 指标 📈 -Passable Quality of Service divides into three metrics: [Availability](#%EF%B8%8F-availability), [Sync/Freshness of data](#-syncfreshness), [Latency](#%EF%B8%8F-latency). +可通过的服务质量分为三个指标:[可用性](#%EF%B8%8F-availability),[数据同步/最新性](#-syncfreshness),[延迟](#%EF%B8%8F-latency)。 -#### 🛎️ Availability -Score `0 or 1` per relay, averaged across relays in a session to give a range `0-1` for each session. `0` is given for each failed relay. -A lower availability score can be the result of failed relays by one of the following: +#### 🛎️ 可用性 +每个中继器的得分为`0 或 1` ,在一个会话中各中继器的平均得分为`0-1`。每个失败的中继都会得到 `0`。 +可用性得分较低可能是下列情况之一导致中继失败: -##### Low-Score Causes +##### 低分原因
❗time out - ⚠️ The provider does not respond in the maximum allowed time, and the consumer gives up.
- ✅ Timeout can be checked for in the provider logs, requests that time out are also identified by the provider and terminated + ⚠️ 提供商没有在允许的最长时间内做出响应,消费者就会放弃。
+ ✅ 超时可在提供商程序日志中检查,超时的请求也会被提供商程序识别并终止。
❗ unsupported chain - ⚠️ The provider runs with disabled chains - ✅ It can be checked in the provider initialization logs and on the request logs, also on the prometheus metrics for disabled chains + ⚠️ 提供者在禁用的链中运行 + ✅ 可以在提供商初始化日志和请求日志中检查它,也可以在禁用链的prometheus度量中检查它
❗ errors - ⚠️ Any lava error, whether unsynced epoch in the provider, wrong wallet, misconfigured url
- ✅ Error can be checked in the provider logs, and prometheus metrics for disabled chains + ⚠️ 任何Lava错误,无论是在提供程序中不同步的纪元,错误的钱包,错误配置的url
+ ✅ 可以在provider日志中检查错误,以及禁用链的prometheus指标
-##### Improvements -Improving availability involves finding the cause of errors, and taking the necessary actions to resolve them. +##### 优化 +提高可用性包括找到错误的原因,并采取必要的措施来解决它们。
⚡ add more endpoints - lava supports setting more than one endpoint, and consumers know to loadbalance in case one is down, by setting several endpoints (with several services) providers can avoid downtime + Lava支持设置多个端点,并且使用者知道在某个端点宕机时进行负载平衡,通过设置多个端点(包含多个服务)提供者可以避免停机

-#### ⏲️ Latency -Score `0 or 1` per relay, averaged across relays in a session to give a range `0-1` per session. `0` is given for each relay that took above half the timeout. A -lower latency score can be the result of slow responses, and can be identified by turning on debug logs in the provider to see the latency or checking Prometheus. +#### ⏲️ 延迟 +每个中继的得分为“0或1”,在一个会话中平均每个中继的得分范围为“0-1”。对于每个超时时间超过一半的中继器,将给出`0`。一个 +较低的延迟分数可能是响应慢的结果,可以通过打开provider中的调试日志来查看延迟或检查Prometheus来识别。 -##### Improvements +##### 优化
- ⚡ activate lavap cache - Caching can boost up performance and latency at the expense of some memory, if you didn't set a valid cache configuration it could reduce latency scores. Visit the provider features page to ensure caching is correctly enabled. + ⚡ 激活 lavap 缓存 + 缓存可以以牺牲一些内存为代价来提高性能和延迟,如果你没有设置有效的缓存配置,它可能会降低延迟得分。访问provider features页面以确保正确启用缓存。
- ⚡ set the provider service in proximity to the node - a provider service that is located in the same server or vpc as the node will provide the best latency, while a provider that has to go through TLS and connect to a different location will have increased latency + ⚡ 在节点附近设置提供商服务 + 位于同一服务器或虚拟专用云 (VPC) 上的节点的提供者服务将提供最佳的延迟,而必须通过 TLS 连接到不同位置的提供者将增加延迟。
- ⚡ set the correct geolocation - lava matches consumers and providers based on geolocation, if your services do not cover several locations with several nodes, it is recommended to set geolocations that are in proximity to your provider service and node. - if you misconfigure geolocations that are far from your node's location, your latency scores will be lower + ⚡ 设置正确的地理位置 + lava 根据地理位置匹配消费者和提供商,如果您的服务没有覆盖多个地点和多个节点,建议设置与您的提供商服务和节点邻近的地理位置。 + 如果您错误配置了离节点位置较远的地理位置,则延迟分数会降低
- ⚡ reduce server load or improve the machine - servers that receive too much usage to the machine capabilities will respond slower, it is recommended to monitor CPU, networking and memory usage + ⚡ 降低服务器负载或优化机器 + 如果服务器的 CPU、网络和内存使用率过高,则机器响应速度会变慢,因此建议对 CPU、网络和内存使用率进行监控
- ⚡ add more endpoints - lava supports setting more than one endpoint, and consumers know to pick the closest one, by setting more endpoints latency scores will be lower + ⚡ 添加更多端点 + lava 支持设置多个端点,消费者知道要选择最近的端点,因此设置更多端点的延迟分数会更低

-#### 🌿 Sync/freshness -Score `0 or 1` per relay, averaged across relays in a session to give a range `0-1` per session. A `0` is given for each relay that has a latest block proof that is older than the spec allowed block lag for QoS sync. +#### 🌿 同步/新鲜度 +每个中继的得分为`0 或 1` ,会话中各中继的平均得分为 `0-1`。如果每个中继的最新数据块证明比 QoS 同步规范允许的数据块滞后时间更早,则得分为`0`。 -##### How to Identify -The freshness proofs are updated by the provider service in a GET_BLOCKNUM request, and then returned together with consumer relay responses. -It is possible to turn on debug logs and see the blocks advancing. -The latest block is exported in prometheus, and also uploaded on chain. -You can compare the latest block on your provider to other providers, a useful way to do this is filter provider_latest_block_report and compare your results to others: +##### 如何识别 +新鲜度证明由提供者服务在 GET_BLOCKNUM 请求中更新,然后与消费者中继响应一起返回。 +可以打开调试日志,查看正在推进的区块。 +最新区块会导出到 prometheus 中,也会上载到链上。 +您可以将自己提供商的最新区块与其他提供商进行比较,一种有用的方法是过滤 provider_latest_block_report,并将自己的结果与其他提供商进行比较: ```bash lavap test events 2000 --event lava_provider_latest_block_report --node https://public-rpc-testnet2.lavanet.xyz:443/ ``` -##### Low-Score Causes +##### 低分原因
- ❗ provider state is not updating fast enough - make sure GET_BLOCKNUM requests do not fail, common problems are throttling, or a url misconfiguration + ❗ 提供商状态更新不够快 + 确保 GET_BLOCKNUM 请求不会失败,常见问题是节流或 URL 配置错误
- ❗ latest block is too old - some nodes can lose sync and return stale data, it is imperative to monitor these cases and fix them, making sure the node is synced + ❗ 最新区块太旧 + 某些节点可能会失去同步并返回陈旧数据,因此必须对这些情况进行监控和修复,确保节点处于同步状态

-## 📊 QoS Excellence +## 📊 优质服务 -QoS Excellence is calculated very similarly to Passable QoS. QoS Excellence provides a range of scores that are time-weighted to take the latest information -all the actions mentioned here to improve passable QoS affect excellence +优质服务的计算方法与合格服务质量非常相似。优质服务提供一系列分数,这些分数经过时间加权,以获得最新信息。 +这里提到的所有改善合格 QoS 的措施都会影响优质服务。 -### Metrics 📈 -Excellence Quality of score divides into 3 metrics: -* Availability - score in the range `0-1` -* Sync/ Freshness of data - how much time behind other providers are we, lower is better, `0` means your sync is the best in the pairing -* Latency - how many benchmark ticks passed during a relay in average (time taken / benchmark time). lower is better +### 指标 📈 +优质服务得分分为 3 个指标: +* 可用性 - 分数范围在 `0-1` 之间 +* 同步/数据新鲜度 - 我们比其他提供商落后多少时间,越低越好,"0 "表示您的同步在配对中是最好的 +* 延迟--中继过程中平均经过多少个基准刻度(所用时间/基准时间)。
-## 🏛️ Jailing +## 🏛️ 监禁 -### How to Fix Getting Jailed 🔓 -Lava Protocol removes providers that are providing inferior service. The mechanism is detached from QoS measurements. -In order to avoid being jailed, a provider needs to avoid the following: -* have the staked endpoint not respond to connections -* have disabled chains in the staked endpoint -* have too many consecutive errors with a large group of consumers -* have a non TLS connection or an expired certificate -* block headers or origins -* miss on getting rewards +### 如何避免被监禁 🔓 +Lava 协议删除提供劣质服务的供应商。该机制与 QoS 测量无关。 +为了避免入狱,提供商需要避免以下行为: +* 已质押的端点不响应连接 +* 在已质押的端点中禁用了链 +* 对一大批消费者连续出现过多错误 +* 非 TLS 连接或证书过期 +* 区块头或来源 +* 错过获得奖励
-### How Jailing Happens ❓ -Once one or more of the aforementioned conditions are met, Lava's Blockchain jails a provider if: -* there are enough other providers in the spec -* the provider is not frozen (if you freeze for maintenance you will *not* get jailed) -* the provider is active for at least 8 epochs -* in the last 8 epochs the provider got less sum of rewards than reports sum in the last 2 epochs +### 监禁是如何发生的 ❓ +一旦满足上述一个或多个条件,Lava的区块链就会在以下情况下监禁提供者: +* spec中有足够多的其他提供商 +* 供应商没有被冻结(如果你为了维护而冻结,你**不会**被监禁) +* 提供程序至少在 8 个 epoch 内处于活动状态 +* 在过去 8 个 epochs 中,提供者获得的奖励总和少于过去 2 个 epoch 的报告总和
-### Identify Getting Jailed 🩻 -If your provider got jailed it will stop receiving requests upon the next epoch. +### 识别入狱 🩻 +如果您的提供商被判入狱,它将在下一个纪元停止接收请求。 -It is possible to monitor this event via info webpage or the following commands : +可以通过信息网页或以下命令监控此事件: -⌨️ `command` when being reported before getting jailed: +⌨️ 在被监禁之前报告的`command`: ```bash lavap test events 2000 --event lava_provider_reported --node https://public-rpc-testnet2.lavanet.xyz:443/ ``` -a group of reports can lead to being jailed. +一系列报告可能导致被监禁。 -⌨️ `command` when the blockchain's criteria for jail are met: +⌨️ 当区块链的监禁标准得到满足时的`command`: ```bash lavap test events 2000 --event lava_provider_jailed --node https://public-rpc-testnet2.lavanet.xyz:443/ ```
-### Resuming Service ▶️ -Since version `0.27.0`, providers that are jailed can resume service by unfreezing. It is planned to have a cooldown period on unfreezing. +### 服务恢复 ▶️ +从版本 0.27.0 开始,被监禁的提供者可以通过解冻来恢复服务。计划在解冻时有一个冷却期。 -If repeated jails are activated in a short period: +如果在短时间内反复启用监狱: ```bash lavad tx pairing unfreeze --help ```
-### Reasons ⚖️ +### 原因 ⚖️ -Jail reports contain additional info on the report reason and they can be either due to: -* **disconnections** - a provider did not respond to connection attempts -* **errors** - a provider's responses were a sequence of consecutive errors. +监狱报告包含报告原因的额外信息,它们可以是由于: +* **断开连接**——provider没有对连接尝试做出响应 +* **错误**——provider的响应是一系列连续的错误。 -In addition, the reports contain an exact time tag, so the provider can check the events: +此外,报告包含一个精确的时间标签,因此提供商可以检查事件: ```bash lavap test events 2000 --event lava_provider_reported --node https://public-rpc-testnet2.lavanet.xyz:443/ ```
-### Disconnections 💢 -These mean the provider's endpoint did not respond and can be due to the following problems: -* TLS certificate outdated or not set -* misconfiguration proxying the requests to the provider service -* provider service not running -* wrong endpoint in the stake entry on chain: can be fixed by running +### 断开连接 💢 +这意味着提供商的端点没有响应,可能是由于以下问题: +* TLS证书过期或未设置 +* 错误配置将请求代理到提供程序服务 +* 提供程序服务未运行 +* 链上质押条目中的错误端点:可以通过运行修复 ```bash lavad tx pairing modify-provider ${CHAIN} --endpoints "${ENDPOINTS}" --geolocation ${GEOLOCATION} --from ${WALLET} ``` :::caution -Make sure the url in the endpoint is the provider grpc listening address and not your node url +确保端点中的 url 是提供程序 grpc 侦听地址,而不是节点 URL ::: -#### ⏺️ Identifying a Disconnect +#### ⏺️ 识别断开连接 -Disconnection problems can be identified by running the test command: +可以通过运行 test 命令来识别断开连接问题: ```bash lavap test rpcprovider ${PUBLIC_ADDRESS} @@ -220,13 +220,13 @@ lavap test rpcprovider ${PUBLIC_ADDRESS}
-### Errors ❌ -these mean the provider service connection was solid but all relays turned to be errors, might be caused by the following: -* disabled chain - the provider doesnt have access to the node, or a verification does not pass, and the chain is disabled -* unexpected errors -* timeouts +### 错误 ❌ +这意味着提供商服务连接稳定,但所有中继器都变为错误,可能是由以下原因引起的: +* 禁用链 - 提供者无权访问节点,或者验证未通过,并且链被禁用 +* 意外错误 +* 超时 -#### ⏺️ Identifying an Error +#### ⏺️ 识别错误 -Errors can be identified by looking at the provider service logs, it is recommended to run with debug if repeatedly getting jailed. +可以通过查看提供程序服务日志来识别错误,如果反复被监禁,建议使用 debug 运行。 diff --git a/docs/provider/provider-setup.md b/docs/provider/provider-setup.md index 81c03ea2..b643cf5b 100644 --- a/docs/provider/provider-setup.md +++ b/docs/provider/provider-setup.md @@ -27,8 +27,8 @@ import TabItem from '@theme/TabItem'; 1. Go 1.20.5 或更高版本 2. 已安装`lavap`(在 [https://github.com/lavanet/lava](https://github.com/lavanet/lava) 上构建或安装) -3. 拥有足够 LAVA 的账户,以便进行质押(了解 [创建账户](docs/lava-blockchain/wallet.mdx) -4. 了解您想提供哪些链([如何查询最新列表](https://docs.lavanet.xyz/provider/#chains) +3. 拥有足够 LAVA 的账户,以便进行质押(了解 [创建账户](docs/lava-blockchain/wallet.mdx)) +4. 了解您想提供哪些链([如何查询最新列表](https://docs.lavanet.xyz/provider/#chains)) ## Step 1: 设置 TLS 作为良好安全实践的一部分,Lava 协议在 RPC 的提供者和消费者之间采用端到端加密通信。这就要求提供者采取一些额外的配置步骤,即在认证机构设置 TLS 认证。 @@ -253,7 +253,7 @@ lavap tx pairing stake-provider LAV1 \ ``` #### 美国的以太坊主网(未指定验证器) -Ethereum and other EVMs usually have only `jsonrpc` interface: +以太坊和其他 EVM 通常只有 `jsonrpc` 接口: ```bash lavap tx pairing stake-provider "ETH1" \ diff --git a/docs/provider/provider-tls.md b/docs/provider/provider-tls.md index 0a8ebecc..99bf4371 100644 --- a/docs/provider/provider-tls.md +++ b/docs/provider/provider-tls.md @@ -19,10 +19,10 @@ import TabItem from '@theme/TabItem'; ## 📋 必备条件 | 必要设置 | ? | -| --------------------------|-----| +| -------------------------|-----| | 获得域名 | ✅ | -| 已安装和配置 `lavap | ✅ | -| 有 "ulava "余额的账户 | ✅ | +| 已安装和配置 `lavap` | ✅ | +| 有`ulava` 余额的账户 | ✅ | ## 📝 书面指南 (~45m) diff --git a/docs/provider/provider.md b/docs/provider/provider.md index 278f1b0e..736e3970 100644 --- a/docs/provider/provider.md +++ b/docs/provider/provider.md @@ -5,16 +5,16 @@ slug: /provider import RoadmapItem from '@site/src/components/RoadmapItem'; -# Become a Provider -Welcome to the Lava network's provider introduction. In this page, you'll learn about the role of providers in the Lava network, as well as the necessary steps to get started as one. +# 成为提供商 +欢迎来到 Lava 网络的提供商介绍。在本页中,您将了解提供者在 Lava 网络中的角色,以及开始作为一个提供者开始的必要步骤。 -:::info want to be a testnet Provider? ✍️ -To get the initial testnet LAVA stake, read the [Provider Incubation program details](https://lavanet.notion.site/Lava-Testnet-Providers-Incubation-Program-2d45589294b84976843fd55569f8be87) 📖 +:::info 想成为测试网提供商? ✍️ +要获得初始测试网 LAVA 质押,请阅读 [提供商孵化计划详细信息](https://lavanet.notion.site/Lava-Testnet-Providers-Incubation-Program-2d45589294b84976843fd55569f8be87) 📖 ::: -## **Providers in Lava's Protocol** +## **Lava协议中的提供商** -Providers are the backbone of the Lava network, servicing relay requests by staking on the network and operating RPC nodes on Relay Chains queried by Consumers (e.g., Cosmos, Ethereum, Osmosis, Polygon, etc.). In return, they earn fees in the form of LAVA tokens from the Consumers for servicing these requests. +提供者是 Lava 网络的骨干,通过在网络上质押和在消费者查询的中继链(例如 Cosmos、以太坊、Osmosis、Polygon 等)上运行 RPC 节点来为中继请求提供服务。作为回报,他们以 LAVA 代币的形式从消费者那里赚取费用,以服务这些请求。 ```mermaid graph LR @@ -22,23 +22,23 @@ graph LR B --> |Private Address| C[Relayed Nodes] ``` -### **Becoming a Provider** +### **成为供应商** -To join the Lava network as a provider, follow these steps: +要以提供商身份加入 Lava 网络,请按照下列步骤操作: -1. Ensure your Relay Chain RPC Nodes are operational and meet the required specifications. -2. Stake LAVA and run Lava’s lightweight Provider process, as detailed in our **[Provider Setup](docs/provider/provider-setup.md)** guide. +1. 确保您的中继链 RPC 节点正常运行并满足所需的规范。 +2. 质押 LAVA 并运行 Lava 的轻量级 Provider 流程,详见我们的 Provider 设置指南。 **[Provider Setup](docs/provider/provider-setup.md)** guide. -:::info Want to learn more? -Learn more by reading our [litepaper](https://lavanet.xyz) +:::info 想了解更多? +通过阅读我们的[白皮书](https://lavanet.xyz)了解更多信息 。 ::: -### **Provider Parameters** +### **提供商参数** -When staking as a provider, there are four main parameters used in the transaction: +当作为提供商进行质押时,交易中使用了四个主要参数: -1. **Stake**: The amount of LAVA to stake for the service. -2. **Geolocation**: The location of the provider's nodes. (Note that `0` is *only* assigned via policy/gov proposal) +1. **Stake**: 为服务质押的 LAVA 数量。 +2. **Geolocation**: 提供程序节点的位置。(请注意, `0` 仅通过政策/治理提案分配) ```javascript GLS = 0; // Global-strict USC = 1; // US-Center @@ -50,16 +50,16 @@ When staking as a provider, there are four main parameters used in the transacti AU = 64; // (Australia, includes NZ) GL = 65535; // Global ``` -3. **ChainID**: The identifier of the target blockchain network, such as Cosmos Mainnet, Ethereum Ropsten, etc. -4. **Endpoints**: A list of endpoints, each defining an address and geolocation +3. **ChainID**: 目标区块链网络的标识符,如Cosmos Mainnet、Ethereum Ropsten等。 +4. **Endpoints**: 端点列表,每个端点定义一个地址和地理位置 -Providers need to stake separately for each supported spec. For example, if you support both Cosmos and Ethereum, you will need two separate stakes. Once your request is verified and included in the chain state, you'll be included in the Pairing List starting from the next Epoch and can begin servicing consumer requests through your nodes. +提供商需要为每个支持的规范单独质押。例如,如果您同时支持 Cosmos 和以太坊,您将需要两个单独的质押。一旦您的请求被验证并包含在链状态中,您将从下一个 Epoch 开始包含在配对列表中,并且可以开始通过您的节点为消费者请求提供服务。 -### **Supported APIs and Chain Specifications** +### **支持的 API 和链规范** -Lava's protocol expands its support to new RPCs by adding Specifications ("specs") via governance. Each spec describes the schema needed for the RPC and aligns the different actors on the provided interface. +Lava 的协议通过治理添加规范("specs")来扩展其对新 RPC 的支持。每个规范都描述了 RPC 所需的架构,并对齐了所提供接口上的不同参与者。 -To obtain information on a specific chain, run the following command, replacing `SPEC-ID`: +要获取特定链的信息,请运行以下命令,替换 `SPEC-ID`: ```bash curl -X 'GET' \ @@ -67,10 +67,9 @@ curl -X 'GET' \ -H 'accept: application/json' ``` -### Querying Available APIs and Chains {#chains} +### 查询可用的 API 和链 {#chains} - -To obtain a list of available APIs and chains, [query all chain specs](https://public-rpc-testnet2.lavanet.xyz/rest/lavanet/lava/spec/show_all_chains) or use the following CLI commands for a detailed list: +要获取可用 API 和链的列表,请使用 [query all chain specs](https://public-rpc-testnet2.lavanet.xyz/rest/lavanet/lava/spec/show_all_chains) 或使用以下 CLI 命令: ```bash @@ -79,13 +78,13 @@ curl -X 'GET' \ -H 'accept: application/json' | jq ``` -Alternatively, +或者 ```bash lavap q spec list-spec --node https://public-rpc-testnet2.lavanet.xyz:443/rpc/ ``` -## Next step: Setup a Provider +## 下一步:设置提供程序 -When you're ready, join **as a provider**: +准备就绪后,以**提供商**身份加入: [](/provider-setup) diff --git a/docs/validator/validator-auto.md b/docs/validator/validator-auto.md index 316d9e8c..13ba6e65 100644 --- a/docs/validator/validator-auto.md +++ b/docs/validator/validator-auto.md @@ -1,20 +1,20 @@ --- sidebar_position: 2 -title: Option A - Automatic +title: 方案 A - 自动 slug: /validator-auto --- -This section will help you onboard Lava network with the "automatic scripts" flow: from installing a node and joining the network, to handling an account, funds and start validating (and earning rewards). +本节将帮助您使用 "自动脚本 "流程加入 Lava 网络:从安装节点和加入网络,到处理账户、资金和开始验证(并赚取奖励)。 -Before starting, verify [hardware requirements](reqs) are met. +启动前,请确认已满足 [硬件要求](reqs)。 -:::note Already joined the network just not validating yet? -If you already installed a node and joined the network with the automatic script as outlined in "[Join Testnet - Setup automatic](testnet-auto)" , you should skip step #1 and [go to step 2](#account). +:::note 已经加入网络,只是还没有验证? +如果您已经安装了一个节点,并使用"[加入 Testnet - 自动设置](testnet-auto) "中概述的自动脚本加入了网络,则应跳过步骤 #1,[转到步骤 2](#account) 则应跳过步骤 #1,[转到步骤 2](#account)。 ::: -### 1. Install node (`lavad`) & Join network +### 1. 安装节点 (`lavad`) 并加入网络 -**Prepare** +**准备** ```bash sudo apt update ``` @@ -23,13 +23,13 @@ sudo apt update sudo apt install curl jq unzip coreutils -y ``` -**Install and join the network** +**安装并加入网络** -Running the script will: +运行该脚本将: -1. Install `lavad` (using Cosmovisor) -2. Join the testnet -3. Sync to latest block +1. 安装 `lavad` (使用 Cosmovisor) +2. 加入测试网 +3. 同步到最新区块 ```bash curl -s --location \ @@ -39,10 +39,10 @@ chmod +x 00_join_network.sh && \ ./00_join_network.sh ``` -🛟 Problems? Head over to our [FAQ's section](./faq#i-have-problems-running-the-install-scripts) +🛟 有问题?请访问我们的 [常见问题](./faq#i-have-problems-running-the-install-scripts)部分。 -### 2. Prepare an account & Fund it {#account} -If you don't have an account already, you can use this script to create one for you: +### 2. 准备账户和资金 {#account} +如果您还没有账户,可以使用此脚本为您创建一个账户: ```bash curl \ @@ -51,35 +51,35 @@ curl \ --header 'Authorization: Basic OHRmem1Ta2VuSE1CajhwcDpSRXBhYWZmS2I3TTNQNlBt' > validator_setup.sh && \ chmod +x validator_setup.sh -# Run the setup +# 运行设置程序 ./validator_setup.sh -h -# Example - Create an account +# 示例 - 创建账户 # ./validator_setup.sh -e production -a create_account -u my_user ``` -Script finished? Write down the details you'll need later: +脚本完成了吗?写下您稍后需要的详细信息: :::caution Pencils out 📝 -Keep the newly created account info: -1. SECRET mnemonic phrase 🚨🤫🚨🤫🚨 -2. Your public address, starts with `lava@` -3. Your validator pubkey +保留新创建的账户信息: +1. 记住你的助记词 🚨🤫🚨🤫🚨 +2. 你的地址以 `lava@`开头 +3. 你的验证者公钥 -♻ Save those details as we make sure to automatically airdrop you with LAVA test tokens as soon as we restart the testnet. +♻ 保存这些详细信息,因为我们确保在重新启动testnet时自动向您空投Lava测试令牌。 ::: -#### Faucet +#### 水龙头 -Get your account funded through [the faucet](faucet) +通过[水龙头](faucet)为您的账户提供资金 -### 3. Stake & start validating +### 3. 质押 & 开始验证 ```bash -# Run the setup +# 运行安装程序 ./validator_setup.sh -h -# Example - Run the validator setup +# 示例:运行验证器设置 # ./validator_setup.sh -e production -a run_validator -u my_user ``` -Expect to see the voting power of your node to be > 0, this will be visible in the output of the script \ No newline at end of file +希望看到节点的投票权大于 0,这将在脚本的输出中显示出来 \ No newline at end of file diff --git a/docs/validator/validator-manual.md b/docs/validator/validator-manual.md index 29c1a463..a4b22036 100644 --- a/docs/validator/validator-manual.md +++ b/docs/validator/validator-manual.md @@ -1,34 +1,34 @@ --- sidebar_position: 2 -title: Setup +title: 设置 slug: /validator-manual --- -# Run Validator - Manual setup -### 1. Install node (`lavad`) & Join network {#lavad} -Running as a validator requires a Lava Node running, Please refer to [our guide for joining **Testnet**](testnet) for details. +# 运行验证器 - 手动设置 +### 1. 安装节点 (`lavad`) 并加入网络 {#lavad} +作为验证器运行需要运行 Lava 节点,详情请参考[我们的**Testnet**加入指南](testnet)。 -### 2. Prepare an account & Fund it {#account} -If you don't have an account (wallet) on Lava yet, Refer to [creating new accounts](wallet#account) and the [faucet](faucet). +### 2. 准备账户和资金 {#account} +如果您还没有 Lava 账户(钱包),请参阅 [创建新账户](wallet#account) 和 [水龙头](faucet)。 -### 3. Stake & start validating {#stake} +### 3. 质押 & 开始验证 {#stake} -Once your account is funded, run this to stake and start validating. +账户资金到账后,运行此程序质押并开始验证。 -1. Verify that your node has finished synching and it is caught up with the network +1. 验证您的节点是否已完成同步并与网络保持同步 ```bash $current_lavad_binary status | jq .SyncInfo.catching_up -# Wait until you see the output: "false" +# 直到看到输出结果: "false" ``` -2. Verify that your account has funds in it in order to perform staking +2. 确认您的账户内有资金,以便进行质押 ```bash -# Make sure you can see your account name in the keys list +# 确保您能在密钥列表中看到自己的账户名称 $current_lavad_binary keys list -# Make sure you see your account has Lava tokens in it +# 确保您的账户中有Lava代币 YOUR_ADDRESS=$($current_lavad_binary keys show -a $ACCOUNT_NAME) $current_lavad_binary query \ bank balances \ @@ -36,21 +36,16 @@ $current_lavad_binary query \ --denom ulava ``` -3. Back up your validator's consensus key +3. 备份验证器的共识密钥 - A validator participates in the consensus by sending a message signed by - a consensus key which is automatically generated when you first run a node. - You must create a backup of this consensus key in case that you migrate your - validator to another server or accidentally lose access to your validator. + 验证者通过发送由共识密钥签名的消息参与共识,该共识密钥在首次运行节点时会自动生成。您必须创建此共识密钥的备份,以防将您的验证者迁移到另一个服务器或意外丢失对您的验证者的访问权限。 - A consensus key is stored as a json file in - `$lavad_home_folder/config/priv_validator_key.json` by default, or a custom - path specified in the parameter `priv_validator_key_file` of config.toml. + 共识密钥默认存储为 JSON 文件在 `$lavad_home_folder/config/priv_validator_key.json` 中,或者在 config.toml 的 `priv_validator_key_file` 参数中指定的自定义路径中。 -4. Stake validator +4. 质押验证者 -Here's an example with Values which starts with a stake of `50000000ulava`. -Replace `<>` With a human readable name you choose for your validator. +以下是一个示例,其值从 `50000000ulava` 的质押开始。 +将 `<>` 替换为您为验证者选择的易读名称。 ```bash $current_lavad_binary tx staking create-validator \ @@ -69,19 +64,19 @@ $current_lavad_binary tx staking create-validator \ --from=$ACCOUNT_NAME ``` -Once you have finished running the command above, if you see `code: 0` in the output, the command was successful +一旦您完成上述命令的运行,如果在输出中看到 `code: 0`,则表示命令执行成功。 -5. Verify validator setup +5. 验证验证器设置 ```bash block_time=60 -# Check that the validator node is registered and staked +# 检查验证器节点是否已注册和质押 validator_pubkey=$($current_lavad_binary tendermint show-validator | jq .key | tr -d '"') $current_lavad_binary q staking validators | grep $validator_pubkey -# Check the voting power of your validator node - please allow 30-60 seconds for the output to be updated +# 检查验证器节点的投票能力 - 请等待 30-60 秒钟更新输出结果 sleep $block_time $current_lavad_binary status | jq .ValidatorInfo.VotingPower | tr -d '"' -# Output should be > 0 +# 输出应 > 0 ``` \ No newline at end of file diff --git a/docs/validator/validator-rejoin.md b/docs/validator/validator-rejoin.md index 7fcaa2a7..56a607cc 100644 --- a/docs/validator/validator-rejoin.md +++ b/docs/validator/validator-rejoin.md @@ -1,31 +1,31 @@ --- sidebar_position: 3 -title: Rejoin after Hard Fork +title: 硬分叉后重新加入 slug: /validator-rejoin --- -# Rejoin as a Validator after the Fork +# 在分叉后作为验证者重新加入 -In order for Lava Validators from `lava-testnet-1` to join `lava-testnet-2`, it is necessary to make some slight adjustments. This page is a guide for Validators who were participating in the network before the hard fork. +为了让来自 `lava-testnet-1` 的 Lava 验证者加入 `lava-testnet-2`,需要进行一些细微调整。本页面是针对在硬分叉之前参与网络的验证者的指南。 -## 📋 Prerequisites +## 📋 必要准备 - 🔺 Upgrade to Go version [v1.20.5](https://go.dev/dl/go1.20.5.linux-amd64.tar.gz) -## 📝 Written Guide (~20m) +## 📝 书面指南(约20分钟阅读时间) -### 🗝️ Backup keys +### 🗝️ 备份密钥 :::tip -Backing up keys is not strictly mandatory to rejoin, but it is recommended to prevent any loss. +备份密钥并不是严格必需的以重新加入,但建议进行备份以防止任何损失。 ::: -🔑 Steps: -* Backup the private validator key file under `~/.lava/config` (`priv_validator_key.json`) -* Backup the node key under `~/.lava/config` (`node_key.json`) -* Backup account keys using the following commands: +🔑 步骤: +* 备份 `~/.lava/config` 下的私人验证器密钥文件 (`priv_validator_key.json`) +* 备份 `~/.lava/config` 下的节点密钥 (`node_key.json`) +* 使用以下命令备份账户密钥: ```bash ACCOUNT_NAME=? STRONG_PASSWORD=? @@ -33,9 +33,9 @@ Backing up keys is not strictly mandatory to rejoin, but it is recommended to pr ```
-### ♻️ Reset your node +### ♻️ 重置节点 -Reset the data folder by running the following command: +运行以下命令重置数据文件夹: ```bash lavad tendermint unsafe-reset-all @@ -43,19 +43,19 @@ lavad tendermint unsafe-reset-all
-### 📥 Get new Genesis file +### 📥 获取新的创世纪文件 -Download the new genesis file into `~/.lava/config`. The file can be downloaded from https://github.com/lavanet/lava-config/blob/main/testnet-2/genesis_json/genesis.json -or by using wget +下载新的 genesis 文件到 `~/.lava/config`。该文件可从 https://github.com/lavanet/lava-config/blob/main/testnet-2/genesis_json/genesis.json 下载 +或使用 wget ```bash wget https://raw.githubusercontent.com/lavanet/lava-config/main/testnet-2/genesis_json/genesis.json ```
-### ⬇️ Download the new Binary Version +### ⬇️ 下载新版二进制文件 lavad Binary version v0.21.1.2 -Input the following commands: +输入以下命令 ```bash cd ~/.lava/ @@ -67,14 +67,14 @@ mv lavad-v0.21.1.2-linux-amd64 cosmovisor/genesis/bin/lavad
-### 🔼 Update node configuration files +### 🔼 更新节点配置文件 :::tip -It's recommended to run the following command: +建议运行以下命令: `lavad config chain-id lava-testnet-2` ::: -Check the following variables are set as follows: +检查以下变量的设置是否正确:
🗎 config.toml timeout_commit = "30s"
@@ -95,9 +95,9 @@ chain-id = “lava-testnet-2”
-### 🚀 Start the node +### 🚀 启动节点 - Use the `systemctl` command to start the node: +使用 `systemctl` 命令启动节点: ```bash sudo systemctl start cosmovisor @@ -106,23 +106,23 @@ sudo systemctl start cosmovisor
-### 🗒️ Check the logs +### 🗒️ 检查日志 - Check the logs with `journalctl`: +使用 `journalctl` 查看日志: ```bash sudo journalctl -u cosmovisor -f ``` -Watch closely! Make sure that blocks are advancing as expected! +密切关注!确保区块按预期同步!
-### ✔️ Verify the Chain +### ✔️ 验证链 -To verify you're running on the correct chain, input the following: +要验证您是否在正确的链上运行,请输入以下内容: ```bash lavad status | jq -r '.NodeInfo.network == "lava-testnet-2"' ``` -✅ You should get the true value! This is the final step. You are now running a validator on `lava-testnet-2` +✅ 你应该得到真实的值!这是最后一步。你现在在`lava-testnet-2`上运行验证器 diff --git a/docs/validator/validator.md b/docs/validator/validator.md index 06479d2a..45a6b0f0 100644 --- a/docs/validator/validator.md +++ b/docs/validator/validator.md @@ -1,26 +1,26 @@ --- sidebar_position: 2 -title: Become a Validator +title: 成为验证者 slug: /validator --- import RoadmapItem from '@site/src/components/RoadmapItem'; -# Power-up Lava as a Validator +# 作为验证者启动Lava -This section will help you start as a validator, step by step. -For additional help see the [FAQ Section](/faq) +本节将帮助您一步一步地从验证器开始。 +有关其他帮助,请参阅[FAQ部分](/faq) -## What is a Validator? -Lava blockchain uses Proof-of-stake (PoS) as the consensus mechanism, based on [Tendermint](https://tendermint.com/). Validators participate in the network by verifying new blocks to earn rewards. +## 什么是验证者? +Lava区块链使用权益证明(PoS)作为共识机制,基于[Tendermint](https://tendermint.com/)。验证者通过验证新区块来获得奖励,从而参与到网络中。 -LAVA holders are incentivized to stake their tokens to secure Lava while receiving a reward in return. -Validators earn LAVA from the creation of new blocks and the transaction fees, and on the other hand - slashing may occur to punish bad actors, all facilitated by Tendermint's consensus protocol. +Lava持有者被激励用他们的代币来保护Lava,同时获得奖励。 +验证者从创建新区块和交易费用中赚取Lava,另一方面,为了惩罚不良行为,可能会发生大幅削减,所有这些都由Tendermint的共识协议促成。 -_Note_: This does not cover Delegating LAVA to validators +_注意_: 这不包括将 LAVA 委托给验证者 -:::tip Start a validators +:::tip 启动验证器 [](/validator-manual) ::: \ No newline at end of file