diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-home.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-home.md new file mode 100644 index 0000000000..ab9c27d834 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-home.md @@ -0,0 +1,311 @@ +--- +title: 学院主页 +slug: /academy-home +--- + +import ChialispIntro from '@site/static/img/academy/Intro2Chialisp.png'; +import SmartCoins from '@site/static/img/academy/SmartCoins.png'; +import Signatures from '@site/static/img/academy/Signatures.png'; +import InnerPuzzles from '@site/static/img/academy/InnerPuzzles.png'; + +import Consensus from '@site/static/img/academy/consensus.png'; +import Timelords from '@site/static/img/academy/timelords.png'; +import BlockFormation from '@site/static/img/academy/forming-blocks.png'; +import CoinSetModel from '@site/static/img/academy/coin-set.png'; +import Security from '@site/static/img/academy/security.png'; + +import FarmingOverview from '@site/static/img/academy/farming-overview.png'; +import ChallengesPlotFilters from '@site/static/img/academy/challenges-plot-filters.png'; +import Pools from '@site/static/img/academy/pools.png'; +import CreatingYourFirstPlot from '@site/static/img/academy/Intro2Farming.png'; + +import PrimitivesOverview from '@site/static/img/academy/primitives.png'; +import NFTs from '@site/static/img/academy/nft.png'; +import CATs from '@site/static/img/academy/cat.png'; +import DIDs from '@site/static/img/academy/did.png'; + +欢迎来到Chia学院,这里是深入研究Chia区块链技术的学术中心。 在这个以快速数字化转型为特征的时代,本学院提供对Chia区块链的全面探索,剖析其技术细节、现实应用以及其安全数据处理的细微差别。 作为Chia学院的学生,将深入了解Chia区块链的核心概念和功能。 + +## 课程 + +以下是几门精选课程,涵盖从区块链技术基础到Chialisp和实现的具体内容。 课程可以按任意顺序学习,因此请随意探索。 + +--- + +#### Chialisp概述 + + + +--- + +#### 区块链基础 + + + +--- + +#### 绘图与耕种 + + + +--- + +#### Primitives + + + +--- + +## 课程运作方式 + +查看[学院概述](https://docs.chia.net/academy-overview)页面,了解课程的呈现和组织方式。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-overview.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-overview.md index 03ae4ebb0c..724739abfb 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-overview.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/academy-intro/academy-overview.md @@ -1,89 +1,89 @@ --- -title: Academy Overview +title: 学院概述 slug: /academy-overview --- import Runnable from '@site/src/components/Runnable.tsx'; -The lesson pages in Chia Academy are thoughtfully designed to enhance the learning experience for students. Each lesson is organized in a user-friendly and visually appealing manner. The structure typically includes: +Chia学院的课程页面经过精心设计,以增强学生的学习体验。 每节课都以用户友好且视觉吸引的方式组织。 结构通常包括: --- -## Lesson title +## 课程标题 -Each lesson starts with a clear and descriptive title that informs students about the topic they are about to explore. +每节课以一个清晰且描述性的标题开始,告知学生他们将要探讨的主题。 --- -## Learning objectives +## 学习目标 -A set of specific learning objectives is provided at the beginning of the lesson. These objectives outline what students will be able to understand or do by the end of the lesson, setting clear expectations. +在课程开始时会提供一组具体的学习目标。 这些目标概述了学生在课程结束时能够理解或完成的内容,设定了明确的期望。 -- Learning Objective 1 -- Learning Objective 2 -- Learning Objective 3 +- 学习目标1 +- 学习目标2 +- 学习目标3 --- -## Content +## 内容 -The core content in each lesson is conveyed through structured, short format videos followed by scripts. This hybrid visual and text approach ensures accessibility and caters to diverse learning preferences. +每节课的核心内容通过结构化的短视频和脚本传达。 这种视觉和文本混合的方法确保了可访问性,适应了不同的学习偏好。 --- -## Script +## 脚本 -Each of the short format videos will be proceeded by the script used for creating the video. This written format ensures ease of translation catering to diverse learners. +每个短视频之后都会附有用于制作视频的脚本。 书面格式确保了翻译的便利性,适应了不同的学习者。
- Expand for the full script + 展开查看完整脚本 00:00 -This is an example of how the scripts will be provided including timestamps. +这是脚本提供的示例,包括时间戳。 00:20 -The timestamps are provided in set intervals and are formatted as `minutes:seconds` (`MM:SS`). +时间戳以设定的间隔提供,格式为`分钟:秒`(`MM:SS`)。
--- -## Common gotchas +## 常见问题 -While lessons are thoughtfully designed to facilitate learning, there are some common pitfalls or challenges that a learner might face. These will be described after the script for each lesson. +虽然课程经过精心设计以促进学习,但学习者可能会遇到一些常见的陷阱或挑战。 课程的这一部分会指出这些潜在的问题,并提供建议或解决方案。 -- **Gotcha 1:** Description of gotcha 1. -- **Gotcha 2:** Description of gotcha 2. -- **Gotcha 3:** Description of gotcha 3. +- **常见问题1:** 常见问题1的描述。 +- **常见问题2:** 常见问题2的描述。 +- **常见问题3:** 常见问题3的描述。 --- -## Knowledge check +## 知识检测 -Each lesson contains a brief self-assessment quiz designed to gauge learners' comprehension and retention of the video material. These assessments reinforce key concepts and help learners self-assess their understanding. +每节课程都包含一个简短的自我评估测验,旨在衡量学习者对视频材料的理解和记忆。 这些评估强化了关键概念,并帮助学习者自我评估他们的理解。 -The quiz section has two components, questions and answers. The questions contain lesson-applicable questions and the answers contain the corresponding answers. +测验部分有两个组成部分,问题和答案。 问题包含与课程相关的问题,答案包含相应的答案。 -Since this is a self assessment, you can of course skip the questions and go straight to the answers; but, we strongly recommend that you take the time to solve the question on your own before checking the answer. +由于这是一个自我评估,您当然可以跳过问题直接查看答案;但是,我们强烈建议您在查看答案之前花时间自己解决问题。 -:::tip Question 1 +:::tip 问题1 -What format is used for timestamps in the content scripts? +内容脚本中使用什么格式来表示时间戳? :::
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) -`MM:SS` or `minutes:seconds` +`MM:SS` 或者 `minutes:seconds`
-:::tip Question 2 +:::tip 问题2 -What is the serialized form of this Chialisp puzzle? +这个Chialisp谜题的序列化形式是什么? ```chialisp (mod (arg1 arg2) (+ arg1 arg2)) @@ -93,7 +93,7 @@ What is the serialized form of this Chialisp puzzle?
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) ```chialisp (+ 2 5) @@ -101,15 +101,15 @@ What is the serialized form of this Chialisp puzzle?
-:::tip Question 3 +:::tip 问题3 -What is the Chialisp puzzle for squaring a passed argument? +求传入参数的平方的Chialisp谜题是什么? :::
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) ```chialisp (mod (arg) @@ -124,35 +124,31 @@ What is the Chialisp puzzle for squaring a passed argument? --- -## Additional resources +## 附加资源 -Links to additional reading materials, videos, or external resources may be provided for learners who wish to delve deeper into the lessons subject. +为了帮助希望深入学习课程主题的学习者,可能会提供额外的阅读材料、视频或外部资源链接。 -### Runnable Chialisp and clvm plugins +### 可运行的Chialisp和clvm插件 -Runnable plugins are for Chialisp and clvm are provided with all applicable lessons. Take some time to familiarize yourself with the tools and learn how to best make use of them throughout the lessons. -Each plugin has a series of components: +所有适用的课程都提供了Chialisp和clvm的可运行插件。 花些时间熟悉这些工具,并学习如何在整个课程中最好地利用它们。 每个插件都有一系列组件: -**Language:** The language of the plugin (Chialisp or clvm) is in the top right corner. -**Solution:** The top section is the input or solution. -**Puzzle:** The bottom section is the puzzle. -**Run:** Each plugin has a play/run button to the right of the language identifier. -**Result:** After clicking run, the result of the puzzle appears below the puzzle. -**Cost:** After clicking run, the clvm cost of the puzzle is calculated and appears in the bottom right corner. -**Errors:** After clicking run, the plugin checks for and provides any errors in place of the result section. +**语言:** 插件的语言(Chialisp或clvm)位于右上角。 +**解决方案(Solution):** 顶部部分是输入或解决方案。 +**谜题(Puzzle):** 底部部分是谜题。 +**运行:** 每个插件在语言标识符右侧都有一个播放/运行按钮。 +**结果:** 单击运行后,谜题的结果将出现在谜题下方。 :::info -The plugins only validate the formatting and completeness of the code; they do not check for any potential exploits. +插件仅验证代码的格式和完整性;它们不检查任何潜在的漏洞。 ::: -#### Chialisp plugin +#### Chialisp 插件 -When clicking run, the puzzle will first be serialized into clvm (similar to the `run` command) then the solution will be passed into the serialized puzzle (similar to the `brun` command). -The below example is a Chialisp puzzle that squares the number passed as an argument. +单击运行时,谜题将首先被序列化为clvm(类似于 `run` 命令),然后解决方案将被传递到序列化谜题中(类似于 `brun` 命令)。 下面的示例是一个Chialisp谜题,它将传入的参数作为一个数字并返回其平方。 -Note the number `(5)` is used in the solution top section and the Chialisp formatted puzzle is entered in the puzzle bottom section. Clicking run on this puzzle will return `25` as the result. +注意解决方案顶部部分使用了数字 `(5)`,而 Chialisp 格式化的谜题被输入到谜题底部部分。 单击此谜题上的运行按钮将返回 `25` 作为结果。 @@ -167,12 +163,11 @@ Note the number `(5)` is used in the solution top section and the Chialisp forma -#### Clvm plugin +#### Clvm插件 -When clicking run, the solution will be passed into the serialized puzzle (similar to the `brun` command). -The below example uses the serialized puzzle from above that squares the number passed as an argument. +单击运行时,解决方案将被传递到序列化的谜题中(类似于`brun` 命令)。 下面的示例使用了上面序列化的谜题,将传入的参数作为一个数字并返回其平方。 -Note the number `(5)` is used in the solution top section and the serialized puzzle is entered in the puzzle bottom section. Clicking run on this puzzle will return `25` as the result. +注意解决方案顶部部分使用了数字 `(5)`,而序列化的谜题被输入到谜题底部部分。 单击此谜题上的运行按钮将返回 `25` 作为结果。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/block-formation-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/block-formation-basics.md index c659de8e9f..ffc6105c82 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/block-formation-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/block-formation-basics.md @@ -5,7 +5,7 @@ slug: /block-formation-basics In this lesson, we review the basics of block formation including the farmers role in validating transactions, forming blocks, and managing the mempool. -## Learning objectives +## 学习目标 - **Transaction Validation**: Learn how nodes validate transactions for inclusion in a block. - **Block Formation**: Understand farmers role in forming blocks. @@ -13,7 +13,7 @@ In this lesson, we review the basics of block formation including the farmers ro --- -## Content +## 内容
@@ -21,7 +21,7 @@ In this lesson, we review the basics of block formation including the farmers ro --- -## Script +## 脚本
@@ -45,7 +45,7 @@ and the relevant transactions are cleared from the mempool. In this way, transac --- -## Common gotchas +## 常见问题 - **Transaction Validation:** Transactions are validated by all nodes not only while blocks are being formed but also when the newly infused blocks are sent from peers, this eliminates a malicious actors ability from altering transactions even if they have the fastest timelord and have farmed the block. - **Block Formation vs Infusion:** Block formation is the process of combining proofs of space with transactions (the foliage) and is performed by the farmer while block infusion is the process of adding blocks to the chain itself and is performed by timelords. @@ -53,7 +53,7 @@ and the relevant transactions are cleared from the mempool. In this way, transac --- -## Knowledge check +## 知识检测 :::tip Question 1 - Transaction Validation @@ -94,10 +94,10 @@ False, it is timelords that **infuse** blocks to the chain and the role of full What is the Mempool? -A. Temporary storage on the network where transactions are queued before being confirmed. -B. The amount of system memory the blockchain can access. -C. The total size of all current plots on the network. -D. Another name for the chia blockchain database. +A. Temporary storage on the network where transactions are queued before being confirmed.\ +The amount of system memory the blockchain can access.\ +The total size of all current plots on the network.\ +Another name for the chia blockchain database. ::: @@ -111,9 +111,9 @@ A. Temporary storage on the network where transactions are queued before being c --- -## Additional resources +## 附加资源 -### Links +### 链接 - Transaction validation [overview](https://docs.chia.net/block-validation/#body-validation): dives into the requirements for validating the blocks body (which contains the transactions). - Block formation [overview](https://docs.chia.net/consensus-foliage): explores the intricacies of the full nodes role in block formation and when transaction blocks are formed. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/coinset-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/coinset-basics.md index b147a35d00..d2fd74fc13 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/coinset-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/coinset-basics.md @@ -5,7 +5,7 @@ slug: /coinset-basics In this lesson, we dive into the coinset model basics and learn what it means to spend a coin in Chia. -## Learning objectives +## 学习目标 - **Coin Contents**: Learn what data is stored in a coin. - **Coin Puzzle**: Understand the role of a coins puzzle. @@ -13,7 +13,7 @@ In this lesson, we dive into the coinset model basics and learn what it means to --- -## Content +## 内容
@@ -21,7 +21,7 @@ In this lesson, we dive into the coinset model basics and learn what it means to --- -## Script +## 脚本
@@ -72,7 +72,7 @@ the hash of the puzzle that contains the conditions, and the value of the coin. --- -## Common gotchas +## 常见问题 - **Coinset vs Account:** Chia adopts the coinset model where everything is a coin that has its own set of rules, more information about the coinset model can be found [here](https://docs.chia.net/coin-set-vs-account/). This differs from the account model which instead uses contracts (or accounts) to represent users balances and these balances are what is stored on the chain (as opposed to coins and those coins values). - **Puzzles:** All requirements for spending a coin are contained in the coins puzzle. These puzzles can be simple or complex and effect how, when, and by whom the coin can be spent. The coins puzzle must be determined at the coins creation and cannot be altered thereafter. @@ -80,7 +80,7 @@ the hash of the puzzle that contains the conditions, and the value of the coin. --- -## Knowledge check +## 知识检测 :::tip Question 1 - Coinset @@ -147,9 +147,9 @@ The coinset model. --- -## Additional resources +## 附加资源 -### Links +### 链接 - Detailed [coinset and account model comparisons](https://docs.chia.net/coin-set-vs-account/): details the differences between the coinset and account models including how these differences effect transactions. - Overview of [coin puzzles](https://docs.chia.net/coin-set-intro/#puzzles): overviews the role of a coins puzzle and the effect it has on the coins abiltiy to be spent. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/consensus-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/consensus-basics.md index 5eb3f3aff1..289de75623 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/consensus-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/consensus-basics.md @@ -5,7 +5,7 @@ slug: /consensus-basics In this lesson, we review the basics of consensus, the process by which to determine the true state of a blockchain. -## Learning objectives +## 学习目标 - **Farmers**: Understand the basic role of farmers in providing proofs of space. - **Timelords**: Understand the basic role of timelords in providing proofs of time. @@ -13,7 +13,7 @@ In this lesson, we review the basics of consensus, the process by which to deter --- -## Content +## 内容
@@ -21,7 +21,7 @@ In this lesson, we review the basics of consensus, the process by which to deter --- -## Script +## 脚本
@@ -52,7 +52,7 @@ This consensus method maintains trustless security through high-decentralization --- -## Common gotchas +## 常见问题 - **Proof of Space:** Chia relies on Proof of Space where the user stores deterministic x value tables in "plots" not to be confused with Proof of Capacity (PoC) where users store data of other network participants (like filecoin). - **Timelords:** Timelords play the role of issuing challenges, verifying proofs of space, and infusing blocks to the chain. Farmers submit their Proofs of Space to Timelords but it is the Timelords that infuse blocks. @@ -60,7 +60,7 @@ This consensus method maintains trustless security through high-decentralization --- -## Knowledge check +## 知识检测 :::tip Question 1 - Consensus Method @@ -130,9 +130,9 @@ What is the current (as of December 2023) ratio of plots that contain eligible p --- -## Additional resources +## 附加资源 -### Links +### 链接 - Consensus [detailed documentation](https://docs.chia.net/consensus-intro): details the Chia consensus including proofs of space and time, timelords, vdfs, and more. - Farming [basics](https://docs.chia.net/farming-basics): overviews the farming process and how to get started. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/security-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/security-basics.md index ee6b3653b1..5d2ffc7bdd 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/security-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/security-basics.md @@ -5,7 +5,7 @@ slug: /security-basics In this lesson, we learn the basic security implementations in Chia and how they protect users from bad actors. -## Learning objectives +## 学习目标 - **Decentralization**: Understand how a decentralized network enhances security and reduces attack options for bad actors. - **Coin Signatures**: Learn how coin signatures protect the users ability to spend the coins. @@ -13,7 +13,7 @@ In this lesson, we learn the basic security implementations in Chia and how they --- -## Content +## 内容
@@ -21,7 +21,7 @@ In this lesson, we learn the basic security implementations in Chia and how they --- -## Script +## 脚本
@@ -57,7 +57,7 @@ so you can be sure about what exactly a coin is going to do when it is spent. --- -## Common gotchas +## 常见问题 - **Decentralization:** The true decentralization of Chia greatly increases the economic costs associated with performing various attacks on Chia, protecting it from all scales of bad actors. - **Coin Signatures:** Ensuring that a coins solution requires signing ensures that only the intended user can spend the coin, this is an essential part of securing coins on Chia. @@ -65,7 +65,7 @@ so you can be sure about what exactly a coin is going to do when it is spent. --- -## Knowledge check +## 知识检测 :::tip Question 1 - Decentralization @@ -112,9 +112,9 @@ False, a custom-developed flavor of Lisp called Chialisp was developed to be use --- -## Additional resources +## 附加资源 -### Links +### 链接 - General [Security Overview](https://docs.chia.net/coin-set-security): overviews of Chia security and a review of potential attacks. - Overview of [Coin Signing](https://docs.chia.net/coin-set-security/#signing): reviews the purpose of signing and when it should be used for coins. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/timelord-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/timelord-basics.md index be69213de2..354a62a205 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/timelord-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/blockchain-basics/timelord-basics.md @@ -5,7 +5,7 @@ slug: /timelord-basics In this lesson, we dive into the role that Timelords play in the consensus by using VDFs to generate challenges. -## Learning objectives +## 学习目标 - **Proofs of Time**: Learn how Proofs of Time are created by timelords and what role they perform. - **Verifiable Delay Function (VDF)**: Understand the basics of VDFs. @@ -13,7 +13,7 @@ In this lesson, we dive into the role that Timelords play in the consensus by us --- -## Content +## 内容
@@ -21,7 +21,7 @@ In this lesson, we dive into the role that Timelords play in the consensus by us --- -## Script +## 脚本
@@ -53,7 +53,7 @@ While at least one Timelord is required for the blockchain to function, anyone c --- -## Common gotchas +## 常见问题 - **VDFs and Proofs of Time:** A Verifiable Delay Function, also referred to as a Proof of Time or VDF, is a proof that a sequential function was executed a certain number of times. - **Timelords:** Only 1 timelord is needed to keep the chain moving but anyone can run a timelord and multiple timelords on the network ensures resiliency. Some attacks that timelords protect against are documented [here](https://docs.chia.net/consensus-attacks#faster-timelord). @@ -61,15 +61,15 @@ While at least one Timelord is required for the blockchain to function, anyone c --- -## Knowledge check +## 知识检测 :::tip Question 1 - Timelords How many Farmers need to run a Timelord for the network? -A. Every Farmer needs to run a Timelord. -B. At least half the Farmers need to run a Timelord. -C. Farmers aren't able to run Timelords. +A. Every Farmer needs to run a Timelord.\ +At least half the Farmers need to run a Timelord.\ +Farmers aren't able to run Timelords.\ D. Just one Timelord is needed for the network. ::: @@ -105,10 +105,10 @@ A. Timelords What are the primary purposes of VDFs? (choose all that apply) -A. To slow down the network. -B. To prove time has passed between blocks. -C. Provide security to the network. -D. Prepare for time travel integrations. +A. To slow down the network.\ +B. To prove time has passed between blocks.\ +Provide security to the network.\ +Prepare for time travel integrations. ::: @@ -116,8 +116,8 @@ D. Prepare for time travel integrations. Answer (expand when ready to see the answer) -B. To prove time has passed between blocks. -C. Provide security to the network. +B. To prove time has passed between blocks.\ +Provide security to the network.
@@ -139,9 +139,9 @@ True --- -## Additional resources +## 附加资源 -### Links +### 链接 - Timelords [detailed documentation](https://docs.chia.net/timelord-algorithm/): details the timelords role in the consensus model. - Proofs of Time / VDFs [overview](https://docs.chia.net/proof-of-time/): detailed overview for Proofs of Time and VDFs. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-inner-puzzle.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-inner-puzzle.md index cdb027cae6..882f6483a9 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-inner-puzzle.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-inner-puzzle.md @@ -5,16 +5,16 @@ slug: /chialisp-inner-puzzle import Runnable from '@site/src/components/Runnable.tsx'; -In this lesson, we'll talk about why you might want to nest puzzles and how to set them up. +在这节课上,我们将讨论为什么您可能希望嵌套谜题以及如何设置它们。 -## Learning objectives +## 学习目标 -- **Functions**: Learn how to define and execute functions in Chialisp. -- **Nesting Puzzles**: Understand the use of nesting puzzles in Chialisp. +- **函数(Functions)**:学习如何在 Chialisp 中定义和执行函数。 +- **嵌套谜题(Nesting Puzzles)**:了解在 Chialisp 中使用嵌套谜题的用途。 --- -## Content +## 内容
@@ -22,72 +22,72 @@ In this lesson, we'll talk about why you might want to nest puzzles and how to s --- -## Script +## 脚本
Expand for the full script 00:00\ -All puzzles result in the output of a condition that tells a blockchain what to do with a coin that it's wrapped in. Inner puzzles can be thought of as a coin within a coin where the result is a condition that is passed to the outer puzzle which executes it. +所有的谜题都会产生一个条件输出,告诉区块链在其中包装的硬币该做什么。 内部谜题可以看作是硬币中的硬币,结果是一个传递给外部谜题并由其执行的条件。 00:20\ -One specific use for this functionality is if you wanted to use a generic inner puzzle and wrap it in an outer puzzle that verifies a signature. The outer puzzle can be a sort of template that you can pass in any generic inner puzzle and it will be signature protected by the outer puzzle. Let's create this exact outer puzzle template. +这种功能的一个特定用途是,如果你想使用一个通用的内部谜题,并将其包装在一个验证签名的外部谜题中。 外部谜题可以看作是一种模板,你可以将任何通用的内部谜题传递进去,它将由外部谜题保护。 让我们创建这个外部谜题模板。 00:40\ -We're going to define a module, and for our parameters we'll have a `PUBLIC_KEY` that we'll curry in later, an `INNER_PUZZLE` that we'll also curry in, and then the `inner_solution`. We'll include the `condition_codes.clib` library file and the `sha256tree.clib` library file as well. Then, we're going to define a new function. +我们要定义一个模块,对于我们的参数,我们将有一个稍后传入的 `PUBLIC_KEY`,一个我们也将传入的 `INNER_PUZZLE`,然后是 `inner_solution`。 我们还将包含 `condition_codes.clib` 和 `sha256tree.clib` 库文件。 然后,我们将定义一个新的函数。 01:00\ -We'll call this `calculate_output` and in the parameters we'll have our `PUBLIC_KEY`, the `inner_solution`, and the `conditions` that we'll execute. In a combine statement, we'll have the standard signature verification that we used in the previous video. (`(defun calculate_output (PUBLIC_KEY inner_solution conditions) (c (list AGG_SIG_MET PUBLIC_KEY (sha256tree inner_solution)) conditions))`) +我们将其命名为 `calculate_output`,在参数中我们将有我们的 `PUBLIC_KEY`,`inner_solution`,以及我们将执行的 `conditions`。 在一个组合语句中,我们将使用之前视频中使用的标准签名验证。 (`(defun calculate_output (PUBLIC_KEY inner_solution conditions) (c (list AGG_SIG_MET PUBLIC_KEY (sha256tree inner_solution)) conditions))`) 01:20\ -For the message that we're verifying, we'll be verifying the `inner_solution` and then we'll return the `conditions`. Now that we've defined our new function, we'll call it with `calculate_output`, provide the `PUBLIC_KEY` and the `inner_solution`, and then we'll use the `apply` operator or `a` on our `INNER_PUZZLE`, providing the `inner_solution`. (`calculate_output PUBLIC_KEY inner_solution (a INNER_PUZZLE inner_solution)`) +对于我们要验证的消息,我们将验证 `inner_solution`,然后返回 `conditions`。 现在我们已经定义了我们的新函数,我们将使用 `calculate_output` 调用它,提供 `PUBLIC_KEY` 和 `inner_solution`,然后我们将对我们的 `INNER_PUZZLE` 使用 `apply` 运算符或 `a`,提供 `inner_solution`。 (`calculate_output PUBLIC_KEY inner_solution (a INNER_PUZZLE inner_solution)`) 01:40\ -The `apply` operator is how you execute some code. So the `INNER_PUZZLE` will be executed with the `inner_solution`. So this puzzle will first evaluate the inner puzzle with the `(a INNER_PUZZLE inner_solution))` method, and use the result as the condition for our `calculate_output` function. +`apply` 运算符是执行一些代码的方式。 因此,`INNER_PUZZLE` 将使用 `inner_solution` 执行。 因此,这个谜题将首先使用 `(a INNER_PUZZLE inner_solution))` 方法评估内部谜题,并将其结果用作我们的 `calculate_output` 函数的条件。 02:00\ -This function requires a signature of the `inner_solution` to pass. Now let's write the inner puzzle. For this puzzle, we're going to use a condition called `ASSERT_HEIGHT_RELATIVE`, which specifies when a coin can be spent, based on the number of blocks passed since coin creation. We'll define a module and in our parameters, we'll curry in the `REQUIRED_BLOCKS`. This will be a number of blocks that have to pass before the coin can be spent. +这个函数需要 `inner_solution` 的签名才能通过。 现在让我们编写内部谜题。 对于这个谜题,我们将使用一个称为 `ASSERT_HEIGHT_RELATIVE` 的条件,它指定了基于自硬币创建以来经过的块数的硬币何时可以被花费。 我们将定义一个模块,在我们的参数中,我们将传入 `REQUIRED_BLOCKS`。 这是一个必须经过的块数,硬币才能被花费。 02:20\ -Then, we'll have our `conditions`. We'll include the `condition_codes.clib` library again, and then we'll define a statement that uses the `ASSERT_HEIGHT_RELATIVE` condition on the `REQUIRED_BLOCKS` that we curried in, and then we'll return the `conditions`. +然后,我们将有我们的 `conditions`。 我们再次包含 `condition_codes.clib` 库文件,然后我们将定义一个语句,该语句使用我们传入的 `REQUIRED_BLOCKS` 上的 `ASSERT_HEIGHT_RELATIVE` 条件,然后我们将返回 `conditions`。 02:40\ -All right, now we have both our inner puzzle and our outer puzzle. Let's curry in the needed values. First we'll get our public key with `chia keys show`, and then we'll curry the block value into the inner puzzle with `cdv clsp curry inner-puzzle.clsp -a` and specify the number of blocks that we want to pass. +好了,现在我们有了内部谜题和外部谜题。 让我们传入所需的值。 首先,我们使用 `chia keys show` 获取我们的公钥,然后我们将块值传入内部谜题,使用 `cdv clsp curry inner-puzzle.clsp -a` 并指定我们想要经过的块数。 03:00\ -In this case, we'll use `20`. We can now curry this result, along with our public key, into the outer puzzle with `cdv clsp curry outer-puzzle.clsp -a`, enter our public key, `-a` and in quotes we'll paste the compiled inner puzzle. +在这种情况下,我们将使用 `20`。 现在我们可以将此结果与我们的公钥一起传入外部谜题,使用 `cdv clsp curry outer-puzzle.clsp -a`,输入我们的公钥,`-a`,然后在引号中粘贴编译后的内部谜题。 03:20\ -Now that we have our final compiled puzzle, we can go ahead and create a coin using the process that we covered in the last video. Once the coin has been created, we can create our solution for this coin. First we get our wallet address and `decode` it. We'll use this in our desired solution. Again, we'll be using the `CREATE_COIN` condition signified by the code `51`. +现在我们有了最终的编译谜题,我们可以继续创建一个硬币,使用我们在上一个视频中介绍的流程。 一旦硬币被创建,我们就可以为这个硬币创建解决方案。 首先我们获取我们的钱包地址并进行 `decode`。 我们将在我们想要的解决方案中使用这个地址。 同样,我们将使用代码 `51` 表示的 `CREATE_COIN` 条件。 03:40\ -Note that I'm nesting the solution in four (4) sets of parentheses. This is because the outer puzzle parameters list is passed in wrapped with parentheses as is the inner solution. In the inner puzzle, we have another set of parentheses for the list of conditions, and each condition is also wrapped. +注意,我将解决方案嵌套在了4组括号中。 这是因为外部谜题参数列表被包裹在括号中,内部解决方案也是如此。 在内部谜题中,我们有另一组括号用于条件列表,并且每个条件也被包裹在其中。 04:00\ -It's important to understand the structure of the puzzle to make sure that the solution you provide is structured properly. Now we'll add the encoded solution into our spend bundle where we already have the coin info and puzzle reveal from coin creation. Next, we'll get our signature using the method we outlined in the previous video. We'll hash our solution and concatenate it with the coin ID and genesis challenge. +了解谜题的结构非常重要,以确保您提供的解决方案结构正确。 现在我们将编码的解决方案添加到我们的花费包中,其中已经包含了来自硬币创建的硬币信息和谜题展示。 接下来,我们将使用我们在上一个视频中概述的方法获取我们的签名。 我们将解决方案进行哈希处理,然后将其与硬币 ID 和起源挑战进行连接。 04:20\ -Now we can sign the resulting message with `chia keys sign` and copy the signature into our spend bundle, being sure to append `0x` to signify that it's a value. Now run `cdv rpc pushtx spendbundle.json`. +现在我们可以使用 `chia keys sign` 对结果消息进行签名,并将签名复制到我们的花费包中,确保附加 `0x` 以表示它是一个值。 现在运行 `cdv rpc pushtx spendbundle.json`。 04:40\ -If the number of blocks is not yet passed, it will have a pending status. If successful, we can look up the coin record again and see that the spent block index is more than 20 blocks later than the confirmed block index. In this video, we learned how inner puzzles work and how they interact with outer puzzles. Thanks so much for watching, catch you next time. +如果块数尚未经过,它将显示为挂起状态。 如果成功,我们可以再次查找硬币记录,并查看已花费的块索引比确认的块索引晚了 20 个块。 在这个视频中,我们学习了内部谜题的工作原理以及它们与外部谜题的交互。 非常感谢观看,下次再见。
--- -## Common gotchas +## 常见问题 -- **More Parentheses:** It's important to take note of where your solutions are going to be used in your puzzle and wrap them in the appropriate amount of parentheses. This can be counter-intuitive as the parentheses can seem unecessary at first glance. +- **更多的括号**:重要的是要注意你的解决方案将在谜题中的哪里使用,并用适当数量的括号将它们包裹起来。 这可能有些反直觉,因为乍一看,括号似乎是不必要的。 --- -## Knowledge check +## 知识检测 -:::tip Question 1 - Evaluating Inner Puzzles +:::tip 问题1 - 评估内部谜题 -What operator is used to evaluate a puzzle within another puzzle? +什么运算符用于评估另一个谜题中的谜题? ::: @@ -95,7 +95,7 @@ What operator is used to evaluate a puzzle within another puzzle? Answer (expand when ready to see the answer) -The `apply` operator. (`a`) +`apply`运算符。 (`a`) ```chialisp (a INNER_PUZZLE inner_solution) @@ -103,9 +103,9 @@ The `apply` operator. (`a`)
-:::tip Question 2 - A New Condition +:::tip 问题2 - 一个新条件 -What does the `ASSERT_HEIGHT_RELATIVE` condition check for? +`ASSERT_HEIGHT_RELATIVE` 条件检查什么? ::: @@ -113,19 +113,19 @@ What does the `ASSERT_HEIGHT_RELATIVE` condition check for? Answer (expand when ready to see the answer) -`ASSERT_HEIGHT_RELATIVE` checks for how many blocks have passed since coin creation. It allows the resolution of a puzzle after a predefined number of blocks have passed. +`ASSERT_HEIGHT_RELATIVE` 检查自货币创建以来经过了多少个区块。 它允许在预定义数量的区块经过后解决谜题。
--- -## Additional resources +## 附加资源 -### Runnable Chialisp and clvm plugins +### 可运行的Chialisp和clvm插件 -For information on using these plugins please refer to the [academy overview](/academy-overview#runnable-chialisp-and-clvm-plugins) +有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。 -#### Chialisp plugin +#### Chialisp 插件 @@ -137,7 +137,7 @@ For information on using these plugins please refer to the [academy overview](/a -#### Clvm plugin +#### Clvm插件 @@ -147,11 +147,11 @@ For information on using these plugins please refer to the [academy overview](/a -### Links +### 链接 -- General [chialisp concepts](https://docs.chia.net/guides/chialisp-concepts): overviews of currying, inner puzzles, and morphing conditions. -- Guided [chialisp walkthroughs](https://docs.chia.net/guides/): guides for installation, creating smart coins, and working with BLS signatures. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- [Chialisp基本概念](https://docs.chia.net/guides/chialisp-concepts):包括柯里化(currying)、内部谜题(inner puzzles)和条件变换(morphing conditions)的概述。 +- 指导性的[Chialisp演练](https://docs.chia.net/guides/):安装、创建智能币和使用BLS签名的指南。 +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-intro.md index b45464d324..24cb016278 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-intro.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-intro.md @@ -5,17 +5,17 @@ slug: /chialisp-intro import Runnable from '@site/src/components/Runnable.tsx'; -In this lesson, we review the basics of Chialisp including syntax & structure, inequalities and if statements, and setting up a development environment. +在本课程中,我们将回顾 Chialisp 的基础知识,包括语法& 结构、不等式和 if 语句,以及设置开发环境。 -## Learning objectives +## 学习目标 -- **Syntax and Structure**: Understand the basic Chialisp syntax and structure. -- **Puzzles and Solutions**: Understand the use of puzzles and solutions in Chialisp. -- **Development Environment**: Setup and configure the Chialisp development environment. +- **语法和结构**:理解基本的 Chialisp 语法和结构。 +- **谜题和解决方案**:了解在 Chialisp 中使用谜题和解决方案。 +- **开发环境**:安装和配置 Chialisp 开发环境。 --- -## Content +## 内容
@@ -23,77 +23,77 @@ In this lesson, we review the basics of Chialisp including syntax & structure, i --- -## Script +## 脚本
- Expand for the full script + 展开查看完整脚本 00:00 -We're going to go over the very basics of Chialisp we'll talk about a few things the basic syntax and structure of a Chialisp program puzzles and solutions and set up a development environment to test it all out. +我们将简要介绍 Chialisp 的基础知识,包括:Chialisp 程序的基本语法和结构、谜题和解决方案,以及设置开发环境来测试这些内容。 00:20 -So let's get started, the first thing you'll want to do is make sure you have the correct version of python. If you type in python3-version make sure you have python 3.10. Next we're going to want to create a virtual environment so if you run the command python3 -m venv venv. +So let's get started, the first thing you'll want to do is make sure you have the correct version of python. If you type in python3-version make sure you have python 3.10. Next we're going to want to create a virtual environment so if you run the command python3 -m venv venv. 如果你输入 `python3 --version`,确保你安装的是 Python 3.10。 接下来,我们要创建一个虚拟环境,你可以运行命令 `python3 -m venv venv`。 00:40 -This is going to create a virtual environment that we can activate to do our development in and to activate it we're going to type in this command bin\activate and now you can see that we are in a virtual environment. +这将创建一个虚拟环境,我们可以激活它进行开发。要激活它,我们将输入以下命令:`bin\activate`,现在你可以看到我们已经进入了虚拟环境。 01:00 -Next we're going to want to install the Chia Dev tools and you can do this by in running pip install Chia Dev tools and let it do its thing. So now let's just make sure we have the correct version by typing cdv --version and you can see we have version 1.1.4. +接下来,我们需要安装 Chia 开发工具,你可以通过运行 `pip install Chia Dev tools` 来完成。 现在,让我们确保我们安装了正确版本,输入 `cdv --version`,你会看到我们的版本是 1.1.4。 01:20 -So now we have our development environment all set up let's go over some key lisp basics. This is the basic run command it takes a list with an operator followed by two operands. +现在我们已经设置好了开发环境,让我们来学习一些关键的 Lisp 基础知识。 这是基本的运行命令,它接受一个带有运算符后跟两个操作数的列表(list)。 01:40 -In this example, we have the operands two and three and they'll be added together so we should get five. That's not very useful though so let's create a program that we can pass in some parameters and do the addition for us. All right in this example we have defined a module that receives two parameters arg1 arg2 and then runs the operation on those two parameters so when we run this we're going to get the compiled version of the program that we just wrote. +在这个例子中,我们有两个操作数,分别是2和3,它们将被相加,所以我们应该得到5。 但这并不是很有用,所以让我们创建一个程序,可以传入一些参数,并为我们执行加法。 在这个例子中,我们定义了一个模块,接收两个参数 arg1 和 arg2,然后对这两个参数进行操作,所以当我们运行它时,我们将得到刚刚编写的程序的编译版本。 02:00 -This is called the puzzle the arguments will be passed into the puzzle as a solution. So how do we run this code? Well our second command is brun so if we pass this compiled puzzle through the brun command and give it a solution such as 7 and 10. +这被称为谜题(puzzle),参数将作为解决方案(solution)传递到谜题中。 那么我们如何运行这段代码呢? 我们的第二个命令是 `brun`,所以如果我们通过 `brun` 命令传递这个编译后的谜题,并给它一个解决方案,比如 7 和 10。 02:20 -It's going to use that solution as the parameters for the program so we should get 17. Now let's talk about inequalities and if statements. In this program I'm comparing two numbers 10 and 5, and seeing if the first is greater than the second. So in this case the result would be true and we receive a 1. +它将使用该解决方案作为程序的参数,所以我们应该得到 17。 现在让我们谈谈不等式和 if 语句。 在这个程序中,我比较了两个数字 10 和 5,并检查第一个是否大于第二个。 因此在这种情况下,结果将为真,我们会收到一个 1。 02:40 -In the opposite case it would be false and we received an empty set so if statements are going to take this structure if followed by our comparison then the result if it's true followed by the result if it's false. So let's run this program, if 1 which is true return true, else return false. +在相反的情况下,结果将为假,并且我们会收到一个空集(empty set),so if statements are going to take this structure if followed by our comparison then the result if it's true followed by the result if it's false. 所以让我们运行这个程序,如果是1意味着结果为真,则返回true,否则返回false。 03:00 -So we expect to see true. So let's create a puzzle using comparisons and if statements. So we're going to type run and define a module that takes two arguments arg1 arg2. So we're going to define an if statement and we want to know if we add the two arguments together if they're greater than 100. +所以我们期望的结果是真(true)。 那么让我们使用比较和 if 语句创建一个谜题。 我们将输入 `run` 并定义一个接受两个参数 `arg1` 和 `arg2` 的模块(module )。 我们将定义一个 if 语句,我们想知道如果我们将这两个参数加在一起,它们是否大于 100。 03:20 -So if greater than the addition of argument 1 and argument 2 is greater than 100 then we're going to return large if it's true and small if it's false. +所以如果大于参数 1 和参数 2 的加法结果大于 100,那么如果为真,我们将返回 "large",如果为假,我们将返回 "small"。 03:40 -We'll close this and as you can see it's really easy to get lost in the parentheses so for future videos we'll be using a text editor which will make this a lot easier but if we run this we will receive the compiled version of our program and let's pass that puzzle into brun with our solution so run and +我们将关闭这个,正如你所看到的,很容易在括号中迷失方向,所以在未来的视频中,我们将使用文本编辑器,这将使得操作变得更加简单,但如果我们运行这个,我们将收到我们程序的编译版本,然后将这个谜题与我们的解决方案一起传递给 `brun`。 04:00 -we'll add 70 and 100 which is guaranteed to be over 100 so we should receive the result large and that's it. That's the basics of Chialisp; we've talked about basic operators, inequalities if statements compiling our program into puzzles, and passing in a solution. +我们将添加 70 和 100,这肯定会超过 100,所以我们应该收到结果 "large",就是这样。 这就是 Chialisp 的基础知识;我们讨论了基本运算符、不等式、if 语句、将程序编译成谜题(puzzles),并传递解决方案(solution)。 04:20 -In future videos we'll talk about smart coins signatures and inner puzzles. Thanks for joining me and I'll catch you in the next video! +在未来的视频中,我们将讨论智能币、签名和内部谜题。 感谢您的参与,我们下个视频见!
--- -## Common gotchas +## 常见问题 -- **run vs brun:** Run is used to serialize and run chialisp puzzles while brun is used to run clvm serialized puzzles generally when passing arguments. -- **Parentheses:** Chialisp is part of the fully parenthesized prefix notation programming language family tracing their [origins]() to LISP 1 from the 1950s. One highly apparent aspect of these languages is their use of parenthesis to denote lists. It is recommended to use an IDE with proper syntax highlighting when writing these languages to ensure that all parenthesis are in the proper places. To help with this here is a [Chialisp language server extension](https://marketplace.visualstudio.com/items?itemName=ChiaNetwork.chialisp) for Visual Studio. -- **Prefix Notation:** Chialisp being part of the LISP family uses prefix notation. This means that the functions or operators appears first with their arguments following. +- **run vs brun:** `run` 用于序列化并运行 Chialisp 谜题,而 `brun` 用于运行 clvm 序列化的谜题,通常用于传递参数。 +- **括号(Parentheses):**Chialisp 是完全括号前缀表示法编程语言家族的一部分,可以[追溯](https://en.wikipedia.org/wiki/Lisp_(programming_language))到上世纪 50 年代的 LISP 1。 这些语言的一个显而易见的特点是它们使用括号来表示列表(lists)。 建议在编写这些语言时使用具有适当语法高亮功能的集成开发环境,以确保所有括号都处于正确的位置。 为了帮助解决这个问题,这里有一个适用于 Visual Studio 的 [Chialisp 语言服务器扩展](https://marketplace.visualstudio.com/items?itemName=ChiaNetwork.chialisp)。 +- **前缀表示法:**Chialisp 作为 LISP 家族的一部分,使用前缀表示法。 这意味着函数或运算符首先出现,其参数紧随其后。 --- -## Knowledge check +## 知识检测 -:::tip Question 1 - Subtraction +:::tip 问题 1 - 减法 -What is a chialisp puzzle for subtracting two arguments? +请给出一个用于计算两个参数相减的Chialisp 谜题? :::
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) ```chialisp (mod (arg1 arg2) @@ -103,9 +103,9 @@ What is a chialisp puzzle for subtracting two arguments?
-:::tip Question 2 - Comparison +:::tip 问题 2 - 比较 -What is the serialized form of this chialisp puzzle? +这个 Chialisp 谜题的序列化形式是什么? ```chialisp (mod (arg1 arg2) @@ -117,7 +117,7 @@ What is the serialized form of this chialisp puzzle?
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) ```chialisp (> 2 5) @@ -125,17 +125,17 @@ What is the serialized form of this chialisp puzzle?
-:::tip Question 3 - If Statement +:::tip 问题 3 - If 语句 -What is the result of the below serialized puzzle and solution? +下面的序列化谜题和解决方案的结果是什么? -Puzzle: +谜题: ```chialisp (a (i 2 (q 1 . "true") (q 1 . "false")) 1) ``` -Solution: +解决方案: ```chialisp (1) @@ -145,26 +145,26 @@ Solution:
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) `"true"`
-:::tip Question 4 - Combining all of the above +问题 4 - 将上述所有内容结合起来 -What is a Chialisp puzzle that performs the following? +执行以下操作的 Chialisp 谜题是什么? -- Accepts two arguments -- Adds the two arguments together -- Compares the sum of the arguments to 100 -- Results in "Large" when the sum is greater than 100 and "Small" when the sum is less than 100 +- 接受两个参数 +- 将这两个参数相加 +- 比较参数的和是否大于 100 +- 当参数的和大于 100 时结果为 "Large",当参数的和小于 100 时结果为 "Small" :::
- Answer (expand when ready to see the answer) + 答案(当准备好查看答案时展开) ```chialisp (mod (arg1 arg2) @@ -176,13 +176,13 @@ What is a Chialisp puzzle that performs the following? --- -## Additional resources +## 附加资源 -### Runnable Chialisp and clvm plugins +### 可运行的Chialisp和clvm插件 -For information on using these plugins please refer to the [academy overview](/academy-overview#runnable-chialisp-and-clvm-plugins) +有关如何使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins) -#### Chialisp plugin +#### Chialisp 插件 @@ -194,7 +194,7 @@ For information on using these plugins please refer to the [academy overview](/a -#### Clvm plugin +#### Clvm插件 @@ -204,11 +204,11 @@ For information on using these plugins please refer to the [academy overview](/a -### Links +### 链接 -- General [chialisp concepts](https://docs.chia.net/guides/chialisp-concepts): overviews of currying, inner puzzles, and morphing conditions. -- Guided [chialisp walkthroughs](https://docs.chia.net/guides/): guides for installation, creating smart coins, and working with BLS signatures. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. -- Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. +- Chialisp[基本概念](https://chialisp.com/chialisp-concepts/):包括柯里化(currying)、内部谜题(inner puzzles)和条件变换(morphing conditions)的概述。 +- 指导性的[Chialisp演练](https://docs.chia.net/guides/):安装、创建智能币和使用BLS签名的指南。 +- Chialisp[详细文档](https://chialisp.com/):关于Chialisp所有方面的详细信息 +- 从[Discord](https://discord.gg/chia)获取支持:如需进一步支持,请加入我们的Discord服务器,并在 #chialisp 或 #support 频道中提问 --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-signatures.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-signatures.md index 45807de540..27b1510ffd 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-signatures.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-signatures.md @@ -5,16 +5,16 @@ slug: /chialisp-signatures import Runnable from '@site/src/components/Runnable.tsx'; -In this lesson, we go over how to secure coins using signatures. +在这节课中,我们将讨论如何使用签名来保护币。 -## Learning objectives +## 学习目标 -- **Signing and Signatures**: Understand the uses and benefits of signatures. -- **Chialisp Library files**: Learn about helpful Chialisp libraries to simplify development. +- **签名(Signing、Signatures)**:了解签名的用途和好处。 +- **Chialisp 库文件**:了解简化开发的有用Chialisp库。 --- -## Content +## 内容
@@ -22,91 +22,91 @@ In this lesson, we go over how to secure coins using signatures. --- -## Script +## 脚本
Expand for the full script 00:00\ -We created our first smart coin and secured it so that only someone with the correct password could spend it. In this video, we'll use a signature to secure our coin so that only the person with the correct signature will be able to spend the coin. +我们创建了我们的第一个智能币,并将其安全地保护,只有拥有正确密码的人才能使用它。 在本视频中,我们将使用签名来保护我们的币,以便只有拥有正确签名的人才能使用这个币。 00:20\ -So what is a signature? A digital signature allows you to sign a message with a private key. This message can then be verified by a recipient using your public key. Let's start with an example of signing a message and then verifying it. +那么什么是签名? 数字签名允许您使用私钥对消息进行签名。 然后,接收方可以使用您的公钥验证此消息。 让我们从签署消息并验证它的示例开始。 00:40\ -Run `chia keys sign --message` with the message `"hello" --hdpath m` then choose your wallet ID. This process will sign the message 'hello' with your private key. To verify this message we'll run `chia keys verify` enter the message, then the signature and the sender's public key. (`chia keys verify --message hello --signature [SIG] --public_key [PUB_KEY]`) +运行 `chia keys sign --message`,消息为 `"hello"`,`--hdpath m`,然后选择您的钱包ID。 此过程将使用您的私钥对消息 'hello' 进行签名。 要验证此消息,我们将运行 `chia keys verify`,输入消息,然后是签名和发送方的公钥。 (`chia keys verify --message hello --signature [SIG] --public_key [PUB_KEY]`) 01:00\ -So now that we know how signing works, let's create a coin that can be spent when given the correct signature. So in our chialisp file, let's define a module that takes two parameters. The first will be a public key that we'll curry in later. This will determine who is able to spend the coin. +现在我们知道签名的工作原理了,让我们创建一个只有在提供正确签名时才能花费的币。 因此,在我们的 chialisp 文件中,让我们定义一个接受两个参数的模块。 第一个将是我们稍后将添加的公钥。 这将确定谁可以花费这个币。 01:20\ -The second parameter will be the conditions that determine how the coin will be spent. Next, we'll include some libraries to make our code a bit easier to write. The first lets us use written condition codes rather than number codes, and the second is a library for tree hashing. +第二个参数将是决定如何花费币的条件。 接下来,我们将包含一些库,以使我们的代码更易于编写。 第一个库允许我们使用编写的条件代码而不是数字代码,第二个库是一个用于树哈希的库。 01:40\ -To install these libraries, run this command in the terminal. `cdv clsp retrieve sha256tree condition-codes`. Back to our chialisp file, we'll define a combine statement with`c` and for the first parameter, create a list composed of the `AGG_SIG_ME` condition, our public key parameter and the conditions parameter run through the tree hashing library. (`(c (list AGG_SIG_ME PUBLIC_KEY (sha256tree conditions)) conditions)`) +要安装这些库,在终端中运行此命令。 `cdv clsp retrieve sha256tree condition-codes`. 回到我们的 chialisp 文件,我们将使用 `c` 定义一个组合语句,对于第一个参数,创建一个由 `AGG_SIG_ME` 条件、我们的公钥参数和通过树哈希库的条件参数组成的列表。 (`(c (list AGG_SIG_ME PUBLIC_KEY (sha256tree conditions)) conditions)`) 02:00\ -The second parameter in the combine statement will be the conditions that are passed into the program. So what does this do? Well the `AGG_SIG_ME` condition is a standard condition that signs a message with a public key. In this case we are currying in the key and the message is the tree hash of the conditions parameter. +组合语句中的第二个参数将是传递到程序中的条件。 那么这是做什么的呢? `AGG_SIG_ME` 条件是一个标准条件,用公钥签名消息。 在这种情况下,我们将在键和消息是条件参数的树哈希之后对键进行曲线处理。 02:20\ -We do this so that the conditions cannot be modified by the farmer. So in order to spend the coin, the user must provide a solution that contains a list of conditions; or how they'd like to spend the coin; as well as a signature to show that they are the ones authorized to do so. +我们这样做是为了防止农民修改条件。 因此,为了花费币,用户必须提供一个包含条件列表的解决方案;或者他们希望如何花费币的方式;以及一个签名,以表明他们是授权进行操作的人。 02:40\ -For this example, we're going to create a solution that uses the `CREATE_COIN` condition to essentially unlock the value of the coin and send it back to our wallet. First, let's finish creating this coin. We'll get our master public key with `chia keys show` and curry that into our program. It's important to prefix the key with `0x` to show that it is a value. +在本示例中,我们将创建一个解决方案,该解决方案使用 `CREATE_COIN` 条件来解锁币的价值,并将其发送回我们的钱包。 首先,让我们完成创建此币。 我们将使用 `chia keys show` 获取我们的主公钥,并将其曲线化到我们的程序中。 重要的是要用 `0x` 前缀表示它是一个值。 03:00\ -Now we'll get the puzzle reveal with `opc` and enter in the compiled code. Make sure to save this for later. And for the puzzle hash we'll run `opc -h` and enter the compiled code. We'll save this for later as well. We'll need to take the puzzle hash and encode it into an address. Run `cdv encode --prefix txch` and enter the puzzle hash. +现在我们将使用 `opc` 获取拼图展示,并输入编译代码。 记得保存这个以备将来使用。 对于拼图哈希,我们将运行 `opc -h` 并输入编译代码。 我们也会保存这个以备将来使用。 我们需要将拼图哈希编码成一个地址。 运行 `cdv encode --prefix txch` 并输入拼图哈希。 03:20\ -That gives us the puzzle address. Now we'll send an amount of chia to this address to lock it. And we'll check the status. Once confirmed, we'll be ready to spend it. +这给了我们拼图地址。 现在,我们将发送一定量的 chia 到这个地址以锁定它。 然后我们会检查状态。 一旦确认,我们就可以花费它了。 03:40\ -To spend the coin, we'll need to create a spend bundle. Take a look at this outline. this should look familiar to the spend bundle we created in the previous video. We'll need four things, the coin record, the puzzle reveal which we already calculated, the solution we want to provide, and an aggregated signature to authorize our spend. +要花费这个币,我们需要创建一个花费包。 看一下这个大纲。 这应该看起来很熟悉,就像我们在上一个视频中创建的花费包一样。 我们需要四件东西,币记录,我们已经计算过的拼图展示,我们想要提供的解决方案以及一个聚合签名来授权我们的花费。 04:00\ -To get the coin record, run `cdv rpc coinrecords --by puzzlehash` and enter the puzzle hash from earlier. Copy the coin object and paste it into the spend bundle template. Next we can enter the puzzle reveal we calculated earlier. For the solution, we're going to have to so some work. +要获取币记录,请运行 `cdv rpc coinrecords --by puzzlehash`,并输入之前的拼图哈希。 复制币对象,并将其粘贴到花费包模板中。 接下来,我们可以输入我们之前计算过的拼图展示。 对于解决方案,我们将需要做一些工作。 04:20\ -We'll use the standard condition `CREATE_COIN` to unlock the value of the coin and send it back to our wallet. To do that, we'll need our address which we can get with `chia wallet get address` and decode it to get the wallet address puzzle hash with `cdv decode` and our address. +我们将使用标准条件 `CREATE_COIN` 来解锁币的价值,并将其发送回我们的钱包。 为此,我们需要我们的地址,我们可以使用 `chia wallet get address` 获取,然后解码以获取钱包地址拼图哈希,并使用 `cdv decode` 和我们的地址。 04:40\ -To craft the solution, we'll run this command where `51` is the `CREATE_COIN` condition code, our wallet address puzzle hash, and an amount in mojo. We can enter this response into the solution of our spend bundle. +为了制作解决方案,我们将运行此命令,其中 `51` 是 `CREATE_COIN` 条件代码,我们的钱包地址拼图哈希,以及一个以 mojo 为单位的金额。 我们可以将此响应输入到我们的花费包的解决方案中。 05:00\ -Finally, the aggregated signature. Remember that the message we are signing is the tree hash of our conditions; or our solution. So first, let's generate that hash. Next we'll also need the coin ID and the genesis challenge. The genesis challenge is a standard value for each network. +最后,聚合签名。 请记住,我们正在签名的消息是我们的条件的树哈希;或我们的解决方案。 首先,让我们生成该哈希。 接下来,我们还需要币 ID 和起源挑战。 起源挑战是每个网络的标准值。 05:20\ -You can find the appropriate challenge by entering `chia show -s` and searching for 'genesis challenge'. Since we're on testnet10, our challenge is this value starting with 'AE'. For the coin ID, we actually need the parent ID, the puzzle hash, and the amount which can all be found in the coin record we copied earlier. +你可以通过输入 `chia show -s` 并搜索 'genesis challenge' 来找到适当的挑战。 对于币 ID,实际上我们需要父 ID、拼图哈希和金额,这些都可以在我们之前复制的币记录中找到。 05:40\ -To get the coin ID, we'll run `cdv inspect -id coins` enter the parent ID, the puzzle hash, and the amount. (`cdv inspect -id coins --parent-id [PARENT_ID] --puzzle-hash [PUZZLE_HASH] --amount [AMOUNT]`) The `AGG_SIG_ME` condition expects the concatenation of the conditions treehash, coin ID, and genesis challenge, so run +要获取币 ID,我们将运行 `cdv inspect -id coins`,然后输入父 ID、拼图哈希和金额。 (`cdv inspect -id coins --parent-id [PARENT_ID] --puzzle-hash [PUZZLE_HASH] --amount [AMOUNT]`)`AGG_SIG_ME` 条件期望条件树哈希、币 ID 和起源挑战的连接,因此运行 06:00\ -`concat` the conditions treehash, coin ID, and genesis challenge. Make sure to use the prefix `0x` to signify that these are values. Now let's sign this message and since we're NOT using it as a value, remember to remove the `0x` prefix this time. +`concat` 条件树哈希、币 ID 和起源挑战。 确保使用前缀 `0x` 表示这些都是值。 现在让我们对此消息进行签名,并且由于我们没有将其用作值,请记住这次删除 `0x` 前缀。 06:20\ -Now we can enter this signature into our spend bundle and push it. Run `cdv rpc pushtx spendbundle.json`. If your signature is incorrect, you'll get a failure message. Otherwise, congratulations! You've created a smart coin secured with a signature and spent it. +现在我们可以将此签名输入到我们的花费包中并进行推送。 运行 `cdv rpc pushtx spendbundle.json`。 如果您的签名不正确,您将收到一个失败消息。 否则,恭喜! 您已经创建了一个智能币,并使用签名进行了保护。 06:40\ -So we've talked in this video about how signatures work, their importance, and how to implement them into a smart coin. Thanks so much for watching, I'll see you next time. +在本视频中,我们讨论了签名的工作原理、它们的重要性以及如何将它们实现到智能币中。 非常感谢观看,我们下次见。
--- -## Common gotchas +## 常见问题 -- **0x Prefixes:** It's important to keep track of how we are using different values and understand how Chialisp is going to handle them. A common gotcha is forgetting to append `0x` to a value, or in some cases removing it to tell the puzzle how to properly handle the parameter. -- **"Saving for Later":** At several points in this lesson, we generate results that we'll need to use elsewhere, sometimes many times. These results also do not have obivious indicators as to what they are. It's helpful to have a document to temporarily store these results for later use. +- **0x 前缀:** 重要的是要跟踪我们如何使用不同的值,并了解 Chialisp 将如何处理它们。 一个常见的小错误是忘记向值附加 `0x`,或在某些情况下将其删除以告诉拼图如何正确处理参数。 +- **“暂存以备后用”:** 在本课程的几个地方,我们生成了需要在其他地方使用的结果,有时候是多次。 这些结果也没有明显的指示符表明它们是什么。 为了以后使用,将这些结果临时保存在一个文件中是很有帮助的。 --- -## Knowledge check +## 知识检测 -:::tip Question 1 - Keys +:::tip 问题 1 - 密钥 -True or False. You need to use someone's private key to lock up a coin for them to spend. +正确还是错误。 你需要使用某人的私钥来锁定一枚硬币,以便他们能够花费。 ::: @@ -114,13 +114,13 @@ True or False. You need to use someone's private key to lock up a coin for them Answer (expand when ready to see the answer) -False. You would use their public key. Private keys are to be kept secret and never revealed to anyone. +错误 你应该使用他们的公钥。 私钥应保密,永远不应透露给任何人。
-:::tip Question 2 - Aggregate Signature +:::tip 问题 2 - 聚合签名 -An Aggregated Signature is comprised of which three components? +聚合签名由哪三个部分组成? ::: @@ -128,23 +128,23 @@ An Aggregated Signature is comprised of which three components? Answer (expand when ready to see the answer) -The `AGG_SIG_ME` condition expects a concatenated value of the following: +`AGG_SIG_ME`条件期望以下值的串联: -1. The conditions treehash. -2. The coin ID. -3. The genesis challenge. +1. 条件的树哈希。 +2. 币的ID。 +3. 创世挑战。
--- -## Additional resources +## 附加资源 -### Runnable Chialisp and clvm plugins +### 可运行的Chialisp和clvm插件 -For information on using these plugins please refer to the [academy overview](/academy-overview#runnable-chialisp-and-clvm-plugins) +有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。 -#### Chialisp plugin +#### Chialisp 插件 @@ -156,7 +156,7 @@ For information on using these plugins please refer to the [academy overview](/a -#### Clvm plugin +#### Clvm插件 @@ -166,11 +166,11 @@ For information on using these plugins please refer to the [academy overview](/a -### Links +### 链接 -- General [chialisp concepts](https://docs.chia.net/guides/chialisp-concepts): overviews of currying, inner puzzles, and morphing conditions. -- Guided [chialisp walkthroughs](https://docs.chia.net/guides/): guides for installation, creating smart coins, and working with BLS signatures. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- [Chialisp基本概念](https://docs.chia.net/guides/chialisp-concepts):包括柯里化(currying)、内部谜题(inner puzzles)和条件变换(morphing conditions)的概述。 +- 指导性的[Chialisp演练](https://docs.chia.net/guides/):安装、创建智能币和使用BLS签名的指南。 +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-smart-coin.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-smart-coin.md index 9241966bf7..1e7f8704d9 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-smart-coin.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/chialisp/chialisp-smart-coin.md @@ -5,17 +5,17 @@ slug: /chialisp-smart-coin import Runnable from '@site/src/components/Runnable.tsx'; -In this lesson, we go over currying, hashing, and conditions, and submit and use our first Chia Smart Coin. +在本课程中,我们将讨论柯里化、哈希和条件,并提交并使用我们的第一个 Chia 智能硬币。 -## Learning objectives +## 学习目标 -- **Currying**: Understand how to create more general use puzzle by using Currying. -- **Hashing**: Understand the need to obfuscate sensitive portions of a puzzle by using Hashing. -- **Conditions**: Using conditions to allow the spender of the coin to decide how it is spent. +- **Currying(柯里化)**:了解如何通过柯里化创建更通用的谜题。 +- **Hashing(哈希)**:了解通过哈希来混淆谜题中的敏感部分的必要性。 +- **Conditions(条件)**:使用条件允许花费者决定如何花费币。 --- -## Content +## 内容
@@ -23,95 +23,95 @@ In this lesson, we go over currying, hashing, and conditions, and submit and use --- -## Script +## 脚本
Expand for the full script 00:00\ -Everything on a blockchain is a coin. They are often referred to as smart coins because every coin has a chialisp program associated with it. That program, known as the puzzle, decides how and when the coin can be spent, and what happens when it is. +在区块链上,一切都是一个币。 它们通常被称为智能硬币,因为每个币都与一个称为谜题的Chialisp程序相关联。 该程序决定了币何时以及如何被使用,以及在使用时会发生什么。 00:20\ -NFTs, CATs, and standard transactions are all defined using puzzles. In the previous video, we learned how to write basic chialisp programs. Let's apply that to some more complex puzzles and create a coin that can be spent on the blockchain. +NFT、CAT 和标准交易都使用谜题来定义。 在上一个视频中,我们学习了如何编写基本的Chialisp程序。 让我们将这些应用到一些更复杂的谜题中,并创建一个可以在区块链上使用的币。 00:40\ -In this video, we'll be talking about currying, hashing, and conditions. So let's get started! We'll start by creating a new chialisp file called `password.clsp` and create a module that takes a parameter `password` and determines if the value passed in equals `hello`. If it does, return correct, if not return incorrect. +在这个视频中,我们将讨论柯里化、哈希和条件。 那么让我们开始吧! 我们将首先创建一个名为 `password.clsp` 的新Chialisp文件,并创建一个模块,它接受一个参数 `password` 并确定传入的值是否等于 `hello`。 如果是,则返回 "correct",否则返回 "incorrect"。 01:00\ -We'll run this using the `brun` command in our terminal and pass in `hello` which should give us a success. Just to test the opposite, we'll pass in something else, and see if that fails. So this is a bit of a refresher on chialisp basics. One of the issues we have with a puzzle like this is that the hard-coded value for the password is both insecure and not very useful. +我们将在终端中使用 `brun` 命令运行这个,并传入 `hello`,这应该会给我们一个成功。 为了测试相反的情况,我们将传入其他内容,然后看看是否失败。 这是对Chialisp基础知识的一点复习。 我们这个谜题的一个问题是,密码的硬编码值既不安全也不太有用。 01:20\ -We'd like to have a generalized puzzle that we can use for any password we choose to have. For this we'll use currying and hashing. To make this puzzle more generalized, we will be using currying. To do so, let's replace our password parameter with two new ones, `CORRECT_PASSWORD` and `provided_password`, and then run our comparison on those parameters. +我们想要一个更通用的谜题,可以用于任何我们选择的密码。 为此,我们将使用柯里化和哈希。 为了使这个谜题更通用,我们将使用柯里化。 为此,让我们用两个新的参数替换我们的密码参数,`CORRECT_PASSWORD` 和 `provided_password`,然后在这些参数上运行我们的比较。 01:40\ -Now in our terminal, we can curry in a value to replace the correct password parameter and compile it. Run `cdv clsp curry password.clsp -a` and pass in our desired password, in this case - `hello` and we get the following result. Now if we run that through `brun` and give it the correct password, we should get a success. +现在在我们的终端中,我们可以柯里化一个值来替换正确的密码参数并进行编译。 运行 `cdv clsp curry password.clsp -a`,并传入我们想要的密码,这里是 `hello`,我们会得到以下结果。 现在如果我们通过 `brun` 运行它,并给它正确的密码,我们应该会得到一个成功。 02:00\ -We can also nest these commands like this - (`brun "$(cdv clsp curry password.clsp -a 'goodbye')" "(goodbye)"`). The first steps to making our puzzle more secure is to use hashing. A hash function will take an input and return a hash value. One of the most popular hashing algorithms is sha256 which is directly supported within chialisp. +我们也可以像这样嵌套这些命令 - (`brun "$(cdv clsp curry password.clsp -a 'goodbye')" "(goodbye)"`)。 使我们的谜题更安全的第一步是使用哈希。 A hash function will take an input and return a hash value. 最流行的哈希算法之一是 sha256,它直接在chialisp中支持。 02:20\ -A few important notes about hash functions; given a value, calculating the hash is extremely easy. Given a hash, calculating the original input is extremely difficult or impossible, and passing the same value through a hashing function multiple times will always result in the same output. +关于哈希函数的几个重要说明:给定一个值,计算哈希非常容易。 给定一个哈希,计算原始输入非常困难或不可能,并且通过哈希函数多次传递相同的值将始终产生相同的输出。 02:40\ -We can use these principles to our advantage by currying a hash of the expected password instead of the password value itself. This prevents us from revealing the expected password while still allowing us to check if the provided password is correct. This is done by hashing the provided password. So let's change our puzzle to use hashing. +我们可以利用这些原则,通过柯里化预期密码的哈希值而不是密码值本身来提高安全性。 This prevents us from revealing the expected password while still allowing us to check if the provided password is correct. This is done by hashing the provided password. 所以让我们改变我们的谜题来使用哈希。 03:00\ -First, change the curried parameter to `PASSWORD_HASH` and change the other parameter to `password`. In the comparison, use sha256 to hash the given password and compare it to the password hash. To test this we'll first have to hash a password and curry it into our new puzzle. +首先,将柯里化参数更改为 `PASSWORD_HASH`,并将其他参数更改为 `password`。 在比较中,使用 sha256 来哈希给定的密码,并将其与密码哈希进行比较。 为了测试这个,我们首先需要对密码进行哈希并将其柯里化到我们的新谜题中。 03:20\ -Run `cdv hash "hello"` to get the hash for the password 'hello'. We can now curry this into our puzzle like last time, making sure to prefix the hash with `0x` to identify it as a chialisp value. Now we can pass this compiled puzzle through `brun` and provide the correct password to test. +运行 `cdv hash "hello"` 来获取密码 "hello" 的哈希。 现在我们可以像上次一样将其柯里化到我们的谜题中,确保用 `0x` 前缀标识为chialisp值。 现在我们可以通过 `brun` 传递这个编译后的谜题,并提供正确的密码进行测试。 03:40\ -It's important to know that while hashing is an essential part of securing our puzzle, this is not quite enough. When we provide our solution with the correct password, that password will be visible on the blockchain. Meaning we won't be able to use it again. The final solution to this problem is to use signatures, which we'll talk about in a future video. Now that we've talked about currying and hashing, let's talk about conditions. +重要的是要知道,虽然哈希是确保我们的谜题安全的重要部分,但这还不够。 当我们用正确的密码提供我们的解决方案时,该密码将在区块链上可见。 这意味着我们将无法再次使用它。 解决这个问题的最终方法是使用签名,我们将在未来的视频中讨论。 现在我们已经讨论了柯里化和哈希,让我们谈谈条件。 04:00\ -In our password puzzle, let's make a couple of additions. First, we'll add a parameter called conditions and then replace the success and fail messages with that parameter, followed by `(x)`. So what does this do? Well the `x` represents an error. If the password is incorrect, the if statement will evaluate to false and error out, terminating the program and leaving the coin that we are creating unspent. +在我们的密码谜题中,让我们做一些添加。 首先,我们将添加一个名为 `conditions` 的参数,然后用该参数替换成功和失败消息,后跟 `(x)`。 那么这是做什么的呢? 好吧,`x` 代表错误。 如果密码不正确,if 语句将计算为 false,并且出错,终止程序,并使我们创建的币未花费。 04:20\ -If the correct password is given, the conditions that are provided by the spender will be run. So back to our terminal, first we'll need to curry in our hashed password as before. Now that we have the compiled puzzle, we're going to need to do a few things to create the coin. First, we'll need the puzzle hash which we can get by running `opc -H` and passing in our compiled puzzle. +如果给出正确的密码,则conditions 提供者提供的条件将会执行。 回到我们的终端,首先我们需要像之前一样柯里化我们的哈希密码。 现在我们有了编译后的谜题,我们需要做一些事情来创建币。 首先,我们需要谜题哈希,我们可以通过运行 `opc -H` 并传入我们的编译后的谜题来获得。 04:40\ -We'll save the result for later. Next, we'll need the puzzle reveal which is just a serialized form of the puzzle in hex. It's what you must reveal on chain when spending a coin. We can get this by running `opc` and passing in our compiled puzzle. We'll save this for later as well. +我们将保存结果供以后使用。 接下来,我们需要谜题揭示,它只是谜题的十六进制序列化形式。 这是在花费币时必须在链上揭示的内容。 我们可以通过运行 `opc` 并传入我们的编译后的谜题来获得这个。 我们也会保存这个以备将来使用。 05:00\ -Now to create the coin, we need to encode our puzzle hash into an address with `cdv encode -p txch` and passing in our puzzle hash. We then send that address an amount of xch to lock it. Now let's spend the coin to release value back to our wallet. First, we'll get our wallet address and convert it to a puzzle hash with `cdv decode`. +现在要创建币,我们需要将我们的谜题哈希编码为一个地址,使用 `cdv encode -p txch` 并传入我们的谜题哈希。 然后我们将给该地址发送一定数量的 xch 以锁定它。 现在让我们花费币以释放价值回到我们的钱包。 首先,我们将获取我们的钱包地址,并使用 `cdv decode` 将其转换为谜题哈希。 05:20\ -We'll then use this to build the condition we want to pass into the coin. For this example, we're going to use the `CREATE_COIN` condition which is denoted by the code `51`. So to construct our solution, we'll write `opc` then give our password, then the condition we want to pass in. +接下来,我们将使用这个来构建我们要传递到币中的条件。 对于本例,我们将使用代号为 `51` 的 `CREATE_COIN` 条件。 因此,为了构建我们的解决方案,我们将写 `opc` 然后给出我们的密码,然后是我们要传递的条件。 05:40\ -In this case, the condition code `51`, our wallet puzzle hash - prefixed by `0x`, and an amount. This output is our solution and we'll save it for later. All right, we now need to retrieve the coin record we created earlier when we committed xch to the puzzle. Run `cdv rpc coinrecords --by puzzlehash` and pass in the original puzzle hash. +在这种情况下,条件代码 `51`,我们的钱包谜题哈希 - 前缀为 `0x`,以及一个数量。 这个输出就是我们的解决方案,我们会将其保存供以后使用。 好的,现在我们需要检索我们之前创建的币记录,当我们将 xch 承诺给谜题时。 运行 `cdv rpc coinrecords --by puzzlehash` 并传入原始谜题哈希。 06:00\ -The output may contain a few coin records depending on if you're following the example closely and use the most recent one based on highest block index, and copy the coin record. Now we are going to create a spend bundle. Start a `json` file and create a property called `coin_spends` that contains an array containing an object. (`[{}]`) +输出可能会包含一些币记录,具体取决于您是否紧密遵循示例,并根据最高区块索引选择最近的一个,并复制币记录。 现在我们将创建一个花费捆绑包。 开始一个 `json` 文件,并创建一个名为 `coin_spends` 的属性,其中包含一个包含一个对象的数组。 (`[{}]`) 06:20\ -Paste the coin record, followed by the puzzle reveal you generated earlier, and then the solution. Create another property called `aggregated_signature` and assign this value (`0xc0000000000...`) That's 191 zeros. Now submit the spend bundle to the mempool with `cdv rpc pushtx spendbundle.json`. +粘贴币记录,然后是您之前生成的谜题揭示,然后是解决方案。 创建另一个名为 `aggregated_signature` 的属性,并将其分配为这个值(`0xc0000000000...`)这是 191 个零。 现在将花费捆绑包提交到内存池中,使用 `cdv rpc pushtx spendbundle.json`。 06:40\ -If everything was successful, this transaction should be accepted and you should see your wallet balance increase after some time passes. Now you've created your first smart coin. In this video, we talked about how to curry values into a generalized puzzle, how to hash both sensitive values as well as puzzles for creating coins, and touched on conditions that can be passed into puzzles. +如果一切顺利,此交易应该被接受,一段时间后您应该会看到您的钱包余额增加。 现在您已经创建了您的第一个智能币。 在本视频中,我们讨论了如何将值柯里化到通用谜题中,如何对敏感值以及用于创建币的谜题进行哈希,并简要介绍了可以传递到谜题中的条件。 07:00\ -In the next video, we'll talk further about security and how to use signatures to better secure your transactions. See you then. +在下一个视频中,我们将进一步讨论安全性以及如何使用签名来更好地保护您的交易。 那时再见。
--- -## Common gotchas +## 常见问题 -- **Curried parameters:** It's considered best practice to write parameters that are intended to be curried in in all caps. This helps keep track of where each parameter is coming from while writing the puzzle. -- **0x Prefixes:** It's important to keep track of how we are using different values and understand how Chialisp is going to handle them. A common gotcha is forgetting to append `0x` to a value, or in some cases removing it to tell the puzzle how to properly handle the parameter. -- **Condition Codes:** Condition codes are by default signified by a numerical code. In future lessons, we will also use a library that allows us to reference the codes with more descriptive language. +- **柯里化参数:** 最佳实践是将意图进行柯里化的参数写成大写字母。 这有助于在编写谜题时跟踪每个参数的来源。 +- **0x 前缀:** 重要的是要跟踪我们如何使用不同的值,并了解 Chialisp 将如何处理它们。 一个常见的小错误是忘记向值附加 `0x`,或在某些情况下将其删除以告诉拼图如何正确处理参数。 +- **条件代码:** 条件代码默认用数字代码表示。 在未来的课程中,我们还将使用一个允许我们使用更具描述性语言引用代码的库。 --- -## Knowledge check +## 知识检测 -:::tip Question 1 - Curried Parameters +:::tip 问题 1 - 柯里化参数 -Which parameter in this puzzle will be curried in? +在这个谜题中,哪个参数将被柯里化进去? ```chialisp (mod (ARG1 arg2) @@ -128,15 +128,15 @@ Which parameter in this puzzle will be curried in? Answer (expand when ready to see the answer) -ARG1 will be curried in. +ARG1 将被柯里化进去。 -Currying always substitutes parameters in order, so when currying, the first will be replaced. Best practice is to write a curried parameter in all caps to help us keep track. +柯里化始终按顺序替换参数,因此在柯里化时,第一个将被替换。 最佳实践是将柯里化的参数用大写字母写出,以帮助我们跟踪。
-:::tip Question 2 - Hashing Principles +:::tip 问题 2 - 哈希原理 -What are the three principles of hashing? +哈希的三个原理是什么? ::: @@ -144,15 +144,15 @@ What are the three principles of hashing? Answer (expand when ready to see the answer) -1. Given a value, hashing that value is computationally easy -2. Given a hash, calculating the value is computationally difficult or impossible -3. Hashing the same input, will result in the same output +1. 给定一个值,对该值进行哈希是计算上容易的。 +2. 给定一个哈希,计算出原始值是计算上困难或不可能的。 +3. 对相同的输入进行哈希,将会得到相同的输出。
-:::tip Question 3 - Hashing Puzzle +:::tip 问题 3 - 哈希谜题 -True or False. Sha256 is one of the most popular hashing algorithms and is natively supported by chialisp. +正确还是错误。 Sha256是最流行的哈希算法之一,并且在chialisp 中得到了原生支持。 ::: @@ -164,13 +164,13 @@ True -:::tip Question 4 - Combining all of the above +:::tip 问题 4 - 结合上述所有内容 -Write a Chialisp puzzle that performs the following. +编写一个 Chialisp 谜题,执行以下操作。 -- Accepts a curried parameter -- Hashes a provided parameter with sha256 and compares it to the curried parameter. -- Outputs a provided result if the comparison is true. +- 接受一个柯里化参数 +- 使用sha256哈希提供的参数,并将其与柯里化参数进行比较。 +- 如果比较结果为真,则输出提供的结果。 ::: @@ -191,13 +191,13 @@ Write a Chialisp puzzle that performs the following. --- -## Additional resources +## 附加资源 -### Runnable Chialisp and clvm plugins +### 可运行的Chialisp和clvm插件 -For information on using these plugins please refer to the [academy overview](/academy-overview#runnable-chialisp-and-clvm-plugins) +有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。 -#### Chialisp plugin +#### Chialisp 插件 @@ -209,7 +209,7 @@ For information on using these plugins please refer to the [academy overview](/a -#### Clvm plugin +#### Clvm插件 @@ -219,11 +219,11 @@ For information on using these plugins please refer to the [academy overview](/a -### Links +### 链接 -- General [chialisp concepts](https://docs.chia.net/guides/chialisp-concepts): overviews of currying, inner puzzles, and morphing conditions. -- Guided [chialisp walkthroughs](https://docs.chia.net/guides/): guides for installation, creating smart coins, and working with BLS signatures. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- [Chialisp基本概念](https://docs.chia.net/guides/chialisp-concepts):包括柯里化(currying)、内部谜题(inner puzzles)和条件变换(morphing conditions)的概述。 +- 指导性的[Chialisp演练](https://docs.chia.net/guides/):安装、创建智能币和使用BLS签名的指南。 +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/challenges-plot-filters.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/challenges-plot-filters.md index c0c8c742fd..e93f31e21f 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/challenges-plot-filters.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/challenges-plot-filters.md @@ -5,14 +5,14 @@ slug: /challenges-plot-filters In this lesson, we discuss how the plot filter works, and what the benefits are of using one. -## Learning objectives +## 学习目标 - **Plot Filters**: Understand the basics of how the plot filter works, as well as the benefits of using one. - **Challenge Generation**: Understand how the challenge is generated by the Timelord and sent to the Farmer. --- -## Content +## 内容
@@ -20,7 +20,7 @@ In this lesson, we discuss how the plot filter works, and what the benefits are --- -## Script +## 脚本
@@ -42,13 +42,13 @@ The Timelord will choose the Proof of Space that most closely meets the challeng --- -## Common gotchas +## 常见问题 - **Are valid proofs filtered out?:** It is very possible that a valid proof of space would be contained in a filtered plot. This affects every farmer equally though, and the benefits of further decentralization are well worth it. --- -## Knowledge check +## 知识检测 :::tip Question 1 - Challenge Frequency @@ -74,22 +74,21 @@ What are the two significant benefits of using a plot filter? Answer (expand when ready to see the answer) -```bash 1. It further decentralizes the network. -2. It reduces the amount of compute needed, improving network efficiency -``` +2. 1. It further decentralizes the network. + 2. It reduces the amount of compute needed, improving network efficiency
--- -## Additional resources +## 附加资源 -### Links +### 链接 - More [farming basics](https://docs.chia.net/farming-basics): overviews of plotting, pooling, and rewards. - In depth [architecture overview](https://docs.chia.net/architecture-overview): describing the interactions between Farmers, Harvesters, Wallets, etc. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/farming-overview.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/farming-overview.md index 34bbbde9af..a30a7c1735 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/farming-overview.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/farming-overview.md @@ -1,18 +1,18 @@ --- -title: Farming Overview +title: 耕种概览 slug: /farming-overview --- -In this lesson, we go over the plotting process, and what happens when a Farmer wins a challenge. +在本课程中,我们将介绍绘图过程,以及当农名赢得挑战时会发生什么。 -## Learning objectives +## 学习目标 -- **Protocols**: Understand the basics of the Chia Farming protocol. -- **Puzzles and Solutions**: Understand the use of puzzles and solutions in Chialisp. +- **协议**:了解Chia耕种协议的基础知识。 +- **谜题(Puzzles)和解决方案(Solutions)**:了解谜题和解决方案在Chialisp中的使用。 --- -## Content +## 内容
@@ -20,43 +20,43 @@ In this lesson, we go over the plotting process, and what happens when a Farmer --- -## Script +## 脚本
Expand for the full script 0:00\ -Farmers are nodes that seek to win Proof of Space challenges in exchange for rewards. The Farmer that wins a challenge constructs and processes a block of transactions and adds it to the blockchain. +农民(Farmers)是寻求赢得空间证明挑战以换取奖励的节点。 赢得挑战的农民会构建并处理一个交易区块,并将其添加到区块链中。 0:20\ -To start, the Farmers pre-generate hashes into large blocks called Plots. The size of these plots are determined by a constant, k. k32 is the minimum required size and equates to around 108GB per plot. +首先,农民预先生成哈希值到称为图块(Plots)的大块(large blocks)中。 这些图块的大小由一个常数k决定,k32是所需的最小尺寸,相当于每个图块约108GB。 0:40\ -This plotting process is computationally intensive, similar to classic blockchain "mining", however, this process is only done once, reducing the overall energy usage immensely. Once the plots are created, they are then passively monitored by harvesters to determine if they contain a valid Proof of Space for the current network challenge. +这个绘图过程计算密集,类似于传统区块链的“挖矿”,但这个过程只需要进行一次,大大减少了整体能耗。 一旦图块创建完成,它们会被农民被动监控,以确定它们是否包含当前网络挑战的有效空间证明。 1:00\ -If the Farmer wins the challenge, they will start filling a block with transactions from the mempool. The Farming client has control of which transactions to include in the block, and will usually choose based on the largest Farming Fee, adding to the overall reward received. +如果农民赢得了挑战,他们将开始从内存池中填充交易到区块中。 耕种客户端将控制哪些交易可以包含到区块中,通常会根据最高的耕种手续费用来做选择,从而增加总奖励。 1:20\ -The block is then processed, meaning all the transactions and programs within smart coins are executed and resolved. The block is then signed by the farmer and submitted to the chain. +然后处理该区块,意味着所有交易和智能币中的程序都会被执行和解决。 区块随后由农民签名并提交到链上。
--- -## Common gotchas +## 常见问题 -- **Continuous Harvesting:** Plots do not need to be continuously created. A Farmer can create many plots all at once, and continuously harvest from those plots well into the future. The plots will remain valid and in use even after a proof of space has been found. -- **Choosing Transactions:** Transactions are stored temporarily in the "mempool" and are retrieved by a winning Farmer to create a block. The transactions can be chosen to maximize the reward a Farmer receives by prioritizing the transactions that include Farming Fees. This means that if a transaction doesn't include a Fee, there is a chance that it will not be included in a block even if it was created before the transactions that were. +- **持续收获**:图块不需要一直创建。 农民可以一次性创建许多图块,并在未来持续从这些图块中收获。 即使在找到空间证明之后,这些图块仍然有效并且可以使用。 +- **选择交易**:交易暂时存储在“内存池”中,获胜的农夫会从其中检索交易来创建区块。 可以通过优先选择包含耕种手续费的交易来最大化农民获得的奖励。 这意味着如果一笔交易没有包含手续费,即使它在其他包含手续费的交易之前创建,也有可能不会被包含在区块中。 --- -## Knowledge check +## 知识检测 -:::tip Question 1 - k Size +:::tip 问题1 - k值 -What is the minimum k size required by the Chia blockchain? +Chia区块链要求的最小k值是多少? ::: @@ -64,13 +64,13 @@ What is the minimum k size required by the Chia blockchain? Answer (expand when ready to see the answer) -`"k32"` +k32 -:::tip Question 2 - Plot File Size +:::tip 问题2 - 图块文件大小 -How large is a plot file when using the minimum k-size, k32? +使用最小k值k32时,图块文件有多大? ::: @@ -78,13 +78,13 @@ How large is a plot file when using the minimum k-size, k32? Answer (expand when ready to see the answer) -`"Around 108GB"` +大约108GB -:::tip Question 3 - Plotting Frequency +:::tip 问题3 - 绘图频率 -How often should a Farmer replot? +农民应该多长时间重新绘图一次? ::: @@ -92,13 +92,13 @@ How often should a Farmer replot? Answer (expand when ready to see the answer) -`"Ideally, a Farmer should not have to replot. There may be some instances a Farmer may want to replot (alter the k-size or compression, changing from pool-based farming to solo-farming etc.), but the plots should remain valid and useful well into the future."` +理想情况下,农民不需要重新绘图。 农民可能在某些情况下会想要重新绘图(如改变k值或压缩率,从基于矿池的耕种改为独立耕种等),但图块应长期保持有效和有用。 -:::tip Question 4 - Processing Smart Coins. +:::tip 问题4 - 处理智能币。 -True or False; When a block is created, the Timelord processes and evaluates all the contained smart coins. +真还是假;当一个区块被创建时,时间领主会处理和评估所有包含的智能币。 ::: @@ -106,19 +106,19 @@ True or False; When a block is created, the Timelord processes and evaluates all Answer (expand when ready to see the answer) -`"False. The Farmer processes the smart coins contained in the block. The Timelord infuses the block to the rest of the chain."` +错误 农民处理区块中包含的智能币。 时间领主将区块注入到链的其余部分。 --- -## Additional resources +## 附加资源 -### Links +### 链接 - More [farming basics](https://docs.chia.net/farming-basics): overviews of plotting, pooling, and rewards. - In depth [architecture overview](https://docs.chia.net/architecture-overview): describing the interactions between Farmers, Harvesters, Wallets, etc. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/first-plot.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/first-plot.md index b3d8ccc8a4..82cc1d2b92 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/first-plot.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/first-plot.md @@ -5,14 +5,14 @@ slug: /first-plot In this lesson, we learn how to set up the Chia client, sync our full node using a torrent file, and create our first plot to start farming. -## Learning objectives +## 学习目标 - **Syncing a Full Node**: Learn how to set up the Chia client and sync a full node. - **Plot Creation**: Learn how to create a plot. --- -## Content +## 内容
@@ -20,25 +20,25 @@ In this lesson, we learn how to set up the Chia client, sync our full node using --- -## Common gotchas +## 常见问题 - **Joining a pool before plotting:** It might seem strange to join a pool before setting up your plots, but the plots need to be generated using a plotnft in order for the pool to know who runs them. You must associate a plotnft with a pool if you want to use pooling, and if set up correctly you can always leave the pool later and farm your plots solo. --- -## Knowledge check +## 知识检测 Follow along with the video, and start plotting! --- -## Additional resources +## 附加资源 -### Links +### 链接 - More [farming basics](https://docs.chia.net/farming-basics): overviews of plotting, pooling, and rewards. - In depth [architecture overview](https://docs.chia.net/architecture-overview): describing the interactions between Farmers, Harvesters, Wallets, etc. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/pools.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/pools.md index 9c4d53fe83..7e84db9d11 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/pools.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/plotting-farming/pools.md @@ -5,14 +5,14 @@ slug: /pools In this lesson, we review the Pooling protocol, and how it can benefit a Farmer starting out. -## Learning objectives +## 学习目标 - **Benefits of Pooling**: Understand the benefits of participating in a Pool. - **Reward Splitting**: Understand how the rewards are split among pool participants. --- -## Content +## 内容
@@ -20,7 +20,7 @@ In this lesson, we review the Pooling protocol, and how it can benefit a Farmer --- -## Script +## 脚本
@@ -42,13 +42,13 @@ The overall reward earned is largely the same over time for average sized farms, --- -## Common gotchas +## 常见问题 - **Farming size still matters:** The size of a Farm directly relates to how many valid partials are generated, and partials determine a farmers share of the pool reward (7/8). This means there is still a benefit to large farms joining a pool. --- -## Knowledge check +## 知识检测 :::tip Question 1 - Reward Split @@ -80,13 +80,13 @@ How does the protocol maintain decentralization? --- -## Additional resources +## 附加资源 -### Links +### 链接 - More [farming basics](https://docs.chia.net/farming-basics): overviews of plotting, pooling, and rewards. - In depth [architecture overview](https://docs.chia.net/architecture-overview): describing the interactions between Farmers, Harvesters, Wallets, etc. -- Chialisp [detailed documentation](https://chialisp.com/): detailed information on all aspects of chialisp. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 - Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-cat.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-cat.md new file mode 100644 index 0000000000..4d4a3db0bf --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-cat.md @@ -0,0 +1,97 @@ +--- +title: CATs +slug: /academy-cat +--- + +In this lesson, we talk about Chia Asset Tokens, and how they can be used. + +## 学习目标 + +- **Issuance**: Understand the basic types of issuance rules. + +--- + +## 内容 + +
+ +
+ +--- + +## 脚本 + +
+ + Expand for the full script + +0:00\ +A Chia Asset Token, or CAT, is a type of fungible token that can be minted from XCH. These tokens can take many different forms from a separate form of currency, to representing a collection of identical assets. + +0:20 +A CAT can have different properties, determined by it's TAIL, or Token Asset Issuance Limiter. This TAIL determines how the CAT is issued, how it can be subsequently spent, and whether it can be melted back into XCH. + +0:40 +A CAT wraps an inner puzzle that controls ownership of the coin. This is typically the standard transaction puzzle to facilitate sending the CATs to a Chia wallet. For the TAIL, there are 2 standard puzzles, Single-Issuance, and Multi-Issuance. +The Single-Issuance TAIL is more restrictive and is designed to make sure the supply is maintained. + +1:00 +With this TAIL, only the CATs minted at creation are valid, and they cannot be melted back into XCH. +The Multi-Issuance TAIL allows more identical CATs to be issued in the future, as long as the original issuance key is used. This is useful if the total number of tokens needed is unknown. + +1:20 +While these are the standard puzzles, a TAIL can be customized to allow any desired behavior. + +
+ +--- + +## 常见问题 + +- **Fungibility:** CATs are fungible, meaning they can be exchanged for each other at will. There are no editions, lot numbers, or anything else that would differentiate two CATs from the same issuance. +- **Melting:** Melting a CAT (if allowed by the TAIL) converts the underlying value of the CAT back to XCH which can then be used for other coins. A CAT can only ever be melted into the same amount of XCH used to create the CAT. + +--- + +## 知识检测 + +:::tip Question 1 - CATs vs. NFTs + +True or False; A CAT is a special type of NFT. + +::: + +
+ + Answer (expand when ready to see the answer) + +错误 A CAT is fungible, whereas an NFT is non-fungible and represents a unique item. + +
+ +:::tip Question 2 - TAILs + +What are the standard types of TAILs? + +::: + +
+ + Answer (expand when ready to see the answer) + +Single-Issuance and Multi-Issuance. + +
+ +--- + +## 附加资源 + +### 链接 + +- More about [primitives](https://docs.chia.net/guides/primitives/): guides for each primitive, and how to use them. +- In depth [CAT overview](https://docs.chia.net/guides/cat-creation-tutorial/): describing the CAT standard, and how to issue them. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 +- Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-did.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-did.md new file mode 100644 index 0000000000..58cb382aa3 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-did.md @@ -0,0 +1,89 @@ +--- +title: DIDs +slug: /academy-did +--- + +This lesson is an overview of DIDs. + +## 学习目标 + +- **Identity Ownership**: Understand the differences in data ownership between decentralized and non-decentralized identities. + +--- + +## 内容 + +
+ +
+ +--- + +## 脚本 + +
+ + Expand for the full script + +0:00\ +DIDs, or decentralized identifiers, provide a way to identify users or organizations in a decentralized way. DIDs can be used as account identifiers. + +0:20 +For example, someone using a specific service would create a DID associated with that service that they control. They could use this DID to authorize access to the service, and manage assets the service may provide and permissions it may request. + +0:40 +In non-decentralized environments, the account information is controlled and owned by the service provider. With decentralized identities, the identity and the data associated with it, are controlled and owned by the user. This allows the user to use the DID with many different services and in many different contexts, and control the information associated with it. + +
+ +--- + +## 常见问题 + +- **DIDs are NFTs:** DIDs are actually a special type of NFT. This ensures uniqueness and that only one entitiy has control of any one DID. +- **DID limits:** A user can generate many DIDs and associate each one with different services or assets. + +--- + +## 知识检测 + +:::tip Question 1 - DID issuance + +True or False; A DID is issued by a service provider to identify a user. + +::: + +
+ + Answer (expand when ready to see the answer) + +错误 The DID is created by the user, and associated with a service provider. This allows the user to use one DID for many different services. + +
+ +:::tip Question 2 - DID limits + +How many DIDs can a user have? + +::: + +
+ + Answer (expand when ready to see the answer) + +There is no practical limit to the number of DIDs a user can create. + +
+ +--- + +## 附加资源 + +### 链接 + +- More about [primitives](https://docs.chia.net/guides/primitives/): guides for each primitive, and how to use them. +- In depth [DID guide](https://docs.chia.net/guides/nft-intro/): how to create a DID. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 +- Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-nft.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-nft.md new file mode 100644 index 0000000000..3cd89c5cbc --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/academy-nft.md @@ -0,0 +1,114 @@ +--- +title: NFTs +slug: /academy-nft +--- + +In this lesson, we talk about what an NFT is, and some examples of how it can be used. + +## 学习目标 + +- **Fungibility**: Understand what makes something fungible. +- **Uses and Value**: Understand the use of NFTs, and what makes something valuable. + +--- + +## 内容 + +
+ +
+ +--- + +## 脚本 + +
+ + Expand for the full script + +0:00\ +NFTs, or non-fungible tokens, can be used to provide proof of ownership, handle licenses and royalties, and ensure uniqueness for digital entities and even real-world items. + +0:20 +Let's start at the basics. An item is non-fungible if it can not be interchanged for another identical item. For example, an original painting, a driver's license, or even a family heirloom. These items are unique and can't be substituted for something of "equal value" since any other item would not have the same properties. + +0:40 +Since digital items can be inherently duplicated, we need to pair the item with something that isn't. An NFT is a token on the blockchain that represents an item. This item could be physical and the NFT is a sort of registry of ownership on the blockchain, or the item could be digital, with the NFT serving as the non-interchangeable component. + +1:00 +NFTs can be used to provide ownership provenance, such as the sale and resale of digital art. They can also provide a mechanism of distributing royalties to the original author upon resale. + +1:20 +NFTs can also provide a method of verifying and transferring more ethereal concepts such as digital memberships and ecosystem specific assets. +It's an important point that just because something is non-fungible, it is not inherently valuable. For example, a family heirloom is non-fungible, and may have emotional value to one person, + +1:40 +but it does not have true value outside of a specific context. NFTs are a tool that is useful for providing a new way to work with digital items. They do not themselves create value. + +
+ +--- + +## 常见问题 + +- **Size Limitations:** Because there is a limit to how large a single transaction can be, it is very rare to have the digital item itself embedded in the NFT. The token will instead contain a reference to the item that is hosted elsewhere. +- **NFTs are Data:** It is common to think of some type of image or art when thinking of NFTs. This is a very limited view. NFTs are essentially data objects that can contain references to other digital assets, or simply be the data object itself. The referenced asset may be a piece of digital art, but it could just as easily be a document, contract, application, etc. + +--- + +## 知识检测 + +:::tip Question 1 - Fungibility + +What makes something fungible? + +::: + +
+ + Answer (expand when ready to see the answer) + +Something is fungibile if it can be easily substituted for another item. + +
+ +:::tip Question 2 - Physical vs. Digital + +True or False; An NFT can really only represent digital assets. + +::: + +
+ + Answer (expand when ready to see the answer) + +错误 An NFT can also represent physical assets, and serves as a registry on the blockchain. + +
+ +:::tip Question 3 - Value + +True or False; Minting and NFT makes the underlying asset valuable. + +::: + +
+ + Answer (expand when ready to see the answer) + +错误 Simply being an NFT does not make it valuable. NFTs are a tool to handle digital assets in a new way. + +
+ +--- + +## 附加资源 + +### 链接 + +- More about [primitives](https://docs.chia.net/guides/primitives/): guides for each primitive, and how to use them. +- In depth [NFT guide](https://docs.chia.net/guides/nft-intro/): how to mint an NFT. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 +- Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/primitives-overview.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/primitives-overview.md new file mode 100644 index 0000000000..9b003c1615 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/academy/primitives/primitives-overview.md @@ -0,0 +1,106 @@ +--- +title: Primitives Overview +slug: /primitives-overview +--- + +In this lesson, we talk about what a primitive is, and how it can be used. + +## 学习目标 + +- **Primitives**: Recognize the basic Chia primitives. +- **Open-Source**: Understand how open-source improves Chia through community involvement. + +--- + +## 内容 + +
+ +
+ +--- + +## 脚本 + +
+ + Expand for the full script + +0:00\ +Primitives are what we call commonly used structures in Chialisp. They are essentially features that are specifically supported with native methods in our various libraries, and have defined structures to ensure compatibility. + +0:20 +These Primitives include features commonly found in other blockchains such as NFTs and DIDs, but also include unique features such as CATs, Offers, Clawback, and Verifiable Credentials. +These primitives are the building blocks to creating efficient blockchain powered applications. + +0:40 +Each primitive represents a Chialisp puzzle that adheres to the current standard for that feature. These standards are submitted and can be modified by the community through the CHIP process, whereby new features, or modifications to existing primitives can be submitted and reviewed by community members, in keeping with the open-source nature of the Chia Blockchain. + +1:00 +Many of our unique primitives have come out of this process and it ensures that as development matures, the blockchain will evolve to satisfy the needs of developers in a multitude of use-cases. + +
+ +--- + +## 常见问题 + +- **Primitives as Standards:** Primitives are pre-defined features that adhere to certain standards agreed upon by the community. That does not mean that custom bespoke features cannot be developed or used for a specific use-case, even if it is not widely used. Chialisp allows any developer to create custom puzzles that map to their specific use-case, if an existing primitive does not quite fit. + +--- + +## 知识检测 + +:::tip Question 1 - Features + +True or False; Primitives are standardized features of the Chia Blockchain. + +::: + +
+ + Answer (expand when ready to see the answer) + +True. Primitives are what we call features that have defined standards, as agreed upon by the community. + +
+ +:::tip Question 2 - CHIPs? + +What does CHIP stand for? + +::: + +
+ + Answer (expand when ready to see the answer) + +CHIP stands for CHia Improvement Proposal. It is a way for the community of developers to propose new features, or changes to existing features. + +
+ +:::tip Question 3 - Custom Features + +True or False; Developers should only use pre-defined primitives. + +::: + +
+ + Answer (expand when ready to see the answer) + +错误 Primitives are meant to provide common and useful building blocks that are flexible to cover many use-cases. However, there may be instances where the existing primitives don't provide the needed functionality and a custom puzzle will be needed. + +
+ +--- + +## 附加资源 + +### 链接 + +- More about [primitives](https://docs.chia.net/guides/primitives/): guides for each primitive, and how to use them. +- Chialisp[详细文档](https://chialisp.com/):提供有关Chialisp各个方面的详细信息。 +- Support [in discord](https://discord.gg/chia): for further support join our discord server and ask in the #chialisp or #support channels. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/architecture-overview.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/architecture-overview.md index f8338c3c13..1c76be1a45 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/architecture-overview.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/architecture-overview.md @@ -1,6 +1,6 @@ --- title: 架构概览 -slug: /architecture-overview +slug: 架构概览 --- ![chia架构](/img/chia-network-architecture.png) diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/farmers.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/farmers.md index 7bfa2a7422..52082be761 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/farmers.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/farmers.md @@ -1,6 +1,6 @@ --- title: 耕种 -slug: /farmer-architecture +slug: 耕种架构 --- Chia的农民与比特币矿工相似。 他们通过在其储存的地块中找到有效的空间证明来获得区块奖励和费用。 耕种进程并不会保留一个区块链的副本,而由他们信任的一个完整节点来提供更新。 完整节点和耕种进程使用耕种协议相互沟通。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/full-nodes.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/full-nodes.md index 89e247aef1..6d4110c10b 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/full-nodes.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/full-nodes.md @@ -1,6 +1,6 @@ --- title: 全节点 -slug: /full-node-architecture +slug: /全节点架构 --- Chia点对点系统的核心由全节点组成。 全节点有以下几项责任: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/harvesters.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/harvesters.md index 419cd25cd3..1fbb019373 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/harvesters.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/harvesters.md @@ -1,6 +1,6 @@ --- title: 收割机 -slug: /harvester-architecture +slug: 收割机架构 --- 收割机是一些独立的机器,由农民控制。 在大规模耕作活动中,农民可能与许多收割机连接在一起。 @@ -16,7 +16,7 @@ slug: /harvester-architecture 就大多数挑战而言,质量 ( 步骤1) 很低,所以没有必要获取全部证明(步骤2)。 一个节点有28秒的时间返回一个证明,所以磁盘I/O 不会是一个限制因素, 即使证明存储在慢速HDD上。 -:::note +:::注意: 磁带驱动器太慢无法耕种。 The protocol was designed to support hard disks, but nothing slower. It is possible to use tape for long-term plot storage, only transferring the plots to disks for occasional farming, but this is likely a very rare use case. ::: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/mempool.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/mempool.md index ae026edc4d..74853dcd98 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/mempool.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/mempool.md @@ -7,6 +7,8 @@ The mempool (or memory pool) is a collection of transactions stored by full node The mempool is a required facet of Chia due to the decentralized nature of the blockchain. Transaction blocks occur approximately every 52 seconds, and it's impossible to predict who will win a block. Therefore, all transactions must be broadcast to the whole network and stored locally until they are confirmed. Additionally, it is normal to have more pending transactions than can fit in a single block, so the mempool also acts as a queue for inclusion into the blockchain. +For more information about the mempool, see our [blog post](https://www.chia.net/2024/01/11/getting-to-know-the-mempool-and-transaction-fees/) on this subject. + :::info How many transactions can fit into a block? Due to the varying size of transactions, and the different definitions of what even counts as a "transaction," there is not an exact number. But just for a bit of rough guidance, approximately 1000 transactions with two inputs and two outputs, or 2000 transactions with one input and one output can fit into a single block. ::: @@ -27,52 +29,60 @@ To view the current status of the mempool, see the dashboard for [mainnet](https :::info -Currently, the block size is artificially limited to 50% of its capacity. Eventually this limitation will be lifted, but the numbers discussed in this section assume it is being enforced. - -::: - -:::info - -The total size of the mempool differs by network. - -- Mainnet: 550 billion cost, or 100 blocks -- Testnet10: 110 billion cost, or 20 blocks +- By default, the total size of the mempool is 20 blocks. This true for both mainnet and testnet11. +- Prior to version 2.2, the block size was artificially capped at 50% of its capacity. +- Starting in version 2.2, the block size cap was increased to 60%. +- This limitation will be increased gradually, until it reaches 100%, or 11 billion cost -- the limit enforced by the consensus rules. +- The size (in CLVM cost) of the mempool is `mempool blocks * max cost per block * block size limit`. + - In version 2.2, this amounts to `20 * 11 billion * 0.6`, which equals 132 billion. + - When the block limiter is lifted, the total size will be `20 * 11 billion`, or 220 billion. ::: ### Scenario 1: Mempool Not Busy -If the transaction you just submitted -- plus the entire contents of the mempool -- can fit into one block, then your transaction will be added to the next block. This is true even if you don't include a transaction fee. +If the transaction you just submitted -- plus the entire contents of the mempool -- can fit into one block, then your transaction will be added to the next block. This is true even if you don't include a transaction fee. This is true even if you don't include a transaction fee. -The reason for this is straightforward -- the farmer has nothing to gain by excluding certain transactions, so it will include everything. Note that some proprietary software takes the opposite approach: the farmer will _only_ include transactions that pay a fee, regardless of mempool size. +The reason for this is straightforward -- the farmer has nothing to gain by excluding certain transactions, so it will include everything. The reason for this is straightforward -- the farmer has nothing to gain by excluding certain transactions, so it will include everything. Note that some proprietary software takes the opposite approach: the farmer will _only_ include transactions that pay a fee, regardless of mempool size. The mempool for Chia's mainnet is often in this state. This does not mean that no transactions are being submitted. It simply means that the network's speed of around 20 transactions per second is sufficient to keep up with demand. ### Scenario 2: Mempool Busy But Not Full -If the mempool's contents will occupy more than one block, but the mempool is not full, then it is considered _busy_. In this case: +If the mempool's contents will occupy more than one block, but the mempool is not full, then it is considered _busy_. In this case: In this case: -- Transactions that don't include fees will be added to the mempool, but they won't make it into the next block. Instead, they will have to "wait in line" for higher-priority transactions to be cleared. They likely will eventually be included in a block, but this is not guaranteed. -- Transactions with fees will be added to the mempool and prioritized according to the size of their fee-per-cost. For example, a transaction with a 1-mojo fee will enter the queue ahead of zero-fee transactions. +- Transactions that don't include fees will be added to the mempool, but they won't make it into the next block. Instead, they will have to "wait in line" for higher-priority transactions to be cleared. They likely will eventually be included in a block, but this is not guaranteed. Instead, they will have to "wait in line" for higher-priority transactions to be cleared. They likely will eventually be included in a block, but this is not guaranteed. +- Transactions with fees will be added to the mempool and prioritized according to the size of their fee-per-cost. Transactions with fees will be added to the mempool and prioritized according to the size of their fee-per-cost. For example, a transaction with a 1-mojo fee will enter the queue ahead of zero-fee transactions. :::info Testnet10 info -Testnet10 is constantly being "dusted" (thousands of small transactions are being included) in order to simulate a busy network, which can be useful for testing. The dust transactions do not include any fees, so in order for your transaction to be prioritized ahead of the dust, you simply have to include a 1-mojo fee. In this case, your transaction will likely be included in the next transaction block. However, if you don't include a fee, it will likely need to wait ~40-60 minutes before being included. +Testnet10 is constantly being "dusted" (thousands of small transactions are being included) in order to simulate a busy network, which can be useful for testing. The dust transactions do not include any fees, so in order for your transaction to be prioritized ahead of the dust, you simply have to include a 1-mojo fee. In this case, your transaction will likely be included in the next transaction block. However, if you don't include a fee, it will likely need to wait ~40-60 minutes before being included. The dust transactions do not include any fees, so in order for your transaction to be prioritized ahead of the dust, you simply have to include a 1-mojo fee. In this case, your transaction will likely be included in the next transaction block. However, if you don't include a fee, it will likely need to wait ~40-60 minutes before being included. ::: ### Scenario 3: Mempool Full -If the mempool is completely full, then in order for your transaction to be added, it will need to kick out one or more transactions. In this scenario: +If the mempool is completely full, then in order for your transaction to be added, it will need to kick out one or more transactions. In this scenario: In this scenario: - Transactions with no fee will not be added to the mempool. - Transactions with a fee of less than five mojos per cost (~100 million mojos for 2-input, 2-output transactions) will be treated as zero-fee transactions, i.e. they will not be added to the mempool. - Transactions with a fee of at least five mojos per cost will be added to the mempool, prioritized by fee-per-cost, _if_ they are not the lowest priority transactions. In this case, one or more of the lowest-priority transactions will be removed. -- If the lowest-cost transaction in the mempool is higher than than the new transaction, then the new transaction will not be added. For example, if the lowest priority transaction in the mempool has a fee of 100 mojos-per-cost (as might be the case in a very busy network), then a new transaction will have to include a higher fee in order to be added to the mempool. -This scenario often occurs on testnet10. When the mempool is completely full, the dusters stop submitting transactions until some of the dust has been cleared. This scenario might occasionally happen on mainnet as well, in which case a minimum fee would be required. +This scenario often occurs on testnet11. This scenario often occurs on testnet10. When the mempool is completely full, the dusters stop submitting transactions until some of the dust has been cleared. This scenario might occasionally happen on mainnet as well, in which case a minimum fee would be required. This scenario might occasionally happen on mainnet as well, in which case a minimum fee would be required. + +If you see `INVALID_FEE_TOO_CLOSE_TO_ZERO` in your log file, the mempool was likely full when you submitted your transaction, and you did not include a sufficient fee to kick out an existing transaction. Try resubmitting your transaction with a higher fee. Try resubmitting your transaction with a higher fee. -If you see `INVALID_FEE_TOO_CLOSE_TO_ZERO` in your log file, the mempool was likely full when you submitted your transaction, and you did not include a sufficient fee to kick out an existing transaction. Try resubmitting your transaction with a higher fee. +### Scenario 4: Mempool Full of Transactions with Fees + +This is the final scenario, where every transaction in the mempool has a fee of at least five mojos per cost. In order for your transaction to be added, it will need to kick out one or more transactions. In this scenario: + +- Transactions with no fee will not be added to the mempool. +- Transactions with a fee of less than five mojos per cost (~100 million mojos for 2-input, 2-output transactions) will be treated as zero-fee transactions, i.e. they will not be added to the mempool. +- Transactions with a fee of at least five mojos per cost _might_ be added to mempool. For this to happen, they will need to kick out one or more transactions with a lower fee-per-cost ratio. For example: + - If the "cheapest" transaction currently in the mempool has a fee per cost of 10, and your transaction's fee per cost is 9, then your transaction will not be added to the mempool. + - If the "cheapest" transaction is 10, and yours is 15, then it likely will be added. However, even in this case, there are scenarios where your transaction might not be added, such as when the lowest-cost transaction currently in the mempool is quite large. + +If the mempool from Chia's mainnet reaches this state, the competition for block space will be strong. In order for your transaction to be included, the minimum fee might be significantly higher than it would be in the other scenarios. ## Replace by Fee @@ -80,6 +90,15 @@ A transaction can replace another transaction in the mempool if it spends at lea For example, if the original transaction spent coins A and B, then another transaction that spends A, B, and C can replace it. However, a transaction that spends B and C cannot. This prevents denial-of-service (DOS) attacks, as well as censorship of transactions. There is also a minimum fee bump which might depend on mempool software being used. In `chia-blockchain`, this is set to 5 fee-per-cost. This prevents spam replacement transactions. +The full conditions for replace by fee are: + +1. The new spend bundle needs to include at least all the spends in the original one (can include additional spends) +2. The new spend bundle needs to pay a higher fee per cost than the original one (and higher than the [minimum fee required for inclusion](https://docs.chia.net/mempool/#fee-required-for-inclusion)) +3. The new spend bundle needs to pay at least 10000000 mojos more in fees than the original one +4. If there were any time-locks associated with the original spend, the new spend bundle has to have the same time-lock + +The replace by fee logic can be found [here](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/full_node/mempool_manager.py#L678)in the codebase) + ## Block Creation When the farmer makes a block, they will select the highest fee-per-cost transactions from the mempool until they reach the maximum block size. These spend bundles are combined into one large spend bundle, which is guaranteed to be valid, since all spend bundles in the mempool must spend disjointed coins. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/timelords.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/timelords.md index 5504a9a87b..d48ae1f0cc 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/timelords.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/architecture/timelords.md @@ -27,7 +27,7 @@ You can learn about potential attacks against Chia's network in the [Attacks and There are two primary types of Timelords: Regular and Blueboxes. -The first is the core Timelord that takes in Proofs of Space and uses a single fastest core to perform repeated squaring in a [class group of unknown order](https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf) as fast as possible. Beside each running VDF (referred to as a vdf_client in the application and source) is a set of proof generation threads that accumulate the proof that the time calculation's number of iterations was done correctly. +The first is the core Timelord and can be either a software Timelord or a hardware Timelord (ASIC) that takes in Proofs of Space and uses a single fastest core to perform repeated squaring in a [class group of unknown order](https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf) as fast as possible. Beside each running VDF (referred to as a vdf_client in the application and source) is a set of proof generation threads that accumulate the proof that the time calculation's number of iterations was done correctly. The second are Bluebox Timelords. Blueboxes are most any machine - especially things like old servers or gaming machines - that scour the historical chain looking for uncompressed proofs of time. So that the chain moves quickly, the regular Timelords use a faster method of generating proofs of time but the proofs are larger, which takes your Raspberry Pi a lot more time and effort to validate and sync the blockchain. A Bluebox picks up an uncompressed Proof of Time and recreates it, but this time with the slower and more compact proofs generated at the end. Those are then gossiped around to everyone so they can replace the large and slow to verify Proofs of Time with the compact and much quicker to validate version of exactly the same thing. @@ -39,38 +39,19 @@ It's good to have a few Timelords out there. There can be things like routing fl The Company plans to run a few Timelords around the world - and some backups too - to ensure that all Farmers and nodes can hear the beat that the Timelords are calling. -## Installing a Timelord +For installation and usage documentation please refer [here](/timelord-install). -:::info -If you want to run a Timelord on Linux/MacOS, first follow the Install from Source instructions [here](/installation#from-source). Then run: - -```bash -. ./activate -sh install-timelord.sh -chia start timelord & -``` - -::: - -Timelords execute sequential verifiable delay functions (proofs of time or VDFs), that get added to blocks to make them valid. This requires fast CPUs and a few cores per VDF. - -Due to restrictions on how [MSVC](https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B) handles 128 bit numbers and how Python relies upon MSVC, it is not possible to build and run Timelords of all types on Windows. - -### Regular Timelords - -On MacOS x86_64 and all Linux distributions, building a Timelord is as easy as running `chia start timelord &` in the virtual environment. You can also run `./vdf_bench square_asm 400000` once you've built Timelord to give you a sense of your optimal and unloaded ips. Each run of `vdf_bench` can be surprisingly variable and, in production, the actual ips you will obtain will usually be about 20% lower due to load of creating proofs. The default configuration for Timelords is good enough to just let you start it up. Set your log level to INFO and then grep for "Estimated IPS:" to get a sense of what actual ips your Timelord is achieving. - -### Bluebox Timelords +## Troubleshooting a Timelord -Once you build the Timelord with `sh install-timelord.sh` in the virtual environment, you will need to make two changes to `~/.chia/VERSION/config.yaml`. In the `timelord:` section, set `bluebox_mode:` to `True`. Then you need to proceed to the `full_node:` section and set `send_uncompact_interval:` to something greater than 0. We recommend `300` seconds there so that your Bluebox has some time to prove through a lot of the un-compacted Proofs of Time before the node drops more into its lap. The default settings may otherwise work but if the total effort is a little too much for whatever machine you are on you can also lower the `process_count:` from 3 to 2, or even 1, in the `timelord_launcher:` section. You know it is working if you see `VDF Client: Sent proof` in your logs at INFO level. +For troubleshooting steps please refer to the documentation [here](/troubleshooting/timelords). ## The Future of Timelords -In 2023, CNI received its first batch of ASIC timelords. When run as a cluster of three VDFs, these timelords could hit upwards of one million IPS. This was approximately four times the speed of the fastest non-ASIC timelords. After installing several timelords in strategic locations globally, and after thorough testing on private testnets, the company added the ASICs to the biggest public testnet -- testnet10. Finally, after [years of designing](https://www.businesswire.com/news/home/20211013005324/en/Chia-Partners-With-Supranational-to-Create-Industry-Leading-Proof-of-Space-Time-Security) the ASICs and months of testing them, they were activated on mainnet in October 2023. +In 2023, CNI received its first batch of ASIC timelords. When run as a cluster of three VDFs, these timelords could hit upwards of one million IPS. This was approximately four times the speed of the fastest non-ASIC timelords. After installing several timelords in strategic locations globally, and after thorough testing on private testnets, the company added the ASICs to a public testnet. Finally, after [years of designing](https://www.businesswire.com/news/home/20211013005324/en/Chia-Partners-With-Supranational-to-Create-Industry-Leading-Proof-of-Space-Time-Security) the ASICs and months of testing them, they were activated on mainnet in October 2023. -The next step is to distribute some of the remaining ASIC timelords to a select list of applicants, as detailed in a [blog post](https://www.chia.net/2023/10/26/asic-timelords-faster-than-fast-chia-network/). This process will ensure a high amount of global redundancy on this critical network infrastructure. +The next step was to distribute some of the remaining ASIC timelords to a select list of applicants, as detailed in a [blog post](https://www.chia.net/2023/10/26/asic-timelords-faster-than-fast-chia-network/). This process ensures a high amount of global redundancy on this critical network infrastructure. -Of course, as technology improves, the ASIC design will need to be updated. However, this process is extremely costly, and the current generation is already pushing upon the limits imposed by the laws of physics. We expect the current crop to remain the fastest timelords in the world for years to come. +Of course, as technology improves, the ASIC design will need to be updated. However, this process is extremely costly, and the current generation is already pushing upon the limits imposed by the laws of physics. We expect the current crop to remain the fastest timelords in the world for years to come. However, this process is extremely costly, and the current generation is already pushing upon the limits imposed by the laws of physics. We expect the current crop to remain the fastest timelords in the world for years to come. ## Timelords and Attacks diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-format.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-format.md index 64d25bdfcf..ebb6018ea2 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-format.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-format.md @@ -1,6 +1,6 @@ --- title: 区块格式 -slug: /block-format +slug: /区块格式 --- ## 完整块 @@ -19,5 +19,58 @@ slug: /block-format - **foliage**: Foliage: Foliage data for the reward chain block, the hash of this is the `header_hash`. - **foliage_transaction_block**: Optional[FoliageTransactionBlock]: Transaction related metadata that is relevant for light clients (not actual transactions), only for tx blocks. - **transactions_info**: Optional[TransactionsInfo]: Transaction related metadata that is not relevant for light clients (not actual transactions), only for tx blocks. -- **transactions_generator**: Optional[SerializedProgram]: A clvm program that generates all transactions (spends). +- **transactions_generator**: Optional[SerializedProgram]: A clvm program that generates all transactions (spends). See the next section for an important [update](#transactions_generator-update) due to the 2.1.0 hard fork. - **transactions_generator_ref_list**: List[uint32]: A list of block heights of previous generators referenced by this block's generator. + +## transactions_generator update + +Chia underwent a hard fork in version 2.1.0. This included updates to the `transactions_generator` code. + +### When + +The hard fork will activate at block `5 496 000`, which is expected to occur in June 2024. All nodes need to be compatible with the new implementation prior to this block. + +### Why + +Among other changes, the `transactions_generator` code was ported to Rust. + +There were multiple reasons for this update: + +- As an optimization -- Rust is generally more performant than Python +- To support back refs +- To make block validation faster +- To enable compression with block refs by referencing subtrees of prior transactions + +### Where + +The code for these changes is held in two primary locations: + +- The [clvm_rs](https://github.com/Chia-Network/clvm_rs/blob/main/src/serde/de_br.rs) repo has the new serialization and deserialization code. +- The [chia_rs](https://github.com/Chia-Network/chia_rs/tree/main/crates/chia-consensus/src/gen) repo has the consensus generator code. +- The Rust program for running the generator is [run_block_generator.rs](https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-consensus/src/gen/run_block_generator.rs). + +### What + +Two important changes went into this update: + +1. Allow serializing CLVM in a new, more compact form. This doesn't affect how CLVM is executed, it's just a matter of encoding. It does have some important consequences: + + - Farmers can effectively stuff more transactions into blocks, because with a more compact encoding, you can fit more for the same byte-cost. + - The new implementation can take advantage of the de-duplication in the new serialization format, by caching tree-hashes. This effectively de-duplicates the work of hashing puzzles. + + About the new serialization format: + + The atom `0xfe` is followed by another atom, which is interpreted as a path into the environment (the same form as in CLVM). It references a node from a part of the tree that has already been deserialized (thus, allowing for de-duplicating sub-trees). + +2. The generator ROM implementation was ported from CLVM to Rust. This also doesn't affect the behavior of anything (other than the CLVM cost, as explained below). It just speeds up block validation. + + About the generator ROM: + + - It is the code that invokes the generator in a block. + - The return value is a list of spends. + - The ROM validates all spends by checking the puzzle hashes and calling into all puzzles passing in their solutions. + - The work done by the ROM no longer charges a CLVM cost, which has two primary benefits: + - It allows farmers to put more transactions into blocks. + - It makes it easier for the farmer to predict the total cost of a block as it's including transactions. + +[CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md#block-generator-optimizations) contains more info about the generator optimizations. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-rewards.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-rewards.md index 5418957a8c..720f2c288a 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-rewards.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/block-validation/block-rewards.md @@ -7,7 +7,7 @@ In Chia, the issuance schedule, also referred to as the block reward schedule, d ## Strategic Reserve (pre-farm) -The first block of the network pays out 21 million XCH, divided into a 1/8 coin and a 7/8 coin, to an address that Chia Network Inc controls. The purpose and future usage of the funds is described in the [business whitepaper](https://www.chia.net/whitepaper). +The first block of the network pays out 21 million XCH, divided into a 1/8 coin and a 7/8 coin, to an address that Chia Network Inc controls. The purpose and future usage of the funds is described in the [business white paper](https://www.chia.net/whitepaper). ## Halvings @@ -36,7 +36,7 @@ Therefore, Chia coins are never destroyed. In a given block, any portion of a sp ## Farmer vs Pool reward -The block reward is divided into two coins. The first coin goes to the farmer puzzle hash, which is specified by the farmer, and usually goes straight to the farmer's wallet. This contains 1/8 of the total value (0.25 XCH for the first 3 years). This is referred to as the _farmer coin_. +The block reward is divided into two coins. The first coin goes to the farmer puzzle hash, which is specified by the farmer, and usually goes straight to the farmer's wallet. This contains 1/8 of the total value. This is referred to as the _farmer coin_. The second coin, with 7/8 of the value, is called the _pool coin_. This coin can go to one of two places: @@ -48,11 +48,11 @@ The second coin, with 7/8 of the value, is called the _pool coin_. This coin can As detailed in the [Business white paper](https://www.chia.net/whitepaper), the network's emissions schedule is as follows: | Years | Final
Block | Final Month
(Approx.) | Block Reward
(total) | Pool
Reward | Farmer
Reward | -| ------: | --------------: | ------------------------: | -----------------------: | --------------: | ----------------: | -| 1 - 3 | `5 045 760` | March 2024 | 2 XCH | 1.75 XCH | 0.25 XCH | -| 4 - 6 | `10 091 520` | March 2027 | 1 XCH | 0.785 XCH | 0.125 XCH | -| 7 - 9 | `15 137 280` | March 2030 | 0.5 XCH | 0.4375 XCH | 0.0625 XCH | -| 10 - 12 | `20 183 040` | March 2033 | 0.25 XCH | 0.21875 XCH | 0.03125 XCH | -| 13 - ∞ | ∞ | ∞ | 0.125 XCH | 0.109375 XCH | 0.015625 XCH | - -Note that the rewards are adjusted according to a block height, not a timestamp. The `Final Block` column is therefore accurate as the last block before the rewards are modified. The months and years are only estimates based on when the block heights are likely to be reached. +| -------:| ---------------------:| -------------------------------:| ------------------------------:| ---------------------:| -----------------------:| +| 1 - 3 | `5 045 760` | March 2024 | 2 XCH | 1.75 XCH | 0.25 XCH | +| 4 - 6 | `10 091 520` | March 2027 | 1 XCH | 0.785 XCH | 0.125 XCH | +| 7 - 9 | `15 137 280` | March 2030 | 0.5 XCH | 0.4375 XCH | 0.0625 XCH | +| 10 - 12 | `20 183 040` | March 2033 | 0.25 XCH | 0.21875 XCH | 0.03125 XCH | +| 13 - ∞ | ∞ | ∞ | 0.125 XCH | 0.109375 XCH | 0.015625 XCH | + +Note that the rewards are adjusted according to a block height, not a timestamp. Note that the rewards are adjusted according to a block height, not a timestamp. The `Final Block` column is therefore accurate as the last block before the rewards are modified. The months and years are only estimates based on when the block heights are likely to be reached. The months and years are only estimates based on when the block heights are likely to be reached. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/asic-hwvdf.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/asic-hwvdf.md new file mode 100644 index 0000000000..dde1107ab6 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/asic-hwvdf.md @@ -0,0 +1,119 @@ +--- +sidebar_label: ASICs +title: ASICs HW VDF +slug: /asic-cli +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Reference + +### `hw_vdf_client` + +Functionality: Run the ASIC HW VDF Software + +Usage: hw_vdf_client [OPTIONS] PORT [N_VDFS] + +Options: + +| Long Command | Type | Required | Description | +| :----------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------- | +| --freq | INTEGER | False | set ASIC frequency [%d, 200 - 2200] | +| --voltage | INTEGER | False | set board voltage [.88, 0.7 - 1.0] | +| --ip | TEXT | False | timelord IP address [localhost] | +| --vdfs-mask | TEXT | False | mask for enabling VDF engines [7, 1 - 7] | +| --vdf-threads | TEXT | False | number of software threads per VDF engine [4, 2 - 64] | +| --proof-threads | TEXT | False | number of proof threads per VDF engine [3, 1 - 63] | +| --auto-freq-period | TEXT | False | auto-adjust frequency every N seconds [0, 10 - inf] | +| --list | TEXT | False | list available devices and exit | +| --help | None | False | Show a help message and exit | + +
+Example 1 - Run the ASIC software with defaults + +```bash +hw_vdf_client 8000 3 +``` + +Response: + +``` +2024-04-12T10:32:05.898 Setting frequency to 1100.000000 MHz +2024-04-12T10:32:06.016 Frequency is 1100.000000 MHz +2024-04-12T10:32:06.020 Board voltage is 0.875 V +2024-04-12T10:32:06.020 Setting voltage to 0.880 V +2024-04-12T10:32:06.021 Board voltage is now 0.875 V +2024-04-12T10:32:06.032 Board current is 0.698 A +2024-04-12T10:32:06.043 Board power is 0.610 W +2024-04-12T10:32:06.049 Connecting to 127.0.0.1:8000 +2024-04-12T10:32:06.049 VDF 0: Connected to timelord, waiting for challenge +``` + +
+ +
+Example 2 - Run the ASIC software with auto-frequency, initial frequency, and defined ip + +```bash +hw_vdf_client --freq 1500 --auto-freq 60 --ip 192.168.0.122 8000 3 +``` + +Response: + +``` +2024-04-12T10:32:05.898 Setting frequency to 1500.000000 MHz +2024-04-12T10:32:06.016 Frequency is 1500.000000 MHz +2024-04-12T10:32:06.020 Board voltage is 0.875 V +2024-04-12T10:32:06.020 Setting voltage to 0.880 V +2024-04-12T10:32:06.021 Board voltage is now 0.875 V +2024-04-12T10:32:06.032 Board current is 0.698 A +2024-04-12T10:32:06.043 Board power is 0.610 W +2024-04-12T10:32:06.049 Connecting to 192.168.0.122:8000 +2024-04-12T10:32:06.049 VDF 0: Connected to timelord, waiting for challenge +``` + +
+ +
+Example 3 - Run the ASIC software with defined ip and only 1 vdf (i.e. defaults for cluster) + +```bash +hw_vdf_client --ip 192.168.0.122 8000 1 +``` + +Response: + +``` +2024-04-12T10:32:05.898 Setting frequency to 1100.000000 MHz +2024-04-12T10:32:06.016 Frequency is 1100.000000 MHz +2024-04-12T10:32:06.020 Board voltage is 0.875 V +2024-04-12T10:32:06.020 Setting voltage to 0.880 V +2024-04-12T10:32:06.021 Board voltage is now 0.875 V +2024-04-12T10:32:06.032 Board current is 0.698 A +2024-04-12T10:32:06.043 Board power is 0.610 W +2024-04-12T10:32:06.049 Connecting to 192.168.0.122:8000 +2024-04-12T10:32:06.049 VDF 0: Connected to timelord, waiting for challenge +``` + +
+ +--- + +## Troubleshooting a Timelord + +For troubleshooting steps please refer to the documentation [here](/troubleshooting/timelords). + +--- + +## Timelord support + +Join Our [Discord](https://discord.gg/chia) and jump into the #support channel for support + +--- + +## Timelord FAQ + +For FAQ please refer to the documentation [here](/timelord-install#timelord-faq). + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cat-admin.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cat-admin.md index 5e2194b162..34bce54639 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cat-admin.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cat-admin.md @@ -23,27 +23,27 @@ Usage: cats [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -l | --tail | TEXT | True | The TAIL program to launch this CAT with | -| -c | --curry | TEXT | False | An argument to curry into the TAIL | -| -s | --solution | TEXT | False | The solution to the TAIL program [default: ()] | -| -t | --send-to | TEXT | True | The address these CATs will appear at once they are issued | -| -a | --amount | INTEGER | True | The amount to issue in mojos (regular XCH will be used to fund this) | -| -m | --fee | INTEGER | False | The fees for the transaction, in mojos [default: 0] | -| -d | --authorized-provider | TEXT | False | A trusted DID that can issue VCs that are allowed to trade the CAT. Specifying this option will make the CAT a CR (credential restricted) CAT. Requires specifying either `--proofs-checker` or `--cr-flag` | -| -r | --proofs-checker | TEXT | False | The program that checks the proofs of a VC for a CR-CAT. Specifying this option requires a value for `--authorized-providers` | -| -v | --cr-flag | TEXT | False | Specify a list of flags to check a VC for in order to authorize this CR-CAT. Specifying this option requires a value for `--authorized-providers`. Cannot be used if a custom `--proofs-checker` is specified. | -| -f | --fingerprint | INTEGER | False | The wallet fingerprint to use as funds | -| -sig | --signature | TEXT | False | A signature to aggregate with the transaction | -| -as | --spend | TEXT | False | An additional spend to aggregate with the transaction | -| -b | --as-bytes | None | False | Output the spend bundle as a sequence of bytes instead of JSON | -| -sc | --select-coin | None | False | Stop the process once a coin from the wallet has been selected and return the coin | -| -q | --quiet | None | False | Quiet mode will not ask to push transaction to the network | -| -p | --push | None | False | Automatically push transaction to the network in quiet mode | -| | --root-path | PATH | False | The root folder where the config lies [default: ~/.chia/mainnet] | -| | --wallet-rpc-port | INTEGER | False | The RPC port the wallet service is running on | -| | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------------- |:------- |:-------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -l | --tail | TEXT | True | The TAIL program to launch this CAT with | +| -c | --curry | TEXT | False | An argument to curry into the TAIL | +| -s | --solution | TEXT | False | The solution to the TAIL program [default: ()] | +| -t | --send-to | TEXT | True | The address these CATs will appear at once they are issued | +| -a | --amount | INTEGER | True | The amount to issue in mojos (regular XCH will be used to fund this) | +| -m | --fee | INTEGER | False | The fees for the transaction, in mojos [default: 0] | +| -d | --authorized-provider | TEXT | False | A trusted DID that can issue VCs that are allowed to trade the CAT. Specifying this option will make the CAT a CR (credential restricted) CAT. Requires specifying either `--proofs-checker` or `--cr-flag` Specifying this option will make the CAT a CR (credential restricted) CAT. Requires specifying either `--proofs-checker` or `--cr-flag` | +| -r | --proofs-checker | TEXT | False | The program that checks the proofs of a VC for a CR-CAT. Specifying this option requires a value for `--authorized-providers` Specifying this option requires a value for `--authorized-providers` | +| -v | --cr-flag | TEXT | False | Specify a list of flags to check a VC for in order to authorize this CR-CAT. Specifying this option requires a value for `--authorized-providers`. Cannot be used if a custom `--proofs-checker` is specified. Specifying this option requires a value for `--authorized-providers`. Cannot be used if a custom `--proofs-checker` is specified. | +| -f | --fingerprint | INTEGER | False | The wallet fingerprint to use as funds | +| -sig | --signature | TEXT | False | A signature to aggregate with the transaction | +| -as | --spend | TEXT | False | An additional spend to aggregate with the transaction | +| -b | --as-bytes | None | False | Output the spend bundle as a sequence of bytes instead of JSON | +| -sc | --select-coin | None | False | Stop the process once a coin from the wallet has been selected and return the coin | +| -q | --quiet | None | False | Quiet mode will not ask to push transaction to the network | +| -p | --push | None | False | Automatically push transaction to the network in quiet mode | +| | --root-path | PATH | False | The root folder where the config lies [default: ~/.chia/mainnet] | +| | --wallet-rpc-port | INTEGER | False | The RPC port the wallet service is running on | +| | --help | None | False | Show a help message and exit |
Example 1 - select a coin from the wallet with a value of at least 1 XCH (1 trillion mojos) @@ -94,7 +94,7 @@ After pushing the transaction, the new ID and Eve Coin (singleton parent coin) w
Example 3 - Mint a new CR-CAT -First, select a coin to use for the minting. Flags included in this example (CR-specific flags are in **bold**): +First, select a coin to use for the minting. First, select a coin to use for the minting. Flags included in this example (CR-specific flags are in **bold**): - `--tail`: The tail to use; in this case we'll use a single-issuance TAIL - `--send-to`: The address to send the CR-CATs to upon minting @@ -120,7 +120,7 @@ Response: Name: c5519ac8ef55043b23bef45b1326d445f2c4af579f13dc0cdec10335ccb0a809 ``` -In the above repsonse, `Name` is the ID of the coin to be used for the minting. Next, run the same command again, but remove the `--select-coin` flag and add `--curry 0x` (the `0x` is required and important here): +In the above repsonse, `Name` is the ID of the coin to be used for the minting. In the above repsonse, `Name` is the ID of the coin to be used for the minting. Next, run the same command again, but remove the `--select-coin` flag and add `--curry 0x` (the `0x` is required and important here): ```bash cats --tail ./reference_tails/genesis_by_coin_id.clsp.hex --send-to txch1ek6ln2ejdsec6l734x8tggk9j5sepl8nfqjer5yt2dr905f04prqmcjcc5 --authorized-provider did:chia:1x23lnyd2xjefnfly075ngk79duf0yxna35cp86mgnnp4t33senfs4cah7u --cr-flag "test_proof1" --amount 1000000 -m 1000 --as-bytes --curry 0xc5519ac8ef55043b23bef45b1326d445f2c4af579f13dc0cdec10335ccb0a809 @@ -134,9 +134,9 @@ Asset ID: 262a2c2cbb09414652006c4da139a186b3a110bb57cd5d76b6785e4811f1c77c Eve Coin ID: 692a4f63c56815a33510088a255d695aea472d0f03bb9f0d5cdd5c91a82821f2 ``` -Just as with standard CATs, the CR-CAT has been minted and sent to its destination address. `Asset ID` can now be added in the destination wallet. +Just as with standard CATs, the CR-CAT has been minted and sent to its destination address. `Asset ID` can now be added in the destination wallet. `Asset ID` can now be added in the destination wallet. -In this case, the destination wallet is the holder of a VC with the proof required to hold this CR-CAT. To verify this, run the `vcs get` CLI command: +In this case, the destination wallet is the holder of a VC with the proof required to hold this CR-CAT. To verify this, run the `vcs get` CLI command: To verify this, run the `vcs get` CLI command: ```bash chia wallet vcs get @@ -154,7 +154,7 @@ Inner Address: txch166pzqd55p2emp9sqaflvyc8x2s4qn4eexrxgrlfwf8khuefp5fqswe84mu Proof Hash: f063e22557705b14425b8fca60018796b4364eb6354f45d0b99431a71d3043e5 ``` -This VC contains the proof that was added to the CR-CAT (`test_proof1`). Once the CR-CAT has been added to this Chia wallet, it will be displayed as type `CRCAT`. For example: +This VC contains the proof that was added to the CR-CAT (`test_proof1`). Once the CR-CAT has been added to this Chia wallet, it will be displayed as type `CRCAT`. For example: Once the CR-CAT has been added to this Chia wallet, it will be displayed as type `CRCAT`. For example: ```bash chia wallet show @@ -186,7 +186,7 @@ Usage: secure_the_bag [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------------------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------------------- |:------- |:-------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -c | --curry | TEXT | False | An argument to curry into the TAIL | | -a | --amount | INTEGER | True | The amount to issue in mojos (regular XCH will be used to fund this) | | -stbtp | --secure-the-bag-targets-path | TEXT | True | Path to CSV file containing targets of secure the bag (inner puzzle hash + amount). The total value of the coins in this file must match the value of the `amount` flag. If they don't match, an error will be thrown. | @@ -222,7 +222,7 @@ Usage: secure_the_bag [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------- | +|:------------- |:----------------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------- | | -ecid | --eve-coin-id | TEXT | True | ID of coin that was spent to create secured bag | | -th | --tail-hash | TEXT | True | TAIL hash / Asset ID of CAT to unwind from secured bag of CATs | | -stbtp | --secure-the-bag-targets-path | TEXT | True | Path to CSV file containing targets of secure the bag (inner puzzle hash + amount) | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/clawback.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/clawback.md index 84ebeaa53a..99791ba0d8 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/clawback.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/clawback.md @@ -36,14 +36,14 @@ Usage: `clawback [OPTIONS] COMMAND [ARGS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :--------------------------- | +|:------------- |:------------ |:---- |:-------- |:---------------------------- | | | --version | None | False | Show the version and exit | | -h | --help | None | False | Show a help message and exit | Commands: | Name | Description | -| :----- | :-------------------------------------------------- | +|:------ |:--------------------------------------------------- | | claim | Claim a clawback coin after the timelock has passed | | claw | Clawback an unclaimed coin | | create | Send xch to a clawback coin | @@ -60,7 +60,7 @@ Usage: `clawback claim [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -c | --coin-id | TEXT | True | The coin ID you want to claim | | -m | --fee | FLOAT | False | The fee in XCH for this transaction | | -w | --wallet-id | INTEGER | False | The wallet id for fees. If no target address given the clawback will go to this wallet id | @@ -245,7 +245,7 @@ Usage: `clawback claw [OPTIONS]` Options: Clawback an unclaimed coin | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -c | --coin-id | TEXT | True | The coin ID for the clawback coin to inspect | | -m | --fee | FLOAT | False | The fee in XCH for this transaction | | -w | --wallet-id | INTEGER | False | The wallet id for fees. If no target address given the clawback will go to this wallet id | @@ -317,7 +317,7 @@ Usage: `clawback create [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -t | --to | TEXT | True | The recipient's address | | -l | --timelock | INTEGER | False | The timelock to use for the clawback coin you're creating, in seconds. Default is two weeks | | -a | --amount | INTEGER | True | The amount to fund (in XCH) | @@ -410,7 +410,7 @@ Usage: `clawback show [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -c | --coin-id | TEXT | False | The coin ID for the clawback coin to inspect | | -np | --node-rpc-port | INTEGER | False | Set the port where the Node is hosting the RPC interface | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cli.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cli.md index c679cc1d61..8a502a05a5 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cli.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/cli.md @@ -91,6 +91,22 @@ Command: `chia start {service}` `-r, --restart`: Restart of running processes +| | Full Node | Wallet | Farmer | Harvester | Timelord | Timelord Launcher | Timelord-Only | Introducer | Full Node Simulator | +| ----------------- | --------- | ------ | ------ | --------- | -------- | ----------------- | ------------- | ---------- | ------------------- | +| all | X | X | X | X | X | X | | | | +| node | X | | | | | | | | | +| harvester | | | | X | | | | | | +| farmer | X | X | X | X | | | | | | +| farmer-no-wallet | X | | X | X | | | | | | +| farmer-only | | | X | | | | | | | +| timelord | X | | | | X | X | | | | +| timelord-only | | | | | X | | X | | | +| timelord-launcher | | | | | | X | | | | +| wallet | X | X | | | | | | | | +| wallet-only | | X | | | | | | | | +| introducer | | | | | | | | X | | +| simulator | | | | | | | | | X | + # plotters In 2.1.0 the option to use different plotters including compressed plotter was introduced. Each plotter has slightly different hardware requirements and may need slightly different options specified. The cli reference for all plotters can be found in the [Plotters CLI Page](/plotters-cli). Learn more about the alternative plotters in the [Alternative Plotters page](/plotting-software). @@ -162,7 +178,7 @@ For more detail, you can read about the DiskProver commands in [chiapos](https:/ The plots check challenge is a static challenge. For example if you run a plots check 20 times, with 30 tries against the same file, it will produce the same result every time. So while you may see a plot ratio \<< 1 for a plot check with `x` number of tries, it does not mean that the plot itself is worthless. It just means that given these static challenges, the plot is producing however many proofs. As the number of tries (`-n`) increases, we would expect the ratio to not be \<< 1. Since Mainnet is live, and given that the blockchain has new challenges with every signage point - just because a plot is having a bad time with one specific challenge, does not mean it has the same results versus another challenge. "Number of plots" and "k-size" are much more influential factors at winning blocks than "proofs produced per challenge". -**In theory**, a plot with a ratio >> 1 would be more likely to win challenges on the blockchain. Likewise, a plot with a ratio \<< 1 would be less likely to win. However, in practice, this isn't actually going to be noticeable. Therefore, don't worry if your plot check ratios are less than 1, unless they're _significantly_ less than 1 for _many_ `-n`. +**In theory**, a plot with a ratio >> 1 would be more likely to win challenges on the blockchain. Likewise, a plot with a ratio \<< 1 would be less likely to win. However, in practice, this isn't actually going to be noticeable. Therefore, don't worry if your plot check ratios are less than 1, unless they're _significantly_ less than 1 for _many_ `-n`. Likewise, a plot with a ratio \<< 1 would be less likely to win. However, in practice, this isn't actually going to be noticeable. Therefore, don't worry if your plot check ratios are less than 1, unless they're _significantly_ less than 1 for _many_ `-n`. # db @@ -193,16 +209,16 @@ Command: `chia db backup [add flags and parameters]` **Flags** -`--backup_file [PATH]`: (optional) Specifies the backup file and location. Default will create the backup in the same directory as the database. +`--backup_file [PATH]`: (optional) Specifies the backup file and location. Default will create the backup in the same directory as the database. Default will create the backup in the same directory as the database. `--no_indexes`: (optional) Create backup without indexes. **Database backup notes** -- This will vacuum (compress) and backup your database and may take several hours to complete. Use at your own leisure. +- This will vacuum (compress) and backup your database and may take several hours to complete. Use at your own leisure. Use at your own leisure. - You do not need to stop your Chia node while performing the upgrade. - The new database file will be written to the same folder as the original with "vacuumed\_" prepended to the name. -- To use the backup database: Close the chia client, remove/delete the main database, rename the backup database to remove "vacuumed\_", and restart the chia client. Note the initial start will take extra time as the client verifies the backup db file. +- To use the backup database: Close the chia client, remove/delete the main database, rename the backup database to remove "vacuumed\_", and restart the chia client. Note the initial start will take extra time as the client verifies the backup db file. Note the initial start will take extra time as the client verifies the backup db file. ## [validate](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/cmds/db.py) @@ -210,13 +226,13 @@ Command: `chia db validate [add flags and parameters]` **Flags** -`--db [PATH]`: (optional) Specifies which database file to validate. Default will use the default database and path. +`--db [PATH]`: (optional) Specifies which database file to validate. Default will use the default database and path. Default will use the default database and path. -`--validate-blocks`: (optional) Validate consistency of properties of the encoded blocks and block records. Note this will increase the validation time. +`--validate-blocks`: (optional) Validate consistency of properties of the encoded blocks and block records. Note this will increase the validation time. Note this will increase the validation time. **Database validate notes** -- This will validate your database and may take several hours to complete. Use at your own leisure. +- This will validate your database and may take several hours to complete. Use at your own leisure. Use at your own leisure. - You do not need to stop your Chia node while performing the upgrade. - This will start by processing the latest block and traverse to the first block. @@ -342,6 +358,7 @@ Options: Commands: completion Generate shell completion configure Modify configuration + dao Create, manage or show state of DAOs data Manage your data db Manage the blockchain database dev Developer commands and tools diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/custody-tool.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/custody-tool.md index 4050333a87..5cc8e3fe18 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/custody-tool.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/custody-tool.md @@ -25,12 +25,12 @@ Usage: `cic audit [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -f | --filepath | TEXT | False | The file path the dump the audit log | -| -d | --diff | TEXT | False | A previous audit log to diff against this one | -| -h | --help | None | False | Show a help message and exit | +| -f | --filepath | TEXT | False | The file path the dump the audit log | +| -d | --diff | TEXT | False | A previous audit log to diff against this one | +| -h | --help | None | False | Show a help message and exit |
Example @@ -102,12 +102,12 @@ Usage: `cic clawback [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | -| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | -| -h | --help | None | False | Show a help message and exit | +| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | +| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | +| -h | --help | None | False | Show a help message and exit |
Example @@ -134,11 +134,11 @@ Usage: `cic complete [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | -| -h | --help | None | False | Show a help message and exit | +| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | +| -h | --help | None | False | Show a help message and exit |
Example -- complete a withdrawal @@ -172,7 +172,7 @@ Usage: `cic derive_root [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:-------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------- | | -c | --configuration | TEXT | False | The configuration file with which to derive the root (or the filepath to create it at if using --db-path) [default: ./Configuration (needs derivation).txt] | | -db | --db-path | TEXT | False | Optionally specify a DB path to find the configuration from | | -pks | --pubkeys | TEXT | True | A comma separated list of pubkey files that will control this money | @@ -210,7 +210,7 @@ Usage: `cic examine_spend [OPTIONS] SPEND_FILE` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------------- | :------ | :------- | :--------------------------------------------------------------- | +|:------------- |:------------------ |:------- |:-------- |:---------------------------------------------------------------- | | | --qr-density | INTEGER | False | The amount of bytes to pack into a single QR code [default: 250] | | -va | --validate-against | TEXT | False | A new configuration file to check against requests for rekeys | | -h | --help | None | False | Show a help message and exit | @@ -249,12 +249,12 @@ Usage: `cic export_config [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :-------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:--------------------------------------------------------------------------------------------------------- | | -f | --filename | TEXT | False | The file path to export the config to (default: ./Configuration Export (\*\*\*\*\*\*).sqlite) | | -db | --db-path | TEXT | True | The file path to initialize/find the sync database at (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -p | --public | None | False | Enable to export the public information only (default: disabled) | -| -h | --help | None | False | Show a help message and exit | +| -p | --public | None | False | Enable to export the public information only (default: disabled) | +| -h | --help | None | False | Show a help message and exit |
Example -- export the config to export.bin @@ -283,12 +283,12 @@ Usage: `cic increase_security_level [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | -| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | -| -h | --help | None | False | Show a help message and exit | +| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | +| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | +| -h | --help | None | False | Show a help message and exit |
Example -- move to a 4-of-5 config @@ -318,7 +318,7 @@ Usage: `cic init [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------------- | :--- | :------- | :-------------------------------------------------------------------------------------------------- | +|:------------- |:--------------------- |:---- |:-------- |:--------------------------------------------------------------------------------------------------- | | -d | --directory | TEXT | False | The directory in which to create the configuration file [default: .] | | -wt | --withdrawal-timelock | TEXT | True | The amount of time where nothing has happened before a withdrawal can be made (in seconds) | | -pc | --payment-clawback | TEXT | True | The amount of time to clawback a payment before it's completed (in seconds) | @@ -354,15 +354,15 @@ Usage: `cic launch_singleton [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------- | -| -c | --configuration | TEXT | True | The configuration file with which to launch the singleton | -| -db | --db-path | TEXT | True | The file path to initialize the sync database at | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------- | +| -c | --configuration | TEXT | True | The configuration file with which to launch the singleton | +| -db | --db-path | TEXT | True | The file path to initialize the sync database at | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -np | --node-rpc-port | INTEGER | False | Set the port where the Node is hosting the RPC interface. See the rpc_port under full_node in config.yaml | -| | --fee | INTEGER | False | Fee to use for the launch transaction (in mojos) [default: 0] | -| -h | --help | None | False | Show a help message and exit | +| | --fee | INTEGER | False | Fee to use for the launch transaction (in mojos) [default: 0] | +| -h | --help | None | False | Show a help message and exit |
Example @@ -391,11 +391,11 @@ Usage: `cic p2_address [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -p | --prefix | TEXT | False | The prefix to use when encoding the address (default: xch) | -| -h | --help | None | False | Show a help message and exit | +| -p | --prefix | TEXT | False | The prefix to use when encoding the address (default: xch) | +| -h | --help | None | False | Show a help message and exit |
Example @@ -423,8 +423,8 @@ Usage: `cic payment [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------------------------------------- | -| -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | +|:------------- |:--------------------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------------------------------------ | +| -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | | -f | --filename | TEXT | False | The filepath to dump the spend bundle into | | -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | | -a | --amount | INTEGER | False | The outgoing amount (in mojos) to pay [default: 0] | @@ -463,14 +463,14 @@ Usage: `cic push_tx [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------- | -| -b | --spend-bundle | TEXT | True | The signed spend bundle | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------- | +| -b | --spend-bundle | TEXT | True | The signed spend bundle | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -np | --node-rpc-port | INTEGER | False | Set the port where the Node is hosting the RPC interface. See the rpc_port under full_node in config.yaml | -| -m | --fee | INTEGER | False | The fee to attach to this spend (in mojos) | -| -h | --help | None | False | Show a help message and exit | +| -m | --fee | INTEGER | False | The fee to attach to this spend (in mojos) | +| -h | --help | None | False | Show a help message and exit |
Example @@ -500,8 +500,8 @@ Usage: `cic show [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :------------------------------------------------------------------------------ | -| -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (**\*\***).sqlite) [required] | +|:------------- |:------------ |:---- |:-------- |:------------------------------------------------------------------------------- | +| -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (**\*\***).sqlite) [required] | | -c | --config | None | False | Enable to display the details of the public config (default: disabled) | | -d | --derivation | None | False | Enable to display the private details of the private config (default: disabled) | | -h | --help | None | False | Show a help message and exit | @@ -561,13 +561,13 @@ Usage: `cic start_rekey [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------ | :--- | :------- | :------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------------- |:---- |:-------- |:-------------------------------------------------------------------------------- | | -db | --db-path | TEXT | True | The file path to the sync DB (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | -| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | -| -new | --new-configuration | TEXT | True | The configuration you would like to rekey the singleton to | -| -h | --help | None | False | Show a help message and exit | +| -f | --filename | TEXT | False | The filepath to dump the spend bundle into | +| -pks | --pubkeys | TEXT | True | A comma separated list of pubkeys that will be signing this spend | +| -new | --new-configuration | TEXT | True | The configuration you would like to rekey the singleton to | +| -h | --help | None | False | Show a help message and exit |
Example @@ -596,13 +596,13 @@ Usage: `cic sync [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------ | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------------------- | | -c | --configuration | TEXT | False | The configuration file with which to initialize a sync database (default: ./Configuration (\*\*\*\*\*\*).txt) | | -db | --db-path | TEXT | True | The file path to initialize/find the sync database at (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -np | --node-rpc-port | INTEGER | False | Set the port where the Node is hosting the RPC interface. See the rpc_port under full_node in config.yaml | -| -s | --show | None | False | Enable to show a summary of the singleton after sync is complete (default: disabled) | -| -h | --help | None | False | Show a help message and exit | +| -np | --node-rpc-port | INTEGER | False | Set the port where the Node is hosting the RPC interface. See the rpc_port under full_node in config.yaml | +| -s | --show | None | False | Enable to show a summary of the singleton after sync is complete (default: disabled) | +| -h | --help | None | False | Show a help message and exit |
Example -- sync and show the config @@ -642,11 +642,11 @@ Usage: `cic update_config [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :--- | :------- | :------------------------------------------------------------------------------------------------------------ | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:---- |:-------- |:------------------------------------------------------------------------------------------------------------------------- | | -c | --configuration | TEXT | False | The configuration file with which to initialize a sync database (default: ./Configuration (\*\*\*\*\*\*).txt) | | -db | --db-path | TEXT | True | The file path to initialize/find the sync database at (default: ./sync (\*\*\*\*\*\*).sqlite) | -| -h | --help | None | False | Show a help message and exit | +| -h | --help | None | False | Show a help message and exit |
Example -- update config after rekey @@ -676,7 +676,7 @@ Usage: `cic which_pubkeys [OPTIONS] AGGREGATE_PUBKEY` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :------------ | :------ | :------- | :------------------------------------------------------------------ | +|:------------- |:------------- |:------- |:-------- |:------------------------------------------------------------------- | | -pks | --pubkeys | TEXT | True | A comma separated list of pubkey files that may be in the aggregate | | -m | --num-pubkeys | INTEGER | False | Check only combinations of a specific number of pubkeys | | | --no-offset | None | False | Do not try the synthetic versions of the pubkeys | @@ -789,7 +789,7 @@ Positional arguments: Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------- | :--- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:-------------------- |:---- |:-------- |:--------------------------------------------------------------------------------------------------------------------------------------- | | -y | --yes | None | False | Enable to skip confirmations (default: disabled) | | | --qr | None | False | Enable to show signature as QR code (default: disabled) | | | --nochunks | None | False | Enable to read the spend in its entirety rather than as chunks (testing only) argument to pass to gpg (besides -d). (default: disabled) | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/daos.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/daos.md index dcc91e48a0..76245018ae 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/daos.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/daos.md @@ -27,14 +27,14 @@ Usage: chia dao add \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -n | --name | TEXT | False | Set the DAO wallet name | -| -t | --treasury-id | TEXT | True | The Treasury ID of the DAO you want to track | -| -a | --filter-amount | INTEGER | False | The minimum number of votes a proposal needs before the wallet will recognise it \[default: 1] | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -n | --name | TEXT | False | Set the DAO wallet name | +| -t | --treasury-id | TEXT | True | The Treasury ID of the DAO you want to track | +| -a | --filter-amount | INTEGER | False | The minimum number of votes a proposal needs before the wallet will recognise it \[default: 1] | +| -h | --help | None | False | Show a help message and exit |
Example @@ -136,21 +136,21 @@ Usage: chia dao add_funds \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the DAO Treasury Wallet | -| -w | --funding-wallet-id | INTEGER | True | The ID of the wallet to send funds from (must be of type `STANDARD_WALLET`) | -| -a | --amount | TEXT | True | The amount of funds to send, in XCH | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the DAO Treasury Wallet | +| -w | --funding-wallet-id | INTEGER | True | The ID of the wallet to send funds from (must be of type `STANDARD_WALLET`) | +| -a | --amount | TEXT | True | The amount of funds to send, in XCH | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example @@ -251,12 +251,12 @@ Usage: chia dao balance \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -283,21 +283,21 @@ Usage: chia dao close_proposal \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------ | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -p | --proposal-id | TEXT | True | The ID of the proposal you are voting on | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -p | --proposal-id | TEXT | True | The ID of the proposal you are voting on | | -d | --self-destruct | None | False | If this flag is set, it will self-destruct a broken proposal, thus forcing to force it to close \[default: not set] | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | | | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | | | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example @@ -410,29 +410,29 @@ Usage: chia dao create \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -n | --name | TEXT | False | Set the DAO wallet name | -| | --proposal-timelock | INTEGER | False | The minimum number of blocks before a proposal can close \[default: 1000] | -| | --soft-close | INTEGER | False | The number of blocks a proposal must remain unspent before closing \[default: 20] | -| | --attendance-required | INTEGER | True | The minimum number of votes a proposal must receive to be accepted | -| | --pass-percentage | INTEGER | False | The percentage of 'yes' votes in basis points a proposal must receive to be accepted. 100% = 10000 \[default: 5000] | -| | --self-destruct | INTEGER | False | The number of blocks required before a proposal can be automatically removed \[default: 10000] | -| | --oracle-delay | INTEGER | False | The number of blocks required between oracle spends of the treasury \[default: 50] | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -n | --name | TEXT | False | Set the DAO wallet name | +| | --proposal-timelock | INTEGER | False | The minimum number of blocks before a proposal can close \[default: 1000] | +| | --soft-close | INTEGER | False | The number of blocks a proposal must remain unspent before closing \[default: 20] | +| | --attendance-required | INTEGER | True | The minimum number of votes a proposal must receive to be accepted | +| | --pass-percentage | INTEGER | False | The percentage of 'yes' votes in basis points a proposal must receive to be accepted. 100% = 10000 \[default: 5000] | +| | --self-destruct | INTEGER | False | The number of blocks required before a proposal can be automatically removed \[default: 10000] | +| | --oracle-delay | INTEGER | False | The number of blocks required between oracle spends of the treasury \[default: 50] | | | --proposal-minimum | INTEGER | False | The minimum amount (in xch) that a proposal must use to be created (this is a spam-prevention measure; it will be donated to the treasury when the proposal is closed) \[default: 0.000000000001] | -| | --filter-amount | INTEGER | False | The minimum number of votes a proposal needs before the wallet will recognise it \[default: 1] | -| | --cat-amount | INTEGER | True | The number of DAO CATs (in mojos) to create when initializing the DAO | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --fee-for-cat | TEXT | False | Set the fees for the CAT creation transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| | --filter-amount | INTEGER | False | The minimum number of votes a proposal needs before the wallet will recognise it \[default: 1] | +| | --cat-amount | INTEGER | True | The number of DAO CATs (in mojos) to create when initializing the DAO | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --fee-for-cat | TEXT | False | Set the fees for the CAT creation transaction, in XCH \[default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit | :::info @@ -563,22 +563,22 @@ Usage: chia dao create_proposal \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the DAO wallet to use | -| -a | --amount | INTEGER | True | The amount of new cats the proposal will mint (in mojos) | -| -t | --to-address | TEXT | True | The address new cats will be minted to | -| -v | --vote-amount | INTEGER | True | The number of votes to add | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the DAO wallet to use | +| -a | --amount | INTEGER | True | The amount of new cats the proposal will mint (in mojos) | +| -t | --to-address | TEXT | True | The address new cats will be minted to | +| -v | --vote-amount | INTEGER | True | The number of votes to add | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit | :::warning @@ -682,24 +682,24 @@ Usage: chia dao create_proposal \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -t | --to-address | TEXT | False | The address the proposal will send funds to | -| -a | --amount | FLOAT | False | The amount of funds the proposal will send (in mojos) | -| -v | --vote-amount | INTEGER | True | The number of votes to add | -| | --asset-id | TEXT | False | The asset id of the funds the proposal will send. Leave blank for xch | -| -j | --from-json | TEXT | False | Path to a json file containing a list of additions, for use in proposals with multiple spends | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -t | --to-address | TEXT | False | The address the proposal will send funds to | +| -a | --amount | FLOAT | False | The amount of funds the proposal will send (in mojos) | +| -v | --vote-amount | INTEGER | True | The number of votes to add | +| | --asset-id | TEXT | False | The asset id of the funds the proposal will send. Leave blank for xch | +| -j | --from-json | TEXT | False | Path to a json file containing a list of additions, for use in proposals with multiple spends | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example @@ -818,26 +818,26 @@ Usage: chia dao create_proposal \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -v | --vote-amount | INTEGER | True | The number of votes to add | -| | --proposal-timelock | INTEGER | False | The new minimum number of blocks before a proposal can close | -| | --soft-close | INTEGER | False | The number of blocks a proposal must remain unspent before closing | -| | --attendance-required | INTEGER | False | The minimum number of votes a proposal must receive to be accepted | -| | --pass-percentage | INTEGER | False | The percentage of 'yes' votes in basis points a proposal must receive to be accepted. 100% = 10000 | -| | --self-destruct | INTEGER | False | The number of blocks required before a proposal can be automatically removed | -| | --oracle-delay | INTEGER | False | The number of blocks required between oracle spends of the treasury | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -v | --vote-amount | INTEGER | True | The number of votes to add | +| | --proposal-timelock | INTEGER | False | The new minimum number of blocks before a proposal can close | +| | --soft-close | INTEGER | False | The number of blocks a proposal must remain unspent before closing | +| | --attendance-required | INTEGER | False | The minimum number of votes a proposal must receive to be accepted | +| | --pass-percentage | INTEGER | False | The percentage of 'yes' votes in basis points a proposal must receive to be accepted. 100% = 10000 | +| | --self-destruct | INTEGER | False | The number of blocks required before a proposal can be automatically removed | +| | --oracle-delay | INTEGER | False | The number of blocks required between oracle spends of the treasury | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example @@ -908,19 +908,19 @@ Usage: chia dao exit_lockup \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the DAO wallet from which to exit the lockup | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the DAO wallet from which to exit the lockup | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit | This command will unlock tokens that have been locked for voting, provided that there are no active proposals that these CATs have voted on. This command will automatically determine which CATs are available to be unlocked. @@ -1005,12 +1005,12 @@ Usage: chia dao get_id \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the DAO wallet which will receive the funds | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the DAO wallet which will receive the funds | +| -h | --help | None | False | Show a help message and exit |
Example @@ -1039,13 +1039,13 @@ Usage: chia dao list_proposals \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -c | --include-closed | None | False | Set to include previously closed proposals \[Default: not set] | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -c | --include-closed | None | False | Set to include previously closed proposals \[Default: not set] | +| -h | --help | None | False | Show a help message and exit | This command will list all open proposals by default. If the `-c` flag is included, then all open _and_ closed proposals will be listed. @@ -1083,20 +1083,20 @@ Usage: chia dao lockup_coins \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the DAO wallet to use | -| -a | --amount | TEXT | True | The amount of CATs (not mojos) to lock in voting mode | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the DAO wallet to use | +| -a | --amount | TEXT | True | The amount of CATs (not mojos) to lock in voting mode | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit | This command will lock the specified number of tokens, thereby making them available for voting. @@ -1215,19 +1215,19 @@ Usage: chia dao release_coins \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example @@ -1308,12 +1308,12 @@ Usage: chia dao rules \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -1346,13 +1346,13 @@ Usage: chia dao show_proposal \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -p | --proposal_id | TEXT | True | The ID of the proposal to fetch, obtainable by running the [list_proposals](#list_proposals) command | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :--------------------------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -p | --proposal_id | TEXT | True | The ID of the proposal to fetch, obtainable by running the [list_proposals](#list_proposals) command | +| -h | --help | None | False | Show a help message and exit |
Example @@ -1391,22 +1391,22 @@ Usage: chia dao vote \[OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -i | --wallet-id | INTEGER | True | ID of the wallet to use | -| -p | --proposal-id | TEXT | True | The ID of the proposal you are voting on | -| -a | --vote-amount | INTEGER | True | The number of votes you want to cast | -| -n | --vote-no | None | False | Use this option to vote against a proposal. If not present then the vote is for the proposal | -| -m | --fee | TEXT | False | Set the fees per transaction, in XCH \[default: 0] | -| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | -| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | -| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | -| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | -| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | -| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +| :------------ | :------------------------------------ | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -i | --wallet-id | INTEGER | True | ID of the wallet to use | +| -p | --proposal-id | TEXT | True | The ID of the proposal you are voting on | +| -a | --vote-amount | INTEGER | True | The number of votes you want to cast | +| -n | --vote-no | None | False | Use this option to vote against a proposal. If not present then the vote is for the proposal | +| -m | --fee | TEXT | False | Set the fees per transaction, in XCH [default: 0] | +| | --reuse, --reuse-puzhash | None | False | Set either of these flags to reuse the existing address for the change \[default: not set] | +| | --new-address, --generate-new-puzhash | None | False | Set either of these flags to generate a new puzzle hash / address for the change \[default: not set] | +| -ma | --min-coin-amount, --min-amount | TEXT | False | Ignore coins worth less then this much XCH or CAT units | +| -l | --max-coin-amount, --max-amount | TEXT | False | Ignore coins worth more then this much XCH or CAT units | +| | --exclude-coin | TEXT | False | Exclude the coin with this ID from being spent | +| | --exclude-amount | TEXT | False | Exclude any coins with this XCH or CAT amount from being included | +| -h | --help | None | False | Show a help message and exit |
Example diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/datalayer.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/datalayer.md index 0e486762b7..db33a5c504 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/datalayer.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/datalayer.md @@ -40,7 +40,7 @@ Usage: `chia data add_mirror [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:--------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------------- | | -i | --id | TEXT | True | The hexadecimal ID of the store to mirror | | -a | --amount | INTEGER | True | The amount (in mojos) to spend to create the mirror. In theory, mirrors with a higher `amount` will be prioritized. Minimum `amount` is 0 | | -u | --url | TEXT | False | A URL where the mirror will reside. Can be repeated to add multiple URLs in the same command | @@ -76,15 +76,15 @@ Usage: `chia data add_missing_files [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------- | -| -i | --ids | TEXT | True | The hexadecimal store id(s) | -| -o | --override | None | False | If set, will overwrite files that already exist (default: not set) | -| -n | --no-override | None | False | If set, will not overwrite files that already exist (default: set) | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:--------------------------------------------------------------------------------------------------------------------------------------------- | +| -i | --ids | TEXT | True | The hexadecimal store id(s) | +| -o | --override | None | False | If set, will overwrite files that already exist (default: not set) | +| -n | --no-override | None | False | If set, will not overwrite files that already exist (default: set) | | -d | --directory | TEXT | False | If specified, use a non-default directory to write the files (default: `~/.chia/mainnet/data_layer/db/server_files_location_`) | -| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Fingerprint of the wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | +| -f | --fingerprint | INTEGER | False | Fingerprint of the wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -158,18 +158,18 @@ Usage: `chia data clear_pending_roots [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -i | --id | TEXT | True | The ID of the store from which to clear the pending roots | -| | --yes | None | False | Set to confirm the action without prompting [Default: not set / prompt to confirm] | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -i | --id | TEXT | True | The ID of the store from which to clear the pending roots | +| | --yes | None | False | Set to confirm the action without prompting [Default: not set / prompt to confirm] | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example -To clear all pending roots, you need to enter the store ID. An example of this which also disables prompting: +To clear all pending roots, you need to enter the store ID. An example of this which also disables prompting: An example of this which also disables prompting: ```bash chia data clear_pending_roots -i 2772c8108e19f9fa98ff7bc7d4bafd821319bc90af6b610d086b85f4c21fa816 --yes @@ -201,13 +201,13 @@ Usage: `chia data create_data_store [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------: | :---------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:--------:|:------------------------------------------------------------------------------------------------------------- | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH | -| | --verbose | None | False | Set to enable verbose output | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH | +| | --verbose | None | False | Set to enable verbose output | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -352,13 +352,13 @@ Usage: `chia data delete_mirror [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -c | --coin_id | TEXT | True | The coin_id of the mirror to delete (obtainable from the [get_mirrors](#get_mirrors) command) | -| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -c | --coin_id | TEXT | True | The coin_id of the mirror to delete (obtainable from the [get_mirrors](#get_mirrors) command) | +| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -385,13 +385,23 @@ Usage: `chia data get_keys [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | -| -r | --root_hash | TEXT | False | The hexadecimal root hash | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | +| -r | --root_hash | TEXT | False | The hexadecimal root hash | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -p | --page | INTEGER | False | Enables pagination of the output and requests a specific page | +| | --max-page-size | INTEGER | False | Set how many bytes to be included in a page, if pagination is enabled [Default: 40 MB] | +| -h | --help | None | False | Show a help message and exit | + +:::info + +Pagination is disabled by default. If it is enabled (by using the `page` flag), then the JSON response will include `total_pages` and `total_bytes`, in addition to the data. + +If an item is larger than `max-page-size`, an error will be thrown. + +:::
Example @@ -424,13 +434,23 @@ Usage: `chia data get_keys_values [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | -| -r | --root_hash | TEXT | False | The hexadecimal root hash | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | +| -r | --root_hash | TEXT | False | The hexadecimal root hash | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -p | --page | INTEGER | False | Enables pagination of the output and requests a specific page | +| | --max-page-size | INTEGER | False | Set how many bytes to be included in a page, if pagination is enabled [Default: 40 MB] | +| -h | --help | None | False | Show a help message and exit | + +:::info + +Pagination is disabled by default. If it is enabled (by using the `page` flag), then the JSON response will include `total_pages` and `total_bytes`, in addition to the data. + +If an item is larger than `max-page-size`, an error will be thrown. + +:::
Example @@ -473,14 +493,24 @@ Usage: `chia data get_kv_diff [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store ID | -| -hash_1 | --hash_1 | TEXT | True | The first hash to compare | -| -hash_2 | --hash_2 | TEXT | True | The second hash to compare | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store ID | +| -hash_1 | --hash_1 | TEXT | True | The first hash to compare | +| -hash_2 | --hash_2 | TEXT | True | The second hash to compare | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -p | --page | INTEGER | False | Enables pagination of the output and requests a specific page | +| | --max-page-size | INTEGER | False | Set how many bytes to be included in a page, if pagination is enabled [Default: 40 MB] | +| -h | --help | None | False | Show a help message and exit | + +:::info + +Pagination is disabled by default. If it is enabled (by using the `page` flag), then the JSON response will include `total_pages` and `total_bytes`, in addition to the data. + +If an item is larger than `max-page-size`, an error will be thrown. + +:::
Example @@ -522,7 +552,7 @@ Usage: `chia data get_mirrors [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -i | --id | TEXT | True | The hexadecimal ID of the store for which to get mirrors | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | @@ -568,7 +598,7 @@ Usage: `chia data get_owned_stores [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -h | --help | None | False | Show a help message and exit | @@ -598,6 +628,60 @@ Response: --- +### `get_proof` + +Functionality: Obtains a merkle proof of inclusion for a given key + +Usage: `chia data get_proof [OPTIONS]` + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | +| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | +| -k | --key | TEXT | True | The hexadecimal key | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit | + +The proof is a proof of inclusion that a given key, value pair is in the specified datalayer store by chaining the Merkle hashes up to the published on-chain root hash. + +A user can generate a proof for multiple k,v pairs in the same datastore. + +
+Example + +```bash +chia data get_proof --id 7de232eecc08dc5e524ad42fad205c9ec7dd3f342677edb7c2e139c51f55d40e -k 0x0003 +``` + +Response: + +```bash +{ + "proof": { + "coin_id": "0x774e5f9ba7a8afbfa7fd2050347b4a2d400d3cd530637a18b61b094bb5a0f756", + "inner_puzzle_hash": "0x875cc80014bc72f2028c27500d5b44bf6906cd13ad16d7b5f4a5da77a06c8c2f", + "store_proofs": { + "proofs": [ + { + "key_clvm_hash": "0xa143e7ffd81147f136f921fef88760c46c7a05f15b81995f9c5cfed2a737a3f1", + "layers": [], + "node_hash": "0xe488fa1bf0f712b224df0daf312b3d479f80e3a330d4bebd8f26a0d52dc0ebbb", + "value_clvm_hash": "0xed052604ee4ff3996c15ef9b2cb0925233a2e78b6168bb6e67d133e074109b42" + } + ], + "store_id": "0x7de232eecc08dc5e524ad42fad205c9ec7dd3f342677edb7c2e139c51f55d40e" + } + }, + "success": true +} +``` + +
+ +--- + ### `get_root` Functionality: Get the Merkle Root and timestamp of a given store ID @@ -606,12 +690,12 @@ Usage: `chia data get_root [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -643,12 +727,12 @@ Usage: `chia data get_root_history [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -704,11 +788,11 @@ Usage: `chia data get_subscriptions [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit |
Example @@ -746,12 +830,12 @@ Usage: `chia data get_sync_status [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -h | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit | If the `root_hash` matches the `target_root_hash`, then the store is synced. @@ -788,14 +872,14 @@ Usage: `chia data get_value [OPTIONS]` Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------- | -| -store | --id | TEXT | True | The hexadecimal store id | -| -k | --key | TEXT | True | The hexadecimal key | -| -r | --root_hash | TEXT | False | The hexadecimal root hash | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -store | --id | TEXT | True | The hexadecimal store id | +| -k | --key | TEXT | True | The hexadecimal key | +| -r | --root_hash | TEXT | False | The hexadecimal root hash | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under data_layer in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| | --help | None | False | Show a help message and exit | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| | --help | None | False | Show a help message and exit |
Example @@ -828,7 +912,7 @@ Commands: `check` (Calls the plugin_info endpoint on all configured plugins) Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :--------------------------- | +|:------------- |:------------ |:---- |:-------- |:---------------------------- | | -h | --help | None | False | Show a help message and exit | Note that currently `check` is the only sub-command under the `plugins` command. This command is shown in the example. @@ -865,7 +949,7 @@ Usage: `chia data remove_subscription [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -store | --id | TEXT | True | The hexadecimal ID of the store to which you would like to subscribe | | -u | --url | TEXT | False | A URL where the data store resides. This argument can be used multiple times in the same command | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | @@ -898,7 +982,7 @@ Usage: `chia data subscribe [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -store | --id | TEXT | True | The hexadecimal ID of the store to which you would like to subscribe | | -u | --url | TEXT | False | A URL where the data store resides. This argument can be used multiple times in the same command | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | @@ -986,7 +1070,7 @@ Usage: `chia data unsubscribe [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -store | --id | TEXT | True | The hexadecimal ID of the store to which you would like to unsubscribe | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | @@ -1031,12 +1115,14 @@ Usage: `chia data update_data_store [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -store | --id | TEXT | True | The hexadecimal store ID | | -d | --changelist | TEXT | True | A JSON object representing the changelist | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | | -m | --fee | TEXT | False | Set the fees for the transaction, in XCH | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| | --submit | None | False | Set to submit the result on chain [Default: don't submit] | +| | --no-submit | None | False | Set to explicitly specify not to submit the result on chain [Default: don't submit] | | -h | --help | None | False | Show a help message and exit | A few notes on the `-d` / `--changelist` option: @@ -1221,6 +1307,73 @@ value = { --- +### `verify_proof` + +Functionality: Verifies a merkle proof of inclusion + +Usage: `chia data verify_proof [OPTIONS]` + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | +| -p | --proof | TEXT | True | Proof to validate in JSON format | +| -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -h | --help | None | False | Show a help message and exit | + +Notes about this command: + +- It only needs to perform a single lookup of the on-chain root. +- It doesn't need to have synced any of the data, or be subscribed to the data store. +- To keep the proofs smaller, only the clvm hash of the key and value are included in the proof, and not the actual key or value. (A clvm hash is just a sha256 hash of the data prepended with 0x01.) +- Datalayer uses CLVM hashes for ease of verification in CLVM, although for this specific use case, there is no on-chain validation happening. +- When using this command, pay attention to the `current_root` value in the returned JSON. + - If `current_root` is `True`, this data chains to the current published root, and so if you synced the data, you can be sure it would be there. + - If `current_root` is `False`, the root has moved from the time the proof was generated. You cannot make any assumptions in this case about whether the data is in fact in the datastore or not since the root has changed, therefore the data might have changed. It is up to the caller to determine how to treat this case; one possible action would be to obtain a new proof. + +The proof to validate requires several fields: + +- `coin_id` +- `inner_puzzle_hash` +- `store_proofs` + - `proofs` + - `key_clvm_hash` + - `value_clvm_hash` + - `node_hash` + - `layers` + +Each of these fields is output with the [get_proof](#get_proof) command. For more examples, see chia-blockchain [PR #16845](https://github.com/Chia-Network/chia-blockchain/pull/16845). + +
+Example + +```bash +chia data verify_proof -p '{"coin_id": "0x774e5f9ba7a8afbfa7fd2050347b4a2d400d3cd530637a18b61b094bb5a0f756", "inner_puzzle_hash": "0x875cc80014bc72f2028c27500d5b44bf6906cd13ad16d7b5f4a5da77a06c8c2f", "store_proofs": {"proofs": [{"key_clvm_hash": "0xa143e7ffd81147f136f921fef88760c46c7a05f15b81995f9c5cfed2a737a3f1","layers": [], "node_hash": "0xe488fa1bf0f712b224df0daf312b3d479f80e3a330d4bebd8f26a0d52dc0ebbb", "value_clvm_hash": "0xed052604ee4ff3996c15ef9b2cb0925233a2e78b6168bb6e67d133e074109b42"}], "store_id": "0x7de232eecc08dc5e524ad42fad205c9ec7dd3f342677edb7c2e139c51f55d40e"}}' +``` + +Response: + +```bash +{ + "current_root": true, + "success": true, + "verified_clvm_hashes": { + "inclusions": [ + { + "key_clvm_hash": "0xa143e7ffd81147f136f921fef88760c46c7a05f15b81995f9c5cfed2a737a3f1", + "value_clvm_hash": "0xed052604ee4ff3996c15ef9b2cb0925233a2e78b6168bb6e67d133e074109b42" + } + ], + "store_id": "0x7de232eecc08dc5e524ad42fad205c9ec7dd3f342677edb7c2e139c51f55d40e" + } +} +``` + +
+ +--- + ### `wallet_log_in` Functionality: Request that the wallet service be logged in to the specified fingerprint @@ -1230,7 +1383,7 @@ Usage: `chia data wallet_log_in [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :-------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------ | +|:------------- |:--------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------- | | -dp | --data-rpc-port | INTEGER | False | Set the port where the DataLayer is hosting the RPC interface. See rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | True | Fingerprint of the wallet to use | | -h | --help | None | False | Show a help message and exit | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/dids.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/dids.md index 352b5c260c..438376e431 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/dids.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/dids.md @@ -20,7 +20,7 @@ Usage: chia wallet did create [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -n | --name | TEXT | False | Set the DID wallet name [default: None] | @@ -85,15 +85,15 @@ Usage: chia wallet did find_lost [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -id | --coin_id | TEXT | True | The DID ID, launcher ID, or latest coin ID of the DID you want to recover. The most time-efficient of these is the latest coin ID | -| -m | --metadata | TEXT | False | The new whole metadata in json format | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:---------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -id | --coin_id | TEXT | True | The DID ID, launcher ID, or latest coin ID of the DID you want to recover. The most time-efficient of these is the latest coin ID | +| -m | --metadata | TEXT | False | The new whole metadata in json format | | -r | --recovery_list_hash | TEXT | False | Override the recovery list hash of the DID. Only set this if your last DID spend updated the recovery list | -| -n | --num_verification | INTEGER | False | Override the required verification number of the DID. Only set this if your last DID spend updated the required verification number | -| -h | --help | None | False | Show a help message and exit. | +| -n | --num_verification | INTEGER | False | Override the required verification number of the DID. Only set this if your last DID spend updated the required verification number | +| -h | --help | None | False | Show a help message and exit. |
Example @@ -123,7 +123,7 @@ Usage: chia wallet did get_details [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | | -id | --coin_id | TEXT | True | The DID ID, launcher ID, or latest coin ID of the DID you want to recover. The most time-efficient of these is the latest coin ID | @@ -170,7 +170,7 @@ Usage: chia wallet did get_did [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | ID of the wallet to use | @@ -205,7 +205,7 @@ Usage: chia wallet did message_spend [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :--------------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:---------------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | ID of the wallet to use | @@ -254,7 +254,7 @@ Usage: chia wallet did get_did [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | ID of the wallet to use | @@ -323,7 +323,7 @@ Usage: chia wallet did sign_message [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --did_id | TEXT | True | DID ID you want to use for signing | @@ -358,7 +358,7 @@ Usage: chia wallet did transfer [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | ID of the DID wallet to transfer | @@ -435,7 +435,7 @@ Usage: chia wallet did update_metadata [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | ID of the DID wallet to use | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/nfts.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/nfts.md index 9e659d3a53..26f3a28f4f 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/nfts.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/nfts.md @@ -18,7 +18,7 @@ Usage: chia wallet nft create [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -di | --did-id | TEXT | False | DID Id to use | @@ -113,7 +113,7 @@ Usage: chia wallet nft mint [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | @@ -309,7 +309,7 @@ Usage: chia wallet nft set_did [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | @@ -346,7 +346,7 @@ Usage: chia wallet nft sign_message [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --nft_id | TEXT | True | NFT ID you want to use for signing | @@ -478,7 +478,7 @@ Usage: chia wallet nft list [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | @@ -577,7 +577,7 @@ Usage: chia wallet nft get_info [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -ni | --nft-coin-id | TEXT | True | Id of the NFT coin for which to show info | @@ -634,7 +634,7 @@ Usage: chia wallet nft transfer [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | @@ -712,7 +712,7 @@ Usage: chia wallet nft add_uri [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :-------------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:--------------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | @@ -779,7 +779,7 @@ Usage: chia wallet nft set_did [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | True | Id of the NFT wallet to use | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/offers.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/offers.md index de8b2cde06..13eb85ca86 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/offers.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/offers.md @@ -37,7 +37,7 @@ Usage: `chia wallet make_offer [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :-----------: | :---------------: | :-----: | :------: | :------------------------------------------------------------------------------------------------------- | +|:-------------:|:-----------------:|:-------:|:--------:|:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -o | --offer | TEXT | True | A wallet id to offer and the amount to offer (formatted like wallet_id:amount) | @@ -45,6 +45,7 @@ Options: | -p | --filepath | TEXT | True | The path to write the generated offer file to | | -m | --fee | TEXT | False | A fee to add to the offer when it gets taken | | | --reuse | None | False | Set this flag to reuse an existing address for the offer [Default: generate a new address] | +| | --override | None | False | Creates offer without checking for unusual values | | -h | --help | None | False | Show a help message and exit | --- @@ -58,7 +59,7 @@ Usage: `chia wallet take_offer [OPTIONS] PATH_OR_HEX` Options: | Short Command | Long Command | Type | Required | Description | -| :-----------: | :---------------: | :-----: | :------: | :------------------------------------------------------------------------------------------------------- | +|:-------------:|:-----------------:|:-------:|:--------:|:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -e | --examine-only | None | False | Print the summary of the offer file but do not take it | @@ -77,7 +78,7 @@ Usage: `chia wallet cancel_offer [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :-----------: | :---------------: | :-----: | :------: | :----------------------------------------------------------------------------------------------------------------------- | +|:-------------:|:-----------------:|:-------:|:--------:|:------------------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -id | --id | TEXT | True | The offer ID that you wish to cancel | @@ -96,7 +97,7 @@ Usage: `chia wallet get_offers [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :-----------: | :--------------------: | :-----: | :------: | :------------------------------------------------------------------------------------------------------- | +|:-------------:|:----------------------:|:-------:|:--------:|:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -id | --id | TEXT | False | The ID of the offer that you wish to examine | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/plotters.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/plotters.md index 25afb9cc67..d50c1a8bf0 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/plotters.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/plotters.md @@ -19,30 +19,28 @@ Usage: chia plotters chiapos [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------ | :------ | :------- | :---------------------------------------------------------------------------------------- | -| -t | --tmp_dir | TEXT | True | Temporary directory 1 (where most of the plots temp data will be stored) | -| -2 | --tmp_dir2 | TEXT | False | Temporary directory 2 [Default: same as `tmp_dir`] | -| -k | --size | INTEGER | False | K value [Default: 32] | -| -m | --memo | TEXT | False | Memo variable | -| -i | --id | TEXT | False | Plot ID [Default: generate a random ID] | -| -b | --buffer | INTEGER | False | Size of the buffer, in MB [Default: 4608] | -| -u | --buckets | INTEGER | False | Number of buckets [Default: 64] | -| -s | --stripes | INTEGER | False | Stripe size [Default: 65536] | -| -r | --threads | INTEGER | False | Num threads [Default: 2] | -| -e | --nobitfield | None | False | Disable bitfield [Default: bitfield is enabled] | -| | --override-k | None | False | Force size smaller than 32 (only needed where `-k` is less than 32 [Default: disabled] | -| -a | --alt_fingerprint | INTEGER | False | Enter the alternative fingerprint of the key you want to use | -| -c | --contract | TEXT | False | Pool Contract Address (64 chars) [Default: none] | -| -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | -| -p | --pool-key | TEXT | False | Pool Public Key (48 bytes) [Default: use the key from the current wallet (self-pooling)] | -| -n | --count | INTEGER | False | Number of plots to create [Default: 1] | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:--------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------- | +| -t | --tmp_dir | TEXT | True | Temporary directory 1 (where most of the plots temp data will be stored) | +| -2 | --tmp_dir2 | TEXT | False | Temporary directory 2 [Default: same as `tmp_dir`] | +| -k | --size | INTEGER | False | K value [Default: 32] | +| -m | --memo | TEXT | False | Memo variable | +| -i | --id | TEXT | False | Plot ID [Default: generate a random ID] | +| -b | --buffer | INTEGER | False | Size of the buffer, in MB [Default: 4608] | +| -u | --buckets | INTEGER | False | Number of buckets [Default: 64] | +| -s | --stripes | INTEGER | False | Stripe size [Default: 65536] | +| -r | --threads | INTEGER | False | Num threads [Default: 2] | +| -e | --nobitfield | None | False | Disable bitfield [Default: bitfield is enabled] | +| | --override-k | None | False | Force size smaller than 32 (only needed where `-k` is less than 32 [Default: disabled] | +| -a | --alt_fingerprint | INTEGER | False | Enter the alternative fingerprint of the key you want to use | +| -c | --contract | TEXT | False | Pool Contract Address (64 chars) [Default: none] | +| -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | +| -p | --pool-key | TEXT | False | Pool Public Key (48 bytes) [Default: use the key from the current wallet (self-pooling)] | +| -n | --count | INTEGER | False | Number of plots to create [Default: 1] | | -x | --exclude_final_dir | None | False | Skips adding [final dir] to harvester for farming [Default: copy to final dir is enabled] | -| -d | --final_dir | TEXT | True | Final directory after plot has been created | -| | --compress | INTEGER | False | Compression level [Default: 0 (not compressed)] | -| -h | --help | None | False | Show a help message and exit | - ---- +| -d | --final_dir | TEXT | True | Final directory after plot has been created | +| | --compress | INTEGER | False | Compression level [Default: 0 (not compressed)] | +| -h | --help | None | False | Show a help message and exit | ### `madmax` @@ -53,7 +51,7 @@ Usage: chia plotters madmax [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :------------ | :------ | :------- | :--------------------------------------------------------------------------------------- | +|:------------- |:------------- |:------- |:-------- |:---------------------------------------------------------------------------------------- | | -k | --size | INTEGER | False | K value [Default: 32] | | -n | --count | INTEGER | False | Number of plots to create [Default: 1] | | -r | --threads | INTEGER | False | Num threads [Default: 4] | @@ -86,33 +84,33 @@ Usage: chia plotters bladebit cudaplot [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------------- | -| -r | --threads | INTEGER | False | Num threads [Default: 12] | -| -n | --count | INTEGER | False | Number of plots to create [Default: 1] | -| -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | -| -p | --pool-key | TEXT | False | Pool Public Key (48 bytes) [Default: use the key from the current wallet (self-pooling)] | -| -c | --contract | TEXT | False | Pool Contract Address (64 chars) [Default: none] | -| -t | --tmp_dir | TEXT | False | Temporary directory 1 (where most of the plot's temp data will be stored) [Default: in memory] | -| -2 | --tmp_dir2 | TEXT | False | Temporary directory 2 [Default: same as `tmp_dir`] | -| -i | --id | TEXT | False | Plot ID [Default: generate a random ID] | -| -w | --warmstart | None | False | Set to enable warm start [Default: disabled] | -| | --nonuma | None | False | Set to disable numa [Default: enabled] | -| | --no-cpu-affinity | None | False | Set to disable assigning automatic thread affinity [Default: enabled] | -| -v | --verbose | None | False | Set to enable verbose output [Default: disabled] | -| -d | --final_dir | TEXT | True | Final directory after plot has been created | -| | --compress | INTEGER | False | Compression level, 0-9 are accepted [Default: 1] | -| | --device | INTEGER | False | The CUDA device index (typically 0 or 1), set if more than one GPU is installed [Default: 0] | -| | --disk-128 | None | False | Enable hybrid disk plotting, requires 128 GB of system RAM [Default: disabled] | -| | --disk-16\* | None | False | Enable hybrid disk plotting, requires at least 16 GB of system RAM [Default: disabled] **\*SEE WARNING BELOW** | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:---------------------------------------------------------------------------------------------------------------- | +| -r | --threads | INTEGER | False | Num threads [Default: 12] | +| -n | --count | INTEGER | False | Number of plots to create [Default: 1] | +| -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | +| -p | --pool-key | TEXT | False | Pool Public Key (48 bytes) [Default: use the key from the current wallet (self-pooling)] | +| -c | --contract | TEXT | False | Pool Contract Address (64 chars) [Default: none] | +| -t | --tmp_dir | TEXT | False | Temporary directory 1 (where most of the plot's temp data will be stored) [Default: in memory] | +| -2 | --tmp_dir2 | TEXT | False | Temporary directory 2 [Default: same as `tmp_dir`] | +| -i | --id | TEXT | False | Plot ID [Default: generate a random ID] | +| -w | --warmstart | None | False | Set to enable warm start [Default: disabled] | +| | --nonuma | None | False | Set to disable numa [Default: enabled] | +| | --no-cpu-affinity | None | False | Set to disable assigning automatic thread affinity [Default: enabled] | +| -v | --verbose | None | False | Set to enable verbose output [Default: disabled] | +| -d | --final_dir | TEXT | True | Final directory after plot has been created | +| | --compress | INTEGER | False | Compression level, 0-9 are accepted [Default: 1] | +| | --device | INTEGER | False | The CUDA device index (typically 0 or 1), set if more than one GPU is installed [Default: 0] | +| | --disk-128 | None | False | Enable hybrid disk plotting, requires 128 GB of system RAM [Default: disabled] | +| | --disk-16\* | None | False | Enable hybrid disk plotting, requires at least 16 GB of system RAM [Default: disabled] **\*SEE WARNING BELOW** | +| -h | --help | None | False | Show a help message and exit | :::warning warning A few notes about the `disk-16` option: - As of BladeBit 3.0.1 (Chia 2.1.0), `disk-16` is experimental. -- This option has been disabled in the Chia 2.1.0 release. It is currently only available from the [standalone version](https://github.com/Chia-Network/bladebit/) of BladeBit. +- This option has been disabled in the Chia 2.1.0 release. This option has been disabled in the Chia 2.1.0 release. It is currently only available from the [standalone version](https://github.com/Chia-Network/bladebit/) of BladeBit. - Plots created with this option on Linux with direct I/O disabled appear to work, but more testing is still needed. - Plots created with this option on Windows are more likely to encounter issues. - Be sure to check all plots created with this option, as they could be invalid even if the plotter appeared to succeed. @@ -121,16 +119,14 @@ A few notes about the `disk-16` option: :::info -Computers with at least 256 GB of system memory should not use either the `disk-128` or `disk-16` options. They should also not use `tmp_dir` or `tmp_dir2`. In this case, plotting will be performed entirely in memory. +Computers with at least 256 GB of system memory should not use either the `disk-128` or `disk-16` options. They should also not use `tmp_dir` or `tmp_dir2`. In this case, plotting will be performed entirely in memory. They should also not use `tmp_dir` or `tmp_dir2`. In this case, plotting will be performed entirely in memory. -Computers with at least 128 GB of system memory (but less than 256 GB) should use the `disk-128`, `tmp_dir`, and `tmp_dir2` options. In this case, most of the plotting will be done in memory, and some will be done on disk. +Computers with at least 128 GB of system memory (but less than 256 GB) should use the `disk-128`, `tmp_dir`, and `tmp_dir2` options. In this case, most of the plotting will be done in memory, and some will be done on disk. In this case, most of the plotting will be done in memory, and some will be done on disk. -Linux computers with at least 16 GB of system memory (but less than 128 GB) can use the `disk-16`, `tmp_dir`, and `tmp_dir2` options. However, **do so at your own risk**. (See the above warning for details.) In this case, as much of the plotting as possible will be done in memory, and the rest will be done on disk. +Linux computers with at least 16 GB of system memory (but less than 128 GB) can use the `disk-16`, `tmp_dir`, and `tmp_dir2` options. However, **do so at your own risk**. (See the above warning for details.) In this case, as much of the plotting as possible will be done in memory, and the rest will be done on disk. However, **do so at your own risk**. (See the above warning for details.) In this case, as much of the plotting as possible will be done in memory, and the rest will be done on disk. ::: ---- - ### `ramplot` Functionality: Use the BladeBit RAM plotter @@ -140,7 +136,7 @@ Usage: chia plotters bladebit ramplot [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :--------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:---------------------------------------------------------------------------------------- | | -r | --threads | INTEGER | False | Num threads [Default: 12] | | -n | --count | INTEGER | False | Number of plots to create [Default: 1] | | -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | @@ -155,8 +151,6 @@ Options: | | --compress | INTEGER | False | Compression level, 0-9 are accepted [Default: 1] | | -h | --help | None | False | Show a help message and exit | ---- - ### `diskplot` Functionality: Use the BladeBit disk plotter @@ -166,7 +160,7 @@ Usage: chia plotters bladebit diskplot [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:--------------------------------------------------------------------------------------------------- | | -r | --threads | INTEGER | False | Num threads [Default: 12] | | -n | --count | INTEGER | False | Number of plots to create [Default: 1] | | -f | --farmerkey | TEXT | False | Farmer Public Key (48 bytes) [Default: use the key from the current wallet] | @@ -194,8 +188,6 @@ Options: | | --compress | INTEGER | False | Compression level, 0-9 are accepted [Default: 1] | | -h | --help | None | False | Show a help message and exit | ---- - ### `simulate` Functionality: Determine your farm's maximum capacity; this command is **only** avaible with the [standalone version](https://github.com/Chia-Network/bladebit/) of BladeBit. @@ -204,18 +196,94 @@ Usage: bladebit simulate [OPTIONS] \ Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--------- | :------- | :----------------------------------------------------------------------------- | -| -n | --iterations | INTEGER | False | The number of iterations to run [Default: 100] | -| -p | --parallel | INTEGER | False | The number of instances to run in parallel [Default: 1] | -| -l | --lookup | FLOAT | False | Maximum allowed time per proof lookup, in seconds [Default: 8.00] | -| -f | --filter | INTEGER | False | Plot filter bit count [Default: 512] | -| | --partials | INTEGER | False | Partials per-day simulation [Default: 300] | -| | --power | INTEGER | False | Time in seconds to run power simulation. -n is set automatically in this mode. | -| -s | --size | INTEGER | False | Size of farm. Only used when `--power` is set. | -| | --seed | HEX STRING | False | 64 char hex string to use as a random seed for challenges | -| | --no-cuda | None | False | If set, don't use CUDA for decompression. [Default: not set] | -| -d | --device | INTEGER | False | Cuda device index, to be used when more than one device exists [Default: 0] | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---------- |:-------- |:-------------------------------------------------------------------------------------------------------------------- | +| -n | --iterations | INTEGER | False | The number of iterations to run [Default: 100] | +| -p | --parallel | INTEGER | False | The number of instances to run in parallel [Default: 1] | +| -l | --lookup | FLOAT | False | Maximum allowed time per proof lookup, in seconds [Default: 8.00] | +| -f | --filter | INTEGER | False | Plot filter bit count [Default: 512] | +| | --partials | INTEGER | False | Partials per-day simulation [Default: 300] | +| | --power | INTEGER | False | Time in seconds to run power simulation. -n is set automatically in this mode. -n is set automatically in this mode. | +| -s | --size | INTEGER | False | Size of farm. Size of farm. Only used when `--power` is set. | +| | --seed | HEX STRING | False | 64 char hex string to use as a random seed for challenges | +| | --no-cuda | None | False | If set, don't use CUDA for decompression. \[Default: not set\] \[Default: not set\] | +| -d | --device | INTEGER | False | Cuda device index, to be used when more than one device exists [Default: 0] | +| -h | --help | None | False | Show a help message and exit | --- + +## `drplotter` + +Functionality: Use the DrPlotter plotter + +Usage: drplotter \[plot | verify\] \[OPTIONS\] + +### `plot` + +Functionality: Plot with the DrPlotter plotter + +Usage: drplotter plot [OPTIONS] + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:-------------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------- | +| -h | --help | None | False | Show a help message and exit | +| -f | --farmerkey | TEXT | True | Farmer Public Key (48 bytes, hex encoded) | +| -c | --contractkey | TEXT | True | Pool Contract Address (64 chars, hex encoded) | +| -d | --outputDirectory | TEXT | True | Final directory after plot has been created | +| | --compression | TEXT | False | Set compression mode. Choose between eco3x (68 bits per proof), or pro4x (49 bits per proof) [Default: eco3x] | +| -i | --gpu_id | INTEGER | False | GPU ID to use [Default: 0] | +| -n | --n_to_plot | INTEGER | False | Number of plots to create [Default: 0, fills directory] | +| -L | --gpu_memory_limit | INTEGER | False | GPU memory limit in MB [Default: 0 (disabled)] | +| | --min_gpu_ram | None | False | Use min gpu ram | + +### `verify` + +Functionality: Verify plots with the DrPlotter plotter + +Usage: drplotter verify [OPTIONS] + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:---- |:-------- |:---------------------------- | +| -h | --help | None | False | Show a help message and exit | +| -f | --file | TEXT | False | File to read from | +| -d | --directory | TEXT | False | Check all files in directory | + +--- + +## `drsolver` + +Functionality: Use the DrSolver harvester + +Usage: drsolver [OPTIONS] + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:---------------- |:------- |:-------- |:---------------------------------------------------- | +| -h | --help | None | False | Show a help message and exit | +| -g | --gpu | INTEGER | True | GPU ID to use for solving | +| -v | --verbose | None | False | Verbose output | +| -t | --token | TEXT | True | Client token to use for registration | +| | --generate-token | None | False | Generate a client token | +| | --drserver-ip | TEXT | True | Your own DrServer, at IP:PORT, e.g. 192.168.0.1:8080 | +| | --ssl | BOOLEAN | False | Use SSL for your solver server [Default: false] | + +--- + +## `drserver` + +Functionality: Use the DrServer harvester + +Usage: drserver [OPTIONS] + +Options: + +| Short Command | Long Command | Type | Required | Description | +|:------------- |:------------ |:------- |:-------- |:---------------------------- | +| -h | --help | None | False | Show a help message and exit | +| -p | --port | INTEGER | True | Server port | +| -t | --token | TEXT | True | Server token | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/simulator.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/simulator.md index 21dfff1d95..9347dc37b0 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/simulator.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/simulator.md @@ -31,7 +31,7 @@ Usage: `chia dev sim create [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :--------------- | :------ | :------- | :---------------------------------------------------------------------------- | +|:------------- |:---------------- |:------- |:-------- |:----------------------------------------------------------------------------- | | -f | --fingerprint | INTEGER | False | Use your fingerprint to skip the key prompt | | -r | --reward_address | TEXT | False | Use this address instead of the default farming address | | -p | --plot-directory | TEXT | False | Set the directory in which to create/store plots (Default: 'simulator/plots') | @@ -305,7 +305,7 @@ Usage: `chia dev sim autofarm [OPTIONS] [on|off]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :--------------------------- | +|:------------- |:------------ |:---- |:-------- |:---------------------------- | | -h | --help | None | False | Show a help message and exit | Auto farming is enabled by default. The examples will show you how to disable/enable it. @@ -355,7 +355,7 @@ Usage: `chia dev sim farm [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------ | | -b | --blocks | INTEGER | False | Number of blocks to create (Default: 1) | | -n | --non-transaction | None | False | Enable to allow non-transaction blocks (Default: disabled) | | -a | --target-address | TEXT | False | Block reward address. If not specified, the default address will be used | @@ -490,7 +490,7 @@ Usage: `chia dev sim revert [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :--------------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:---------------- |:------- |:-------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -b | --blocks | INTEGER | False | Number of blocks to go back (Default: 1) | | -n | --new_blocks | INTEGER | False | Number of new blocks to add during a reorg (Default: 1) | | -r | --reset | None | False | Enable to revert all transactions to the genesis block (Default: disabled) | @@ -563,7 +563,7 @@ Usage: `chia dev sim start [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :----------------------------------------------------- | +|:------------- |:------------ |:---- |:-------- |:------------------------------------------------------ | | -r | --restart | None | False | Enable to restart running services (Default: disabled) | | -w | --wallet | None | False | Enable to start wallet (Default: disabled) | | -h | --help | None | False | Show a help message and exit | @@ -619,7 +619,7 @@ Usage: `chia dev sim status [OPTIONS]` Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:---------------------------------------------------------------------------------------------------------------------------------------- | | -f | --fingerprint | INTEGER | False | Get detailed information on this fingerprint. | | -k | --show_key | None | False | Enable to show detailed key information, including seed phrase (Default: disabled) | | -c | --show_coins | None | False | Enable to show all unspent coins (Default: disabled). When enabled, this does not show reward coins unless used in conjunction with `-i` | @@ -841,7 +841,7 @@ Usage: `chia dev sim stop [OPTIONS]` Options: Stop running services | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------- | :--- | :------- | :-------------------------------------------- | +|:------------- |:------------ |:---- |:-------- |:--------------------------------------------- | | -d | --daemon | None | False | Enable to stop the daemon (Default: disabled) | | -w | --wallet | None | False | Enable to stop the wallet (Default: disabled) | | -h | --help | None | False | Show a help message and exit | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/vcs.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/vcs.md index ba131ee7e3..4bdd6b69da 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/vcs.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/vcs.md @@ -20,10 +20,10 @@ Usage: chia wallet vcs add_proof_reveal [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -p | --proof | TEXT | True\* | A flag to add as a proof | +| -p | --proof | TEXT | True\* | A flag to add as a proof | | -r | --root-only | None | False | If this flag is set, do not add the proofs to the DB, just output the root from the specified proofs [Default: not set] | | -h | --help | None | False | Show a help message and exit | @@ -72,7 +72,7 @@ Usage: chia wallet vcs get [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | | -s | --start | INTEGER | False | The index to start the list at [default: 0] | @@ -109,7 +109,7 @@ Usage: chia wallet vcs get_proofs_for_root [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:-------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | | -r | --proof-hash | TEXT | True | The root to search for | @@ -146,19 +146,19 @@ Usage: chia wallet vcs mint [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use as the issuing wallet | -| -d | --did | TEXT | True | The DID of the VC's proof provider. Must be owned by the issuing wallet | -| -t | --target-address | TEXT | False | The address to send the VC to once it's minted [Default: send to minting wallet] | -| -m | --fee | TEXT | False | Blockchain fee for mint transaction, in XCH | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use as the issuing wallet | +| -d | --did | TEXT | True | The DID of the VC's proof provider. Must be owned by the issuing wallet Must be owned by the issuing wallet | +| -t | --target-address | TEXT | False | The address to send the VC to once it's minted [Default: send to minting wallet] | +| -m | --fee | TEXT | False | Blockchain fee for mint transaction, in XCH | +| -h | --help | None | False | Show a help message and exit |
Example -A DID is required in order to mint a new VC. If the proof provider does not already have a DID, use the `did create` command to create one. For example: +A DID is required in order to mint a new VC. A DID is required in order to mint a new VC. If the proof provider does not already have a DID, use the `did create` command to create one. For example: For example: ```bash chia wallet did create -f 2108245669 -n Provider_DID -m 0.0001 @@ -171,7 +171,7 @@ Successfully created a DID wallet with name Provider_DID and id 2 on key 2108245 Successfully created a DID did:chia:1n2s77g7rer2v62xzrvd0at6tgx8m4g8t6encghs375r64lc6e5mssdkap3 in the newly created DID wallet ``` -Next, mint a new VC. Note that the DID specified with `-d` must be owned by the fingerprint specified with `-f` (or the one selected if `-f` is not used). For example: +Next, mint a new VC. Next, mint a new VC. Note that the DID specified with `-d` must be owned by the fingerprint specified with `-f` (or the one selected if `-f` is not used). For example: For example: ```bash chia wallet vcs mint -f 2108245669 -d did:chia:1n2s77g7rer2v62xzrvd0at6tgx8m4g8t6encghs375r64lc6e5mssdkap3 -m 0.0001 @@ -208,7 +208,7 @@ Inner Address: txch1at35qwx6djmadnh9v77a72z8vcaxsle36ke3dj26gcpt2fnh654qsqecnj It is recommended that you save the `Launcher ID` because it will be needed if the VC needs to be revoked later. -No proofs have been added yet. This is accomplished with the [update_proofs](#update_proofs) command. +No proofs have been added yet. No proofs have been added yet. This is accomplished with the [update_proofs](#update_proofs) command.
@@ -222,21 +222,21 @@ Usage: chia wallet vcs revoke [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :--------------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -p | --parent-coin-id | TEXT | True\* | The ID of the parent coin of the VC (\*optional if VC ID is used) | -| -l | --vc-id TEXT | TEXT | True\* | The launcher ID of the VC to revoke (must be tracked by wallet) (\*optional if Parent ID is used) | -| -m | --fee | TEXT | False | Blockchain fee for revocation transaction, in XCH | -| | --reuse-puzhash | None | False | If this flag is set, then send the VC back to the same puzzle hash it came from (ignored if `--generate-new-puzhash` is also specified) [Default: generate new puzzle hash] | -| | --generate-new-puzhash | None | False | If this flag is set, then send the VC to a new puzzle hash. This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:---------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -p | --parent-coin-id | TEXT | True\* | The ID of the parent coin of the VC (\*optional if VC ID is used) | +| -l | --vc-id TEXT | TEXT | True\* | The launcher ID of the VC to revoke (must be tracked by wallet) (\*optional if Parent ID is used) | +| -m | --fee | TEXT | False | Blockchain fee for revocation transaction, in XCH | +| | --reuse-puzhash | None | False | If this flag is set, then send the VC back to the same puzzle hash it came from (ignored if `--generate-new-puzhash` is also specified) [Default: generate new puzzle hash] | +| | --generate-new-puzhash | None | False | If this flag is set, then send the VC to a new puzzle hash. This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set | +| -h | --help | None | False | Show a help message and exit |
Example -Revoke the proofs from a VC. A few notes: +Revoke the proofs from a VC. A few notes: A few notes: - The only wallet authorized to call this command is the wallet that contains the DID that created the VC @@ -248,19 +248,20 @@ Response: ```bash VC successfully revoked! +Proofs successfully updated! Relevant TX records: -Transaction 286cc31575aa167c4b34cbc0a768a162caefb6afea77560db0693934ac3fbf1e +Transaction 76f5ea8475d695e798518cd405070dc22542e31fc85220ff7d2ca7b44852a45b Status: Pending -Amount sent: 1E-12 XCH -To address: txch1ehkl33dypc7mg820c7j94zfg8pz5j5lqtx7253nmxft52ryvzw8stx7czc -Created at: 2023-06-23 13:33:50 +Amount sent: 0 XCH +To address: txch10xjm79zct87gc8ux5vzrhnnt03zjn4ntn5y95w37rsfmp4rxjycquqctuc +Created at: 2023-06-15 10:15:27 -Transaction ae6378e84742ab6abb07df666291093938ec9e06ae8e2b4066d7386d94289ba3 +Transaction f9eebb0520d024aaf4ae176d554c0f806b8d724d21d5da03b5f541fafd69c99f Status: Pending -Amount sent: 0 XCH -To address: txch1mahlm65l8q9frcqcfveekx3a29cd74w6gfajqy05ukz2afrzg03syqkz3p -Created at: 2023-06-23 13:33:50 +Amount sent: 1E-12 XCH +To address: txch1dlyh9rwd9y6clt3pjjs3gh25ck9vlfx7qwqvvru27dmhgtn80z9s2rruam +Created at: 2023-06-15 10:15:28 ``` After the transactions have completed, the holder of the VC can now show that the VC does not contain any proofs: @@ -287,22 +288,22 @@ Usage: chia wallet vcs update_proofs [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :--------------------- | :------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | -| -l | --vc-id | TEXT | True | The launcher ID of the VC whose proofs should be updated | -| -t | --new-puzhash | TEXT | False | The puzzle hash to which to send the VC after the proofs have been updated | -| -p | --new-proof-hash | TEXT | True | The new proof hash to update the VC to | -| -m | --fee | TEXT | False | Blockchain fee for update transaction, in XCH | -| | --reuse-puzhash | None | False | If this flag is set, then send the VC back to the same puzzle hash it came from (ignored if `--generate-new-puzhash` is also specified) [Default: generate new puzzle hash] | -| | --generate-new-puzhash | None | False | If this flag is set, then send the VC to a new puzzle hash. This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:---------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use | +| -l | --vc-id | TEXT | True | The launcher ID of the VC whose proofs should be updated | +| -t | --new-puzhash | TEXT | False | The puzzle hash to which to send the VC after the proofs have been updated | +| -p | --new-proof-hash | TEXT | True | The new proof hash to update the VC to | +| -m | --fee | TEXT | False | Blockchain fee for update transaction, in XCH | +| | --reuse-puzhash | None | False | If this flag is set, then send the VC back to the same puzzle hash it came from (ignored if `--generate-new-puzhash` is also specified) [Default: generate new puzzle hash] | +| | --generate-new-puzhash | None | False | If this flag is set, then send the VC to a new puzzle hash. This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set This is the default behavior, and setting this flag will override the `--reuse-puzhash` flag if it is also set | +| -h | --help | None | False | Show a help message and exit |
Example -Update the proofs. A few notes: +Update the proofs. A few notes: A few notes: - The only wallet authorized to call this command is the wallet that contains the DID that created the VC - The `-t` parameter must point to a puzzle hash, not an address diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/wallet.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/wallet.md index 68426b2c3a..a39cbfd6b3 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/wallet.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cli-reference/wallet.md @@ -24,7 +24,7 @@ Usage: chia wallet add_token [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -id | --asset-id | TEXT | True | The Asset ID of the coin you wish to add/rename (the treehash of the TAIL program) | | -n | --token-name | TEXT | False | The name you wish to designate to the token | @@ -63,7 +63,7 @@ Usage: chia wallet coins list [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :----------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------- | +|:------------- |:------------------ |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------- | | -p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | False | Id of the wallet to use [default: 1] | @@ -302,14 +302,14 @@ Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb ### `combine` -Functionality: Combine coins (typically used for combining dust). The maximum number of coins that can be combined within a single transaction is 500. +Functionality: Combine coins (typically used for combining dust). Functionality: Combine coins (typically used for combining dust). The maximum number of coins that can be combined within a single transaction is 500. Usage: chia wallet coins combine [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------------------------------------------------ | | -p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | @@ -801,7 +801,7 @@ Usage: chia wallet coins split [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | @@ -912,21 +912,21 @@ Usage: chia wallet delete_unconfirmed_transactions [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | -| -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -ids | --tx_ids | TEXT | True | IDs of the Clawback transactions you want to revert or claim. Separate multiple IDs by comma (,) | -| -m | --fee | TEXT | False | A fee to add to the offer when it gets taken, in XCH [default: 0] | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | +| -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -ids | --tx_ids | TEXT | True | IDs of the Clawback transactions you want to revert or claim. Separate multiple IDs by comma (,) Separate multiple IDs by comma (,) | +| -m | --fee | TEXT | False | A fee to add to the offer when it gets taken, in XCH [default: 0] | +| -h | --help | None | False | Show a help message and exit | Note that wallet will automatically detect whether the transactions should be reverted (clawed back) or claimed.
Example 1: clawback -First, create the clawback. This is a normal `send` command, with an extra `--clawback` timer: +First, create the clawback. First, create the clawback. This is a normal `send` command, with an extra `--clawback` timer: ```bash chia wallet send -f 4045726944 -a 1 -e "Sending 1 TXCH with 1-hour clawback" -m 0.0001 -t txch1pxam7zakgqfcfr0xm8xcemm76d637w6sg0l7j8h6gv7rdlf8cfxs326mze --clawback_time 3600 @@ -936,6 +936,7 @@ Response: ``` Submitting transaction... +Submitting transaction... Transaction submitted to nodes: [{'peer_id': 'b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab', 'inclusion_status': 'SUCCESS', 'error_msg': None}] Run 'chia wallet get_transaction -f 4045726944 -tx 0x5a41dbe755a7a44b827b61cfa384e79bef5f79370f63fa7ffe1ea29212a26bf6' to get status ``` @@ -998,6 +999,7 @@ Response: ```bash Submitting transaction... +Submitting transaction... Transaction submitted to nodes: [{'peer_id': 'b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab', 'inclusion_status': 'SUCCESS', 'error_msg': None}] Run 'chia wallet get_transaction -f 4045726944 -tx 0x3ca82042aba188d47a80b663523847fa6050a21e04647c7b31ad3aa9d8d5450f' to get status ``` @@ -1060,7 +1062,7 @@ Usage: chia wallet delete_unconfirmed_transactions [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | @@ -1092,7 +1094,7 @@ Usage: chia wallet get_address [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | @@ -1128,7 +1130,7 @@ Usage: chia wallet get_derivation_index [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -h | --help | None | False | Show a help message and exit | @@ -1159,7 +1161,7 @@ Usage: chia wallet get_transaction [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i, | --id | INTEGER | False | ID of the wallet to use [default: 1] | @@ -1197,7 +1199,7 @@ Usage: chia wallet get_transactions [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :------------------ | :------ | :------- | :---------------------------------------------------------------------------------------------------------------- | +|:------------- |:------------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------- | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | @@ -1207,7 +1209,7 @@ Options: | | --paginate | None | False | Prompt for each page of data. Defaults to enabled for interactive consoles, otherwise defaults to disabled | | | --no-paginate | None | False | Do not prompt for each page of data. Defaults to disabled for interactive consoles, otherwise defaults to enabled | | | --sort-by-height | None | False | Sort transactions by height [default: disabled] | -| | --sort-by-relevance | None | False | Sort transactions by \{confirmed \| height \| time\} [default: disabled] | +| | --sort-by-relevance | None | False | Sort transactions by \{confirmed \| height \| time\} [default: disabled] | | | --reverse | None | False | Reverse the transaction ordering [default: disabled] | | | --clawback | None | False | Only show clawback transactions [default: disabled] | | -h | --help | None | False | Show a help message and exit | @@ -1353,6 +1355,8 @@ Status: Confirmed Amount received: 10 CAT aaee6b63bcbc4aef... To address: txch1stn20rhgmh5wvmyyfj2etdpdp73fla0ga4ymtsejz600dszf392s58kx2s Created at: 2022-12-14 00:40:39 +To address: txch1stn20rhgmh5wvmyyfj2etdpdp73fla0ga4ymtsejz600dszf392s58kx2s +Created at: 2022-12-14 00:40:39 ```
@@ -1372,7 +1376,7 @@ Usage: chia wallet notifications delete [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | TEXT | False | A specific notification ID to delete | @@ -1407,7 +1411,7 @@ Usage: chia wallet notifications get [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --id | TEXT | False | The specific notification ID to show | @@ -1449,7 +1453,7 @@ Usage: chia wallet notifications send [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -t | --to-address | TEXT | True | The address to send the notification to | @@ -1485,22 +1489,22 @@ Usage: chia wallet send [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | -| -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | -| -a | --amount | TEXT | True | How much chia to send, in XCH | -| -e | --memo | TEXT | False | Additional memo for the transaction | -| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH [default: 0] | -| -t | --address | TEXT | True | Address to send the XCH | -| -o | --override | None | False | Submits transaction without checking for unusual values [default: disabled] | -| -ma | --min-coin-amount | TEXT | False | Ignore coins worth less then this much (XCH or CAT units) | -| -l | --max-coin-amount | TEXT | False | Ignore coins worth more then this much (XCH or CAT units) | -| | --exclude-coin | TEXT | False | Exclude this coin from being spent | -| | --reuse | None | False | Set this flag to reuse an existing address for the change [default: not set] | -| | --clawback_time | INTEGER | False | The seconds that the recipient needs to wait to claim the fund. A positive number will enable this feature | -| -h | --help | None | False | Show a help message and exit | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:----------------------------------------------------------------------------------------------------------------------------------------------------- | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| -i | --id | INTEGER | False | ID of the wallet to use [default: 1] | +| -a | --amount | TEXT | True | How much chia to send, in XCH | +| -e | --memo | TEXT | False | Additional memo for the transaction | +| -m | --fee | TEXT | False | Set the fees for the transaction, in XCH [default: 0] | +| -t | --address | TEXT | True | Address to send the XCH | +| -o | --override | None | False | Submits transaction without checking for unusual values [default: disabled] | +| -ma | --min-coin-amount | TEXT | False | Ignore coins worth less then this much (XCH or CAT units) | +| -l | --max-coin-amount | TEXT | False | Ignore coins worth more then this much (XCH or CAT units) | +| | --exclude-coin | TEXT | False | Exclude this coin from being spent | +| | --reuse | None | False | Set this flag to reuse an existing address for the change [default: not set] | +| | --clawback_time | INTEGER | False | The seconds that the recipient needs to wait to claim the fund. A positive number will enable this feature A positive number will enable this feature | +| -h | --help | None | False | Show a help message and exit |
Example 1: send with memo @@ -1534,6 +1538,7 @@ Response: ``` Submitting transaction... +Submitting transaction... Transaction submitted to nodes: [{'peer_id': 'b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab', 'inclusion_status': 'SUCCESS', 'error_msg': None}] Run 'chia wallet get_transaction -f 4045726944 -tx 0x3012893bf84b66c849f54b1c4bd893000188a7f728e439d3d6634048e8474482' to get status ``` @@ -1554,7 +1559,7 @@ To address: txch1pxam7zakgqfcfr0xm8xcemm76d637w6sg0l7j8h6gv7rdlf8cfxs326mze Created at: 2023-06-14 10:07:51 ``` -Note that the status is `Confirmed` even though it is a pending clawback transaction. This is because the original transaction _has_ been confirmed and a new pending clawback transaction has been created. +Note that the status is `Confirmed` even though it is a pending clawback transaction. Note that the status is `Confirmed` even though it is a pending clawback transaction. This is because the original transaction _has_ been confirmed and a new pending clawback transaction has been created. To view the pending clawback transaction, call `get_transactions` and include the `--clawback` flag (`-l 1` is used here to show only the latest transaction): @@ -1585,12 +1590,12 @@ Usage: chia wallet show [OPTIONS] Options: -| Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | -| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | +| Short Command | Long Command | Type | Required | Description | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | +| -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -w | --wallet_type | TEXT | False | Choose a specific wallet type to return, choose from the following: [standard_wallet \| atomic_swap \| authorized_payee \| multi_sig \| custody \| cat \| recoverable \| decentralized_id \| pooling_wallet \| nft \| data_layer \| data_layer_offer] | -| -h | --help | None | False | Show a help message and exit | +| -h | --help | None | False | Show a help message and exit |
Example @@ -1649,7 +1654,7 @@ Usage: chia wallet sign_message [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -a | --address | TEXT | True | The address you want to use for signing | @@ -1684,7 +1689,7 @@ Usage: chia wallet update_derivation_index [OPTIONS] Options: | Short Command | Long Command | Type | Required | Description | -| :------------ | :---------------- | :------ | :------- | :----------------------------------------------------------------------------------------------------------- | +|:------------- |:----------------- |:------- |:-------- |:------------------------------------------------------------------------------------------------------------ | | -wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the `rpc_port` under `wallet` in config.yaml | | -f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use | | -i | --index | INTEGER | True | Index to set. Must be greater than the current derivation index | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/clvm-vs-evm.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/clvm-vs-evm.md index 68238a6d16..95d23c163c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/clvm-vs-evm.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/clvm-vs-evm.md @@ -3,7 +3,7 @@ title: CLVM vs EVM slug: /clvm-vs-evm --- -We'll start with a brief description of CLVM. For details on the inner workings of CLVM, see our [CLVM reference](https://chialisp.com/clvm 'CLVM reference on chialisp.com'). +We'll start with a brief description of CLVM. For details on the inner workings of CLVM, see our [CLVM reference](https://chialisp.com/clvm "CLVM reference on chialisp.com"). - CLVM is the compiled, minimal version of ChiaLisp that is used by the Chia network. - CLVM is built out of cons boxes and atoms. Cons boxes contain two items, which can be either an atom or another cons box. @@ -12,17 +12,17 @@ We'll start with a brief description of CLVM. For details on the inner workings ## Comparison -| Design decision | EVM (Solidity) | CLVM (Chialisp) | -| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| The blockchain contains... | Smart contracts (compiled programs) as well as accounts. | The root hash of a binary tree, not source code. | -| Money | Smart contracts _contain_ money. | Standard Chia coins don't _contain_ money. They _are_ money. That said, more complex functionality is possible, allowing coins to contain state, such as money. | -| Determinism | Less deterministic because multiple people can execute code within the same contract. Depending on the order of execution, the result won't always be the same. | More deterministic because coins can only be spent once. However, it's possible to have a coin that multiple people can spend, which would reduce determinism. | -| Centralization | Multiple people interact with the same contract. Centralized by design. | Only the owner interacts with a smart coin. Decentralized by design. | -| Sandboxing | No sandboxing. If a contract is hacked, all users can lose their money. | Strong sandboxing. Spending is the only action allowed on an unspent coin, and only by the owner(s). If a coin is hacked, only that coin's owner(s) lose(s) their money. | +| Design decision | EVM (Solidity) | CLVM (Chialisp) | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| The blockchain contains... | Smart contracts (compiled programs) as well as accounts. | The root hash of a binary tree, not source code. | +| Money | Smart contracts _contain_ money. | Standard Chia coins don't _contain_ money. They _are_ money. That said, more complex functionality is possible, allowing coins to contain state, such as money. | +| Determinism | Less deterministic because multiple people can execute code within the same contract. Depending on the order of execution, the result won't always be the same. | More deterministic because coins can only be spent once. However, it's possible to have a coin that multiple people can spend, which would reduce determinism. | +| Centralization | Multiple people interact with the same contract. Centralized by design. | Only the owner interacts with a smart coin. Decentralized by design. | +| Sandboxing | No sandboxing. If a contract is hacked, all users can lose their money. | Strong sandboxing. Spending is the only action allowed on an unspent coin, and only by the owner(s). If a coin is hacked, only that coin's owner(s) lose(s) their money. | | Composability | Composition is supported, so it is possible to set rules temporarily governing how money may be spent. However, if money is moved outside of the contract, it will follow different rules.

(Note that it is possible to create a contract that “traps” ETH inside of it by only allowing money to be sent from the contract to specific types of addresses. However, by definition this limits the functionality of that money to whatever is contained within the contract.) | Composition is handled through inner puzzles. A puzzle's creator could say, “As long as these rules are followed, an inner puzzle can add any functionality.” Thus, it is possible to set rules that are intrinsic to the money itself, which must be followed _forever_. | -| MEV | Changing transaction order is both profitable and common. MEV is high. | Transactions all occur simultaneously in a block. MEV is low. | -| Reentrancy | Contracts can call functions on other contracts. Withdrawals can happen multiple times. Reentrancy is possible and must be carefully guarded against. | Coins interact with each other through announcements. They cannot call functions on other coins. Spends are atomic. Reentrancy is not possible. | -| Auditability/Security | Weak. Multiple points of failure. Numerous hacks prove this. | Strong. If an attacker changes a coin's puzzle, the hash also changes. The attacker is thus attempting to spend a coin that does not exist. The attacker can modify the solution, but the programmer can counter this by using assertions, which will make any such modifications fail. | +| MEV | Changing transaction order is both profitable and common. MEV is high. | Transactions all occur simultaneously in a block. MEV is low. | +| Reentrancy | Contracts can call functions on other contracts. Withdrawals can happen multiple times. Reentrancy is possible and must be carefully guarded against. | Coins interact with each other through announcements. They cannot call functions on other coins. Spends are atomic. Reentrancy is not possible. | +| Auditability/Security | Weak. Multiple points of failure. Numerous hacks prove this. | Strong. If an attacker changes a coin's puzzle, the hash also changes. The attacker is thus attempting to spend a coin that does not exist. The attacker can modify the solution, but the programmer can counter this by using assertions, which will make any such modifications fail. | --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/conditions.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/conditions.md index 5b974dcb8f..2103dfcf71 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/conditions.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/conditions.md @@ -13,24 +13,21 @@ There are two kinds of conditions. Some require something to be true (such as ti :::warning -Be vigilant when using `ASSERT_MY_COIN_ID` as a shortcut for validating the parent coin ID, puzzle hash, and amount. If they are passed into the solution separately, then validated all at once by hashing them together, it is possible to shift the bytes to the left or right and manipulate the values. +Be vigilant when using `ASSERT_MY_COIN_ID` as a shortcut for validating the parent coin ID, puzzle hash, and amount. If they are passed into the solution separately, then validated all at once by hashing them together, it is possible to shift the bytes to the left or right and manipulate the values. If they are passed into the solution separately, then validated all at once by hashing them together, it is possible to shift the bytes to the left or right and manipulate the values. -You are recommended to use the `coinid` operator when computing coin IDs. This operator was introduced with [CHIP-11](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md). It verifies that hashes are indeed 32 bytes in length, at no extra CLVM cost versus verifying the parent ID, puzzle hash, and amount individually. The `coinid` operator, as well as the other CHIP-11 operators, are described on the Chialisp [operators page](https://chialisp.com/operators#chip-0011-operators). +You are recommended to use the `coinid` operator when computing coin IDs. This operator was introduced with [CHIP-11](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md). It verifies that hashes are indeed 32 bytes in length, at no extra CLVM cost versus verifying the parent ID, puzzle hash, and amount individually. The `coinid` operator, as well as the other CHIP-11 operators, are described on the Chialisp [operators page](https://chialisp.com/operators#chip-0011-operators). This operator was introduced with [CHIP-11](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md). It verifies that hashes are indeed 32 bytes in length, at no extra CLVM cost versus verifying the parent ID, puzzle hash, and amount individually. The `coinid` operator, as well as the other CHIP-11 operators, are described on the Chialisp [operators page](https://chialisp.com/operators#chip-0011-operators). ::: :::warning -`ASSERT_COIN_ANNOUNCEMENT` and `ASSERT_PUZZLE_ANNOUNCEMENT` should typically only be used in a puzzle's _solution_, and not in the puzzle itself. This is especially important when using `ASSERT_COIN_ANNOUNCEMENT`, because it refers to a specific coin. +`ASSERT_COIN_ANNOUNCEMENT` and `ASSERT_PUZZLE_ANNOUNCEMENT` should typically only be used in a puzzle's _solution_, and not in the puzzle itself. This is especially important when using `ASSERT_COIN_ANNOUNCEMENT`, because it refers to a specific coin. This is especially important when using `ASSERT_COIN_ANNOUNCEMENT`, because it refers to a specific coin. -To illustrate the danger, let's say `coin A` uses this condition in its puzzle, and it asserts a coin announcement from `coin B`. -In this case, `coin A` requires `coin B` to be spent in the same block as it is spent. -If `coin B` is spent before `coin A`, then `coin A` can _never_ be spent. +To illustrate the danger, let's say `coin A` uses this condition in its puzzle, and it asserts a coin announcement from `coin B`. In this case, `coin A` requires `coin B` to be spent in the same block as it is spent. If `coin B` is spent before `coin A`, then `coin A` can _never_ be spent. However, if this condition is instead used in the _solution_ for `coin A`, and `coin B` has already been spent, then `coin A` can still be spent later, albeit with a different solution. -It is somewhat less dangerous to use `ASSERT_PUZZLE_ANNOUNCEMENT` in a coin's puzzle because it only relies on a coin with a specific puzzle, and many such coins might exist. -However, it is still best practice to only use this condition in a coin's solution. +It is somewhat less dangerous to use `ASSERT_PUZZLE_ANNOUNCEMENT` in a coin's puzzle because it only relies on a coin with a specific puzzle, and many such coins might exist. However, it is still best practice to only use this condition in a coin's solution. ::: @@ -49,10 +46,12 @@ This condition has no parameters. :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(43 public_key message)` @@ -75,10 +74,12 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(44 public_key message)` @@ -101,10 +102,12 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(45 public_key message)` @@ -127,10 +130,12 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(46 public_key message)` @@ -154,10 +159,12 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(47 public_key message)` @@ -181,10 +188,12 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(48 public_key message)` @@ -208,10 +217,11 @@ The following parameters are expected: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(49 public_key message)` -Verifies a signature for a given message. For [security reasons](https://github.com/Chia-Network/post-mortem/blob/main/2023-05/2023-05-08-AGG_SIG_UNSAFE-can-mimic-AGG_SIG_ME-condition.md), domain strings are not permitted at the end of `AGG_SIG_UNSAFE` messages. +Verifies a signature for a given message. Verifies a signature for a given message. For [security reasons](https://github.com/Chia-Network/post-mortem/blob/main/2023-05/2023-05-08-AGG_SIG_UNSAFE-can-mimic-AGG_SIG_ME-condition.md), domain strings are not permitted at the end of `AGG_SIG_UNSAFE` messages. The following parameters are expected: @@ -225,12 +235,13 @@ The following parameters are expected: ### 50 `AGG_SIG_ME` {#agg-sig-me} :::tip -In most cases, `AGG_SIG_ME` is the recommended condition for requiring signatures. Signatures created for a specific coin spend will only be valid for that exact coin, which prevents an attacker from reusing the signature for other spends. +In most cases, `AGG_SIG_ME` is the recommended condition for requiring signatures. Signatures created for a specific coin spend will only be valid for that exact coin, which prevents an attacker from reusing the signature for other spends. ::: Signatures created for a specific coin spend will only be valid for that exact coin, which prevents an attacker from reusing the signature for other spends. ::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,200,000. ::: +::: Format: `(50 public_key message)` @@ -253,10 +264,11 @@ The following parameters are expected: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) of 1,800,000. ::: +::: Format: `(51 puzzle_hash amount (...memos)?)` -Creates a new coin output with a given puzzle hash and amount. This coin is its parent. +Creates a new coin output with a given puzzle hash and amount. This coin is its parent. This coin is its parent. For more information on the `memos` parameter, see the section on [Memos and Hinting](#memos). @@ -288,7 +300,7 @@ The following parameters are expected: Format: `(60 message)` -Creates an announcement of a given message, tied to this coin's id. For more details, see the section on [Announcements](#announcements). +Creates an announcement of a given message, tied to this coin's id. For more details, see the section on [Announcements](#announcements). For more details, see the section on [Announcements](#announcements). The following parameters are expected: @@ -302,7 +314,7 @@ The following parameters are expected: Format: `(61 announcement_id)` -Asserts an announcement with a given id, which is calculated as `sha256(coin_id + message)`. For more details, see the section on [Announcements](#announcements). +Asserts an announcement with a given id, which is calculated as `sha256(coin_id + message)`. For more details, see the section on [Announcements](#announcements). For more details, see the section on [Announcements](#announcements). The following parameters are expected: @@ -316,7 +328,7 @@ The following parameters are expected: Format: `(62 message)` -Creates an announcement of a given message, tied to this coin's puzzle hash. For more details, see the section on [Announcements](#announcements). +Creates an announcement of a given message, tied to this coin's puzzle hash. For more details, see the section on [Announcements](#announcements). For more details, see the section on [Announcements](#announcements). The following parameters are expected: @@ -330,7 +342,7 @@ The following parameters are expected: Format: `(63 announcement_id)` -Asserts an announcement with a given id, which is calculated as `sha256(puzzle_hash + message)`. For more details, see the section on [Announcements](#announcements). +Asserts an announcement with a given id, which is calculated as `sha256(puzzle_hash + message)`. For more details, see the section on [Announcements](#announcements). For more details, see the section on [Announcements](#announcements). The following parameters are expected: @@ -579,16 +591,18 @@ The following parameters are expected: :::info This condition is part of [CHIP-0011](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md), and will be available at block height 5,496,000. ::: +::: :::note This condition adds an additional [CLVM cost](/coin-set-costs/) equal to whatever the value of the first argument is. ::: +::: Format: `(90 cost ...args)` -Allows future conditions with non-zero CLVM costs to be added as soft forks. This functionality was previously only possible as a hard fork. +Allows future conditions with non-zero CLVM costs to be added as soft forks. This functionality was previously only possible as a hard fork. This functionality was previously only possible as a hard fork. -The cost of the condition is specified in ten-thousands, and further arguments are not specified (the soft-forked condition defines these). The reason to scale the cost by 10,000 is to make the argument smaller. For example, a cost of 100 in this condition would equate to an actual cost of 1 million (1,000,000). The cost argument is two bytes, with a maximum size of 65,535 (an actual cost of 655,350,000). +The cost of the condition is specified in ten-thousands, and further arguments are not specified (the soft-forked condition defines these). The cost of the condition is specified in ten-thousands, and further arguments are not specified (the soft-forked condition defines these). The reason to scale the cost by 10,000 is to make the argument smaller. For example, a cost of 100 in this condition would equate to an actual cost of 1 million (1,000,000). The cost argument is two bytes, with a maximum size of 65,535 (an actual cost of 655,350,000). For example, a cost of 100 in this condition would equate to an actual cost of 1 million (1,000,000). The cost argument is two bytes, with a maximum size of 65,535 (an actual cost of 655,350,000). The following parameters are expected: @@ -599,7 +613,7 @@ The following parameters are expected: ## Memos and Hinting {#memos} -When a coin uses one or more outer puzzles that change their puzzle hash, it's challenging for wallets to know which coins they have the ability to spend. The memos field allows you to hint the inner puzzle hash of created coins, which consequently lets the wallet know that the coin belongs to it. Coins can be looked up by the inner puzzle hash rather than the outer puzzle hash. +When a coin uses one or more outer puzzles that change their puzzle hash, it's challenging for wallets to know which coins they have the ability to spend. When a coin uses one or more outer puzzles that change their puzzle hash, it's challenging for wallets to know which coins they have the ability to spend. The memos field allows you to hint the inner puzzle hash of created coins, which consequently lets the wallet know that the coin belongs to it. Coins can be looked up by the inner puzzle hash rather than the outer puzzle hash. Coins can be looked up by the inner puzzle hash rather than the outer puzzle hash. The `CREATE_COIN` condition is defined as a list containing the opcode `51` and the following arguments: @@ -610,26 +624,26 @@ The `CREATE_COIN` condition is defined as a list containing the opcode `51` and The `memos` parameter is an optional list, which must be null terminated. -If `memos` is present, and the first memo is exactly 32 bytes long, it's used as the hint and the rest of the list are memos. Otherwise, values in the entire list are memos. +If `memos` is present, and the first memo is exactly 32 bytes long, it's used as the hint and the rest of the list are memos. Otherwise, values in the entire list are memos. Otherwise, values in the entire list are memos. As an example, the following inner solution for the [standard transaction](https://chialisp.com/standard-transactions) would create an unhinted coin: ```chialisp -(() (q . ((51 target_puzzle_hash amount))) ()) +(() (q . (() (q . ((51 target_puzzle_hash amount))) ()) ``` The following solution would instead create a coin with the hint matching the inner puzzle hash: ```chialisp -(() (q . ((51 target_puzzle_hash amount (target_puzzle_hash)))) ()) +(() (q . (() (q . ((51 target_puzzle_hash amount (target_puzzle_hash)))) ()) ``` This `CREATE_COIN` condition creates the same coin as before, but now it specifies the hint with which the receiving wallet can look up to find this coin. -Hints are only necessary for outer puzzles, of which the inner puzzle hash matches the hint. For example, coins using the standard transaction itself with no outer puzzle do not need a hint. +Hints are only necessary for outer puzzles, of which the inner puzzle hash matches the hint. Hints are only necessary for outer puzzles, of which the inner puzzle hash matches the hint. For example, coins using the standard transaction itself with no outer puzzle do not need a hint. ## Announcements Announcements are ephemeral, meaning that they don't last forever. They can only be asserted within the block they are created. Their purpose is to ensure multiple coins are spent together, either for fees, verification, or as a security measure. -For coin announcements, the id is the `coin_id` and `message` sha256 hashed together. Likewise, for puzzle announcements, it's the `puzzle_hash` and `message` sha256 hashed together. +For coin announcements, the id is the `coin_id` and `message` sha256 hashed together. For coin announcements, the id is the `coin_id` and `message` sha256 hashed together. Likewise, for puzzle announcements, it's the `puzzle_hash` and `message` sha256 hashed together. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/costs.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/costs.md index 066d2a9d96..d24b24c341 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/costs.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/coin-set-model/costs.md @@ -3,7 +3,7 @@ title: Costs slug: /coin-set-costs --- -Cost is a unit of measurement that is used to represent the available space in a block. It is measured by the amount of computing power required to execute the programs within it, as well as the physical drive space required to store data on each node's machine. +Cost is a unit of measurement that represents resources expended to record a transaction in a block. Cost is a unit of measurement that is used to represent the available space in a block. It is measured by the amount of computing power required to execute the programs within it, as well as the physical drive space required to store data on each node's machine. :::info The maximum cost per block is 11,000,000,000 (11 billion), which is typically equivalent to around 400 KB of space. However, not every block is completely full. @@ -13,9 +13,9 @@ It is important to keep the cost usage of programs on the Chia blockchain as low ## Cost Calculation -Every CLVM program uses a certain amount of cost during execution, based on the operators and the values they are called on. You can refer to the [Cost page](https://chialisp.com/costs) on the Chialisp website to learn more about the cost of various CLVM operators. +Cost has several components. First, every CLVM program uses a certain amount of cost during execution, based on the operators and the values they are called on. You can refer to the [Cost page](https://chialisp.com/costs) on the Chialisp website to learn more about the cost of various CLVM operators. -Additionally, certain conditions in a coin spend have a cost associated with them as well. A few common examples are [`CREATE_COIN`](https://chialisp.com/conditions#create-coin) and [`AGG_SIG_ME`](/conditions#agg-sig-me), which are expensive operations. +Additionally, certain conditions in a coin spend have a cost associated with them as well. Additionally, certain conditions in a coin spend have a cost associated with them as well. A few common examples are [`CREATE_COIN`](https://chialisp.com/conditions#create-coin) and [`AGG_SIG_ME`](/conditions#agg-sig-me), which are expensive operations. Finally, each byte of data that gets added to the blockchain has a cost of 12,000. Spend bundles are created using a serialized format of CLVM programs, calculated by running [opc](https://chialisp.com/commands#serialize) on the original CLVM program. Each two-digit pair of this format is equivalent to one byte, which costs 12,000 to store on the blockchain. @@ -25,7 +25,7 @@ Aside from cost, the maximum number of atoms and pairs (counted separately) in a The minimum spec machine to run a full node is the Raspberry Pi 4. How do we know if this machine can stay synced? The worst case scenario occurs when multiple full transaction blocks are created with the minimum amount of time between them. This will temporarily put maximum load on the system. If the Pi can stay synced in this scenario, then it easily should be able to stay synced under normal load. -The first question we must answer is how much time elapses between transaction blocks. Chia's consensus mandates that at least three signage points must be reached before infusion_iterations may occur, so the minimum time between blocks is the following: +The first question we must answer is how much time elapses between transaction blocks. The first question we must answer is how much time elapses between transaction blocks. Chia's consensus mandates that at least three signage points must be reached before infusion_iterations may occur, so the minimum time between blocks is the following: ``` 3 signage points * signage point time @@ -137,3 +137,31 @@ Theoretical maximum cost per block: `3 620 074 957 + 3 620 074 957 + 3 620 074 9 The theoretical maximum size of a single block is `maximum cost per block / cost per byte`, or `11 000 000 000 / 12 000 = 916 667 bytes`. However, this number ignores the costs of all operators. If you want a CLVM program to do anything useful, the maximum size would be closer to 400 KB. Even this number is not realistic because it assumes that a single program will take up an entire block. The maximum number of vanilla transactions (with two outputs) per block is 1000. Therefore, if there is fee pressure on Chia's blockchain, a 400 KB program would need to include a larger fee than the top 1000 vanilla transactions in the mempool -- combined -- in order for a farmer to include it. + +### Estimated Transaction Costs + +The below chart contains costs for various transactions on the blockchain, each of these assumes the inputs and outputs have been optimized and represent a best case scenario. + +:::note +The [minimum effective](/mempool/#fee-required-for-inclusion) fee represents 5 x the clvm cost and is the minimum fee recognized by the default consensus rules (any fee less would be the same as 1 mojo). This means one needs to use at least the fees listed below during moderate fee pressure but greater fees might be needed for time sensitive transactions to process in a timely manner. + +Please note that the costs and fees listed are for vanilla versions of these transactions, they can vary based on the number of input and output coins needed so consider these the bare minimum. Transactions with a '\*' are listed with a fee of 3 x the minimum effective fee. This is to ensure the fees are more realistic for how coins are distributed in users wallets but note that vanilla versions of these would be 1/3 that which is listed. +::: + +| Transaction Type | clvm Cost | Minimum Effective Fee | +| --------------------------------- | ------------- | ----------------------------------- | +| **Full Block (with 50% cap)** | 5,500,000,000 | 27,500,000,000 mojo (0.0275 xch) | +| **Standard Transaction** | 6,000,000 | 90,000,000 mojo (0.00009 xch) \* | +| **PlotNFT Creation** | 18,000,000 | 90,000,000 mojo (0.00009 xch) | +| **Minting NFT with DID** | 123,000,000 | 615,000,000 mojo (0.000615 xch) | +| **Minting NFT without DID** | 53,000,000 | 265,000,000 mojo (0.000265 xch) | +| **Adding URI to NFT with DID** | 71,000,000 | 355,000,000 mojo (0.000355 xch) | +| **Adding URI to NFT without DID** | 41,000,000 | 205,000,000 mojo (0.000205 xch) | +| **Transfer NFT with DID** | 67,000,000 | 335,000,000 mojo (0.000335 xch) | +| **Assign DID to NFT** | 107,000,000 | 535,000,000 mojo (0.000535 xch) | +| **Send Clawback Transaction** | 10,000,000 | 150,000,000 mojo (0.00015 xch) \* | +| **Claim Clawback Transaction** | 1,400,000 | 7,000,000 mojo (.000007 xch) | +| **Clawback Clawback Transaction** | 15,600,000 | 75,800,000 mojo (.0000758 xch) | +| **Combine 500 Farming Rewards** | 3,100,000,000 | 15,500,000,000 mojo (.0155 xch) | +| **Split 1 Coin into 2** | 11,000,000 | 55,000,000 mojo (.000055 xch) | +| **Cat Transaction** | 37,000,000 | 555,000,000 mojo (.000555 xch) \* | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/attacks-and-countermeasures.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/attacks-and-countermeasures.md index 1252d5259f..a163222fa7 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/attacks-and-countermeasures.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/attacks-and-countermeasures.md @@ -79,7 +79,7 @@ Finally, the formula to calculate the minimum netspace percentage required for t The following table shows the minimum required proportion of the total netspace an attacker must have in order to succeed in a majority attack. This table is valid for attacks lasting any amount of time, though sometimes it's overly conservative for attacks lasting more than one epoch. It uses fixed values for the first two columns. | Number of Timelords | VA (relative to VH) | DD | SA | Percent of netspace required | Comment | -| :-----------------: | :-----------------: | :-----: | :---: | :--------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:-------------------:|:-------------------:|:-------:|:-----:|:----------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | N/A | 1 | ∞ | N/A | Without a timelord, the attack is not possible. | | 1 | 0.5 | 1 | 2 | 66.7% | With a 0.5x timelord, the attacker must control twice as much space as the rest of the network combined. | | ∞ | 0.5 | 1.34313 | 1.489 | 59.8% | With infinite 0.5x timelords, the attacker gains a double-dip advantage, so less space is required versus having a single timelord of the same speed. | @@ -91,7 +91,7 @@ The following table shows the minimum required proportion of the total netspace For attacks lasting longer than one epoch, `DD` will not exceed 1.34313. In such an attack, the final row from the preceding table will change to the following: | Number of Timelords | VA (relative to VH) | DD | SA | Percent of netspace required | Comment | -| :-----------------: | :-----------------: | :-----: | :---: | :--------------------------: | :------------------------------------------------------------------------------- | +|:-------------------:|:-------------------:|:-------:|:-----:|:----------------------------:|:-------------------------------------------------------------------------------- | | ∞ | 2 | 1.34313 | 0.372 | 27.1% | If the attack longer than one epoch, the double-dip advantage will be minimized. | Note that if we continue to increase `VA`, `DD` will always remain at 1.4678 for the first table, and 1.34313 for the second table. The percent of netspace required will decrease linearly. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/challenges.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/challenges.md index a730515681..350d14a959 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/challenges.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/challenges.md @@ -45,9 +45,9 @@ In the networking protocol, the three VDF proofs are usually passed around toget ## Genesis Challenge -The genesis challenge is the first challenge on a network that uses the Proof of Space and Time consensus. The timelords use this challenge to calculate and broadcast the very first signage point. Chia's mainnet, testnets and simulated networks each have their own unique _genesis challenge_. +The genesis challenge is the first challenge on a network that uses the Proof of Space and Time consensus. The timelords use this challenge to calculate and broadcast the very first signage point. Chia's mainnet, testnets and simulated networks each have their own unique _genesis challenge_. The timelords use this challenge to calculate and broadcast the very first signage point. Chia's mainnet, testnets and simulated networks each have their own unique _genesis challenge_. -The genesis challenge is created arbitrarily, by hashing a preimage. In the case of Chia's mainnet, the preimage included the hash of Bitcoin block [675317](https://www.blockchain.com/explorer/blocks/btc/675317), which was mined shortly prior to the launch of Chia's network. It also included the following message from Bram: +The genesis challenge is created arbitrarily, by hashing a preimage. The genesis challenge is created arbitrarily, by hashing a preimage. In the case of Chia's mainnet, the preimage included the hash of Bitcoin block [675317](https://www.blockchain.com/explorer/blocks/btc/675317), which was mined shortly prior to the launch of Chia's network. It also included the following message from Bram: It also included the following message from Bram: `"Operational error causes Fed payment system to crash" We stand on the shoulders of giants, now let's get farming!` @@ -63,6 +63,6 @@ The SHA256 hash of this preimage is: ccd5bb71183532bff220ba46c268991a3ff07eb358e8255a65c30a2dce0e5fbb ``` -This hash is the genesis challenge for Chia's mainnet. The complete JSON data for the genesis challenge is located [here](https://download.chia.net/notify/mainnet_alert.txt). The first block on Chia's mainnet ([block 0](https://www.spacescan.io/block/0)) was created at signage point `2`; it points to the genesis challenge as its previous block. The prefarm was then distributed in [block 1](https://www.spacescan.io/block/1), at signage point `7`. +This hash is the genesis challenge for Chia's mainnet. This hash is the genesis challenge for Chia's mainnet. The complete JSON data for the genesis challenge is located [here](https://download.chia.net/notify/mainnet_alert.txt). The first block on Chia's mainnet ([block 0](https://www.spacescan.io/block/0)) was created at signage point `2`; it points to the genesis challenge as its previous block. The prefarm was then distributed in [block 1](https://www.spacescan.io/block/1), at signage point `7`. The first block on Chia's mainnet ([block 0](https://www.spacescan.io/block/0)) was created at signage point `2`; it points to the genesis challenge as its previous block. The prefarm was then distributed in [block 1](https://www.spacescan.io/block/1), at signage point `7`. The genesis challenge for other networks can be found opening `config.yaml` (located in `~/.chia/mainnet/config` for Chia's mainnet and testnets) and searching for `GENESIS_CHALLENGE:` in the section corresponding to the desired network. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/consensus-intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/consensus-intro.md index 6ee2bb566e..d2a9e9fa78 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/consensus-intro.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/consensus-intro.md @@ -3,6 +3,12 @@ title: Consensus Introduction slug: /consensus-intro --- +:::info + +This section is meant to provide a high level overview of Chia's consensus. If you are interested in implementing a new full node, we recommend that you review the [source code](https://github.com/Chia-Network/chia-blockchain/tree/main/chia/consensus) in order to understand in depth how the consensus is implemented. If you have further questions, feel free to reach out to us on [Discord](https://discord.gg/chia). + +::: + Decentralized consensus algorithms require Sybil resistance, using a resource that is both cryptographically verifiable and scarce (not infinite). In previous blockchain systems, two different scarce resources have been used: computing power (Proof of Work) and staked money (Proof of Stake). Chia's Proof of Space and Time consensus uses storage capacity as the scarce resource. This comes much closer than previous systems to Satoshi's original ideal of "one CPU, one vote," where a _vote_ refers to a chance to win and validate a block, not an actual vote on-chain. For example, someone storing 500 GiB has 5 "votes," and someone storing 100 GiB has 1 "vote." diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/foliage.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/foliage.md index bee6ae458e..7bf98d4214 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/foliage.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/foliage.md @@ -3,21 +3,31 @@ title: Foliage slug: /consensus-foliage --- -In the previous diagrams, there is no place for farmers to specify their rewards, since all blocks are canonical. There is also no place to include transactions. Everything we have talked about so far is the trunk of the blockchain. +In the previous diagrams, there is no place for farmers to specify their rewards, since all blocks are canonical. There is also no place to include transactions. Everything we have talked about so far is known as the _trunk_ of the blockchain. -Farmers have no say in how their block is constructed in the trunk, since they must use the exact proof of space, VDFs, and signatures that are specified. In order to include farming rewards, as well as transactions, in the system, we must introduce an additional component of blocks called _foliage_. +Farmers have no say in how their block is constructed in the trunk, since they must use the exact proof of space, VDFs, and signatures that are specified. In order to include farming rewards, as well as transactions, in the system, we must introduce an additional component to the reward chain called _foliage_. -**Trunk**: The component of blocks and the blockchain which includes VDFs, proofs of space, PoSpace signatures, challenges, and previous trunk blocks, and is completely canonical. The trunk never refers to the foliage chain. +**Trunk**: The component of blocks and the blockchain which includes VDFs, proofs of space, PoSpace signatures, challenges, and previous trunk blocks, and is completely canonical. The trunk includes each of the [three VDF chains](/three-vdf-chains), but it never refers to the foliage. -**Foliage**: The component of blocks and the blockchain which includes specification of where rewards should go, which transactions should be included, and what the previous foliage block is. This is up to the farmer to decide and is grindable, so it can never be used as input to the challenges. +**Foliage**: An extension of the blocks produced in the reward chain. A block's foliage includes the specification of where rewards should go, which transactions should be included, and what the previous block's foliage is. -**Re-org**: A re-org (or reorganization) is when a node's view of the peak changes, such that the old view contains a block that is not included in the new view (some block has been reversed). Both trunk and foliage re-orgs are possible, but should be rare in practice, and low in depth. +:::info + +Foliage provides a separation between the transactions and the consensus. + +A given block's farmer decides what is included in the foliage, thereby allowing the farmer to grind on its contents. If the transactions and the consensus were not separated, a farmer could grind on the foliage in order to gain an unfair edge in the consensus, which would allow them to win more blocks. For this reason, the foliage is kept separate from the consensus, and it can never be used as input to the challenges. + +It is also important to note that in the implementation, when a farmer submits a block, the trunk and foliage are both submitted together -- the two pieces are not calculated and submitted at separate times. The reason we emphasize the separation of the transactions and the consensus is because the farmer may not modify a block's trunk, but retains total control over the foliage. + +::: + +**Re-org**: A re-org (or reorganization) is when a node's view of the peak changes, such that the old view contains a block that is not included in the new view (one or more blocks have either been removed, or have changed order). Both trunk and foliage re-orgs are possible, but should be rare in practice, and low in depth. -In figure 11 below we can see that the foliage is added to blocks to produce an additional chain. This foliage includes a hash of the previous foliage, a reward block hash, and a signature. These foliage pointers are separate from the trunk chain, and are not canonical. That is, farmers could theoretically create a foliage re-org where foliage is replaced, but the exact same trunk (proofs of space and time) are used. +In figure 11 below we can see that the foliage is added to the blocks formed in the reward chain. This foliage includes a hash of the previous foliage, a reward block hash, and a signature. These foliage pointers are separate from the trunk chain, and are not canonical. That is, farmers could theoretically create a foliage re-org where foliage is replaced, but the exact same trunk (proofs of space and time) are used. -To prevent a foliage re-org, honest farmers only create one foliage block per block. As soon as one honest farmer has added a foliage block, the foliage becomes impossible to re-org beyond that height with the same PoSpace, since that farmer will not sign again with the same PoSpace. +To prevent a foliage re-org, honest farmers only create one set of foliage per block. As soon as one honest farmer has added foliage to a block, the foliage becomes impossible to re-org beyond that height with the same PoSpace, since that farmer will not sign again with the same PoSpace. -Furthermore, blocks like B3, which come parallel with another foliage block (B2), do not have to sign the previous foliage block, since they do not necessarily have enough time to see it. +Furthermore, blocks like B3, which come parallel with the foliage of another block (B2), do not have to sign the previous block's foliage, since they do not necessarily have enough time to see it. :::info @@ -33,12 +43,12 @@ Blocks which have red pointers are also eligible to create transactions, and are In the diagram, sp3 comes before B2, (a transaction block, and the previous block of B3), so B3 cannot be a transaction block. -The red arrows provide security by burying foliage blocks, but the gray arrows do not. The purpose of the gray arrows is to maintain a linked list in the foliage, and to reduce complexity in implementations. However, blocks with gray arrows pointing to them do get buried in the next-next block. +The red arrows provide security by burying foliage, but the gray arrows do not. The purpose of the gray arrows is to maintain a linked list in the foliage, and to reduce complexity in implementations. However, foliages with gray arrows pointing to them do get buried in the next-next block.
drawing
-Figure 11: Foliage blocks and trunk blocks. Blocks B1, B2, and B4 have transactions and have red pointers (pointers to last block). Note that the start of the sub-slot is also a signage point. +Figure 11: Foliage and trunk blocks. Blocks B1, B2, and B4 have transactions and have red pointers (pointers to last block). Note that the start of the sub-slot is also a signage point.
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/forks.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/forks.md index 13a81c3f80..44cdb78587 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/forks.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/forks.md @@ -3,12 +3,14 @@ title: Forks slug: /consensus-forks --- -The following table is a comprehensive list of all forks (planned and activated) on Chia's blockchain. It was last updated on 2023-09-10. +The following table is a comprehensive list of all forks (planned and activated) on Chia's blockchain. It was last updated on 2023-09-10. It was last updated on 2023-09-10. -| Activation Block | Activation Date | Type | Build | Status | Description | -| :--------------- | :-------------- | :--- | :---- | :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `2 300 000` | 2022-07-22 | Soft | 1.3.0 | Activated | [Disallow negative division](https://www.chia.net/2022/03/04/divided-we-fork/) | -| `3 630 000` | 2023-05-07 | Soft | 1.7.0 | Activated | [Restrict `AGG_SIG_UNSAFE` message](https://github.com/Chia-Network/post-mortem/blob/main/2023-05/2023-05-08-AGG_SIG_UNSAFE-can-mimic-AGG_SIG_ME-condition.md) | -| `3 886 635` | 2023-07-01 | Soft | 1.8.0 | Activated | [CHIP-14](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0014.md) -- `ASSERT_BEFORE_*` conditions | -| `4 510 000` | 2023-11-12 | Soft | 2.0.0 | Activated | [CHIP-11](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md) -- BLS/SECP CLVM Operators | -| `5 496 000` | 2024-06 | Hard | 2.1.0 | Released,
Not Activated | [CHIP-12](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0012.md) -- Decrease plot filter | +| Activation Block | Activation Date | Type | Build | Status | Description | +|:---------------- |:--------------- |:---- |:----- |:----------------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `2 300 000` | 2022-07-22 | Soft | 1.3.0 | Activated | [Disallow negative division](https://www.chia.net/2022/03/04/divided-we-fork/) | +| `3 630 000` | 2023-05-07 | Soft | 1.7.0 | Activated | [Restrict `AGG_SIG_UNSAFE` message](https://github.com/Chia-Network/post-mortem/blob/main/2023-05/2023-05-08-AGG_SIG_UNSAFE-can-mimic-AGG_SIG_ME-condition.md) | +| `3 886 635` | 2023-07-01 | Soft | 1.8.0 | Activated | [CHIP-14](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0014.md) -- `ASSERT_BEFORE_*` conditions | +| `4 510 000` | 2023-11-12 | Soft | 2.0.0 | Activated | [CHIP-11](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0011.md) -- BLS/SECP CLVM Operators | +| `5 496 000` | 2024-06-13 | Hard | 2.1.0 | Activated | [CHIP-12](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0012.md) -- Decrease plot filter | +| `5 716 000` | 2024-07 | Soft | 2.3.0 | Released,
Not Activated | [CHIP-25](https://github.com/Chia-Network/chips/pull/98) -- Chialisp Message Conditions | +| `5 940 000` | 2024-09 | Soft | 2.4.0 | Released,
Not Activated | Disallow infinity G1 points | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/signage-and-infusion-points.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/signage-and-infusion-points.md index ce91f5321f..7c603d5b39 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/signage-and-infusion-points.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/consensus/signage-and-infusion-points.md @@ -11,7 +11,7 @@ The challenge and reward chains both have signage points. The infused challenge ::: -The signage points occur every 9.375 seconds (64 signage points per 600-second sub-slot). The number of iterations between each signage point is **sp_interval_iterations**, which is equal to sub-slot_iterations / 64. +The signage points occur every 9.375 seconds (64 signage points per 600-second sub-slot). The number of iterations between each signage point is **_sp_interval_iterations_**, which is equal to _sub-slot_iterations / 64_. The challenge at the start of the sub-slot is also a valid signage point. As each of the 64 signage points in the sub-slot is reached, those points are broadcast, starting from the fastest timelord's full node, and propagating to every other full node on the network. @@ -35,13 +35,13 @@ For both of our [previous example](/consensus-challenges), as well as the next e ::: -- sub-slot_iterations = 100,000,000 -- sp_interval_iterations = `sub-slot_iterations` / 64 = 1,562,500 +- _sub-slot_iterations = 100,000,000_ +- _sp_interval_iterations = `sub-slot_iterations` / 64 = 1,562,500_ -The farmer computes the **required_iterations** for each proof of space. If the required_iterations < sp_interval_iterations, the proof of space is eligible for inclusion into the blockchain. At this point, the farmer fetches the entire proof of space from disk (which requires 64 disk seeks, or 640 ms on a slow HDD), creates an unfinished block, and broadcasts it to the network. +The farmer computes the **required_iterations** for each proof of space. If the required_iterations < sp_interval_iterations, the proof of space is eligible for inclusion into the blockchain. At this point, the farmer fetches the entire proof of space from disk (which requires 64 disk seeks, or 640 ms on a slow HDD), creates an unfinished block, and broadcasts it to the network. If the _required_iterations < sp_interval_iterations_, the proof of space is eligible for inclusion into the blockchain. At this point, the farmer fetches the entire proof of space from disk (which requires 64 disk seeks, or 640 ms on a slow HDD), creates an unfinished block, and broadcasts it to the network. :::info -For the vast majority of eligible plots, required_iterations will be far too high, since on average 32 will qualify for the whole network for each 10-minute sub-slot. This is a random process so it's possible (though unlikely) for a large number of proofs to qualify. The signage_point_iterations is the number of iterations from the start of the sub-slot to the signage point. Any plot that does meet the required_iterations for a signage point will qualify as there is no rivalry between winning plots. +For the vast majority of eligible plots, _required_iterations_ will be far too high, since on average 32 will qualify for the whole network for each 10-minute sub-slot. This is a random process so it's possible (though unlikely) for a large number of proofs to qualify. Any plot that does meet the _required_iterations_ for a signage point will qualify as there is no rivalry between winning plots. ::: The exact method for required_iterations is the following: @@ -54,17 +54,19 @@ required_iterations = (difficulty // pow(2, 256) * expected_plot_size(size)) ``` -The difficulty constant factor is based on the initial constants of the blockchain. For Chia, it is `2^67`. The difficulty varies per epoch, as explained in the [Epoch and Difficulty page](/epoch-and-difficulty). As you can see, the **sp_quality_string** is converted into a random number between 0 and 1, by dividing it by `2^256`, and then multiplied by the plot size. +The difficulty constant factor is based on the initial constants of the blockchain. For Chia, it is _2^67_. The difficulty varies per epoch, as explained in [Section 3.11](/epoch-and-difficulty) 'Section 3.11: Epochs and Difficulty Adjustment'). As you can see, the `sp_quality_string` is converted into a random number between 0 and 1, by dividing it by _2^256_, and then multiplied by the plot size. -For consensus purposes, the `expected_plot_size` is `((2 * k) + 1) * (2 ** (k - 1)).`, where k>=32\<50. The actual plot size is that value times a constant factor, in bytes. This is because each entry in the plot is around `k+0.5` bits, and there are around `2^(k)` entries. +For consensus purposes, the `expected_plot_size` is `((2 * k) + 1) * (2 ** (k - 1)).`, where k>=32\<50. The actual plot size is that value times a constant factor, in bytes. This is because each entry in the plot is around `k+0.5` bits, and there are around `2^(k)` entries. The actual plot size is that value times a constant factor, in bytes. This is because each entry in the plot is around `k+0.5` bits, and there are around `2 ** k` entries. -The **infusion_iterations** is the number of iterations from the start of the sub-slot at which the block with at least the required quality can be included into the blockchain. This is calculated as: +The _signage_point_iterations_ is the number of iterations from the start of the sub-slot to the signage point. + +The **infusion_iterations** is the number of iterations from the start of the sub-slot at which the block with at least the required quality can be included into the blockchain. This is calculated as: This is calculated as: ``` infusion_iterations = ( signage_point_iterations + 3 * sp_interval_iterations + required_iterations) % sub-slot_iterations ``` -Therefore, infusion_iterations will be between 3 and 4 signage points after the current signage point. Farmers must submit their proofs and blocks before the infusion point is reached. The modulus is there to allow overflows into the next sub-slot, if the signage point is near the end of the sub-slot. This is expanded on in the [Overflow Blocks and Weight page](/overflow-blocks). +Therefore, _infusion_iterations_ will be between 3 and 4 signage points after the current signage point. Farmers must submit their proofs and blocks before the infusion point is reached. The modulus is there to allow overflows into the next sub-slot, if the signage point is near the end of the sub-slot. This is expanded on in [Section 3.9](/overflow-blocks) 'Section 3.9: Overflow Blocks and Weight'). :::info More information on infusion points is available in the [VDFs page](/proof-of-time#infusion). @@ -81,41 +83,37 @@ Figure 5 shows the infusion point as a green square marked `b1`. The first and l At `b1`, the farmer's block gets combined with the VDF output for that point. This creates a new input for the VDF from that point on, i.e. we infuse the farmer's block into the VDF. `b1` is only fully valid after two events have occurred: -1. infusion_iterations has been reached, and -2. Two VDF proofs have been included: one from `r1` to the signage point and one from `r1` to `b1`. (Actually it's more since there are three VDF chains, explained in the [Three VDF Chains page](/three-vdf-chains)). +1. _infusion_iterations_ has been reached, and +2. Two VDF proofs have been included: one from `r1` to the signage point and one from `r1` to `b1`. (Actually it's more since there are three VDF chains, explained in [Section 3.8](/three-vdf-chains) 'Section 3.8: Three VDF Chains')). -In Figure 5, the farmer creates the block at the time of the signage point, `b1'`. However, `b1'` is not finished yet, since it needs the infusion point VDF. Once the infusion_iterations VDF has been released, it is added to `b1'` to form the finished block at `b1`. +In Figure 5, the farmer creates the block at the time of the signage point, `b1'`. However, `b1'` is not finished yet, since it needs the infusion point VDF. Once the _infusion_iterations_ VDF has been released, it is added to `b1'` to form the finished block at `b1`. Recall that in this example, -- sub-slot_iterations = 100M -- sp_interval_iterations is 1.5625M. Furthermore, let's say a farmer has a total of 1000 plots. +- _sub-slot_iterations = 100,000,000_ +- _= (signage \* point \* sp \* interval_iterations) + (3 \* sp_interval_iterations) + required_iterations_ -For each of the 64 signage points, as they are released to the network every 9.375 seconds, or every 1.5625M iterations, the farmer computes the plot filter and sees how many plots pass. For each passing plot, the farmer calculates required_iterations. +For each of the 64 signage points, as they are released to the network every 9.375 seconds, or every 1.5625M iterations, the farmer computes the plot filter and sees how many plots pass. For each passing plot, the farmer calculates required_iterations. For each passing plot, the farmer calculates _required_iterations_. -Let's say the farmer calculates required_iterations < 1.5625M once in the sub-slot. (We'll assume the exact required_iterations = 0.7828M in this instance.) Figure 5 shows this happening at the 20th signage point. +Let's say the farmer calculates required_iterations < 1.5625M once in the sub-slot. (We'll assume the exact required_iterations = 0.7828M in this instance.) Figure 5 shows this happening at the 20th signage point. (We'll assume the exact _required_iterations = 782,800_ in this instance.) Figure 5 shows this happening at the 20th signage point. infusion_iterations is then computed as: +``` infusion_iterations = signage_point_iterations + (3 \* sp_interval_iterations) + required_iterations +``` -= (signage \* point \* sp \* interval_iterations) + (3 \* sp_interval_iterations) + required_iterations - -= (20 \* 1.5625M) + (3 \* 1.5626M) + 0.7827M - -= 36.7223M - -After realizing they have won (at the 20th infusion point), the farmer fetches the whole proof of space, makes a block (optionally including transactions), and broadcasts this to the network. The block has until infusion_iterations (typically a few seconds) to reach timelords, who will infuse the block, creating the infusion point VDFs. With these VDFs, the block can be finished and added to the blockchain by full nodes. +After realizing they have won (at the 20th infusion point), the farmer fetches the whole proof of space, makes a block (optionally including transactions), and broadcasts this to the network. The block has until _infusion_iterations_ (typically a few seconds) to reach timelords, who will infuse the block, creating the infusion point VDFs. With these VDFs, the block can be finished and added to the blockchain by full nodes. ## Rationale for choosing 64 signage points -Chia's original consensus, which was phased out before the launch of mainnet, used a single signage point per 10-minute subslot. This left the network vulnerable to short-range [replotting attacks](/consensus-attacks#replotting), where an attacker initiates a plot's creation after a signage point, and completes the plot before the next infusion point. The attacker could always choose a plot that passes the plot filter (because the signage point is hashed with the subslot challenge and the plot ID in calculating the filter) and then delete the plot after the infusion point. For a 512-filter, this would result in the attacker mimicking 512 plots (~51 TiB). In reality, under the original consensus, he or she would only need to own single computer capable of creating a plot in less than ten minutes. +Chia's original consensus, which was phased out before the launch of mainnet, used a single signage point per 10-minute subslot. This left the network vulnerable to short-range [replotting attacks](/consensus-attacks#replotting), where an attacker initiates a plot's creation after a signage point, and completes the plot before the next infusion point. The attacker could always choose a plot that passes the plot filter (because the signage point is hashed with the subslot challenge and the plot ID in calculating the filter) and then delete the plot after the infusion point. For a 512-filter, this would result in the attacker mimicking 512 plots (~51 TiB). In reality, under the original consensus, they would only need to own single computer capable of creating a plot in less than ten minutes. :::note Technically this isn't an _attack_ because -- even if successful -- the "attacker" wouldn't gain an ability to cheat the network. However the "attacker" _would_ be using the network in an unintended way, effectively turning Chia into a Proof of Work system. Therefore, Chia's new consensus was intentionally designed to discourage this behavior. ::: -The new consensus was introduced during Chia's beta phase. One of the modifications was to increase the number of signage points to 64 per 10-minute subslot, or one every 9.375 (600/64) seconds, on average. The Challenge Chain was also introduced (see the [Three VDF Chains page](/three-vdf-chains) for more info). The maximum distance between a signage point and the next infusion point is now 4 signage points (see the `infusion_iterations` formula, above), or 37.5 seconds. This is the maximum amount of time for the attack to be possible, but for it to be consistently applied, the minimum time of 28.125 seconds must be applied. Assuming a few extra seconds for network latency and other factors, the attack is now only possible if one can create a new plot in less than 25 seconds. +The new consensus was introduced during Chia's beta phase. One of the modifications was to increase the number of signage points to 64 per 10-minute subslot, or one every 9.375 (600/64) seconds, on average. The Challenge Chain was also introduced (see the [Three VDF Chains page](/three-vdf-chains) for more info). The maximum distance between a signage point and the next infusion point is now 4 signage points (see the _infusion_iterations_ formula, above), or 37.5 seconds. This is the maximum amount of time for the attack to be possible, but for it to be consistently applied, the minimum time of 28.125 seconds must be applied. Assuming a few extra seconds for network latency and other factors, the attack is now only possible if one can create a new plot in less than 25 seconds. :::note Keep in mind that this "attack" is really mimicking the ownership of around 51 TiB of storage. Even when it does become possible to run the attack consistently, it will likely be much cheaper to use the network as intended, storing plots on non-volatile storage. @@ -127,14 +125,14 @@ This begs the question: why not use even more signage points in the consensus? T **Quality string**: A small part of the proof of space, 2 _x values_ out of the total 64 _x values_, which can be retrieved efficiently from disk, and which values_to_fetch is determined by the signage point. -**sp_quality_string**: A hash of the quality string concatenated with the challenge chain's signage point. This hash is what ultimately decides the "luck" of a certain proof, using the size of required_iterations. +**sp_quality_string**: A hash of the quality string concatenated with the challenge chain's signage point. This hash is what ultimately decides the "luck" of a certain proof, using the size of required_iterations. This hash is what ultimately decides the "luck" of a certain proof, using the size of _required_iterations_ **sp_interval_iterations**: Defined as floor(sub-slot_iterations / 64). **Signage points**: 64 intermediary points in time within a sub-slot in both the challenge and reward chains, for which VDFs are periodically released. At each signage point, a VDF output is created and broadcast through the network. The first signage point in the sub-slot is the challenge itself. Each block has a signage point such that the proof of space in the block must be eligible for that signage point. -**required_iterations**: A number computed using the quality string, used to choose proofs of space which are eligible to make blocks. The vast majority of proofs of space will have required_iterations which are too high, and thus not eligible for inclusion into the chain. This number is used to compute the infusion point. +**required_iterations**: A number computed using the quality string, used to choose proofs of space which are eligible to make blocks. The vast majority of proofs of space will have required_iterations which are too high, and thus not eligible for inclusion into the chain. This number is used to compute the infusion point. The vast majority of proofs of space will have _required_iterations_ which are too high, and thus not eligible for inclusion into the chain. This number is used to compute the infusion point. -**Infusion point**: The point in time at infusion_iterations from the challenge point, for a proof of space with a certain challenge and infusion_iterations. At this point, the farmer's block gets infused into the reward chain VDF. The infusion point of a block is always between 3 and 4 signage points after the signage point of that block. Computed as signage_point_iterations + 3 \* sp_interval_iterations + required_iterations. +**Infusion point**: The point in time at infusion_iterations from the challenge point, for a proof of space with a certain challenge and infusion_iterations. At this point, the farmer's block gets infused into the reward chain VDF. The infusion point of a block is always between 3 and 4 signage points after the signage point of that block. Computed as signage_point_iterations + 3 \* sp_interval_iterations + required_iterations. At this point, the farmer's block gets infused into the reward chain VDF. The infusion point of a block is always between 3 and 4 signage points after the signage point of that block. Computed as _signage_point_iterations + 3 \* sp_interval_iterations + required_iterations_. The delay between the signage point and infusion point has many benefits, including defense against orphaning and selfish farming, decreased forks, and no VDF pauses. This delay of around 28 seconds is given so that farmers have enough time to sign without delaying the slot VDF. Well-behaving farmers sign only one signage point with each proof of space, meaning that attackers cannot easily reorg the chain. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contribution/using-github.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contribution/using-github.md new file mode 100644 index 0000000000..2f1652f485 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contribution/using-github.md @@ -0,0 +1,243 @@ +--- +title: Using Github for Chia Contributions +slug: /contribution/using-github +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import ForkButton from '@site/static/img/contributing/fork-button.webp'; +import CodeButton from '@site/static/img/contributing/code-button.webp'; +import AddGPG from '@site/static/img/contributing/userbar-account-settings-global-nav-update.webp'; + +## Using GitHub + +We use Github for source code control, the two main ways to interact with Github are via the web browser or via cli commands, the below links are focused on the web browser access. + +### Create a Github Account + +:::info +The below information has been copied from the [Github docs](https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github). +::: + +To get started with GitHub, you'll need to create a free personal account on GitHub.com and verify your email address. + +Every person who uses GitHub.com signs in to a personal account. Your personal account is your identity on GitHub.com and has a username and profile. For example, see [@octocat's profile](https://github.com/octocat). + +Later, you can explore the different types of accounts that GitHub offers, and decide if you need a billing plan. For more information, see ["Types of GitHub accounts"](https://docs.github.com/en/get-started/learning-about-github/types-of-github-accounts) and ["GitHub’s plans"](https://docs.github.com/en/get-started/learning-about-github/githubs-plans). + +#### Signing up for a Personal Account + +1. Navigate to https://github.com/. +2. Click Sign up. +3. Follow the prompts to create your personal account. + +During sign up, you'll be asked to verify your email address. Without a verified email address, you won't be able to complete some basic GitHub tasks, such as creating a repository. + +If you're having problems verifying your email address, there are some troubleshooting steps you can take. For more information, see ["Verifying your email address"](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/verifying-your-email-address#troubleshooting-email-verification). + +--- + +### Installing Github Desktop + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/desktop/installing-and-authenticating-to-github-desktop/installing-github-desktop). +::: + +You can install GitHub Desktop on Windows 10 64-bit or later. + +:::warning +You must have a 64-bit operating system to run GitHub Desktop. +::: + +1. Visit the [download page for GitHub Desktop](https://desktop.github.com/). +2. Click Download for Windows. +3. In your computer's Downloads folder, double-click the GitHub Desktop setup file. +4. GitHub Desktop will launch after installation is complete. + +--- + +### Forking a Repository + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). +::: + +A fork is a new repository that shares code and visibility settings with the original “upstream” repository. The below example is for the chia-docs repo but the same process can be followed for any of the public Chia-Network repos. + +1. On GitHub.com, navigate to the [Chia-Network/chia-docs](https://github.com/Chia-Network/chia-docs) repository. +2. In the top-right corner of the page, click Fork. + +
+ Fork a Repository in Github +
+
+ +3. Under "Owner," select the dropdown menu and click an owner for the forked repository. +4. By default, forks are named the same as their upstream repositories. Optionally, to further distinguish your fork, in the "Repository name" field, type a name. +5. Optionally, in the "Description" field, type a description of your fork. +6. Optionally, select **Copy the DEFAULT branch only**. + For many forking scenarios, such as contributing to open-source projects, you only need to copy the default branch. If you do not select this option, all branches will be copied into the new fork. +7. Click **Create fork**. + +:::note +If you want to copy additional branches from the upstream repository, you can do so from the Branches page. For more information, see ["Creating and deleting branches within your repository"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository). +::: + +#### Cloning a Forked Repository + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo?tool=webui#cloning-your-forked-repository). +::: + +Right now, you have a fork of the chia-docs repository, but you do not have the files in that repository locally on your computer. + +1. On GitHub.com, navigate to your fork of the Chia-Network/chia-docs repository. +2. Above the list of files, click **Code**. + +
+ Clone a Repository in Github +
+
+ +3. Click "Open with Github Desktop" (this clones the repo locally where you can edit it) + +--- + +### Setup Commit Signing + +All Chia related Github repos require the signing of commits, follow the outlined process to setup automated commit signing for the Github Desktop Application. + +#### Generating a New GPG Key + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key). +::: + +:::note +Note: Before generating a new GPG key, make sure you've verified your email address. If you haven't verified your email address, you won't be able to sign commits and tags with GPG. For more information, see ["Verifying your email address"](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/verifying-your-email-address). +::: + +1. Download and install [the GPG command line tools](https://www.gnupg.org/download/) for your operating system. We generally recommend installing the latest version for your operating system. + +2. Open Git Bash. + +3. Generate a GPG key pair. Since there are multiple versions of GPG, you may need to consult the relevant [man page](https://en.wikipedia.org/wiki/Man_page) to find the appropriate key generation command. + + - If you are on version 2.1.17 or greater, paste the text below to generate a GPG key pair. + + ```shell + gpg --full-generate-key + ``` + + - If you are not on version 2.1.17 or greater, the gpg --full-generate-key command doesn't work. Paste the text below and skip to step 6. + + ```shell + gpg --default-new-key-algo rsa4096 --gen-key + ``` + +4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default. + +5. At the prompt, specify the key size you want, or press `Enter` to accept the default. + +6. Enter the length of time the key should be valid. Press `Enter` to specify the default selection, indicating that the key doesn't expire. Unless you require an expiration date, we recommend accepting this default. + +7. Verify that your selections are correct. + +8. Enter your user ID information. + :::note + When asked to enter your email address, ensure that you enter the verified email address for your GitHub account. To keep your email address private, use your GitHub-provided no-reply email address. For more information, see "Verifying your email address" and "Setting your commit email address." + ::: + +9. Type a secure passphrase. + +10. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags. + +```shell + gpg --list-secret-keys --keyid-format=long +``` + +:::note +Some GPG installations on Linux may require you to use `gpg2 --list-keys --keyid-format` LONG to view a list of your existing keys instead. In this case you will also need to configure Git to use gpg2 by running `git config --global gpg.program gpg2`. +::: + +11. From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: + +```shell + $ gpg --list-secret-keys --keyid-format=long + /Users/hubot/.gnupg/secring.gpg + ------------------------------------ + sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10] + uid Hubot + ssb 4096R/4BB6D45482678BE3 2016-03-10 +``` + +12. Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`: + +``` + gpg --armor --export 3AA5C34371567BD2 + # Prints the GPG key ID, in ASCII armor format +``` + +13. Copy your GPG key, beginning with `-----BEGIN PGP PUBLIC KEY BLOCK-----` and ending with `-----END PGP PUBLIC KEY BLOCK-----`. +14. [Add the GPG key to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). + +#### Configure Git to Sign Commits by Default + +``` +- open Git Bash and run `git config --global commit.gpgsign true` +``` + +#### Store your GPG Key Passphrase + +:::info +Storing your passphrase ensures you don't have to enter it every time you want to sign a commit, this is strictly optional. +::: + +- For Mac users, the [GPG Suite](https://gpgtools.org/) allows you to store your GPG key passphrase in the macOS Keychain. +- For Windows users, the [Gpg4win](https://www.gpg4win.org/) integrates with other Windows tools. +- You can also manually configure [gpg-agent](http://linux.die.net/man/1/gpg-agent) to save your GPG key passphrase, but this doesn't integrate with macOS Keychain like ssh-agent and requires more setup. + +#### Add a GPG Key to Your GitHub Account + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). +::: + +1. In the upper-right corner of any page, click your profile photo, then click `Settings`. + +
+ Add a GPG Key to Your Github Account +
+
+ +2. In the "Access" section of the sidebar, click **SSH and GPG keys**. +3. Next to the "GPG keys" header, click **New GPG key**. +4. In the "Title" field, type a name for your GPG key. +5. In the "Key" field, paste the GPG key you copied when you [generated your GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key). +6. Click **Add GPG key**. +7. To confirm the action, authenticate to your GitHub account. + +--- + +### Making a Pull Request + +:::info +The below information has been adapted from the [Github docs](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project#making-a-pull-request). +::: + +At last, you're ready to propose changes into the main project! This is the final step in producing a fork of someone else's project, and arguably the most important. If you've made a change that you feel would benefit the community as a whole, you should definitely consider contributing back. + +1. To do so, head on over to the repository on GitHub where your project lives. For this example, it would be at `https://github.com//chia-docs`. +2. You'll see a banner indicating that your branch is one commit ahead of chia-docs:main. Click **Contribute** and then **Open a pull request**. +3. GitHub will bring you to a page that shows the differences between your fork and the Chia-Network/chia-docs repository. Click **Create pull request**. + - GitHub will bring you to a page where you can enter a title and a description of your changes. It's important to provide as much useful information and a rationale for why you're making this pull request in the first place. The project owner needs to be able to determine whether your change is as useful to everyone as you think it is. +4. Finally, click **Create pull request**. + +--- + +## Contribution support + +Join Our [Discord](https://discord.gg/chia) and jump into the #support channel for support. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/dev-guides-home.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/dev-guides-home.md index bea0c87fae..cfbce03c75 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/dev-guides-home.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/dev-guides-home.md @@ -52,114 +52,70 @@ Embark on a swift journey into Chia Network's Crash Course for developers. Start
-
-
-
- Intro to Chialisp -
- -
-
-
-
- Intro to Smart Coins -
- -
-
-
-
- Intro to Signatures -
- -
-
-
-
-
- Intro to Inner Puzzles -
- -
-
-
-
- Intro to Cats, Offers, and NFTs -
- -
-
- @@ -175,100 +131,79 @@ Explore the core building blocks of Chia development in the Primitives section.
-
-
-
-
-
-
- @@ -284,101 +219,64 @@ Immerse yourself in Chia Network's Tutorials section for developers. Understand
-
-
-
- Custom Puzzle Lock -
- -
-
-
-
-
- RPC Coin Spend -
- -
-
-
-
-
- Simulator User Guide -
- -
-
-
-
- WalletConnect -
- -
-
@@ -393,157 +291,100 @@ Dive into the Video Series of Chia Network's Developer Guides for a dynamic lear
-
-
- Why Chia is Great -
- -
-
-
-
- Developing Chia Applications -
- -
-
-
-
-
-
- Coin Lifecycle -
- -
-
-
-
-
- State, Coins, and Announcements -
- -
-
-
-
-
-
- Single Issuance CATs -
- -
-
-
-
- Multiple Issuance CATs -
- -
-
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/docs-home.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/docs-home.md index 130aae18c8..e8155c8fb8 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/docs-home.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/docs-home.md @@ -47,58 +47,38 @@ Embark on your Chia Network journey with our Beginner Documentation! Uncover the
-
-
-
- Beginners Farming Guide -
- -
-
-
-
- Beginners Wallet Guide -
- -
-
- @@ -114,115 +94,95 @@ Explore the advanced features of Chia Network through our comprehensive document
-
-
-
-
-
-
-
-
- WalletConnect Reference -
- -
-
@@ -237,44 +197,31 @@ Navigate Chia Network's Troubleshooting Documentation with precision. Check the
-
-
-
- Node Syncing -
- -
-
- @@ -290,100 +237,71 @@ Embark on a knowledge journey through Chia Network's Learn documentation. Delve
-
-
-
-
-
- Chia Keys -
- -
-
-
-
-
- Green Paper -
- -
-
- @@ -399,44 +317,35 @@ Dive into Chia Network's Developer Guides for an immersive experience. Begin wit
-
-
- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/checking-farm-health.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/checking-farm-health.md index d1c64e337b..efb8c501f2 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/checking-farm-health.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/checking-farm-health.md @@ -5,9 +5,9 @@ slug: /checking-farm-health > "Is my farm working?" -It's one of the most common questions farmers ask themselves. This is understandable -- it is possible for those with small- and medium-size farms to go weeks or months without winning a block reward, even if everything is working properly. +It's one of the most common questions farmers ask themselves. It's one of the most common questions farmers ask themselves. This is understandable -- it is possible for those with small- and medium-size farms to go weeks or months without winning a block reward, even if everything is working properly. -The easiest mitigation against this anxiety is to [join a pool](/pool-farming). Your pool will occasionally send you partial challenges in order to estimate your farm's size. If everything is working properly, your pool will report a size for your farm that comes close to its actual size. +The easiest mitigation against this anxiety is to [join a pool](/pool-farming). Your pool will occasionally send you partial challenges in order to estimate your farm's size. If everything is working properly, your pool will report a size for your farm that comes close to its actual size. Your pool will occasionally send you partial challenges in order to estimate your farm's size. If everything is working properly, your pool will report a size for your farm that comes close to its actual size. Beyond joining a pool, there are a few other things you can do to make sure your farm is working properly, whether you use the GUI or the CLI. @@ -28,32 +28,32 @@ Here is how to interpret each of the statistics in the above image: #### Farm Health - **Sync status** -- Shows whether your full node is synced. -- **Plots passing filter** -- Shows whether the "correct" number of plots are passing the [plot filter](https://help.chia.net/hc/en-us/articles/8373437367191-What-is-the-plot-filter-and-why-didn-t-my-plot-pass-it-). The popup, as shown in the above image, contains several stats. As long as the numbers next to `Total plots passing filter` and `Expected Total plots passing filter` are similar, this aspect of your farm is working properly. -- **Missing signage points** -- Chia's consensus is designed such that 64 [signage points](/signage-and-infusion-points) are broadcast every 10 minutes, or 9216 signage points per day. You are ineligible to win a block at any missed signage points. It is normal to miss a few signage points per day, for example due to a temporary outage in your local network. However, if you miss 100 or more signage points per day, there is likely something wrong. The two most common causes for this are that your harvester is overwhelmed (fix this by moving some HDDs to another harvester), or that your network is experiencing frequent outages. -- **Stale partials** -- Your pool will send partial challenges to your node in order to estimate how much space you are contributing. If your node doesn't respond to a partial challenge quickly, it will be considered "stale". Just as with missing signage points, an occasional stale partial is nothing to worry about. If you experience a frequent number of stale partials, the causes and solutions tend to be the same as with missing signage points. +- **Plots passing filter** -- Shows whether the "correct" number of plots are passing the [plot filter](https://help.chia.net/hc/en-us/articles/8373437367191-What-is-the-plot-filter-and-why-didn-t-my-plot-pass-it-). The popup, as shown in the above image, contains several stats. As long as the numbers next to `Total plots passing filter` and `Expected Total plots passing filter` are similar, this aspect of your farm is working properly. The popup, as shown in the above image, contains several stats. As long as the numbers next to `Total plots passing filter` and `Expected Total plots passing filter` are similar, this aspect of your farm is working properly. +- **Missing signage points** -- Chia's consensus is designed such that 64 [signage points](/signage-and-infusion-points) are broadcast every 10 minutes, or 9216 signage points per day. You are ineligible to win a block at any missed signage points. It is normal to miss a few signage points per day, for example due to a temporary outage in your local network. However, if you miss 100 or more signage points per day, there is likely something wrong. The two most common causes for this are that your harvester is overwhelmed (fix this by moving some HDDs to another harvester), or that your network is experiencing frequent outages. You are ineligible to win a block at any missed signage points. It is normal to miss a few signage points per day, for example due to a temporary outage in your local network. However, if you miss 100 or more signage points per day, there is likely something wrong. The two most common causes for this are that your harvester is overwhelmed (fix this by moving some HDDs to another harvester), or that your network is experiencing frequent outages. +- **Stale partials** -- Your pool will send partial challenges to your node in order to estimate how much space you are contributing. If your node doesn't respond to a partial challenge quickly, it will be considered "stale". Just as with missing signage points, an occasional stale partial is nothing to worry about. If you experience a frequent number of stale partials, the causes and solutions tend to be the same as with missing signage points. If your node doesn't respond to a partial challenge quickly, it will be considered "stale". Just as with missing signage points, an occasional stale partial is nothing to worry about. If you experience a frequent number of stale partials, the causes and solutions tend to be the same as with missing signage points. #### Netspace - **Total Netspace** -- This shows an estimate of the total amount of space on Chia's entire network. -- **Farming Space** -- This is hidden behind the popup dialog in the above image. It is your local node's contribution of space to the network. +- **Farming Space** -- This is hidden behind the popup dialog in the above image. It is your local node's contribution of space to the network. It is your local node's contribution of space to the network. #### Farming Rewards - **Estimated Time to Win** -- This is only an estimation of when you will create your next block, based on the percentage of the total netspace you are contributing. You have a 50% chance of winning sooner than this, and a 50% chance of winning later. It is not uncommon for 5x this amount of time to elapse between block wins, even if your farm is set up perfectly. Also keep in mind that the probability that you will win the next block does not increase as more time elapses. The Gambler's Fallacy applies here. -- **Estimated daily XCH** -- The formula for this is `(1 day / Estimated Time to Win) * block reward`. If you join a pool, this is roughly how much you should receive each day. However, you need to account for pool fees, as well as the fact that 1/8 of the reward goes directly to the farmer. +- **Estimated daily XCH** -- The formula for this is `(1 day / Estimated Time to Win) * block reward`. If you join a pool, this is roughly how much you should receive each day. However, you need to account for pool fees, as well as the fact that 1/8 of the reward goes directly to the farmer. If you join a pool, this is roughly how much you should receive each day. However, you need to account for pool fees, as well as the fact that 1/8 of the reward goes directly to the farmer. - **Estimated monthly XCH** -- Same as above, but taken as a monthly estimate. #### Pooling Health -- **Valid Partials** -- Partial proofs your node has successfully returned to your pool, expressed as both a number and a percentage. See above for more info on partials. +- **Valid Partials** -- Partial proofs your node has successfully returned to your pool, expressed as both a number and a percentage. See above for more info on partials. See above for more info on partials. - **Stale Partials** -- The percent and number of partials your node has failed to return on time. - **Invalid partials** -- The percent and number of partials your node has returned that were invalid. - **Missing partials** -- The percent and number of partials your node has failed to return. #### Last Attempted Proof -- **Plots Passed Filter** -- At each signage point, a certain number of your plots will pass the plot filter. The numerator indicates the number of plots that are eligible to play in that specific Proof of Space lottery. For small farms, this number is often 0. The denominator indicates your farm's total number of plots. -- **Proofs Found** -- The number of valid proofs found at that signage point. If you are not in a pool, a number greater than 0 indicates that you have successfully found a proof and will likely win a block reward at the next transaction block. If you are in a pool, a number greater than 0 likely means that a valid partial proof was found and will be returned to your pool. +- **Plots Passed Filter** -- At each signage point, a certain number of your plots will pass the plot filter. The numerator indicates the number of plots that are eligible to play in that specific Proof of Space lottery. For small farms, this number is often 0. The denominator indicates your farm's total number of plots. The numerator indicates the number of plots that are eligible to play in that specific Proof of Space lottery. For small farms, this number is often 0. The denominator indicates your farm's total number of plots. +- **Proofs Found** -- The number of valid proofs found at that signage point. If you are not in a pool, a number greater than 0 indicates that you have successfully found a proof and will likely win a block reward at the next transaction block. If you are in a pool, a number greater than 0 likely means that a valid partial proof was found and will be returned to your pool. If you are not in a pool, a number greater than 0 indicates that you have successfully found a proof and will likely win a block reward at the next transaction block. If you are in a pool, a number greater than 0 likely means that a valid partial proof was found and will be returned to your pool. ### Harvest panel @@ -66,13 +66,13 @@ Here is how to interpret each of the statistics in the above image: In the above image: - **Total farm size raw** -- The actual amount of space your farm is contributing to the network. -- **Total farm size effective** -- The amount of space your farm is effectively contributing, with uncompressed (C0) plots as the baseline. For example, if your farm consists entirely of C3 plots, according to the [plot compression table](/plotting-compression#compression-table), your farm's effective size should be 20% larger than its actual size. If you are using plots with a mixture of compression levels, the effective size of each of your plots will be taken into account in this number's calculation. +- **Total farm size effective** -- The amount of space your farm is effectively contributing, with uncompressed (C0) plots as the baseline. For example, if your farm consists entirely of C3 plots, according to the [plot compression table](/plotting-compression#compression-table), your farm's effective size should be 20% larger than its actual size. If you are using plots with a mixture of compression levels, the effective size of each of your plots will be taken into account in this number's calculation. For example, if your farm consists entirely of C3 plots, according to the [plot compression table](/plotting-compression#compression-table), your farm's effective size should be 20% larger than its actual size. If you are using plots with a mixture of compression levels, the effective size of each of your plots will be taken into account in this number's calculation. ## CLI Health ### Check if your farm thinks it's farming -Before going further, please make sure whether your farm actually considers itself to be farming. There's a good chance that you might not since you are still syncing blocks. +Before going further, please make sure whether your farm actually considers itself to be farming. There's a good chance that you might not since you are still syncing blocks. There's a good chance that you might not since you are still syncing blocks. 要检查您农场的状态,请像往常一样运行 `../activate` 命令(译注:仅通过源码方式安装才需要输入此命令),然后输入 `chia farm summary`。 如果输出的第一行看起来像这样: @@ -98,7 +98,7 @@ farmer: ### 检查是否有地块通过了初筛 -The most important metric to look out for is, whether your plots are passing the plot filter on your harvesting machines. 在通常的设置中,这涉及查看`~/.chia/mainnet/log`目录下的日志,在某些回合中,农场机器是否将地块标记为**可进行耕种**(eligible for farming)。 +The most important metric to look out for is, whether your plots are passing the plot filter on your harvesting machines. 在通常的设置中,这涉及查看`~/.chia/mainnet/log`目录下的日志,在某些回合中,农场机器是否将地块标记为**可进行耕种**(eligible for farming)。 在通常的设置中,这涉及查看`~/.chia/mainnet/log`目录下的日志,在某些回合中,农场机器是否将地块标记为**可进行耕种**(eligible for farming)。 `~/.chia/mainnet/log`目录可能看起来像这样: @@ -119,13 +119,13 @@ username@chia-farmer:~/.chia/mainnet/log$ tree 0 directories, 8 files ``` -Each log file contains log information about all the services ran by Chia. 如果运行的是一个全节点,这些日志可能会很复杂。 We're only interested whether or not plots pass the plot filter. 可以通过运行以下命令来检查: +Each log file contains log information about all the services ran by Chia. 如果运行的是一个全节点,这些日志可能会很复杂。 如果运行的是一个全节点,这些日志可能会很复杂。 We're only interested whether or not plots pass the plot filter. 可以通过运行以下命令来检查: 可以通过运行以下命令来检查: ```bash cat debug.log | grep "[0-9] plots were eligible for farming" ``` -The `cat` command is a \*nix program to get content of a file. With the pipe operator `|`we "pipe" the output to another program called `grep` which can filter textual input. 使用`grep`来过滤出现`"[0-9] plots were eligible for farming"`的内容,以查看是否已经有了符合条件的地块。 +The `cat` command is a \*nix program to get content of a file. With the pipe operator `|`we "pipe" the output to another program called `grep` which can filter textual input. 使用`grep`来过滤出现`"[0-9] plots were eligible for farming"`的内容,以查看是否已经有了符合条件的地块。 With the pipe operator `|`we "pipe" the output to another program called `grep` which can filter textual input. 使用`grep`来过滤出现`"[0-9] plots were eligible for farming"`的内容,以查看是否已经有了符合条件的地块。 示例输出可能如下所示: @@ -157,11 +157,11 @@ cat debug.log | grep "Found [1-9] proofs" 12:30:01.492 harvester src.harvester.harvester : INFO 1 plots were eligible for farming 23d3a7c90f... Found 1 proofs. Time: 0.57000 s. Total 100 plots Found 1 proofs. Time: 0.57000 s. Total 100 plots ``` -If you do this for all your log files and get a result, **great!** This means your farm is 100% working as expected. 可能还没有赢得一个区块,但已经接近成功了一次或多次! +If you do this for all your log files and get a result, **great!** This means your farm is 100% working as expected. 可能还没有赢得一个区块,但已经接近成功了一次或多次! 可能还没有赢得一个区块,但已经接近成功了一次或多次! ### Can a Double NAT scenario impact my farm's ability to send valid proofs to the network? -是也不是。 Double NAT, while quirky, should work due to Chia's uPnP support. 然而,您可能无法通过这种方式将区块发送给其他节点。 "双重NAT"场景发生在客户端(收割机或节点)位于进行了两次NAT的网络内。 通常涉及客户端位于两个路由器后面,而不是一个,如下图所示: +是也不是。 Double NAT, while quirky, should work due to Chia's uPnP support. 然而,您可能无法通过这种方式将区块发送给其他节点。 然而,您可能无法通过这种方式将区块发送给其他节点。 "双重NAT"场景发生在客户端(收割机或节点)位于进行了两次NAT的网络内。 通常涉及客户端位于两个路由器后面,而不是一个,如下图所示: 互联网 --> 路由器 --> 路由器 --> 客户端 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-basics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-basics.md index 5d013fe53f..425c3ad176 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-basics.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-basics.md @@ -3,9 +3,9 @@ title: Farming Basics slug: /farming-basics --- -耕种(Farming)是[生成地块](/plotting-basics)(plotting)后的下一步。 Once a plot has been created, you have a chance of winning Chia as long as the file is being stored and the Chia farming software is running. +耕种(Farming)是[生成地块](/plotting-basics)(/plotting-basics)(plotting)后的下一步。 Once a plot has been created, you have a chance of winning Chia as long as the file is being stored and the Chia farming software is running. -When farming, you allocate a certain amount of storage space in order to have a chance at winning Chia. The more plots you have, the higher your chances of winning. +When farming, you allocate a certain amount of storage space in order to have a chance at winning Chia. The more plots you have, the higher your chances of winning. The more plots you have, the higher your chances of winning. Farming is similar to a lottery. Each plot acts like a lottery ticket, where a new drawing is performed every 9 seconds or so. If you win the lottery, you earn the right to create a new block, and you will be rewarded with Chia. With an average of 4608 blocks a day, you'll have many chances to win. @@ -21,21 +21,21 @@ Prior wins (or lack thereof) do not determine new wins. 如果预计获得奖励 ## 使用联合耕种池来应对 -To combat the infrequency and inconsistency of winning, you can [join a pool](/pool-farming). It works similar to a lottery pool. Instead of occasionally earning a large reward, you will frequently earn a small payment. In the long run, pooling and solo-farming (aka **self-pooling**) will yield the same result (minus any pool fee), but pooling is much more predictable, and recommended for most farmers. +To combat the infrequency and inconsistency of winning, you can [join a pool](/pool-farming). It works similar to a lottery pool. Instead of occasionally earning a large reward, you will frequently earn a small payment. In the long run, pooling and solo-farming (aka **self-pooling**) will yield the same result (minus any pool fee), but pooling is much more predictable, and recommended for most farmers. It works similar to a lottery pool. Instead of occasionally earning a large reward, you will frequently earn a small payment. In the long run, pooling and solo-farming (aka **self-pooling**) will yield the same result (minus any pool fee), but pooling is much more predictable, and recommended for most farmers. -An additional benefit of pooling is instant feedback as to whether your farm is running properly. 如果是独自耕种,可能会不确定自己是否真的能赢得一个区块。 +An additional benefit of pooling is instant feedback as to whether your farm is running properly. 如果是独自耕种,可能会不确定自己是否真的能赢得一个区块。 如果是独自耕种,可能会不确定自己是否真的能赢得一个区块。 Chia设计了官方的联合耕种协议(pooling protocol),以一种其他加密货币从未尝试过的方式引入了矿池。 This allows for officially-supported predictability without compromising on decentralization. ## 区块奖励 -With each new block, a certain amount of Chia is rewarded to the farmer that created it. Chia launched with a block reward of 2 XCH per block. This comes out to 64 XCH distributed every 10 minutes. +With each new block, a certain amount of Chia is rewarded to the farmer that created it. With each new block, a certain amount of Chia is rewarded to the farmer that created it. Chia launched with a block reward of 2 XCH per block. This comes out to 64 XCH distributed every 10 minutes. This comes out to 64 XCH distributed every 10 minutes. -Every three years, there is a scheduled halving of the block reward. This means that three years after mainnet launch, the block reward is cut in half, to 1 XCH. +Every three years, there is a scheduled halving of the block reward. Every three years, there is a scheduled halving of the block reward. This means that three years after mainnet launch, the block reward is cut in half, to 1 XCH. 以下是完整的区块奖励计划: -| 年份 | 区块奖励 | XCH / 10 mins | +| 年份 | 区块奖励 | XCH / 10 mins | | ----- | --------- | ------------- | | 1-3 | 2.0 XCH | 64 | | 4-6 | 1.0 XCH | 32 | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-compressed-plots.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-compressed-plots.md index 22ec12eccc..eadf555019 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-compressed-plots.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-compressed-plots.md @@ -7,13 +7,13 @@ slug: /farming-compressed-plots import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -As detailed in the [plotting](/plotting-basics) section, compressed plots are supported for both plotting and harvesting as of Chia version 2.0. Before you can harvest compressed plots, you need to inform your harvesters of the fact that they exist. +As detailed in the [plotting](/plotting-basics) section, compressed plots are supported for both plotting and harvesting as of Chia version 2.0. Before you can harvest compressed plots, you need to inform your harvesters of the fact that they exist. Before you can harvest compressed plots, you need to inform your harvesters of the fact that they exist. :::info -As of Chia version 2.0, decompression must be performed at the harvester level. You therefore will need to apply the settings listed on this page to each of your harvesters individually. This also means that each individual harvester will need to be capable of decompressing the plots that have been installed locally. +As of Chia version 2.0, decompression must be performed at the harvester level. You therefore will need to apply the settings listed on this page to each of your harvesters individually. As of Chia version 2.0, decompression must be performed at the harvester level. You therefore will need to apply the settings listed on this page to each of your harvesters individually. This also means that each individual harvester will need to be capable of decompressing the plots that have been installed locally. -In the future, we plan to enable decompression at the farmer level. This means that only one computer on your network will need to be equipped with a fast CPU or GPU for decompressing plots. +In the future, we plan to enable decompression at the farmer level. In the future, we plan to enable decompression at the farmer level. This means that only one computer on your network will need to be equipped with a fast CPU or GPU for decompressing plots. ::: @@ -22,44 +22,42 @@ In the future, we plan to enable decompression at the farmer level. This means t ### GUI 1. Navigate to the `Settings` panel in the lower-left corner of the GUI. -2. Click the `HARVESTER` tab at the top of the panel. The following screen will appear: +2. Click the `HARVESTER` tab at the top of the panel. The following screen will appear: The following screen will appear:
Enable compressed farming
3. Slide the `Enable compressed plot support` slider to the right, as shown in the above image. -4. For `Parallel Decompressor Count`, the default value of `1` will be fine for most users. Here are some details: +4. For `Parallel Decompressor Count`, the default value of `1` will be fine for most users. Here are some details: Here are some details: - This number _only_ affects the amount of memory used for decompression. - - The amount memory required will vary according to the level of compression. For example, if `Parallel Decompressor Count` is set to `1`, around 600-700 MB of memory will be consumed while decompressing a single C7 plot. + - The amount memory required will vary according to the level of compression. The amount memory required will vary according to the level of compression. For example, if `Parallel Decompressor Count` is set to `1`, around 600-700 MB of memory will be consumed while decompressing a single C7 plot. - The amount of memory required will scale linearly, so setting it to `2` will double the required memory. - If your harvester has sufficient memory, as well as a high CPU core count, you can increase this number. For example, `2` might be optimal for a 16-core CPU, or `4` for dual 32-core CPUs. + If your harvester has sufficient memory, as well as a high CPU core count, you can increase this number. For example, `2` might be optimal for a 16-core CPU, or `4` for dual 32-core CPUs. For example, `2` might be optimal for a 16-core CPU, or `4` for dual 32-core CPUs. - However, the generation and speed of your CPU will also have a large impact on the optimal setting. If you do increase `Parallel Decompressor Count`, be sure to monitor your harvester's performance as there is no one-size-fits-all solution. + However, the generation and speed of your CPU will also have a large impact on the optimal setting. However, the generation and speed of your CPU will also have a large impact on the optimal setting. If you do increase `Parallel Decompressor Count`, be sure to monitor your harvester's performance as there is no one-size-fits-all solution. -5. The default value for `Decompressor Thread Count` is `0`. This is the number of threads that will participate in decompressing plots. This number, multiplied by `Parallel Decompressor Count`, needs to less than or equal to the total number of harvester cores. +5. The default value for `Decompressor Thread Count` is `0`. This is the number of threads that will participate in decompressing plots. This number, multiplied by `Parallel Decompressor Count`, needs to less than or equal to the total number of harvester cores. This is the number of threads that will participate in decompressing plots. This number, multiplied by `Parallel Decompressor Count`, needs to less than or equal to the total number of harvester cores. -For example, if your harvester has one CPU with eight cores, you might use the following settings: -_ `Parallel Decompressor Count`: `1` -_ `Decompressor Thread Count`: `6` +For example, if your harvester has one CPU with eight cores, you might use the following settings: _ `Parallel Decompressor Count`: `1` _ `Decompressor Thread Count`: `6` This would instruct the harvester process to use six of the eight cores for decompressing plots, and to use the remaining cores to run the OS, etc. 5. If you want to use a GPU for harvesting, slide the `Enable GPU Harvesting` slider to the right, as shown in the above image. Note that in order to use this setting, your harvester must have an NVIDIA CUDA-class GPU. For harvesting C7 plots, 600-700 MB of DRAM is required. 6. If your harvester has multiple GPUs, you can use `GPU Device Index` to choose which one to use. If your harvester only has one GPU, then leave this set to `0`. -After all of these settings have been properly set, click the red `RESTART LOCAL HARVESTER TO APPLY CHANGES` button. After your harvester restarts, it will use the updated settings. +After all of these settings have been properly set, click the red `RESTART LOCAL HARVESTER TO APPLY CHANGES` button. After your harvester restarts, it will use the updated settings. After your harvester restarts, it will use the updated settings. ### CLI All of the new harvester settings live inside `~/.chia/mainnet/config/config.yaml`. -If you have never installed Chia on this harvester, `config.yaml` won't exist. In this case, run the following command to generate a new copy: +If you have never installed Chia on this harvester, `config.yaml` won't exist. In this case, run the following command to generate a new copy: In this case, run the following command to generate a new copy: ```bash chia init ``` -If you have previously installed Chia on this computer, then `config.yaml` likely already exists. In this case, you will need to add several new settings. However, +If you have previously installed Chia on this computer, then `config.yaml` likely already exists. In this case, you will need to add several new settings. However, In this case, you will need to add several new settings. However, - If you run `chia init` when the config file already exists, Chia won't make any modifications. - If you delete `config.yaml` and run `chia init`, the new settings will be added, but you will lose any custom changes you previously made. @@ -81,16 +79,16 @@ disable_cpu_affinity: false max_compression_level_allowed: 7 ``` -At this point, regardless of whether you are upgrading or running a new build of Chia on this harvester, your copy of `config.yaml` contains all of the latest settings. Their definitions and recommended values are as follows: +At this point, regardless of whether you are upgrading or running a new build of Chia on this harvester, your copy of `config.yaml` contains all of the latest settings. Their definitions and recommended values are as follows: Their definitions and recommended values are as follows: - `parallel_decompressor_count`: The number of CPUs to be used for decompressing plots. If this is set to `0`, then harvesting of compressed plots will be disabled. For GPU harvesting, set this value to `1`. For CPU harvesting, set it to the number of CPUs you want to use for decompression (typically `1`). -- `decompressor_thread_count`: The number of CPU threads that will participate in decompressing plots. This number multiplied by `Parallel Decompressor Count` needs to less than or equal to the total number of CPU cores. -- `use_gpu_harvesting`: Set to `true` to enable harvesting with a GPU. Note that in order to use this setting, your harvester must have an NVIDIA GPU with CUDA capability 5.2 and up, with at least 8GB of vRAM. -- `gpu_index`: If your harvester has multiple GPUs, use this setting to choose which one to use. If your harvester only has one GPU, then leave this set to `0`. +- `decompressor_thread_count`: The number of CPU threads that will participate in decompressing plots. `decompressor_thread_count`: The number of CPU threads that will participate in decompressing plots. This number multiplied by `Parallel Decompressor Count` needs to less than or equal to the total number of CPU cores. +- `use_gpu_harvesting`: Set to `true` to enable harvesting with a GPU. `use_gpu_harvesting`: Set to `true` to enable harvesting with a GPU. Note that in order to use this setting, your harvester must have an NVIDIA GPU with CUDA capability 5.2 and up, with at least 8GB of vRAM. +- `gpu_index`: If your harvester has multiple GPUs, use this setting to choose which one to use. If your harvester only has one GPU, then leave this set to `0`. If your harvester only has one GPU, then leave this set to `0`. - `enforce_gpu_index`: Set to `true` if your harvester has more than one GPU and you want to use one other than the default of `0`. -- `decompressor_timeout`: The number of seconds for your decompressor to time out. The default value of `20` is typically fine. -- `disable_cpu_affinity`: This should typically be `false`. When it is `false`, when using multiple CPU decompressors, each with multiple threads, the threads for each decompressor will be assigned to different physical CPUs. This prevents them for competing over compute time. If it is set to `true`, the threads for each decompressor will be assigned to the same CPU. -- `max_compression_level_allowed`: The highest level of compression your harvester will support. In Chia version 2.0, the maximum level is `7`. This will likely be increased in the future, but for now, you cannot increase it beyond the default. You can, however, set it to a lower number if desired. +- `decompressor_timeout`: The number of seconds for your decompressor to time out. The default value of `20` is typically fine. The default value of `20` is typically fine. +- `disable_cpu_affinity`: This should typically be `false`. `disable_cpu_affinity`: This should typically be `false`. When it is `false`, when using multiple CPU decompressors, each with multiple threads, the threads for each decompressor will be assigned to different physical CPUs. This prevents them for competing over compute time. If it is set to `true`, the threads for each decompressor will be assigned to the same CPU. This prevents them for competing over compute time. If it is set to `true`, the threads for each decompressor will be assigned to the same CPU. +- `max_compression_level_allowed`: The highest level of compression your harvester will support. In Chia version 2.0, the maximum level is `7`. This will likely be increased in the future, but for now, you cannot increase it beyond the default. You can, however, set it to a lower number if desired. In Chia version 2.0, the maximum level is `7`. This will likely be increased in the future, but for now, you cannot increase it beyond the default. You can, however, set it to a lower number if desired. After you have finished making these updates, save `config.yaml` and restart your harvester by running the following command: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-many-machines.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-many-machines.md index b41a50a020..5d1cf8c3cf 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-many-machines.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/farming-many-machines.md @@ -13,9 +13,9 @@ Always make sure to protect yourself from malicious actors by [securing your chi ::: -This guide will show you how to run a harvester on each machine in your network. This architecture is composed of one main machine which runs the farmer, full node, and wallet, and other machines which run only the harvester. 只有主机将连接到Chia网络。 +This guide will show you how to run a harvester on each machine in your network. This architecture is composed of one main machine which runs the farmer, full node, and wallet, and other machines which run only the harvester. 只有主机将连接到Chia网络。 This architecture is composed of one main machine which runs the farmer, full node, and wallet, and other machines which run only the harvester. 只有主机将连接到Chia网络。 -This is the recommended setup for all Chia farms that use more than one computer. It uses less bandwidth, space and CPU versus running a full node on each computer. It also keeps your keys safer because they will only need to be stored on one computer. Finally, it makes your overall farm quicker and more efficient when replying to challenges. +This is the recommended setup for all Chia farms that use more than one computer. It uses less bandwidth, space and CPU versus running a full node on each computer. It also keeps your keys safer because they will only need to be stored on one computer. Finally, it makes your overall farm quicker and more efficient when replying to challenges. It uses less bandwidth, space and CPU versus running a full node on each computer. It also keeps your keys safer because they will only need to be stored on one computer. Finally, it makes your overall farm quicker and more efficient when replying to challenges. 为了保障收割节点与主机之间的通信安全,使用TLS(Transport Layer Security)协议,其中**主机**将充当私有证书颁发机构(CA),用于签署所有证书。 每个收割节点必须拥有自己的签名证书,以便与**主机**正确通信。 @@ -26,7 +26,7 @@ This is the recommended setup for all Chia farms that use more than one computer \_____ 收割机 3 (证书 C) ``` -If you are more of a visual learner, JM made a video outlining the steps from this tutorial. This video is from 2021, but the steps are still relevant today: +If you are more of a visual learner, JM made a video outlining the steps from this tutorial. This video is from 2021, but the steps are still relevant today: This video is from 2021, but the steps are still relevant today: @@ -52,7 +52,7 @@ If you are more of a visual learner, JM made a video outlining the steps from th 在生成地块后,请运行`chia plots check`命令确保一切正常运行。 -- A copy of your **main** machine CA directory needs to be accessible by your harvester machines. This directory is located in: +- A copy of your **main** machine CA directory needs to be accessible by your harvester machines. This directory is located in: This directory is located in: ```bash ~/.chia/mainnet/config/ssl/ca @@ -88,7 +88,7 @@ chia init -c :::warning -For step 4, you are using a copy of your `/ca` directory from your main machine temporarily. 请勿替换收割节点上的`/ca`文件夹。 将`/ca`目录放入收割节点上的临时文件夹中。 将暂时向收割节点展示这些文件,然后可以删除临时文件夹中的`/ca`目录。 This keeps your system more secure by limiting the exposure to your certificates. +For step 4, you are using a copy of your `/ca` directory from your main machine temporarily. 请勿替换收割节点上的`/ca`文件夹。 请勿替换收割节点上的`/ca`文件夹。 将`/ca`目录放入收割节点上的临时文件夹中。 将暂时向收割节点展示这些文件,然后可以删除临时文件夹中的`/ca`目录。 This keeps your system more secure by limiting the exposure to your certificates. ::: @@ -98,7 +98,7 @@ For step 4, you are using a copy of your `/ca` directory from your main machine ~/.chia/mainnet/config/config.yaml ``` -Search for the remote **`harvester`**'s farmer_peer section (NOT `full_node`). Enter the local IP address of your main machine (typically `192.168.xxx.yyy`) as the `host` value. +Search for the remote **`harvester`**'s farmer_peer section (NOT `full_node`). Enter the local IP address of your main machine (typically `192.168.xxx.yyy`) as the `host` value. Enter the local IP address of your main machine (typically `192.168.xxx.yyy`) as the `host` value. In other words, replace `` in the following snippet with your main machine's local IP: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/pool-farming.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/pool-farming.md index a51b1a451e..0572af6973 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/pool-farming.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/farming/pool-farming.md @@ -15,13 +15,13 @@ Chia的联合耕种协议(pooling protocol)允许将地块分配给“联合 :::note -The official pooling protocol was introduced in verion 1.2 in mid-2021. All plots created before this point, as well as newer plots created with following the pooling protocol, are not eligible for pooling. If you have any of these "OG" plots, you can either recreate them using a plot NFT, or co-farm them on the same machine as your official pool plots. +The official pooling protocol was introduced in verion 1.2 in mid-2021. All plots created before this point, as well as newer plots created with following the pooling protocol, are not eligible for pooling. The official pooling protocol was introduced in verion 1.2 in mid-2021. All plots created before this point, as well as newer plots created with following the pooling protocol, are not eligible for pooling. If you have any of these "OG" plots, you can either recreate them using a plot NFT, or co-farm them on the same machine as your official pool plots. ::: ### 第一步:同步全节点和钱包 -In order to set up your farm for pooling, you need to have a synced full node and wallet. In the upper-right corner of your wallet, you should see green icons next to `FUll NODE` and `WALLET`: +In order to set up your farm for pooling, you need to have a synced full node and wallet. In the upper-right corner of your wallet, you should see green icons next to `FUll NODE` and `WALLET`: In the upper-right corner of your wallet, you should see green icons next to `FUll NODE` and `WALLET`:
Sync status @@ -37,7 +37,7 @@ For more info, see our [blog post](https://www.chia.net/2023/03/19/introducing-c ### 第二步:获取一些XCH -开始联合耕种之前,请确保钱包里面拥有一小笔XCH。 可以向朋友索取mojo(1 mojo等于0.000000000001 XCH),或者到https://faucet.chia.net/获取mojo。 You can use the receive address on the `Tokens` page, and you can also create new receive addresses. Any of the receive addresses can be used; they are all part of the same wallet. +开始联合耕种之前,请确保钱包里面拥有一小笔XCH。 可以向朋友索取mojo(1 mojo等于0.000000000001 XCH),或者到https://faucet.chia.net/获取mojo。 You can use the receive address on the `Tokens` page, and you can also create new receive addresses. Any of the receive addresses can be used; they are all part of the same wallet. Any of the receive addresses can be used; they are all part of the same wallet. ### 第三步:创建联合耕种农田(Plot NFT) @@ -59,7 +59,7 @@ chia plotnft create -s local chia plotnft create -s pool -u https://bar.examplepool.org ``` -请注意,即便选择的是选项1,以后仍然可以加入联合耕种池,并且可以随时切换到其它池。 如果决定加入一个联合耕种池,请输入网址 (必须以 *https://*开头),然后查看描述。 如果同意, 则开始创建联合耕种农田, 并等待它被确认 (只点击一次)。 这可能需要几分钟的时间才能得到确认,然后出现在“联合耕种”选项卡中。 您只需要 1 个联合耕种农田。 +请注意,即便选择的是选项1,以后仍然可以加入联合耕种池,并且可以随时切换到其它池。 如果决定加入一个联合耕种池,请输入网址 (必须以 _https://_开头),然后查看描述。 如果同意, 则开始创建联合耕种农田, 并等待它被确认 (只点击一次)。 这可能需要几分钟的时间才能得到确认,然后出现在“联合耕种”选项卡中。 您只需要 1 个联合耕种农田。 #### 使用图形用户界面(GUI) @@ -71,9 +71,9 @@ Click the `Pooling` icon on the left side of your wallet, and click `JOIN A POOL
-Select `Connect to pool`. You will need to enter a valid pool URL. For a list of Chia pools, see [chialinks.com](https://chialinks.com/pools). +Select `Connect to pool`. You will need to enter a valid pool URL. Select `Connect to pool`. You will need to enter a valid pool URL. For a list of Chia pools, see [chialinks.com](https://chialinks.com/pools). -Creating a plot NFT requires an on-chain transaction that will cost one mojo. You are also recommended to enter a blockchain fee. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes. +Creating a plot NFT requires an on-chain transaction that will cost one mojo. You are also recommended to enter a blockchain fee. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes. You are also recommended to enter a blockchain fee. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes.
Create a plot NFT @@ -81,7 +81,7 @@ Creating a plot NFT requires an on-chain transaction that will cost one mojo. Yo
-If you entered a valid pool URL, the details will pop up. If everything looks acceptable, click `CREATE`: +If you entered a valid pool URL, the details will pop up. For example, this pool has a fee of 1%. If everything looks acceptable, click `CREATE`: If everything looks acceptable, click `CREATE`:
Pool details @@ -89,7 +89,7 @@ If you entered a valid pool URL, the details will pop up. If everything looks ac
-Your transaction will be pushed to the blockchain. While it is pending, a new screen will appear: +Your transaction will be pushed to the blockchain. While it is pending, a new screen will appear: While it is pending, a new screen will appear:
Plot NFT pending @@ -116,7 +116,7 @@ Detailed instructions can be found in the "How to Plot" page: ### 第五步:管理联合耕种农田。 -You should see your plots in the `Pooling` dialog. The status should say `Pooling``. 在这里,可以看到当前农田的难度,已获得的积分(points)以及联合耕种池认为您拥有的积分(积分余额)。 +You should see your plots in the `Pooling` dialog. The status should say `Pooling``. 在这里,可以看到当前农田的难度,已获得的积分(points)以及联合耕种池认为您拥有的积分(积分余额)。 The status should say `Pooling`. 在这里,可以看到当前农田的难度,已获得的积分(points)以及联合耕种池认为您拥有的积分(积分余额)。
Plot NFT details @@ -128,7 +128,7 @@ You should see your plots in the `Pooling` dialog. The status should say `Poolin 积分是一种计算地块找到了多少证明的方式。 每个K32地块每天平均会获得10个积分,与难度无关。 积分与Chia(XCH)不同。 积分只是反映了进行了多少耕种的值。 可以将其视为一种会计工具。 根据您获得的积分数,由联合耕种池定期发放XCH,并将您的积分重置为0,这是矿池的责任。 -To change pools, click on the `CHANGE POOL` button and enter the new pool URL. 请注意,更改联合耕种池有一个等待期,可能会持续几分钟到一小时左右。 请在此过程中不要关闭应用程序。 可以随意更改联合耕种池,而且不需要进行注册或支付任何罚款。 请注意,如果更改了联合耕种池,之前的耕种池不再有义务继续向你支付收益。 +To change pools, click on the `CHANGE POOL` button and enter the new pool URL. 请注意,更改联合耕种池有一个等待期,可能会持续几分钟到一小时左右。 请注意,更改联合耕种池有一个等待期,可能会持续几分钟到一小时左右。 请在此过程中不要关闭应用程序。 可以随意更改联合耕种池,而且不需要进行注册或支付任何罚款。 请注意,如果更改了联合耕种池,之前的耕种池不再有义务继续向你支付收益。 您应该确保在过去24小时内的积分数是准确的。 每天每个k32地块应该获得大约10个积分,所以如果有100个k32的地块,每天应该获得大约1000个积分。 确保您的积分在持续增长。 支付后,积分余额将重置为零。 积分将随机出现,因为查找证明也是随机的。 因此,预计会有很多变化,并且会有好运和坏运的时候。 @@ -144,7 +144,7 @@ To change pools, click on the `CHANGE POOL` button and enter the new pool URL. ### 多台电脑 -You can take your 24-word seed phrase and enter it into a different computer, and when it is synched, the current Plot NFTs and pool information will be automatically downloaded from the blockchain. All information about your pool, plot NFTs, and smart contract addresses is completely backed up on the blockchain, and can be recovered using the seed phrase. +You can take your 24-word seed phrase and enter it into a different computer, and when it is synched, the current Plot NFTs and pool information will be automatically downloaded from the blockchain. All information about your pool, plot NFTs, and smart contract addresses is completely backed up on the blockchain, and can be recovered using the seed phrase. All information about your pool, plot NFTs, and smart contract addresses is completely backed up on the blockchain, and can be recovered using the seed phrase. ### 多个密钥 @@ -156,7 +156,7 @@ You can take your 24-word seed phrase and enter it into a different computer, an ### 区块链手续费 -Blockchain fees are paid to the creator of the block (farmers), to incentivize them to include your transaction. If the blockchain is busy, you might have to pay small a small fee to get your transaction included. (Creating a plot NFT and changing pools both require an on-chain transaction.) +Blockchain fees are paid to the creator of the block (farmers), to incentivize them to include your transaction. If the blockchain is busy, you might have to pay small a small fee to get your transaction included. (Creating a plot NFT and changing pools both require an on-chain transaction.) If the blockchain is busy, you might have to pay small a small fee to get your transaction included. (Creating a plot NFT and changing pools both require an on-chain transaction.) ### 无效状态 @@ -238,11 +238,11 @@ chia plotnft show ### 什么是联合耕种农田? -一个联合耕种农田(plot NFT)是区块链上的智能币或代币,允许用户管理他们在耕种池中的成员资格。 Users can assign the plot NFT to any pool they want, at any point. 在生成地块时,可以选择一个农田,并且该地块将永远与该农田绑定在一起。 农田是“非同质化”的,因为它们不可互换;每个农田代表一个独特的耕种池合约。 +一个联合耕种农田(plot NFT)是区块链上的智能币或代币,允许用户管理他们在耕种池中的成员资格。 Users can assign the plot NFT to any pool they want, at any point. 在生成地块时,可以选择一个农田,并且该地块将永远与该农田绑定在一起。 在生成地块时,可以选择一个农田,并且该地块将永远与该农田绑定在一起。 农田是“非同质化”的,因为它们不可互换;每个农田代表一个独特的耕种池合约。 ### 需要支付XCH来创建联合耕种农田或切换耕种池吗? -Each plot NFT you create will require 1 mojo (1 trillionth of a XCH) + transaction fee. 切换耕种池只需要支付交易手续费。 如果您没有任何XCH,可以从Chia的官方水龙头获得100个mojo:https://faucet.chia.net/ +Each plot NFT you create will require 1 mojo (1 trillionth of a XCH) + transaction fee. 切换耕种池只需要支付交易手续费。 切换耕种池只需要支付交易手续费。 如果您没有任何XCH,可以从Chia的官方水龙头获得100个mojo:https://faucet.chia.net/ ### 可以同时在旧土地和新地块上耕种吗? @@ -260,7 +260,7 @@ Each plot NFT you create will require 1 mojo (1 trillionth of a XCH) + transacti Chia has three major differences from most other crypto pooling protocol: -1. Joining pools is permissionless. 在加入之前不需要在耕种池(矿池)服务器上注册账户。 +1. Joining pools is permissionless. 在加入之前不需要在耕种池(矿池)服务器上注册账户。 在加入之前不需要在耕种池(矿池)服务器上注册账户。 2. Farmers receive 1/8 of the block reward plus transaction fees, while the pool receives 7/8 of the reward to redistribute (minus pool fees) amongst all pool participants. 3. The farmer with the winning proof will farm the block, not the pool server. @@ -321,8 +321,8 @@ Python ### How does one calculate a farmer's space? -A farmer's space can be estimated by the number of points submitted over each unit of time, or points/second. 每个k32地块平均每天获得10个积分(points)。 所以每个地块的算力为 `10 / 86400 = 0.0001157 points/second`。 Per byte, that is `L = 0.0001157 / 108884400275 = 1.06259482265 * 10^-15`. To calculate total space `S`, take the total number of points found `P`, and the time period in seconds `T` and do `S = P / (L*T)`. -For example for 340 points in 6 hours, use `P=340, T=21600, L=1.06259482265e-15`, `S = 340/(21600*1.06259482265e-15) = 14,813,492,786,900 bytes`. Dividing by `1024^4` we get `13.4727932044 TiB`. +A farmer's space can be estimated by the number of points submitted over each unit of time, or points/second. 每个k32地块平均每天获得10个积分(points)。 每个k32地块平均每天获得10个积分(points)。 所以每个地块的算力为 `10 / 86400 = 0.0001157 points/second`。 Per byte, that is `L = 0.0001157 / 108884400275 = 1.06259482265 * 10^-15`. Per byte, that is `L = 0.0001157 / 108884400275 = 1.06259482265 * 10^-15`. To calculate total space `S`, take the total number of points found `P`, and the time period in seconds `T` and do `S = P / (L*T)`. +For example for 340 points in 6 hours, use `P=340, T=21600, L=1.06259482265e-15`, `S = 340/(21600*1.06259482265e-15) = 14,813,492,786,900 bytes`. Dividing by `1024^4` we get `13.4727932044 TiB`. Dividing by `1024^4` we get `13.4727932044 TiB`. :::info diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/bridge-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/bridge-guide.md new file mode 100644 index 0000000000..bd82089fee --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/bridge-guide.md @@ -0,0 +1,333 @@ +--- +title: XCH Bridge Guide +slug: /bridge-guide +--- + +## Intro + +A _cryptocurrency bridge_ is a powerful tool that enables seamless transfers of digital assets between different blockchain networks, breaking down the barriers of blockchain interoperability. The first Chia blockchain bridge by Warp.Green is now available, paving the way for anyone to access XCH. + +As the first of many bridges to come, Warp.Green marks an exciting milestone in our journey toward greater access to chia (XCH). To help you get started, here's a introductory guide on how to use the Warp.Green bridge. + +## The Warp.green Bridge + +The [Warp.green bridge](https://www.warp.green/) is a messaging protocol that enables bridging assets between Chia and other blockchains. It is an open-source project located on [GitHub](https://github.com/warpdotgreen). It was developed by Warp.green, which is not affiliated with Chia Network Inc. + +This guide will show you how to send ETH from the [Base](https://www.base.org/) blockchain (an Ethereum L2) to the Chia blockchain. The transfer will take a total of 15-20 minutes, though the initial setup could take considerably longer if you are not familiar with the technologies involved. + +:::info + +It is also possible to bridge assets from Ethereum to Chia, but we chose the Base chain for this guide because it tends to have lower fees. + +In addition, it is possible to bridge assets in the other direction: from Chia to Ethereum/Base. This guide doesn't demonstrate this functionality, but the basic technique is quite similar. + +Finally, note that the bridge is set up to allow for bridging _any_ Chia or Ethereum asset. However, only a limited number of assets are currently supported. A list of supported assets is maintained at [warp.green/bridge/assets](https://www.warp.green/bridge/assets). + +::: + +## Set up MetaMask + +[MetaMask](https://metamask.io/) is one of the most popular wallets for storing digital assets such as ETH, and it supports the Base blockchain. We will use MetaMask for this guide, so if you want to follow along, you will need to install it as a web browser extension. But don't worry – if you want to use a different Base wallet, the instructions will likely be similar. + +After you have installed MetaMask, click the browser extension button ("1" in the following image), then click the dropdown to change blockchains ("2"): + +

+ bridge +

+
+ +By default, Ethereum's mainnet will be selected. The Warp.green bridge _will_ work with this network, but for this guide, we will use Base instead. Click `+ Add network`: + +

+ bridge +

+
+ +Several supported networks will be displayed. Locate `Base Mainnet` and click `Add`: + +

+ bridge +

+
+ +Verify that you are adding the correct network. The Chain ID for the Base mainnet is `8453`. Make sure this number is shown, and click `Approve`: + +

+ bridge +

+
+ +The network should be added successfully. Click `Switch to Base Mainnet`: + +

+ bridge +

+
+ +You will be given some important info about this network. Read this info carefully, then click `Got it`: + +

+ bridge +

+
+ +In order to use this wallet for the bridge, you will need to add funds. In this example, the MetaMask wallet was funded with 0.0057 ETH on the Base blockchain: + +

+ bridge +

+
+ +After your Ethereum wallet has been funded, you can set up a Chia wallet. + +## Set up a Chia wallet + +While several Chia wallets exist, currently the bridge only supports wallets that use WalletConnect, as well as [Goby](https://www.goby.app/). For this example, we will use the Chia reference wallet. See our [wallet guide](/getting-started/wallet-guide/#use-the-chia-wallet) for instructions on setting up this wallet. + +You will need to add some XCH to the reference wallet in order to pay fees. In the image below, the wallet contains 0.001 XCH. Typically, this amount will be sufficient. + +We're going to send a wrapped form of ETH to the Chia reference wallet. If you are using Chia 2.3.1 or later, your wallet will automatically recognize the wrapped ETH, but it's still a good idea to add this asset manually. + +:::info + +Regardless of which blockchain you are using, when you receive a bridged token, it will be a "wrapped" version of the native token. The Warp.green bridge calls its tokens "warped" instead of "wrapped". There is no material difference between these two terms; they can be used interchangeably. + +::: + +Click `MANAGE TOKEN LIST`: + +

+ bridge +

+
+ +Locate `Base Warped milliETH` and click the slider to enable this asset. Feel free to double-check that the asset's ID matches the one from the [asset list](https://www.warp.green/bridge/assets) on Warp.green's website: + +

+ bridge +

+
+ +Your wallet will add `Base Warped milliETH`: + +

+ bridge +

+
+ +:::info + +One `Base Warped milliETH` is the equivalent to 1/1000 of one ETH. This denomination was chosen due to the differences in decimals on Chia and Ethereum. + +::: + +## Connect your wallets to the bridge + +Using the same browser where you installed MetaMask, browse to [warp.green/bridge](https://www.warp.green/bridge). In order to use the bridge, you will need to connect both of your wallets. + +### Connect your ETH wallet + +Click `Connect ETH Wallet`: + +

+ bridge +

+
+ +Click `MetaMask` (or whichever wallet you used on the Ethereum side): + +

+ bridge +

+
+ +Select the account(s) you want to connect to the bridge. If you just installed MetaMask, there will only be one account. Click `Next`: + +

+ bridge +

+
+ +Click `Connect` to connect your MetaMask wallet to the bridge: + +

+ bridge +

+
+ +Your MetaMask wallet is now connected to the bridge. + +### Connect your Chia wallet + +Click `Connect Wallet`: + +

+ bridge +

+
+ +Click `Wallet Connect` if you are using the Chia reference wallet: + +

+ bridge +

+
+ +You will be shown a QR code (not shown here). In this example, we'll click the `Copy Link` button. + +Next, open your reference wallet, click the WalletConnect icon ("1" in the image below), then click `ADD CONNECTION` ("2"): + +

+ bridge +

+
+ +Paste the link you previously copied, and click `CONTINUE`: + +

+ bridge +

+
+ +Your Chia reference wallet will now be connected to the bridge. Click `CLOSE`: + +

+ bridge +

+
+ +The bridge will request an address from your wallet. It may perform other requests as well. Click `CONFIRM` for each request: + +

+ bridge +

+
+ +Return to your web browser. You should see `Connected` displayed under `Wallet Connect`. If so, you can close this dialog: + +

+ bridge +

+
+ +## Initiate the transfer + +The bridge will ask you to enter an amount to transfer. By default, the asset to transfer will be USDC. However, in this example, we will transfer ETH: + +

+ bridge +

+
+ +Enter the amount to transfer. Also, verify that the `From` and `To` chains are accurate. For this example, we will transfer 0.001 ETH from Base to Chia. + +:::info + +The Base blockchain will charge a fee, so you will not be able to send the full amount in your MetaMask wallet. In this example, 0.00000465 ETH was the required fee. This fee will vary, depending on which blockchain you are using, and how busy the network is. + +::: + +After you have verified this info, click `Bridge`: + +

+ bridge +

+
+ +In Step 1 of the transfer, you will be given one more chance to verify the accuracy of everything you have entered. + +:::warning caution + +Be sure to read this dialog carefully, and verify that all information contained within is accurate. + +::: + +:::note note on fees + +Several fees may apply when using the bridge: + +Each blockchain charges a fee to use its network. The size of each fee depends on how busy the network is, as well as how long you are willing to wait for your transaction to be confirmed. Generally speaking, the fees on Base are significantly lower than those on Ethereum. On Chia, the network is often not busy enough to require any fees. + +In addition, a "toll" is automatically deducted for using the bridge. The toll is a small charge (either 0.001 XCH or 0.00001 ETH, depending on the chain where the transaction originated), collected solely to prevent network spam. This money does not go to the bridge or to its operators. Instead, it is redirected to the farmer/miner of the block which includes your transaction. + +Finally, the bridge itself charges a 0.3% tip for using the protocol. This tip is split among the bridge validators and helps to cover the costs associated with maintaining the bridge. + +For more information, see [warp.green's documentation](https://docs.warp.green/). + +::: + +If everything looks good, click `Initiate Bridging`: + +

+ bridge +

+
+ +MetaMask will pop up, and you will be shown the details of your transfer. This includes the current blockchain fee amount. Click `Confirm` to accept the fee and initiate the transfer: + +

+ bridge +

+
+ +You will now be taken to Step 2 of the transfer. Before completing the transfer, you will need to wait around 10-15 minutes; the exact time can vary a bit. The reason for this delay is to avoid funds being lost in blockchain reorgs: + +

+ bridge +

+
+ +Leave this browser window open, and return to it after 15 minutes. + +### Complete the transfer + +After waiting for around 15 minutes, the transfer will reach Step 3. Click `Generate Offer via Wallet`: + +

+ bridge +

+
+ +Change to your Chia reference wallet. You may see a dialog asking for permission to execute `getWallets`. If so, Click `CONFIRM`: + +

+ bridge +

+
+ +You may need to grant permission to execute one or more additional methods. Click `CONFIRM` on these dialogs. Eventually, you will see a dialog with a `SHOW OFFER DETAILS` button. Click this button: + +

+ bridge +

+
+ +You will be shown the details of the transfer from the bridge to your wallet. By default, no blockchain fee will be used. However, if you have available funds (the small circle in the image below), we recommend that you add a fee in order to expedite the transfer. Either way, leave the `In exchange for` side of the dialog blank. Click `CLOSE` when you are finished reviewing this dialog: + +

+ bridge +

+
+ +If you added a blockchain fee, it will now appear in the `Confirmation Request` dialog. Click `CONFIRM`: + +

+ bridge +

+
+ +Return to your web browser. The transfer will now be in progress. This should be completed in 1-5 minutes, depending on how busy the Chia network is, along with the size of your fee: + +

+ bridge +

+
+ +After the transfer has completed, return to the reference wallet. It should now contain the `Base Warped milliETH`. In this example, the bridge charged a 0.3% fee, so 0.997 wmilliETH.b was transferred. Recall that this amount is worth 0.000997 ETH: + +

+ bridge +

+
+ +Congratulations! You have successfully transferred ETH from the Base chain to Chia. If you would like to exchange the wmilliETH.b for another asset, you could head to a decentralized exchange such as [dexie.space](https://dexie.space/), or an AMM such as [tibetswap.io](https://v2.tibetswap.io/). diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/farming-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/farming-guide.md index 31456289cb..b169488e45 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/farming-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/farming-guide.md @@ -101,15 +101,15 @@ Assuming you don't have a wallet yet, click `CREATE A NEW WALLET KEY` (If you al
-You will be presented with a list of twenty-four words. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is also important. +You will be presented with a list of twenty-four words. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is important. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is also important. -You can also choose a custom name for your wallet. Click `NEXT` when you are finished. +You can also choose a custom name for your wallet. Click `NEXT` when you are finished. Click `NEXT` when you are finished. :::warning -If someone obtains a copy of these words, they can steal your entire wallet, including all of its funds. Be sure to store your recovery phrase in a safe place. +If someone obtains a copy of these words, they can steal your entire wallet, including all of its funds. Be sure to store your recovery phrase in a safe place. Be sure to store your recovery phrase in a safe place. -::: +:::
Wallet seed phrase @@ -130,31 +130,64 @@ You will be taken to your wallet, which will show a zero-XCH balance. There will ### Fund your wallet -If you think you will ever want to join a pool (recommended for small and medium farms), you will need at least one mojo (one trillionth of an XCH). To help with this, we have set up an online faucet. To use the faucet, you will need a receive address. Click `RECEIVE` to display one: +If you think you will ever want to join a pool (recommended for small and medium farms), you will need at least one mojo (one trillionth of an XCH). To help with this, we have set up an online faucet at [faucet.chia.net](https://faucet.chia.net/). -
- Receive address -
+To use the faucet you will need to identify your **Master Public Key** (also referred to as the **Public Key**). You can use either the GUI or CLI to identify the Master Public Key by following these steps: -
+#### GUI -Copy your receive address (it will begin with `xch`) and head to our [faucet page](https://faucet.chia.net/). Paste your address, click the "I'm not a robot" check box, and click `Submit`: +:::warning +Never share your private / secret keys or mnemonics with anyone. These give access to spend funds from your wallet. +::: -
- Faucet +1. In the top right corner select logout: +
+ Logout of the Chia wallet
+
+2. Using the desired keys menu, select details: +
+ Select Details for a Chia keyset +

-You should receive a message stating that your money is on the way. Note that you can only use this faucet once. +3. View and copy the **Public Key** to the field on the Faucet page: +
+ Chia keys detail screen, Public Key highlighted +
+
-Within a few minutes, your wallet's balance should increase: +#### CLI -
- Wallet with 100 mojos -
+:::warning +**NEVER** share your private / secret keys or mnemonics with anyone. These give access to spend funds from your wallet. +::: -
+In order to view your keys from the cli, run `chia keys show`, optionally including the `-f ` flag to show only the info for the key you just generated: + +1. From terminal (mac/linux) or powershell (windows) run `chia keys show`: + +```bash +chia keys show +``` + +2. View and copy the **Master Public Key** to the field on the faucet page: + +```bash +Showing all public keys derived from your master seed and private key: + +Label: Demo Wallet +Fingerprint: 2281896037 +Master public key (m): 96ce91d974daa0990e6681ac2de3e3f49142f6b655a081817832265c143e658a6e60a5dec856f292f45fe2d04c7856f6** +Farmer public key (m/12381/8444/0/0): a9e366b26f155491af9a903c0ed9717bfd09a71cbe283eeda825128fd7c6b9ac60e1608f9f008adcfbf66e233d5b4ce8 +Pool public key (m/12381/8444/1/0): 9566fa434f342dd5f9380a6bfc59dd7d1abd22869a425a8ca09cf27200eaa6aad5bc8fc00db90af832eb8028b0c6e3f0 +First wallet address: xch1kr3zf7dqw5q953ex6zt33lndj90q0zlh68404tsntnljthnwqs2qvjmwrg +``` + +:::note +For more security best practices please review the [Securing Your Chia – How to Be a Hard Target](https://www.chia.net/2021/05/28/securing-your-chia-how-to-be-a-hard-target/) blog article. +::: :::info @@ -225,7 +258,7 @@ Click the `Pooling` icon on the left side of your wallet, and click `JOIN A POOL Before you can join a pool, you will need to create a plot NFT. This will allow you to easily change pools later. -Select `Connect to pool`. You will need to enter a valid pool URL. We will use OpenChia for this example, but there are many great pools to choose from. For a list of reputable pools, see [Chialinks.com](https://chialinks.com/pools/). (Chia Network, Inc. does not run a pool, and is not affiliated with OpenChia or Chialinks). +Select `Connect to pool`. You will need to enter a valid pool URL. We will use OpenChia for this example, but there are many great pools to choose from. `Connect to pool` -- You will need to enter a valid pool URL. We will use OpenChia for this example, but there are many great pools to choose from. For a list of reputable pools, see [Chialinks.com](https://chialinks.com/pools/). (Chia Network, Inc. does not run a pool, and is not affiliated with OpenChia or Chialinks). (Chia Network Inc. does not run a pool, and is not affiliated with OpenChia or Chialinks). :::info @@ -233,7 +266,7 @@ If you don't want to join a pool, select `Self pool`. This will assign you to a ::: -Creating a plot NFT requires an on-chain transaction that will cost one mojo. You are also recommended to enter a blockchain fee. If you used the faucet, you will now have 100 mojos. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes. +Creating a plot NFT requires an on-chain transaction that will cost one mojo. You are also recommended to enter a blockchain fee. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes. You are also recommended to enter a blockchain fee. If you used the faucet, you will now have 100 mojos. Depending on how busy the network is, a one-mojo fee is typically enough to complete your transaction within a few minutes.
Create a plot NFT @@ -249,7 +282,7 @@ If your faucet payout has not arrived after more than 10 minutes, someone on [Di ::: -If you entered a valid pool URL, the details will pop up. For example, this pool has a fee of 1%. If everything looks acceptable, click `CREATE`: +If you entered a valid pool URL, the details will pop up. For example, this pool has a fee of 1%. If everything looks acceptable, click `CREATE`: For example, this pool has a fee of 1%. If everything looks acceptable, click `CREATE`:
Pool details @@ -257,7 +290,7 @@ If you entered a valid pool URL, the details will pop up. For example, this pool
-Your transaction will be pushed to the blockchain. While it is pending, a new screen will appear: +Your transaction will be pushed to the blockchain. While it is pending, a new screen will appear: While it is pending, a new screen will appear:
Plot NFT pending @@ -315,7 +348,7 @@ Next, you will need to choose a plotter. When creating a single plot, `Chia Proo When building a larger farm, the plotter you choose will depend greatly on your available hardware. It may help to experiment with multiple plotters to get a feel for which ones work best for your setup. For details on each of the available plotters, see our [Plotting Software](/plotting-software) section. -::: +:::
Choose plotter @@ -357,7 +390,7 @@ Next, you need to select the temporary and final directories for your plot. The - **SSD** -- Most farmers choose to use an enterprise NVMe SSD for the temporary storage. These SSDs can handle large amounts of reads and writes in their lifetimes. - **HDD** -- If you don't mind plotting slowly, you can choose a directory located on an HDD. -The final directory is where the plot will be copied after it has been created. Most farmers will choose to use an HDD as the final directory. However, for this tutorial an NVMe SSD was used for both the temporary and final directories. +The final directory is where the plot will be copied after it has been created. The final directory is where the plot will be copied after it has been created. Most farmers will choose to use an HDD as the final directory. However, for this tutorial an NVMe SSD was used for both the temporary and final directories. :::warning @@ -373,7 +406,7 @@ You will also need to choose how many plots to create. Certain plotters can be o
-After you have gone through all of these settings, click `CREATE`. You will be taken to a progress panel: +After you have gone through all of these settings, click `CREATE`. You will be taken to a progress panel: You will be taken to a progress panel:
Plot creation progress diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md index e31ecc85d3..38733f2bad 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md @@ -8,13 +8,13 @@ import TabItem from '@theme/TabItem'; :::info -This page will go into the details of the various different ways to install Chia. If you already installed Chia as part of the Farming Guide, then feel free to skip ahead to the [Plotting Basics](/plotting-basics) page. +This page will go into the details of the various different ways to install Chia. This page will go into the details of the various different ways to install Chia. If you already installed Chia as part of the Farming Guide, then feel free to skip ahead to the [Plotting Basics](/plotting-basics) page. ::: There are various ways to install Chia, with the best method depending on what you intend to do: -- If you simply wish to use the Chia wallet, or to run a farm on a single personal computer, then we recommend installing the GUI from our [official downloads page](https://www.chia.net/downloads) for Windows and MacOS, and for Linux users to install the package [as described below](#using-the-cli). The GUI is the simplest way to interact with the Chia client and ideal for most non-developer use cases. +- If you simply wish to use the Chia wallet, or to run a farm on a single personal computer, then we recommend installing the GUI from our [official downloads page](https://www.chia.net/downloads) for Windows and MacOS, and for Linux users to install the package [as described below](#using-the-cli). The GUI is the simplest way to interact with the Chia client and ideal for most non-developer use cases. The GUI is the simplest way to interact with the Chia client and ideal for most non-developer use cases. - If you intend to run a dedicated Chia full node on a server and connect to it programmatically using the [RPC interface](/rpc), the best method would be to install and run Chia via the command line on a proper server environment. @@ -38,7 +38,7 @@ Chia plot files are at least 108GB in size (for K32). To plot successfully requi ### Sleep kills plots -If the computer or hard drives go to sleep during the plotting process, it will fail, and you will need to start over. Please ensure all sleep, hibernate and power saving modes for your computer and hard drives are disabled before starting the Chia plotting process. In the future, Chia will have a resume plot feature. In the meantime, if you do get a failed plot, delete all `*.tmp` files before starting a new plot. +If the computer or hard drives go to sleep during the plotting process, it will fail, and you will need to start over. Please ensure all sleep, hibernate and power saving modes for your computer and hard drives are disabled before starting the Chia plotting process. In the future, Chia will have a resume plot feature. In the meantime, if you do get a failed plot, delete all `*.tmp` files before starting a new plot. Please ensure all sleep, hibernate and power saving modes for your computer and hard drives are disabled before starting the Chia plotting process. In the future, Chia will have a resume plot feature. In the meantime, if you do get a failed plot, delete all `*.tmp` files before starting a new plot. --- @@ -110,7 +110,7 @@ sudo dnf install chia-blockchain :::note Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. -::: +::: ```bash # Create virtual environment @@ -146,7 +146,35 @@ values={[ :::note Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. -::: +::: + +```bash +# Download chia-blockchain +git clone https://github.com/Chia-Network/chia-blockchain -b latest --recurse-submodules + +# Change directory +cd chia-blockchain + +# Install dependencies +sh install.sh + +# Activate virtual environment +. ./activate + +# Initialize +chia init +``` + +The following is how you update to the latest version: + +```bash +# Change directory +cd chia-blockchain + +# Activate the virtual environment +. :::note +Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. +::: ```bash # Download chia-blockchain @@ -197,6 +225,10 @@ sh install.sh # Activate the virtual environment . ./activate +# Initialize the new version +chia init +``` ./activate + # Initialize the new version chia init ``` @@ -206,7 +238,7 @@ chia init :::note Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. -::: +::: ```bash # Download chia-blockchain @@ -240,6 +272,9 @@ chia stop -d all # Deactivate the virtual environment deactivate +# Remove the current virtual environment +rm -r venv + # Pull the latest version git fetch git checkout latest @@ -426,6 +461,16 @@ See [install from source](/installation#from-source) for detailed instruction. #### Install from binary package +```bash +# Install chia-blockchain as a binary package +python -m venv venv +ln -s venv/bin/activate +. #### Install from source - Amazon Linux 2 + +See [install from source](/installation#from-source) for detailed instruction. + +#### Install from binary package + ```bash # Install chia-blockchain as a binary package python -m venv venv @@ -552,19 +597,136 @@ pkg install screen tmux git clone https://github.com/Chia-Network/chia-blockchain.git -b latest # or with SSH: git clone git@github.com:Chia-Network/chia-blockchain.git -b latest -# Note: you can specify the branch by adding "--branch " like: git clone http://github.com/Chia-Network/chia-blockchain.git --branch 1.0.1 +# Note: you can specify the branch by adding "--branch Now, activate the newest environment (`. venv/bin/activate`), upgrade pip (`pip install --upgrade pip`). Now you may skip down to the [clvm_rs install section](#clvm_rs) and begin there. + +---==crwdHRulesLBB_2_BBsuleRHdwrc== + +#### Why This Manual Installation? + +Currently the only way to ensure Chia builds on FreeBSD is to do it from the source. By following these instructions to the letter, you should have no problem building the latest Chia from source on a FreeBSD 11.3 or 11.4. This should also work on FreeBSD 12, possibly with some modifications - e.g. if the ports py-cryptography version is newer than 3.3.2, simply edit as needed - or if your preferred Python version is 3.8+ it should all still work considering you modify the package names as necessary. + +#### Notes on FreeNAS (TrueNAS) + +If you had been using NFS or Samba sharing to expose your plots to a harvester on another OS, such as Linux, you can instead build Chia within a jail (see the FreeNAS manual for 'jails'), expose your plot directories to it and run the harvester within. In my experience, it provides lower-latency and more reliable access to the plots since the disks are direct-attached and not being provided through an extra few layers of network protocols. + +If you are using a fresh jail created by the FreeNAS web GUI you may need to install openssh and setup a ssh key to login as root because by default it appears PAM password logins do not work. The jail shell CLI provided by the FreeNAS GUI allows copy and pasting so you can easily paste your public-key into /root/.ssh/authorized_keys && chmod -R 700 /root/.ssh. + +These instructions would be applicable to 11.3 and 11.4 jails created within FreeNAS 11 only. Version 12 (FreeBSD 12) ✔ + +#### Other Notes + +These instructions will have you building both chia-blockchain and clvm_rs from github source, and python-cryptography from FreeBSD's ports. + +The result of this build will be the "chia version" showing the current release branch ahead by 1 and in "dev0"; for instance building 1.0.1 results in "chia version" returning "1.0.2.dev0". If someone knows why this is and how to fix it, please, edit and correct this! It does not happen on Linux. + +_**These instructions assume a fresh FreeBSD 11 installation!**_ + +#### Discouraged? + +Following the instructions in this document will result in a working Chia CLI build on FreeBSD 11 if you follow step-by-step starting from a vanilla FreeBSD installation. Is something broken? Compare the commands you typed, accessible in your **bash** shell history, and match them with each command in this document. If you feel you've messed something up, do the following: +``` +# if you have (venv) in your shell prompt, type deactivate +deactivate +# remove the chia-blockchain directory which will contain clvm_rs and the Python venv +rm -rf chia-blockchain +# ... now start again! You don't need to do all the setup steps but instead may start at the upgrade notes above if you had finished up to the py-cryptography ports build. ``` -Create a virtual environment directory 'venv' from _within_ the 'chia-blockchain' directory and activate it before proceeding +#### Pre-requisite package installation + +_If starting the build again after a failure and you have not re-installed FreeBSD, don't just skip this package installation section! You may have missed one or more software packages critical to the build._ + +The 'pkg', 'portsnap' and port build are to be run as root. Everything else can be run from a normal non-root user. + +As root, update pkg and ports, and then install all packages as instructed below. ``` -cd chia-blockchain -python3 -m venv venv -source venv/bin/activate +# Update your packages and ports; if ports are already installed as part of your fresh install run portsnap update instead of fetch/extract. +pkg update +portsnap fetch && portsnap extract + +# Install bash if you have not; the default csh will not suffice for the build scripts. +pkg install bash +# change your shell to bash +chsh -s /usr/local/bin/bash +# run bash +/usr/local/bin/bash ``` -You are now in the virtual environment that Python (and so chia) will use. You should have a "(venv)" prefix to your terminal prompt to confirm the venv is working. +Make sure you change the shell for your non-root chia-blockchain user. If you're opting to run Chia as root, you can skip this. If you are root, run this as it appears below; otherwise, you can omit the username because you are already that user. + +``` +chsh -s /usr/local/bin/bash NONROOT_USERNAME +``` + +Now proceed with installing the mandatory development tools. + +``` +pkg install lang/gcc9 gcc gmake cmake + +``` + +#### gcc notes + +After installing gcc version 9.0, this message appears: + +``` +To ensure binaries built with this toolchain find appropriate versions +of the necessary run-time libraries, you may want to link using + + -Wl,-rpath=/usr/local/lib/gcc9 +``` + +It's probably possible to build the libraries in a way that doesn't require `export LD_LIBRARY_PATH=/usr/local/lib/gcc9`. If you know how click "edit" and dish. + +#### Install rust, Python, and everything else. + +``` +pkg install lang/rust +pkg install lang/python37 py37-pip py37-setuptools py37-wheel py37-sqlite3 py37-cffi py37-virtualenv py37-maturin python +pkg install node npm git openssl +``` + +If you are ssh'ing into the machine you might want to use 'screen' so that processes will continue even if you logout. For more information: https://www.freebsd.org/cgi/man.cgi?query=screen. 'tmux' is also a great alternative especially if you use iTerm2 on macOS as it supports native tabs and windows with the '-CC' CLI option. + +``` +# optional packages +pkg install screen tmux +``` + +#### Repo Cloning and Virtual Environment (venv) Activation + +**From this point on, with the exception of the security/py-cryptography port build process (and any other exceptions noted), you may proceed as a normal user.** + +``` +# Clone the latest chia-blockchain repository, via HTTP: +git clone https://github.com/Chia-Network/chia-blockchain.git -b latest +# or with SSH: +git clone git@github.com:Chia-Network/chia-blockchain.git -b latest +# Note: you can specify the branch by adding "--branch :::note +Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. +::: + +```bash +# Download chia-blockchain +git clone https://github.com/Chia-Network/chia-blockchain -b latest --recurse-submodules + +# Change directory +cd chia-blockchain + +# Checkout the beta or release candidate by tag, tags can be found https://github.com/Chia-Network/chia-blockchain/tags. +git checkout tags/2.1.2-rc2 + +# Install dependencies +./Install.ps1 + +# Activate virtual environment +. ./venv/Scripts/Activate.ps1 + +# Initialize +chia init +``` You should have a "(venv)" prefix to your terminal prompt to confirm the venv is working. Upgrade pip: @@ -692,7 +854,7 @@ sed -i .bak 's/enable_upnp: True/enable_upnp: False' ~/.chia/mainnet/config/conf While you don't absolutely need port 8444 forwarded to your Chia node, it is advised that you do so that other peers may connect to you instead of you solely connecting to them. For the average at-home farmer it is advised you do not disable UPnP unless you absolutely know what you're doing or have another node on your local network already using the port and are planning to [Farm on Many Machines](https://docs.chia.net/farming-on-many-machines/). -\*\*\*==crwdHRulesLBB_2_BBsuleRHdwrc== +---==crwdHRulesLBB_2_BBsuleRHdwrc== #### Installed and Ready to Farm! @@ -813,6 +975,211 @@ The GUI can now be launched using the following commands: cd chia-blockchain . ./activate +cd chia-blockchain-gui +npm run electron +``` ./venv/bin/activate +pip install --upgrade pip + +cd ../chiavdf/ +pip install . + +cd ../maturin/ +# don't pass static compiler flags to the rust linker because that would cause +# a core dump, possibly because of resource limits +sed -i 's|cargo_args.extend(\["--", "-C", "link-arg=-s"\])|#cargo_args.extend(\["--", "-C", "link-arg=-s"\])|' setup.py +pip install . + +cd ../clvm_rs/ +maturin develop --release + +# XXX should be a more elegant way... +" like: git clone http://github.com/Chia-Network/chia-blockchain.git --branch 1.0.1 + +``` + +Create a virtual environment directory 'venv' from _within_ the 'chia-blockchain' directory and activate it before proceeding + +``` +cd chia-blockchain +python3 -m venv venv +source venv/bin/activate +``` + +You are now in the virtual environment that Python (and so chia) will use. You should have a "(venv)" prefix to your terminal prompt to confirm the venv is working. + +Upgrade pip: + +``` +pip install --upgrade pip +``` + +To exit the virtual environment: + +``` +deactivate +``` + +#### Building py-cryptography from ports + +_**You'll need to switch to root for this part. If you're already using root remember to leave the virtual environment for this step.**_ + +``` +cd /usr/ports/security/py-cryptography + +# Instruct 'make' that the SSL library is openssl. +# Also force the Python version in case the port tries for a higher one +echo "DEFAULT_VERSIONS+=ssl=openssl python=3.7 python3=3.7" >> /etc/make.conf + +make +``` + +You'll probably see a bunch of warnings and notices; these are not errors and it will build. + +Do NOT run make install. We will do our own py-cryptography install because 'make install' does not copy to our virtual environment. (If you know how to change this, please edit). + +If you are running inside a jail and make fails with an error about the OSVERSION not matching UNAME, you will need to set the UNAME_r environment variable to match your jails OSVERSION: + +``` +# Adjust the value to match your jails OSVERSION +export UNAME_r=11.4-RELEASE +``` + +A full version list can be found [here](https://docs.freebsd.org/en/books/porters-handbook/book.html#versions). + +Once complete switch back to your non-root user if you so optioned. You must now be in your venv once again. + +#### clvm_rs + +Build and install the current version of [clvm_rs](https://github.com/Chia-Network/clvm_rs). +These instructions were created for version 0.1.7 but a newer version may exist. + +``` +git clone http://github.com/Chia-Network/clvm_rs.git --branch 0.1.7 +cd clvm_rs +maturin develop --release +pip install git+https://github.com/Chia-Network/clvm@use_clvm_rs +``` + +clvm_rs 0.1.7 is now installed in your virtual environment. + +#### Install py-cryptography to the venv + +Copy py-cryptography and its meta-data from the staging directory to your virtual environment: + +``` +cp -R /usr/ports/security/py-cryptography/work-py37/stage/usr/local/lib/python3.7/site-packages/cryptography ${VIRTUAL_ENV}/lib/python3.7/site-packages/cryptography +cp -R /usr/ports/security/py-cryptography/work-py37/stage/usr/local/lib/python3.7/site-packages/cryptography-3.3.2-py3.7.egg-info ${VIRTUAL_ENV}/lib/python3.7/site-packages/cryptography-3.3.2-py3.7.egg-info +``` + +Clear any Python byte-code cache files that may contain the old path. These should be re-built by the interpreter but we like a clean environment. + +``` +find ${VIRTUAL_ENV}/lib/python3.7/site-packages/cryptography -name __pycache__ | xargs -I{} rm -rf "{}" +``` + +#### Chia modifications and Building Chia Itself + +Switch to your chia-blockchain clone directory. You will need to edit two files. + +Using your favorite text editor, modify setup.py to edit the cryptography package version to 3.3.2. + +``` +"cryptography==3.4.6" --> to --> "cryptography==3.3.2" +``` + +Now you must modify chia/util/keychain.py to provide a static key when using the Python keyring. This is mandatory otherwise every time the keyring is accessed your passphrase will need to be entered on the command line, and for the CLI daemon this will not do. + +On line 25 of chia/util/keychain.py, change: + +``` +elif platform=="linux": +``` + +to: + +``` +elif platform=="linux" or platform.startswith("freebsd"): +``` + +On line 27 of the same file, change the passphrase from "your keyring password" to whatever you wish your passphrase to be. This is intended to be fixed in future versions but, for the time being, Linux and FreeBSD must have the keyphrase provided statically. + +``` +keyring.keyring_key = "your keyring password" # type: ignore +``` + +can be changed like so: + +``` +keyring.keyring_key = "Too Many Secrets" +``` + +Now, you will build Chia! + +``` +sh install.sh +``` + +Once done, run: + +``` +chia init +``` + +NOTE: if you need to disable UPnP - a protocol which automatically sets up port-forwarding on routers using NAT which is a typical setup at any residence with broadband - set "enable_upnp: False" in config.yaml. You can use the one-liner below or do it yourself. + +``` +sed -i .bak 's/enable_upnp: True/enable_upnp: False' ~/.chia/mainnet/config/config.yaml +``` + +While you don't absolutely need port 8444 forwarded to your Chia node, it is advised that you do so that other peers may connect to you instead of you solely connecting to them. For the average at-home farmer it is advised you do not disable UPnP unless you absolutely know what you're doing or have another node on your local network already using the port and are planning to [Farm on Many Machines](https://docs.chia.net/farming-on-many-machines/). + +\*\*\*==crwdHRulesLBB_2_BBsuleRHdwrc== + +#### Installed and Ready to Farm! + +That's it! Provided the instructions were followed to the T, and the build is a fresh FreeBSD 11.3 or 11.4, either hardware or FreeNAS jailed, you should be good to go! Now go to town with `chia start node` or whatever floats your boat. + +More details can be found in the [Chia Introduction](https://docs.chia.net/introduction). + +_WARNING: Although the following steps have been used successfully, the resulting GUI will be run with an older version of electron than is recommended by the Chia Network team. This may result in unexpected problems._ + +#### Prerequisite package installation + +As root (or using doas / sudo), first install some additional OpenBSD packages required for GUI usage: + +```bash +pkg_add -i electron +``` + +#### Build + +```bash +cd chia-blockchain +. ./activate + +cd chia-blockchain-gui + +# build / set up GUI +npm run build + +# Remove failed electron 8.2.5 install and fall back to the OpenBSD +# ports tree 8.2.0 electron, which currently (as of 6/10/2020) works. +# +# This may not continue to work in the future. A full solution to +# this requires official OpenBSD electron builds, provided by the +# electron project itself. + +rm -rf node_modules/electron +``` + +#### Launch GUI + +The GUI can now be launched using the following commands: + +```bash +cd chia-blockchain +. ./activate + cd chia-blockchain-gui npm run electron ``` @@ -868,6 +1235,14 @@ This can be done by running the following command: export PATH=/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon:$PATH ``` +To load this on startup, add it to the `.bashrc`, `.bash_profile`, or `.zshrc` file depending on which is used by the shell. + +This can be done by running the following command: + +```bash +export PATH=/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon:$PATH +``` + To load this on startup, add it to the `.bashrc`, `.bash_profile`, or `.zshrc` file depending on which is used by the shell. @@ -998,9 +1373,9 @@ chia start farmer ### Systemd -Linux users who have installed the `chia-blockchain-cli` package using [apt, yum, or dnf](https://docs.chia.net/installation/#using-the-cli) will receive systemd configuration files for initializing and managing the Chia processes. Each Chia service needs to be managed separately with systemd, except for the chia-daemon, which will be initialized automatically when any other Chia service is started with systemd (for example, the data-layer service will not automatically start the wallet service - both need to be started individually with systemd). A user must be specified during the initialization to ensure the resulting process can find the Chia root directory. The included systemd files support the default Chia directory location of `/home//.chia/mainnet` only. +Linux users who have installed the `chia-blockchain-cli` package using [apt, yum, or dnf](https://docs.chia.net/installation/#using-the-cli) will receive systemd configuration files for initializing and managing the Chia processes. Each Chia service needs to be managed separately with systemd, except for the chia-daemon, which will be initialized automatically when any other Chia service is started with systemd (for example, the data-layer service will not automatically start the wallet service - both need to be started individually with systemd). A user must be specified during the initialization to ensure the resulting process can find the Chia root directory. The included systemd files support the default Chia directory location of `/home//.chia/mainnet` only. Each Chia service needs to be managed separately with systemd, except for the chia-daemon, which will be initialized automatically when any other Chia service is started with systemd (for example, the data-layer service will not automatically start the wallet service - both need to be started individually with systemd). A user must be specified during the initialization to ensure the resulting process can find the Chia root directory. The included systemd files support the default Chia directory location of `/home//.chia/mainnet` only. -To start a Chia process with systemd, the command format is `systemctl start chia-@`. For example, if starting a Chia full node for the Linux user `ubuntu`, the command would be: +To start a Chia process with systemd, the command format is `systemctl start chia-@`. For example, if starting a Chia full node for the Linux user `ubuntu`, the command would be: For example, if starting a Chia full node for the Linux user `ubuntu`, the command would be: ``` systemctl start chia-full-node@ubuntu @@ -1031,10 +1406,10 @@ Note that the `chia-timelord` service runs the timelord coordinator service, but ## Troubleshooting -Sometimes stray daemons left over from previously running processes will cause strange bugs/errors when upgrading to a new version. Make sure all daemons and chia processes are killed before installing or upgrading. +Sometimes stray daemons left over from previously running processes will cause strange bugs/errors when upgrading to a new version. Make sure all daemons and chia processes are killed before installing or upgrading. Make sure all daemons and chia processes are killed before installing or upgrading. This is normally done by executing `chia stop -d all` from the upgrade example above. -But it doesn't hurt to double check using `ps -Af | grep chia` to make sure there are no chia processes left running. You may have to manually kill the chia daemon if an install and chia start was performed without first running `chia stop -d all` +But it doesn't hurt to double check using `ps -Af | grep chia` to make sure there are no chia processes left running. You may have to manually kill the chia daemon if an install and chia start was performed without first running `chia stop -d all` You may have to manually kill the chia daemon if an install and chia start was performed without first running `chia stop -d all` If all else fails, rebooting the machine and restarting the chia daemon/processes usually does the trick. @@ -1042,7 +1417,7 @@ If all else fails, rebooting the machine and restarting the chia daemon/processe To join a testnet, follow the instructions on [How to Join the Official Testnet](/testnets#join-the-official-testnet). -It is recommended that you keep a separate testnet environment by prepending `CHIA_ROOT="~/.chia/testnetx"` to all of your cli commands. For example, `CHIA_ROOT="~/.chia/testnet10" chia init`. An easier way to do this is to run `export CHIA_ROOT="~/.chia/testnet10"` so that all commands will use testnet10 instead of mainnet. If you're using a version above 1.2.11, you can update all config values to the testnet values by running `chia configure -t true`. +It is recommended that you keep a separate testnet environment by prepending `CHIA_ROOT="~/.chia/testnetx"` to all of your cli commands. For example, `CHIA_ROOT="~/.chia/testnet10" chia init`. An easier way to do this is to run `export CHIA_ROOT="~/.chia/testnet10"` so that all commands will use testnet10 instead of mainnet. If you're using a version above 1.2.11, you can update all config values to the testnet values by running `chia configure -t true`. For example, `CHIA_ROOT="~/.chia/testnet11" chia init`. An easier way to do this is to run `export CHIA_ROOT="~/.chia/testnet11"` so that all commands will use testnet11 instead of mainnet. You can update all config values to the testnet values by running `chia configure -t true`. ## Beta and release candidate installations @@ -1060,7 +1435,7 @@ values={[ :::note Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. -::: +::: ```bash # Download chia-blockchain @@ -1087,7 +1462,7 @@ chia init :::note Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. -::: +::: ```bash # Download chia-blockchain @@ -1112,9 +1487,17 @@ chia init -### Apt +### From packaged installer + + + -```bash # Install packages sudo apt-get update sudo apt-get install ca-certificates curl gnupg @@ -1123,11 +1506,40 @@ sudo apt-get install ca-certificates curl gnupg curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg # Set up repository -echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/prerelease/debian/ prerelease main" | sudo tee /etc/apt/sources.list.d/chia-blockchain-prerelease.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/prerelease/debian/ prerelease main" | sudo tee /etc/apt/sources.list.d/chia-blockchain-prerelease.list > /dev/null sudo apt-get update # Install chia-blockchain sudo apt-get install chia-blockchain # Use chia-blockchain-cli instead for CLI only + + + + +:::note +Make sure you have [Python 3.10](https://www.python.org/downloads/release/python-3109) and [Git](https://git-scm.com/downloads) installed. +::: + +```bash +# Download chia-blockchain +git clone https://github.com/Chia-Network/chia-blockchain -b latest --recurse-submodules + +# Change directory +cd chia-blockchain + +# Checkout the beta or release candidate by tag, tags can be found https://github.com/Chia-Network/chia-blockchain/tags. +git checkout tags/2.1.2-rc2 + +# Install dependencies +sh install.sh + +# Activate virtual environment +. ./activate + +# Initialize +chia init ``` + + + diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/introduction.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/introduction.md index 074468497a..c8dfa420df 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/introduction.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/introduction.md @@ -12,7 +12,7 @@ Chia是一种具有智能交易能力的加密货币和区块链。 它从头开 Chia的主网于2021年3月19日推出。 其生态系统的开发正在进行中,已发布了[CAT](https://chialisp.com/cats)、[NFT](https://chialisp.com/nfts)、[报价(offer)](https://chialisp.com/offers) 和 [DID](https://chialisp.com/dids) 等基础设施。 -This page will give a brief overview of Chia and its various components. If you are interested in becoming a Chia farmer, feel free to skip ahead to the [Beginner's Guide to Farming](/farming-guide). +This page will give a brief overview of Chia and its various components. This page will give a brief overview of Chia and its various components. If you are interested in becoming a Chia farmer, feel free to skip ahead to the [Beginner's Guide to Farming](/farming-guide). ## 时空证明(Proof of Space and Time) @@ -51,7 +51,7 @@ Chia 还有许多其他创新,其中一些包括: - **BLS签名**,允许将区块的所有签名聚合在一起。 - **可扩展性和性能**改进,使得可以在树莓派上运行 Chia节点。 - **权重证明和轻客户端**,支持从移动设备快速同步。 有关更多信息,请参见[轻客户端](/light-clients)。 -- **Chia资产代币**(Chia Asset Tokens,CAT)是可以从标准XCH铸造的可互换代币。 拥有无限可能! [ CAT更多信息](https://chialisp.com/cats)或观看 [CAT视频介绍](https://www.youtube.com/watch?v=yxagP_VC8BE)。 此外,社区成员已经创建了一个名为 [TAIL Database](https://www.taildatabase.com/ 'TAIL database')的数据库,其中包含了众多的CAT列表。 -- **报价文件**(Offer)使得资产的点对点交换成为可能,包括标准XCH 和CAT。 [阅读更多关于报价的信息](https://chialisp.com/offers) 或观看[简短介绍视频](https://youtu.be/Z2FoZSNtttM '报价介绍')。 +- **Chia资产代币**(Chia Asset Tokens,CAT)是可以从标准XCH铸造的可互换代币。 拥有无限可能! [ CAT更多信息](https://chialisp.com/cats)或观看 [CAT视频介绍](https://www.youtube.com/watch?v=yxagP_VC8BE)。 此外,社区成员已经创建了一个名为 [TAIL Database](https://www.taildatabase.com/ "TAIL database")的数据库,其中包含了众多的CAT列表。 +- **报价文件**(Offer)使得资产的点对点交换成为可能,包括标准XCH 和CAT。 [阅读更多关于报价的信息](https://chialisp.com/offers) 或观看[简短介绍视频](https://youtu.be/Z2FoZSNtttM "报价介绍")。 - **NFT** 通过真正的市场独立性、一致的溯源和数字永久性,推动了数字所有权的实际应用。 我们阐述了我们关于 Chia NFT的[愿景](https://www.chia.net/2022/05/11/our-vision-for-chia-nfts.zh.html)并在 2022 年 6 月推出了我们的[NFT1标准](https://www.chia.net/2022/06/29/1.4.0-introducing-the-chia-nft1-standard.zh.html)。 - 本文档将向技术受众解释Chia系统不同组件的动机和实现,并深入解释了所有内容的工作原理。 如果您想直接了解如何在Chia上制作去中心化应用程序(dApps),请访问[Chialisp](https://chialisp.com)网站。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/testnets.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/testnets.md index 44cb130fc7..d36b4b1a6c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/testnets.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/testnets.md @@ -5,8 +5,11 @@ slug: /testnets :::note -Testnet 10 is the supported testnet. Testnet 7 may remain active, but is no longer officially supported by Chia Network Inc. +Testnet 10 is the supported testnet. + +Testnet 7 may remain active, but is no longer officially supported by Chia Network Inc. Testnets can be used to test the chia software with coins that have no real world value.\ +If you want to run the Chia blockchain mainnet, use the [mainnet installation](/installation) instructions.\ If you want to run the Chia blockchain mainnet, use the [mainnet installation](/installation) instructions. ::: @@ -40,8 +43,12 @@ This step is optional, but it will speed up syncing with the testnet - Linux users: `wget https://databases.chia.net/file/chia-public-databases/blockchain_v2_testnet10.sqlite.gz` while in the directory (a v1 DB is also available, but no longer updated). - Windows users: download it from [https://downloads.chia.net/testnet10/](https://downloads.chia.net/testnet10/) and move it to the db folder in the mainnet/ directory in the Chia root folder (i.e. \~/.chia/mainnet/db is the database directory). +:::note + _Make sure to unzip the database before continuing to the next step._ +::: + :::tip Prior to starting your node, it is recommended to delete `peers.dat`, located in `~/.chia/mainnet/db`. If you don't delete this file you might see `WARNING Invalid handshake with peer` in your log file. The reason for this is that peers.dat will contain mainnet peers, which are not running on the testnet. If you do see these warnings, there's no requirement to take further action -- they'll eventually stop appearing as your invalid peers are replaced with valid ones. @@ -86,7 +93,7 @@ _These instructions are tailored for Linux. A similar approach could likely be f 在某些情况下,您可能希望在主网上耕种的同时,在其中一个测试网络上也进行耕种,而不会将它们从主网中移除。 This is doable with a bit of extra legwork to set up unique ports for the testnet chia installation. -有几个设置的选项。 You can either ensure you have the CHIA_ROOT set to unique values for each instance you want to run, or else run the installations on separate users. These instructions will show setting a specific CHIA_ROOT. +有几个设置的选项。 有几个设置的选项。 You can either ensure you have the CHIA_ROOT set to unique values for each instance you want to run, or else run the installations on separate users. These instructions will show setting a specific CHIA_ROOT. ### Set Up mainnet installation @@ -97,6 +104,7 @@ For the mainnet installation, we will stick with the default ports and CHIA_ROOT :::note (Optional) Install `yq` to make editing the yaml files easier [https://github.com/mikefarah/yq#install](https://github.com/mikefarah/yq#install).\ +Alternatively, you can manually edit the ports in `config.yaml`.\ Alternatively, you can manually edit the ports in `config.yaml`. ::: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/timelords.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/timelords.md new file mode 100644 index 0000000000..929f976ca9 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/timelords.md @@ -0,0 +1,320 @@ +--- +title: Timelords +slug: /timelord-install +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +:::warning +**DO NOT** overclock ASICs, overclocking diminishes the life of the ASIC! +::: + +Timelord architecture information can be found [here](/timelord-architecture).\ +The hw_vdf_client parameter information can be found [here](/asic-cli). + +--- + +## Timelord Requirements and Dependencies + +:::info +Due to restrictions on how [MSVC](https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B) handles 128 bit numbers and how Python relies upon MSVC, it is not possible to build and run Timelords of all types on Windows.\ +Running a timelord on a farming machine will reduce the efficiency of the farmer and the timelord, for this reason it is recommended to have a dedicated machine for running timelords. +::: + +Requirements: + +1. Software Timelord + - With the release of ASIC timelords, software timelords will have a near impossible time competing. It is recommended to only run a software timelord for experimentation and learning purposes. + - Dedicated host machine that is a modern gaming PC with minimum 6 fast cores and 8GB of RAM. +2. Bluebox Timelord + - Dedicated host machine that is a modern gaming PC with minimum 6 fast cores and 8GB of RAM. +3. ASIC Timelord + - The ASIC hardware + - Dedicated host machine that is a modern gaming PC with minimum 6 fast cores and 8GB of RAM. + - Two USB-C cables (one for power and one for data). Preferably USB-C to USB-C but we have successfully tested USB-A to USB-C without too much performance loss. + +Dependencies: + +- linux OS, our testing has been with Ubuntu 22 and newer +- git (if installing from source) +- ca-certificates curl gnupg (if installing from APT or if running an ASIC - RECOMMENDED) + +--- + +## Installing a Timelord + +:::info +Timelords execute sequential verifiable delay functions (proofs of time or VDFs), that get added to blocks to make them valid. This requires fast CPUs and a few cores per VDF. +::: + +\ +:::info +Use `chia-blockchain-cli` instead of `chia-blockchain` for CLI only version that does not have a GUI. +::: + +```bash +# Install packages +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg + +# Add GPG key +curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg + +# Set up repository +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chia.list > /dev/null +sudo apt-get update + +# Install chia-blockchain +sudo apt-get install chia-blockchain + +# Launch timelord +chia start node timelord & +``` + + + + +```bash +# Install packages +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg + +# Add GPG key +curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg + +# Set up repository +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chia.list > /dev/null +sudo apt-get update + +# Install chia-blockchain +sudo apt-get install chia-blockchain + +# Bluebox timelord setup +For bluebox timelords you will need to make two changes to `~/.chia/mainnet/config.yaml`. +- In the `timelord:` section, set `bluebox_mode:` to `True`. +- In the `full_node:` section and set `send_uncompact_interval:` to something greater than 0. We recommend `300` seconds there so that your Bluebox has some time to prove through a lot of the un-compacted Proofs of Time before the node drops more into its lap. + +Note - The default settings may otherwise work but if the total effort is a little too much for whatever machine you are on you can also lower the `process_count:` from 3 to 2, or even 1, in the `timelord_launcher:` section. You know it is working if you see `VDF Client: Sent proof` in your logs at INFO level. + +# Launch timelord +chia start node timelord & +``` + + + + +:::warning +**DO NOT** overclock ASICs, overclocking diminishes the life of the ASIC!\ +Detailed information about the hw_vdf_client parameters can be found [here](/asic-cli). +::: + +#### ASIC Cluster Setup + +It is recommended to use three host machines for ASIC clusters in a setup similar to: + +``` + _____ ASIC 2 (ASIC software only, IP set to main machine) + / +Main Machine (ASIC 1) -------------------------- +(chia node, timelord-only, and ASIC software) \_____ ASIC 3 (ASIC software only, IP set to main machine) +``` + +For an ASIC cluster you will need to follow the below install steps on the main machine to include the chia node, timelord-only, and ASIC software processes are all being run on the main machine.\ +The additional ASIC hosts will only need the ASIC software installed (noted in the below install instructions). + +```bash +# Install packages +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg + +# Add GPG key +curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg + +# Set up repositories (first is for chia and second is for the hw vdf repo, for clusters the chia software is only needed on the main machine all other hosts need the hw vdf repo) +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chia.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/chiavdf-hw/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chiavdf-hw.list > /dev/null +sudo apt-get update + +# Install chia-blockchain and ASIC repos (for clusters the chia software is only needed on the main machine all other hosts need the hw vdf repo) +sudo apt-get install chia-blockchain +sudo apt-get install chiavdf-hw + +# Launch the ASIC timelord services (for clusters verify the IP address is correct and launch with only 1 VDF for each) +hw_vdf_client --ip 127.0.0.1 8000 3 + +# Launch timelord services in chia (for clusters only the main machine should be running the node and timelord services) +chia start node timelord-only +``` + + + + +### Installing a Timelord from Source + +:::info +On MacOS x86_64 and all Linux distributions, building a Timelord is as easy as running `chia start timelord &` in the virtual environment. You can also run `./vdf_bench square_asm 400000` once you've built Timelord to give you a sense of your optimal and unloaded ips. Each run of `vdf_bench` can be surprisingly variable and, in production, the actual ips you will obtain will usually be about 20% lower due to load of creating proofs. The default configuration for Timelords is good enough to just let you start it up. Set your log level to INFO and then grep for "Estimated IPS:" to get a sense of what actual ips your Timelord is achieving.\ +Detailed information about the hw_vdf_client parameters can be found [here](/asic-cli). +::: + +```bash +# Download chia-blockchain (for clusters the chia software is only needed on the main machine all other hosts need the hw vdf repo) +git clone https://github.com/Chia-Network/chia-blockchain -b latest --recurse-submodules + +# Change directory +cd chia-blockchain + +# Install dependencies +sh install.sh + +# Activate virtual environment +. ./activate + +# Initialize +chia init +. ./activate + +# Install timelord +sh install-timelord.sh + +# Start timelord (skip this step and proceed below if installing a bluebox or ASIC timelord) +chia start full_node timelord + +# Bluebox timelord setup +Once you build the Timelord with `sh install-timelord.sh` in the virtual environment, you will need to make two changes to `~/.chia/VERSION/config.yaml`. +- In the `timelord:` section, set `bluebox_mode:` to `True`. +- In the `full_node:` section and set `send_uncompact_interval:` to something greater than 0. We recommend `300` seconds there so that your Bluebox has some time to prove through a lot of the un-compacted Proofs of Time before the node drops more into its lap. + +Note - The default settings may otherwise work but if the total effort is a little too much for whatever machine you are on you can also lower the `process_count:` from 3 to 2, or even 1, in the `timelord_launcher:` section. You know it is working if you see `VDF Client: Sent proof` in your logs at INFO level. + +# ASIC timelord setup: install the timelord repo, run the timelord-only chia service, and run the ASIC software +## Install packages +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg + +## Add GPG key +curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg + +## Set up hw vdf repository (for clusters the chia software is only needed on the main machine all other hosts need the hw vdf repo) +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/chiavdf-hw/debian/ stable main" | sudo tee /etc/apt/sources.list.d/chiavdf-hw.list > /dev/null +sudo apt-get update + +## Install ASIC repo +sudo apt-get install chiavdf-hw + +# Launch the ASIC timelord services (for clusters verify the IP address is correct and launch with only 1 VDF for each) +hw_vdf_client --ip 127.0.0.1 8000 3 + +## Launch the timelord-only chia service (for clusters only the main machine should be running the node and timelord services) +chia start node timelord-only + +``` + +--- + +## ASIC Timelord Systemd Setup + +Below is an example of a systemd service file to run the ASIC hw vdf processes.\ +NOTE - make sure to replace `USERNAME` with your system's username. + +```bash +# Create systemd service +sudo nano /etc/systemd/system/chiahw-vdf.service + +# Copy the data from below replacing USERNAME with your system's username +``` + +### Example ASIC systemd File + +```bash +[Unit] +Description=Chia HW VDF Service + +[Service] +Type=simple +ExecStart=/usr/bin/hw_vdf_client --ip 127.0.0.1 8000 3 +User=USERNAME +Group=USERNAME +LimitNOFILE=1048576 +LimitNPROC=1048576 +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target +``` + +```bash +# Save and start the systemd service +CTRL+O # save the file +CTRL-X # exit the nano editor + +# Reload and start the systemd services +sudo systemctl daemon-reload +sudo systemctl enable chiahw-vdf.service +sudo systemctl start chiahw-vdf.service +sudo systemctl status chiahw-vdf.service +``` + +### Using the systemd Service + +Restart the ASIC systemd software: +`sudo systemctl restart chiahw-vdf.service` + +Stop the ASIC systemd software: +`sudo systemctl stop chiahw-vdf.service` + +Check status of the ASIC systemd software: +`sudo systemctl status chiahw-vdf.service` + +--- + +## Troubleshooting a Timelord + +For troubleshooting steps please refer to the documentation [here](/troubleshooting/timelords). + +--- + +## Timelord support + +Join Our [Discord](https://discord.gg/chia) and jump into the #support channel for support + +--- + +## Timelord FAQ + +### What are the hardware requirements for running a Timelord? + +There are no specific requirements as timelords are a fastest wins process. This means that those with higher end hardware are more likely to generate Proofs of Time than those with lower end hardware. +Currently, a modern gaming PC with 8 cores and 8 GB of RAM is recommended when running an ASIC or Bluebox timelord. With the release of ASIC timelords, software timelords will have a near impossible time competing. It is recommended to only run a software timelord for experimentation and learning purposes. + +### Can a Single ASIC Compete with an ASIC Cluster? + +The nature of timelords is to create three VDF chains, one can create the chains themselves in parallel (i.e. one on each ASIC) but one cannot break down the VDFs themselves to parallelize them. +This means that the ASIC cluster will always have an advantage but there are times when a single ASIC can reasonably compete. This almost always requires the block farming node to be closer in physical proximity to the single ASIC than to the ASIC cluster establishing a minor time advantage for the single ASIC + +### Can I Overclock the ASIC to Get More Performance or Higher IPS? + +While one can overclock the ASIC we very strongly recommend against doing such. Overclocking the ASICs will lead to diminishing longevity of the machine and only provides a minor increase in performance making it inefficient to overclock an ASIC. + +### What Voltage Should I Use for an ASIC Timelord? + +It is highly recommend to use the default `0.88` voltage. + +### What OS is Compatible with Running a Timelord? + +It is recommended to use a linux OS to run timelords as these are the most performant. +If running on a MAC, one can compile the chia repo from source and run the timelord services but this is currently only compatible with Intel chips and not compatible with the silicon chip. +Windows is not recommended, due to restrictions on how [MSVC](https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B) handles 128 bit numbers and how Python relies upon MSVC, it is not possible to build and run Timelords of all types on Windows. + +### What System Resources are most Important for an ASIC? + +The single thread speed is one of the most important factors for having a faster ASIC. + +--- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/using-the-gui.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/using-the-gui.md index b5d2d007a2..b46bf62e0d 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/using-the-gui.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/using-the-gui.md @@ -31,7 +31,7 @@ Enabling a passphrase is a recommended step for protecting your funds, but it on ## Syncing -Upon opening Chia, your wallet will need to sync. You'll need to see a green checkmark next to the **WALLET** label in the upper-right corner before seeing any tokens you have. +Upon opening Chia, your wallet will need to sync. Upon opening Chia, your wallet will need to sync. You'll need to see a green checkmark next to the **WALLET** label in the upper-right corner before seeing any tokens you have.

synced @@ -96,3 +96,11 @@ When acquiring NFTs or tokens, you may need to make an offer for them. Offers ar By using offers you are embracing the decentralized nature of the Chia blockchain. [Read more about offers](https://chialisp.com/offers). + +## Run Chia Services in the Background + +Starting in version 2.3.0, this is possible. When you attempt to close the application, the confirmation window will now display a checkbox. If you want to continue running your full node, harvester, farmer, etc after closing the GUI, be sure to check the checkbox, as demonstrated in the following image: + +

+ offers +

diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/wallet-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/wallet-guide.md index fcf1847d8f..8aa6e48fca 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/wallet-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/wallet-guide.md @@ -51,13 +51,13 @@ Assuming you don't have a wallet yet, click `CREATE A NEW WALLET KEY` (If you al

-You will be presented with a list of twenty-four words. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is also important. +You will be presented with a list of twenty-four words. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is important. This is your wallet's recovery phrase. These words are all that are needed to recover your wallet on a new computer. Write them down and store them in a safe place. The order of the words is also important. -You can also choose a custom name for your wallet. Click `NEXT` when you are finished. +You can also choose a custom name for your wallet. Click NEXT when you are finished. Click `NEXT` when you are finished. :::warning -If someone obtains a copy of these words, they can steal your entire wallet, including all of its funds. Be sure to store your recovery phrase in a safe place. +If someone obtains a copy of these words, they can steal your entire wallet, including all of its funds. Be sure to store your recovery phrase in a safe place. Be sure to store your recovery phrase in a safe place. ::: @@ -91,7 +91,7 @@ Chia Asset Tokens (CATs) are fungible assets on Chia's blockchain. In Chia parla
manage token list -
+

2. The Chia reference wallet comes with a few included CATs, but most will need to be entered manually. If you want to add one of the included CATs, click the slider next to the CAT you would like to add. @@ -99,14 +99,14 @@ Chia Asset Tokens (CATs) are fungible assets on Chia's blockchain. In Chia parla
add token -
+

3. If your new CAT is not included in the reference wallet, you will need to obtain its Asset ID (TAIL). There are multiple websites that provide a listing of CATs and their IDs. One such site is [spacescan.io](https://www.spacescan.io). Simply browse to the website, then search for your CAT. For example, here is a search for "dexie bucks":
search for dexie bucks -
+

In addition to CATs, Spacescan provides a listing of NFTs. In certain cases, such as with Dexie Bucks, there are CAT _and_ NFT collections with the same name. In this case, be sure to click on `CAT2`, as in the above image. @@ -115,21 +115,21 @@ The result will show you the details of the CAT you selected, including its ID.
copy dexie bucks ID -
+

It is recommended that you check with another source of truth to make sure you have the correct ID. Another website that provides a listing of CATs and their IDs is [taildatabase.com](https://www.taildatabase.com/). Browse to this site, click the `Explore` menu, and search for your CAT. The name should appear in the search results:
taildatabase dexie bucks search -
+

Some information about the CAT will appear, including its Asset ID, as highlighted here:
taildatabase dexie bucks asset ID -
+

Copy this ID and continue to the next step. @@ -144,7 +144,7 @@ If someone sends you an Asset ID (TAIL), do not assume it is correct. Instead, d
One Meeellion CATs -
+

Your new CAT will now appear in the "Tokens" list in your wallet. @@ -157,7 +157,7 @@ For our first example Offer, we will offer 1 XCH in exchange for the new CAT.
create an offer -
+

2. Next, fill in the details of the Offer. By default, the Offer will be set to expire after 7 days. This is likely fine in most cases. (If an Offer never expires, there is a chance it will be taken as arbitrage long after the maker has forgotten about it.) However, feel free to enter a different expiration time if desired. @@ -168,14 +168,14 @@ After all of the details have been filled in, click `CREATE OFFER`:
fill in offer details -
+

3. If anyone acquires this Offer and it is still valid, they will be able to take it. Click the `I UNDERSTAND` button and the Offer will be created:
confirm offer -
+

3. At this point, the Offer has been created locally. However, until you share it, it is unlikely that anyone will know it exists. Feel free to email the Offer file, share it on social media, etc. The Offer file does not contain any sensitive data. Whoever sees it will only have two options: take it or ignore it. @@ -188,14 +188,14 @@ _ Spacescan -- an explorer and bulletin board \* Finally, you can save the file
distribute offer -
+

4. The Offer will now appear as `Pending Accept`, and the amount of time (if any) until it expires will also be shown:
offer pending status -
+

Congratulations! You have created an Offer. A few things to note: @@ -215,73 +215,73 @@ This example will use a different computer to accept the Offer that was created
One Meeellion CATs -
+

2. Click `Offers`, then view the Offer by either loading, dragging/dropping, or pasting the file:
view offer -
+

3. In this case, the Offer will expire in 6 days. The Taker must give 1000 CATs in exchange for 1 TXCH. The Maker has included a blockchain fee, and the Taker has the option of adding to this fee if desired. If the terms are acceptable, click `ACCEPT OFFER`:
accept offer -
+

4. You will need to confirm that you actually want to accept the Offer, which will initiate an on-chain transaction:
verify acceptance of offer -
+

5. The Offer has been accepted. Click `OK`:
offer accepted -
+

6. While the blockchain transaction is pending, you will see this status in the `Offers you accepted` panel:
offer pending confirm -
+

7. Meanwhile, the `Tokens` screen will show the pending XCH and CAT amounts:
1 XCH incoming -
+

1000 CATs outgoing -
+

8. After the transaction has been confirmed (typically 1-3 minutes), the Offer's status will be updated to `Confirmed`:
plus 1 XCH -
+

9. The final XCH and CAT balances will then be reflected in the `Tokens` screen:
minus 1000 CATs -
+

offer pending status -
+

--- @@ -296,17 +296,17 @@ Click the three dots in the "Actions" column:
Pending Accept -
+

-2. Click "Cancel Offer". +2. Click "Cancel Offer".
Cancel Offer -
+

-3. The "Cancel Offer" dialog will appear. The default option is to cancel on the blockchain, as shown in the red circle in the image below. +3. The "Cancel Offer" dialog will appear. The default option is to cancel on the blockchain, as shown in the red circle in the image below. This option will use your wallet to spend the coin(s) you had offered, and create new coins of the same type and value. This process does not involve taking the other end of the Offer, so you will not receive any funds of the type you had requested. The end result is that your wallet's balance will be the same as it was before you made the Offer (minus any transaction fees). @@ -314,30 +314,30 @@ The advantage of canceling in this manner is that it ensures that nobody can acc
Cancel on blockchain -
+

-4. If you uncheck the checkbox, your wallet will un-reserve the coins for your Offer. However, nothing will be recorded on the blockchain. If you have copied your Offer file elsewhere, someone could still accept it. +4. If you uncheck the checkbox, your wallet will un-reserve the coins for your Offer. However, nothing will be recorded on the blockchain. If you have copied your Offer file elsewhere, someone could still accept it. The advantages of this option are that it will cancel your Offer instantly, and there's no need to include a fee.
Cancel off chain -
+

-5. If you left the checkbox checked in the previous step, your Offer will enter the "Pending Cancel" state while the cancellation is being recorded on the blockchain. This could take several minutes. +5. If you left the checkbox checked in the previous step, your Offer will enter the "Pending Cancel" state while the cancellation is being recorded on the blockchain. This could take several minutes.
Pending Cancel -
+

-6. When your order has been successfully canceled, it will enter the "Cancelled" state. Your funds are now available in your wallet. +6. When your order has been successfully canceled, it will enter the "Cancelled" state. Your funds are now available in your wallet.
Cancelled -
+

--- @@ -350,28 +350,28 @@ You can also create Offers to buy or sell NFTs. While it is possible to select N
Cancelled -
+

2. In this case, both of the NFTs are selected. Next, click `ACTIONS` and `Create Offer`:
Cancelled -
+

3. The `Offer Maker` dialog will appear. Fill in any additional details for your Offer (be sure to request something!), and click `CREATE OFFER`:
Cancelled -
+

3. Share the Offer as you would with a CAT Offer. After the Offer has been created, the NFTs being offered will appear in the Offer summary:
Cancelled -
+

--- @@ -384,21 +384,21 @@ You can also swap NFTs for other NFTs, just like trading cards.
Multi NFT swap -
+

2. When you are satisfied with terms of the Offer, click `CREATE OFFER`:
Cancelled -
+

3. After the Offer has been created, the assets to be trade will be displayed in the summary, just as with other Offers:
Cancelled -
+

--- @@ -413,42 +413,42 @@ This example will continue with the same NFT-NFT Offer from the last section.
Share on Dexie -
+

2. Be sure to verify that the Offer is correct; after it is shared publicly, someone could accept it:
Share Offer -
+

3. Click `NOTIFY CURRENT OWNER`:
Notify current owner -
+

4. You have the option to add a transaction fee for the notification. You can also choose whether to allow counter offers:
Send message -
+

5. A new offer coin will be created. If the owner of the NFT you would like to acquire is using the reference wallet, the wallet will notice this new coin and examine its contents. A new notification will appear in the owner's wallet. Click the notification bell:
Incoming notification -
+

6. A summary of the Offer will appear. Click the summary to see the details of the Offer:
View Offer -
+

--- @@ -497,6 +497,7 @@ Let's say a Maker has wallets for XCH and CKC, with no money in either of them.
0 CKC wallet
+
The maker attempts to make an ambitious offer: 100 XCH for 1 million CKC. @@ -570,6 +571,7 @@ There is a warning dialog about the unknown cat, after which the Offer is confir
Unknown CAT success
+
Notice that the Offer file was named `0.25_Shibe_for_0.1_XCH.offer`, but the file name itself does _not_ dictate the contents of the Offer. The Taker may have inadvertently accepted an Offer for a worthless token! @@ -604,6 +606,7 @@ Let's say a Maker has 0.1 XCH and 1 USDS:
1 USDS in wallet
+
The Maker offers 0.1 XCH in exchange for 10 USDS: @@ -635,6 +638,7 @@ After the Offer has been canceled, a Taker notices the Offer file and decides to
Confirm a canceled offer
+
Later, the Maker notices that the Offer has gone through, despite having been canceled: @@ -645,6 +649,7 @@ Later, the Maker notices that the Offer has gone through, despite having been ca
Post-offer 11 USDS
+
If the Offer had been canceled on-chain, the reserved coins would have been spent. At that point, even if someone else had gotten access to the Offer file, the Offer itself would've been invalid. @@ -667,6 +672,7 @@ For example, let's say a Maker has 1 XCH and 0 USDS:
0 USDS in wallet
+
The Maker creates an Offer of 0.1 XCH for 10 USDS. @@ -683,10 +689,13 @@ This is viewable in the offer's details:
One coin used for offer +
Scroll to the bottom to view coins reserved for the Offer.
+ +
While the Offer is pending, the Maker attempts to send 0.1 XCH to another address. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/constants-variables-notation.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/constants-variables-notation.md index 181b63c4e5..16210e7f7e 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/constants-variables-notation.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/constants-variables-notation.md @@ -8,29 +8,29 @@ slug: /constants-variables-notation ## 0.1 重要常数 -| 常数 | Description | -| ----------- | ----------------------------------------- | -| 10分钟 | 目标 **子时隙(sub-slot)的间隔时长** | -| 32个区块 | 每个目标 **子时隙的区块数量** | -| 16/64个区块 | 每个时隙的最小/最大区块数量 | -| 4608个区块 | 平均每个**纪元(epoch)的区块**数量 | +| 常数 | Description | +| -------- | --------------------------- | +| 10分钟 | 目标 **子时隙(sub-slot)的间隔时长** | +| 32个区块 | 每个目标 **子时隙的区块数量** | +| 16/64个区块 | 每个时隙的最小/最大区块数量 | +| 4608个区块 | 平均每个**纪元(epoch)的区块**数量 | | 384个区块 | 平均每个**子纪元(sub-epoch)的区块**数量 | -| 64个签名点 | 每个**子时隙的签名点**数量 | +| 64个签名点 | 每个**子时隙的签名点**数量 | 由上可得以下结论: -| 隐含的常数 | Description | -| ---------- | ------------------------------------------------------------------------------------------------------------------------- | -| 1天 | **一个纪元的时长**为 $$10 {\ \sf min}\cdot\frac{4608{\ \sf blocks}}{32\ \sf blocks}=1440{\ \sf min}\quad (=1{ \sf day})$$ | -| 2小时 | **目标**子纪元的时长\*\*\*\* | -| 18.75秒 | 平均**完成一个区块的时长**为 $\frac{10{\sf\ min}}{32}=18.75 {\sf\ sec}$ | -| 9.375秒 | **签名点之间的时长**为 $\frac{600}{64}=9.375 {\sf\ sec}$ | +| 隐含的常数 | Description | +| ------ | ----------------------------------------------------------------------------------------------------------------------------- | +| 1天 | **一个纪元的时长**为 $$10 {\ \sf min}\cdot\frac{4608{\ \sf blocks}}{32\ \sf blocks}=1440{\ \sf min}\quad (=1{ \sf day})$$ | +| 2小时 | **目标**子纪元的时长**** | +| 18.75秒 | 平均**完成一个区块的时长**为 $\frac{10{\sf\ min}}{32}=18.75 {\sf\ sec}$ | +| 9.375秒 | **签名点之间的时长**为 $\frac{600}{64}=9.375 {\sf\ sec}$ | ## 0.2 重要变量 -| 变量 | Description | -| ------------------ | -------------------------------------------------------------------------------- | -| $D\in{\mathbb N}$ | 难度参数。 每个纪元重新校准一次,以满足每个时隙(slot)32个区块的目标 | +| 变量 | Description | +| -------------------- | ------------------------------------------- | +| $D\in{\mathbb N}$ | 难度参数。 每个纪元重新校准一次,以满足每个时隙(slot)32个区块的目标 | | $T\in {\mathbb N}$ | 时间参数(子时隙的VDF步数)。 每个纪元重新校准一次,以满足每个子时隙10分钟的目标 | ## 0.3 提示 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-abstract.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-abstract.md index dacb226e69..81e963a3a5 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-abstract.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-abstract.md @@ -18,4 +18,4 @@ slug: /green-paper-abstract ### 先前版本共识绿皮书 -为了提供历史背景,绿皮书的先前版本讨论了一种从未实现的共识,可以在这里查看:[先前绿皮书](/files/Precursor-ChiaGreenPaper.pdf)。 +In order to provide historical context, the Green Paper's previous version that discusses a precursor consensus which was never implemented is available here for viewing: [Precursor Green Paper](https://docs.chia.net/assets/files/Precursor-ChiaGreenPaper-82cb50060c575f3f71444a4b7430fb9d.pdf). diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-appendix.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-appendix.md index 19ecff6b0a..d50a92e9e5 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-appendix.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-appendix.md @@ -12,21 +12,13 @@ In this section we sketch the main building blocks used in the $\textsf{Chia}$  A digital signature scheme is specified by three algorithms; a (probabilistic) key-generation algorithm ${{\sf Sig.keygen}}$, a signing algorithm $\mu\gets {{\sf Sig.sign}}(sk,m)$ and a verification algorithm ${{\sf Sig.verify}}$. We assume the standard security notion (unforgeability under chosen message attacks) and perfect completeness, that is, a correctly generated signature will always verify: -$$ -\begin{aligned} -\forall m,&& -\Pr[{{\sf Sig.verify}}(pk,m,\mu)={\sf accept}]=1\\ -\textrm{where}&&(pk,sk)\gets{{\sf Sig.keygen}}\ ;\ \mu\gets{{\sf Sig.sign}}(sk,m)~. -\end{aligned} -$$ +$$ \begin{aligned} \forall m,&& \Pr[{{\sf Sig.verify}}(pk,m,\mu)={\sf accept}]=1\\ +\textrm{where}&&(pk,sk)\gets{{\sf Sig.keygen}}\ ;\ \mu\gets{{\sf Sig.sign}}(sk,m)~. \end{aligned} $$ $\textsf{Chia}$ uses signatures in the foliage (to chain foliage blocks and to bind them to the trunk) and also in the trunk (so only the farmer can compute the challenge). To avoid grinding attacks, the signatures used in the trunk must be unique, that is for every $pk$ (this includes maliciously generated public keys) and message $m$ there can be at most one accepting signature -$$ -\forall pk,m,\ -({{\sf Sig.verify}}(pk,m,\mu)={\sf accept})\wedge -({{\sf Sig.verify}}(pk,m,\mu')={\sf accept})\Rightarrow (\mu=\mu')~. -$$ +$$ \forall pk,m,\ +({{\sf Sig.verify}}(pk,m,\mu)={\sf accept})\wedge ({{\sf Sig.verify}}(pk,m,\mu')={\sf accept})\Rightarrow (\mu=\mu')~. $$ $$ ## A.2 (Unique) Proofs Of Space @@ -56,19 +48,18 @@ To prevent grinding attacks, we need our PoSpace to be unique as defined below. A PoSpace is unique if for any identity $pk$ and any challenge $c$ there is exactly one proof, i.e., -$$ -\begin{aligned} &\forall N,pk,c,\\ &\left|\{\sigma\ :\ \left({{\sf PoSpace.verify}}(\sigma)={\sf accept}\right)\wedge \left( (\sigma.N,\sigma.pk,\sigma.c)=(N,pk,c)\right)\}\right|= 1 \end{aligned} -$$ +$$ \begin{aligned} &\forall N,pk,c,\\ +&\left|\{\sigma\ :\ \left({{\sf PoSpace.verify}}(\sigma)={\sf accept}\right)\wedge \left( (\sigma.N,\sigma.pk,\sigma.c)=(N,pk,c)\right)\}\right|= 1 \end{aligned} $$ We call a PoSpace _weakly_ unique if the _expected_ number of proofs is close to $1$, i.e., -$$ -\begin{aligned} &\forall N,pk,c,\\ &{\mathrm E}_{c\gets \{0,1\}^w}\left[|\{\sigma : \left({{\sf PoSpace.verify}}(\sigma)={\sf accept}\} \right) \wedge \left((\sigma.N,\sigma.pk,\sigma.c)=(N,pk,c)\right) |\right]\\ &\approx 1 \end{aligned} -$$ +$$ \begin{aligned} &\forall N,pk,c,\\ +&{\mathrm E}_{c\gets \{0,1\}^w}\left[|\{\sigma : \left({{\sf PoSpace.verify}}(\sigma)={\sf accept}\} \right) \wedge \left((\sigma.N,\sigma.pk,\sigma.c)=(N,pk,c)\right) |\right]\\ +&\approx 1 \end{aligned} $$ For weakly unique PoSpace we assume that whenever there is more than one proof for a given challenge which passes verification, ${\sf PoSpace.prove}(S,c)$ outputs all of them. -The [AAC+17] PoSpace used in $\textsf{Chia}$ is only _weakly unique_. To be able to focus on the main challenges, we will nonetheless assume a _unique_ PoSpace when analyzing $\textsf{Chia}$ but our analysis can be extended without major difficulties to handle weakly unique PoSpace, things just get a bit more messy. +The [AAC+17] PoSpace used in $\textsf{Chia}$ is only _weakly unique_. To be able to focus on the main challenges, we will nonetheless assume a _unique_ PoSpace when analyzing $\textsf{Chia}$ but our analysis can be extended without major difficulties to handle weakly unique PoSpace, things just get a bit more messy. To be able to focus on the main challenges, we will nonetheless assume a _unique_ PoSpace when analyzing $\textsf{Chia}$ but our analysis can be extended without major difficulties to handle weakly unique PoSpace, things just get a bit more messy. ### A.2.4 The [AAC+17] PoSpace @@ -76,15 +67,11 @@ We give a very high level outline of the PoSpace from [Pie19b; Wes20] VDFs discussed below also $\tau.\pi$ is unique. **sequentiality:** Informally, sequentiality states that for any $t$, an adversary ${\cal A}$ who makes less than $t$ sequential steps will not find an accepting proof on a random challenge. I.e., for some tiny $\epsilon$ -$$ -\hspace{-1cm} - \Pr[{\sf VDF.verify}(\tau)={\sf accept}\ \wedge \ \tau.c=c\ \wedge\ \tau.t=t \ :\ c\stackrel{rand}{\gets}\{0,1\}^w,\tau\gets{\cal A}(c,t)]\le \epsilon -$$ +$$ \hspace{-1cm} \Pr[{\sf VDF.verify}(\tau)={\sf accept}\ \wedge \ \tau.c=c\ \wedge\ \tau.t=t \ :\ c\stackrel{rand}{\gets}\{0,1\}^w,\tau\gets{\cal A}(c,t)]\le \epsilon $$ Let us stress that ${\cal A}$ is only bounded by the number of _sequential_ steps, but they can use high parallelism. Thus the VDF output cannot be computed faster by adding parallelism beyond what can be used to speed up a single step of the VDF computation. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-introduction.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-introduction.md index a0661ab3d5..19af568982 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-introduction.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-introduction.md @@ -13,7 +13,7 @@ The **$\textsf{Chia}$ network** ([chia.net](https://chia.net/)) is a permission
Figure 1: Illustration of one slot (taking around 10 minutes) of the Chia blockchain. For illustration the slot has just 16 (instead 64) signage points and only 4 blocks (the actual chain has a target of 32).
-As mentioned, $\textsf{Chia}$ is basically what's called a _longest-chain_ protocol in the literature [BNPW19; BDK+19]. This notion captures blockchain protocols that borrow the main ideas from the Bitcoin blockchain: the parties (called miners in Bitcoin and farmers in Chia) that dedicate resources (hashing power in Bitcoin, disk space in Chia) towards securing the blockchain just need to +As mentioned, $\textsf{Chia}$ is basically what's called a _longest-chain_ protocol in the literature [BNPW19; BDK+19]. This notion captures blockchain protocols that borrow the main ideas from the Bitcoin blockchain: the parties (called miners in Bitcoin and farmers in Chia) that dedicate resources (hashing power in Bitcoin, disk space in Chia) towards securing the blockchain just need to This notion captures blockchain protocols that borrow the main ideas from the Bitcoin blockchain: the parties (called miners in Bitcoin and farmers in Chia) that dedicate resources (hashing power in Bitcoin, disk space in Chia) towards securing the blockchain just need to 1. listen to the (P2P) network to learn about progress of the chain and to collect transactions. @@ -23,7 +23,7 @@ As mentioned, $\textsf{Chia}$ is basically what's called a _longest-chain_ prot No other coordination or communication amongst the parties is required. In particular, as the miners in Bitcoin, the farmers in $\textsf{Chia}$ only need to speak up once they find a block and want it to be included in the chain. -Constructing a secure permissionless blockchain using proofs of space is much more challenging than using proofs of work. In particular, a secure (under dynamic availability) longest-chain protocol based on proofs of space alone does not exist [BP22], so Chia's _proofs of space and time_ (PoST) consensus protocol, apart from farmers providing disk space, additionally relies on so called timelords who evaluate verifiable delay functions (VDFs). Figure 2 gives an overview of the formal security proofs and more informal arguments outlined in this document. +Constructing a secure permissionless blockchain using proofs of space is much more challenging than using proofs of work. Constructing a secure permissionless blockchain using proofs of space is much more challenging than using proofs of work. In particular, a secure (under dynamic availability) longest-chain protocol based on proofs of space alone does not exist [BP22], so Chia's _proofs of space and time_ (PoST) consensus protocol, apart from farmers providing disk space, additionally relies on so called timelords who evaluate verifiable delay functions (VDFs). Figure 2 gives an overview of the formal security proofs and more informal arguments outlined in this document. Figure 2 gives an overview of the formal security proofs and more informal arguments outlined in this document.
Diagram of Chia security and arguments @@ -34,17 +34,13 @@ Constructing a secure permissionless blockchain using proofs of space is much mo The Bitcoin blockchain is secure [GKL15] as long as the hashing power $hash_h$ (measured in hashes per second) contributed by honest parties is larger than the hashing power $hash_a$ available to an adversary, i.e., -$$ -hash_h > hash_a -$$ +$$ hash_h > hash_a $$
eq.(1)
Similarly, the security of $\textsf{Chia}$ depends on the amount of space $space_h$ and $space_a$ controlled by the honest parties and the adversary, respectively. Additionally, the speed $vdf_h$ and $vdf_a$ (measured in steps per second) of the VDFs run by the fastest honest timelord and the adversary are relevant. With these definitions, -$$ -\textrm{{\sf Chia}\ is provably secure if : } space_h\cdot vdf_h > space_a \cdot vdf_a \cdot 1.47 -$$ +$$ \textrm{{\sf Chia}\ is provably secure if : } space_h\cdot vdf_h > space_a \cdot vdf_a \cdot 1.47 $$
eq.(2)
@@ -56,9 +52,7 @@ This assumption comes at a prize: there's a $1.47$ factor by which the adversari The bound in eq.(1) is not tight in the sense that we don't have an attack that works if we replace "$>$" with "$<$". We have an attack assuming giving the adversary a slightly lower boosting factor of $1.34$ -$$ -\textrm{double spending in {\sf Chia}\ possible if : }space_h\cdot vdf_h < space_a \cdot vdf_a \cdot 1.34 -$$ +$$ \textrm{double spending in {\sf Chia}\ possible if : }space_h\cdot vdf_h < space_a \cdot vdf_a \cdot 1.34 $$
eq.(3)
@@ -70,9 +64,7 @@ A contribution of this writeup is a modular approach towards achieving secure lo In Bitcoin each block contains the hash of the previous block. If two blocks are found at roughly the same time, so there was no time for the block that was found first to propagate to the miner that found the second, they will refer to the same block, and only one can be added to the chain. The other will be "orphaned" and does not contribute towards securing the blockchain. The fraction of orphaned blocks depends on the network delay (the smaller the delay the fewer orphans) and the block-arrival time (fewer blocks per minute decrease the probability of orphans). Taking this into account, the security statement for Bitcoin from eq.(1) should be augmented to: -$$ -hash_h \cdot \left(1-\frac{network\ delay}{block\ arrival\ time}\right)> hash_a -$$ +$$ hash_h \cdot \left(1-\frac{network\ delay}{block\ arrival\ time}\right)> hash_a $$
eq.(4)
@@ -176,7 +168,7 @@ A block $\beta=\{\beta_F,\beta_T\}$ is made of two parts, the foliage block $\be - A timelord computes the ${\cal RC},{\cal CC},{\sf i}{\cal CC},{\cal FC}$ chains and broadcasts relevant values to the network. This includes signage points ${\sf rc\_sp}$ and ${\sf cc\_sp}$ which are the values of the ${\cal RC}$ and ${\cal CC}$ chains (together with a proof that these values are on the VDF chains) once every $9.375$ seconds. -- A farmer who receives these _signage points_ ${\sf rc\_sp}$ and ${\sf cc\_sp}$ checks whether these points are of interest (i.e., on the heaviest known chain) and all the VDF proofs verify. Next, for each of their plots, they use ${\sf cc\_sp}$ as a challenge to compute a PoSpace $\sigma$. Then they check whether $\sigma$ satisfies a winning condition that allows to produce a block. +- A farmer who receives these _signage points_ ${\sf rc\_sp}$ and ${\sf cc\_sp}$ checks whether these points are of interest (i.e., on the heaviest known chain) and all the VDF proofs verify. Next, for each of their plots, they use ${\sf cc\_sp}$ as a challenge to compute a PoSpace $\sigma$. Then they check whether $\sigma$ satisfies a winning condition that allows to produce a block. Next, for each of their plots, they use ${\sf cc\_sp}$ as a challenge to compute a PoSpace $\sigma$. Then they check whether $\sigma$ satisfies a winning condition that allows to produce a block. If a winning PoSpace $\sigma$ is found, the farmer creates a signature $\mu_{\sf rc\_sp}$ of ${\sf rc\_sp}$ (that verifies under the $pk$ associated with $\sigma$) and a foliage block $\beta_F$ and then gossips the block $\beta=\{\beta_F,\beta_T=\{\sigma,\mu_{\sf rc\_sp}\}\}$. @@ -188,7 +180,7 @@ A block $\beta=\{\beta_F,\beta_T\}$ is made of two parts, the foliage block $\be (${\sf i}{\cal CC}$) For some extra security, the timelord doesn't simply wait till the end of the slot to infuse the signature, but a third VDF is used to fork from ${\cal CC}$ at the infusion point by infusing $\mu_{\sf rc\_sp}$ into ${\cal CC}$, and this fork, called the infused challenge chain ${\sf i}{\cal CC}$, is then infused back to ${\cal CC}$ at the end of the slot. - (${\cal FC}$) Iff the signage point of this block is later than the infusion point of the last _transaction block_, then this block is also a transaction block. Only in this case its foliage $\beta_F$ is appended to the foliage (hash) chain ${\cal FC}$, and this block becomes a "transaction block". + (${\cal FC}$) Iff the signage point of this block is later than the infusion point of the last _transaction block_, then this block is also a transaction block. Only in this case its foliage $\beta_F$ is appended to the foliage (hash) chain ${\cal FC}$, and this block becomes a "transaction block". Only in this case its foliage $\beta_F$ is appended to the foliage (hash) chain ${\cal FC}$, and this block becomes a "transaction block". ## 1.8 Space Oddities @@ -196,7 +188,7 @@ When constructing a proof of stake or proof or a space based longest-chain proto ### 1.8.1 Sized vs. Unsized -A key difference between stake and work is the fact that in a stake based chain we know the amount of the resource available for mining, while for an external resource like work or space this is no longer the case. Lewis-Pye and Roughgarden [Lew21; LR21] formalize this as the _sized_ vs. _unsized_ setting and prove some fundamental differences between them. The main result in [LR21] shows that _certificates_ which "provide incontrovertible proof of block confirmation", only exist in the sized setting, i.e., for PoStake but not PoWork blockchains. +A key difference between stake and work is the fact that in a stake based chain we know the amount of the resource available for mining, while for an external resource like work or space this is no longer the case. Lewis-Pye and Roughgarden [Lew21; LR21] formalize this as the _sized_ vs. _unsized_ setting and prove some fundamental differences between them. A key difference between stake and work is the fact that in a stake based chain we know the amount of the resource available for mining, while for an external resource like work or space this is no longer the case. Lewis-Pye and Roughgarden [Lew21; LR21] formalize this as the _sized_ vs. _unsized_ setting and prove some fundamental differences between them. The main result in [LR21] shows that _certificates_ which "provide incontrovertible proof of block confirmation", only exist in the sized setting, i.e., for PoStake but not PoWork blockchains. In their framework _space_ and also _space and time_ (i.e., the available space multiplied with the speed of the available VDFs) as used in $\textsf{Chia}$ are an unsized resource, so we can't hope to get certificates. @@ -210,7 +202,7 @@ To prevent such attacks some chain require parties to delete old keys, but it's ### 1.8.3 Replotting -A subtle but important difference between stake and space is the fact that space allows for _replotting_ which has no analogue in the stake setting: Given a challenge $c$, a space farmer controlling a plot $S$ of size $N$ can _efficiently_ compute _one_ proof $\sigma \gets {\sf PoSpace.prove}(S,c)$. This is analogous to the stake based setting, but unlike in the stake setting, the farmer can _inefficiently_ compute _multiple_ proofs for challenge $c$ by repeatedly creating fresh plots and computing one proof with each of them. +A subtle but important difference between stake and space is the fact that space allows for _replotting_ which has no analogue in the stake setting: Given a challenge $c$, a space farmer controlling a plot $S$ of size $N$ can _efficiently_ compute _one_ proof $\sigma \gets {\sf PoSpace.prove}(S,c)$. This is analogous to the stake based setting, but unlike in the stake setting, the farmer can _inefficiently_ compute _multiple_ proofs for challenge $c$ by repeatedly creating fresh plots and computing one proof with each of them. This is analogous to the stake based setting, but unlike in the stake setting, the farmer can _inefficiently_ compute _multiple_ proofs for challenge $c$ by repeatedly creating fresh plots and computing one proof with each of them. We refer to attacks exploiting this fact as _replotting attacks_. The most basic design choice to harden a chain against replotting attacks is to make sure that challenges arrive at a sufficiently high rate so that substantial replotting in-between two challenges is not feasible. Moreover the plot filter (which dictates what fraction of plots must be accessed with every challenge) cannot be chosen too aggressively as more aggressive filters makes potential replotting attacks easier. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-references.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-references.md index 3a6cf430d8..8ba22edd52 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-references.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/green-paper-references.md @@ -6,35 +6,35 @@ slug: /green-paper-references # References -| Identifier | Publication | -| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| AAC+17 | Hamza Abusalah, Joël Alwen, Bram Cohen, Danylo Khilko, Krzysztof Pietrzak, and Leonid Reyzin. Beyond Hellman’s time-memory trade-offs with applications to proofs of space. In Tsuyoshi Takagi and Thomas Peyrin, editors, _Advances in Cryptology - ASI- ACRYPT 2017 - 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3-7, 2017, Proceedings, Part II_, volume 10625 of _Lecture Notes in Computer Science_, pages 357–379. Springer, 2017. | -| BBBF18 | Dan Boneh, Joseph Bonneau, Benedikt Bu ̈nz, and Ben Fisch. Verifiable delay functions. In Hovav Shacham and Alexandra Boldyreva, editors, _Advances in Cryptology - CRYPTO 2018 - 38th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 19-23, 2018, Proceedings, Part I, volume 10991 of Lecture Notes in Computer Science_, pages 757–788. Springer, 2018. | -| BBF18 | Dan Boneh, Benedikt Bu ̈nz, and Ben Fisch. A survey of two verifi- able delay functions. _IACR Cryptol. ePrint Arch._, page 712, 2018. | -| BDK+19 | Vivek Bagaria, Amir Dembo, Sreeram Kannan, Sewoong Oh, David Tse, Pramod Viswanath, Xuechao Wang, and Ofer Zeitouni. Proof- of-stake longest chain protocols: Security vs predictability. 2019. | -| BGK+18 | Christian Badertscher, Peter Gazi, Aggelos Kiayias, Alexander Russell, and Vassilis Zikas. Ouroboros genesis: Composable proof-of-stake blockchains with dynamic availability. In David Lie, Mohammad Mannan, Michael Backes, and XiaoFeng Wang, editors, _Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS 2018, Toronto, ON, Canada, October 15-19, 2018_, pages 913–930. ACM, 2018. | -| BNPW19 | Jonah Brown-Cohen, Arvind Narayanan, Alexandros Psomas, and S. Matthew Weinberg. Formal barriers to longest-chain proof-of-stake protocols. In Anna Karlin, Nicole Immorlica, and Ramesh Johari, editors, _Proceedings of the 2019 ACM Conference on Economics and Computation, EC 2019, Phoenix, AZ, USA, June 24-28, 2019_, pages 459–473. ACM, 2019. | -| BP22 | Mirza Ahad Baig and Krzysztof Pietrzak. On the existence of proof of space longest chain protocols (working title), 2022. 2022. Manuscript in preparation. | -| CKWN16 | Miles Carlsten, Harry A. Kalodner, S. Matthew Weinberg, and Arvind Narayanan. On the instability of bitcoin without the block reward. In Edgar R. Weippl, Stefan Katzenbeisser, Christopher Kruegel, Andrew C. Myers, and Shai Halevi, editors, _Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016_, pages 154–167. ACM, 2016. | -| CP19 | Bram Cohen and Krzysztof Pietrzak. The chia network blockchain. 2019. | -| DFKP15 | Stefan Dziembowski, Sebastian Faust, Vladimir Kolmogorov, and Krzysztof Pietrzak. Proofs of space. In Rosario Gennaro and Matthew Robshaw, editors, _Advances in Cryptology - CRYPTO 2015 - 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part II, volume 9216 of Lecture Notes in Computer Science_, pages 585–605. Springer, 2015. | -| DKT21 | Soubhik Deb, Sreeram Kannan, and David Tse. Posat: Proof-of-work availability and unpredictability, without the work. In Nikita Borisov and Claudia Diaz, editors, _Financial Cryptography and Data Security - 25th International Conference, FC 2021, Virtual Event, March 1-5, 2021, Revised Selected Papers, Part II, volume 12675 of Lecture Notes in Computer Science_, pages 104–128. Springer, 2021. | -| DW13 | Christian Decker and Roger Wattenhofer. Information propagation in the bitcoin network. In _13th IEEE International Conference on Peer-to-Peer Computing, IEEE P2P 2013, Trento, Italy, September 9-11, 2013_, Proceedings, pages 1–10. IEEE, 2013. | -| EFKP20 | Naomi Ephraim, Cody Freitag, Ilan Komargodski, and Rafael Pass. Continuous verifiable delay functions. In Anne Canteaut and Yuval Ishai, editors, _Advances in Cryptology - EUROCRYPT 2020 - 39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zagreb, Croatia, May 10-14, 2020, Proceedings, Part III_, volume 12107 of _Lecture Notes in Computer Science_, pages 125–154. Springer, 2020. | -| ES18 | Ittay Eyal and Emin Gu ̈n Sirer. Majority is not enough: bitcoin mining is vulnerable. _Commun_. ACM, 61(7):95–102, 2018. | -| FZ17 | Lei Fan and Hong-Sheng Zhou. iching: A scalable proof-of-stake blockchain in the open setting (or, how to mimic nakamoto’s design via proof-of-stake). _IACR Cryptol. ePrint Arch._, page 656, 2017. | -| GKL15 | Juan A. Garay, Aggelos Kiayias, and Nikos Leonardos. The bitcoin backbone protocol: Analysis and applications. In Elisabeth Oswald and Marc Fischlin, editors, _Advances in Cryptology - EUROCRYPT 2015 - 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Sofia, Bulgaria, April 26-30, 2015, Proceedings, Part II_, volume 9057 of _Lecture Notes in Computer Science_, pages 281–310. Springer, 2015. | -| GKR18 | Peter Gazi, Aggelos Kiayias, and Alexander Russell. Stake-bleeding attacks on proof-of-stake blockchains. In _Crypto Valley Conference on Blockchain Technology, CVCBT 2018, Zug, Switzerland, June 20-22, 2018_, pages 85–92. IEEE, 2018. | -| Hel80 | Martin E. Hellman. A cryptanalytic time-memory trade-off. _IEEE Trans. Inf. Theory_, 26(4):401–406, 1980. | -| Lew21 | Andrew Lewis-Pye. Byzantine generals in the permissionless setting. _CoRR_, abs/2101.07095, 2021. | -| LR21 | Andrew Lewis-Pye and Tim Roughgarden. How does blockchain security dictate blockchain implementation? In Yongdae Kim, Jong Kim, Giovanni Vigna, and Elaine Shi, editors, _CCS ’21: 2021 ACM SIGSAC Conference on Computer and Communications Security, Virtual Event, Republic of Korea, November 15 - 19, 2021_, pages 1006–1019. ACM, 2021. | -| Pie19a | Krzysztof Pietrzak. Proofs of catalytic space. In Avrim Blum, editor, _10th Innovations in Theoretical Computer Science Conference, ITCS 2019, January 10-12, 2019, San Diego, California, USA_, volume 124 of LIPIcs, pages 59:1–59:25. Schloss Dagstuhl - Leibniz- Zentrum für Informatik, 2019. | -| Pie19b | Krzysztof Pietrzak. Simple verifiable delay functions. In Avrim Blum, editor, 1*0th Innovations in Theoretical Computer Science Conference, ITCS 2019, January 10-12, 2019, San Diego, California, USA*, volume 124 of LIPIcs, pages 60:1–60:15. Schloss Dagstuhl - Leibniz-Zentrum fu ̈r Informatik, 2019. | -| PKF+18 | Sunoo Park, Albert Kwon, Georg Fuchsbauer, Peter Gazi, Joël Alwen, and Krzysztof Pietrzak. Spacemint: A cryptocurrency based on proofs of space. In Sarah Meiklejohn and Kazue Sako, editors, _Financial Cryptography and Data Security - 22nd International Conference, FC 2018, Nieuwpoort, Cura ̧cao, February 26 - March 2, 2018, Revised Selected Papers_, volume 10957 of _Lecture Notes in Computer Science_, pages 480–499. Springer, 2018. | -| PS17 | Rafael Pass and Elaine Shi. The sleepy model of consensus. In Tsuyoshi Takagi and Thomas Peyrin, editors, _Advances in Cryptology - ASIACRYPT 2017 - 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3-7, 2017, Proceedings, Part II_, volume 10625 of _Lecture Notes in Computer Science_, pages 380–409. Springer, 2017. | -| SNM+21 | Caspar Schwarz-Schilling, Joachim Neu, Barnab ́e Monnot, Aditya Asgaonkar, Ertem Nusret Tas, and David Tse. Three attacks on proof-of-stake ethereum. _IACR Cryptol. ePrint Arch._, page 1413, 2021. | -| SSZ15 | Ayelet Sapirshtein, Yonatan Sompolinsky, and Aviv Zohar. Optimal selfish mining strategies in bitcoin. _CoRR_, abs/1507.06183, 2015. | -| Wes20 | Benjamin Wesolowski. Efficient verifiable delay functions. _J. Cryptol._, 33(4):2113–2147, 2020. | +| Identifier | Publication | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| AAC+17 | Hamza Abusalah, Joël Alwen, Bram Cohen, Danylo Khilko, Krzysztof Pietrzak, and Leonid Reyzin. Beyond Hellman’s time-memory trade-offs with applications to proofs of space. In Tsuyoshi Takagi and Thomas Peyrin, editors, _Advances in Cryptology - ASI- ACRYPT 2017 - 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3-7, 2017, Proceedings, Part II_, volume 10625 of _Lecture Notes in Computer Science_, pages 357–379. Springer, 2017. | +| BBBF18 | Dan Boneh, Joseph Bonneau, Benedikt Bu ̈nz, and Ben Fisch. Verifiable delay functions. In Hovav Shacham and Alexandra Boldyreva, editors, _Advances in Cryptology - CRYPTO 2018 - 38th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 19-23, 2018, Proceedings, Part I, volume 10991 of Lecture Notes in Computer Science_, pages 757–788. Springer, 2018. | +| BBF18 | Dan Boneh, Benedikt Bu ̈nz, and Ben Fisch. A survey of two verifi- able delay functions. _IACR Cryptol. ePrint Arch._, page 712, 2018. | +| BDK+19 | Vivek Bagaria, Amir Dembo, Sreeram Kannan, Sewoong Oh, David Tse, Pramod Viswanath, Xuechao Wang, and Ofer Zeitouni. Proof- of-stake longest chain protocols: Security vs predictability. 2019. | +| BGK+18 | Christian Badertscher, Peter Gazi, Aggelos Kiayias, Alexander Russell, and Vassilis Zikas. Ouroboros genesis: Composable proof-of-stake blockchains with dynamic availability. In David Lie, Mohammad Mannan, Michael Backes, and XiaoFeng Wang, editors, _Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS 2018, Toronto, ON, Canada, October 15-19, 2018_, pages 913–930. ACM, 2018. | +| BNPW19 | Jonah Brown-Cohen, Arvind Narayanan, Alexandros Psomas, and S. Matthew Weinberg. Formal barriers to longest-chain proof-of-stake protocols. In Anna Karlin, Nicole Immorlica, and Ramesh Johari, editors, _Proceedings of the 2019 ACM Conference on Economics and Computation, EC 2019, Phoenix, AZ, USA, June 24-28, 2019_, pages 459–473. ACM, 2019. | +| BP22 | Mirza Ahad Baig and Krzysztof Pietrzak. On the existence of proof of space longest chain protocols (working title), 2022. 2022. Manuscript in preparation. | +| CKWN16 | Miles Carlsten, Harry A. Kalodner, S. Matthew Weinberg, and Arvind Narayanan. On the instability of bitcoin without the block reward. In Edgar R. Weippl, Stefan Katzenbeisser, Christopher Kruegel, Andrew C. Myers, and Shai Halevi, editors, _Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016_, pages 154–167. ACM, 2016. | +| CP19 | Bram Cohen and Krzysztof Pietrzak. The chia network blockchain. 2019. | +| DFKP15 | Stefan Dziembowski, Sebastian Faust, Vladimir Kolmogorov, and Krzysztof Pietrzak. Proofs of space. In Rosario Gennaro and Matthew Robshaw, editors, _Advances in Cryptology - CRYPTO 2015 - 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part II, volume 9216 of Lecture Notes in Computer Science_, pages 585–605. Springer, 2015. | +| DKT21 | Soubhik Deb, Sreeram Kannan, and David Tse. Posat: Proof-of-work availability and unpredictability, without the work. In Nikita Borisov and Claudia Diaz, editors, _Financial Cryptography and Data Security - 25th International Conference, FC 2021, Virtual Event, March 1-5, 2021, Revised Selected Papers, Part II, volume 12675 of Lecture Notes in Computer Science_, pages 104–128. Springer, 2021. | +| DW13 | Christian Decker and Roger Wattenhofer. Information propagation in the bitcoin network. In _13th IEEE International Conference on Peer-to-Peer Computing, IEEE P2P 2013, Trento, Italy, September 9-11, 2013_, Proceedings, pages 1–10. IEEE, 2013. | +| EFKP20 | Naomi Ephraim, Cody Freitag, Ilan Komargodski, and Rafael Pass. Continuous verifiable delay functions. Naomi Ephraim, Cody Freitag, Ilan Komargodski, and Rafael Pass. Continuous verifiable delay functions. In Anne Canteaut and Yuval Ishai, editors, _Advances in Cryptology - EUROCRYPT 2020 - 39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Zagreb, Croatia, May 10-14, 2020, Proceedings, Part III_, volume 12107 of _Lecture Notes in Computer Science_, pages 125–154. Springer, 2020. Springer, 2020. | +| ES18 | Ittay Eyal and Emin Gu ̈n Sirer. Majority is not enough: bitcoin mining is vulnerable. _Commun_. ACM, 61(7):95–102, 2018. | +| FZ17 | Lei Fan and Hong-Sheng Zhou. iching: A scalable proof-of-stake blockchain in the open setting (or, how to mimic nakamoto’s design via proof-of-stake). _IACR Cryptol. ePrint Arch._, page 656, 2017. | +| GKL15 | Juan A. Garay, Aggelos Kiayias, and Nikos Leonardos. The bitcoin backbone protocol: Analysis and applications. In Elisabeth Oswald and Marc Fischlin, editors, _Advances in Cryptology - EUROCRYPT 2015 - 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Sofia, Bulgaria, April 26-30, 2015, Proceedings, Part II_, volume 9057 of _Lecture Notes in Computer Science_, pages 281–310. Springer, 2015. | +| GKR18 | Peter Gazi, Aggelos Kiayias, and Alexander Russell. Stake-bleeding attacks on proof-of-stake blockchains. In _Crypto Valley Conference on Blockchain Technology, CVCBT 2018, Zug, Switzerland, June 20-22, 2018_, pages 85–92. IEEE, 2018. | +| Hel80 | Martin E. Hellman. A cryptanalytic time-memory trade-off. _IEEE Trans. Inf. Theory_, 26(4):401–406, 1980. | +| Lew21 | Andrew Lewis-Pye. Byzantine generals in the permissionless setting. _CoRR_, abs/2101.07095, 2021. | +| LR21 | Andrew Lewis-Pye and Tim Roughgarden. How does blockchain security dictate blockchain implementation? In Yongdae Kim, Jong Kim, Giovanni Vigna, and Elaine Shi, editors, _CCS ’21: 2021 ACM SIGSAC Conference on Computer and Communications Security, Virtual Event, Republic of Korea, November 15 - 19, 2021_, pages 1006–1019. ACM, 2021. | +| Pie19a | Krzysztof Pietrzak. Proofs of catalytic space. In Avrim Blum, editor, _10th Innovations in Theoretical Computer Science Conference, ITCS 2019, January 10-12, 2019, San Diego, California, USA_, volume 124 of LIPIcs, pages 59:1–59:25. Schloss Dagstuhl - Leibniz- Zentrum für Informatik, 2019. | +| Pie19b | Krzysztof Pietrzak. Simple verifiable delay functions. In Avrim Blum, editor, 1*0th Innovations in Theoretical Computer Science Conference, ITCS 2019, January 10-12, 2019, San Diego, California, USA*, volume 124 of LIPIcs, pages 60:1–60:15. Schloss Dagstuhl - Leibniz-Zentrum fu ̈r Informatik, 2019. | +| PKF+18 | Sunoo Park, Albert Kwon, Georg Fuchsbauer, Peter Gazi, Joël Alwen, and Krzysztof Pietrzak. Spacemint: A cryptocurrency based on proofs of space. In Sarah Meiklejohn and Kazue Sako, editors, _Financial Cryptography and Data Security - 22nd International Conference, FC 2018, Nieuwpoort, Cura ̧cao, February 26 - March 2, 2018, Revised Selected Papers_, volume 10957 of _Lecture Notes in Computer Science_, pages 480–499. Springer, 2018. | +| PS17 | Rafael Pass and Elaine Shi. The sleepy model of consensus. Rafael Pass and Elaine Shi. The sleepy model of consensus. In Tsuyoshi Takagi and Thomas Peyrin, editors, _Advances in Cryptology - ASIACRYPT 2017 - 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3-7, 2017, Proceedings, Part II_, volume 10625 of _Lecture Notes in Computer Science_, pages 380–409. Springer, 2017. Springer, 2017. | +| SNM+21 | Caspar Schwarz-Schilling, Joachim Neu, Barnab ́e Monnot, Aditya Asgaonkar, Ertem Nusret Tas, and David Tse. Three attacks on proof-of-stake ethereum. _IACR Cryptol. ePrint Arch._, page 1413, 2021. | +| SSZ15 | Ayelet Sapirshtein, Yonatan Sompolinsky, and Aviv Zohar. Optimal selfish mining strategies in bitcoin. _CoRR_, abs/1507.06183, 2015. | +| Wes20 | Benjamin Wesolowski. Efficient verifiable delay functions. _J. Cryptol._, 33(4):2113–2147, 2020. | ## Additional Reading diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/hash-and-vdf-chains.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/hash-and-vdf-chains.md index 8f6a61aeb8..e4c010e737 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/hash-and-vdf-chains.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/hash-and-vdf-chains.md @@ -12,9 +12,7 @@ A key ingredient in longest-chain blockchains are hash-chains as discussed in § For this writeup, a _hash chain_ is a sequence $b_0,b_1,b_2\ldots$ of blocks, where each block $b_i=\{h_i,x_i\}$ contains some data value $x_i$ (possibly empty) and (with the exception of $b_0$) a hash value of the current data and the previous block. -$$ -h_i:={\sf H}(b_{i-1},x_i) -$$ +$$ h_i:={\sf H}(b_{i-1},x_i) $$ #### Security from hash chains. @@ -22,7 +20,7 @@ A hash chain is immutable in the following sense: --- -**Proposition 2** (immutability of hash chains). _If ${\sf H}$ is a collision-resistant hash function, then it is computationally infeasible to find two distinct hash chains ${\cal H}=b_0,\ldots.b_i$ and ${\cal H'}=b'_0,\ldots,b'_j$ where $h_i=h'_j$ and no chain is a prefix of the other (which holds if they start with the same $x_0=x'_0$)._ +**Proposition 2** (immutability of hash chains). **Proposition 2** (immutability of hash chains). _If ${\sf H}$ is a collision-resistant hash function, then it is computationally infeasible to find two distinct hash chains ${\cal H}=b_0,\ldots.b_i$ and ${\cal H'}=b'_0,\ldots,b'_j$ where $h_i=h'_j$ and no chain is a prefix of the other (which holds if they start with the same $x_0=x'_0$)._ --- @@ -36,8 +34,7 @@ A hash chain is immutable in the following sense: A VDF chain is a sequence $$ -{\cal V}=z_0,\tau_1,z_1,\tau_2,z_2,\ldots,\tau_\ell -$$ +{\cal V}=z_0,\tau_1,z_1,\tau_2,z_2,\ldots,\tau_\ell $$
eq.(5)
@@ -49,15 +46,13 @@ $$ and the challenge for the $i$th VDF is derived from the previous VDF output (except for $i=1$) and data value -$$ -\tau_1.c := \mathsf{VDF.sample}(z_0) \quad \text{ and } \quad \forall i > 1 : \tau_i.\mathsf{c} := \mathsf{VDF.sample}(\tau_{i-1}.\mathsf{y}, z_{i-1}) -$$ +$$ \tau_1.c := \mathsf{VDF.sample}(z_0) \quad \text{ and } \quad \forall i > 1 : \tau_i.\mathsf{c} := \mathsf{VDF.sample}(\tau_{i-1}.\mathsf{y}, z_{i-1}) $$ where we use the convention that $\tau_0.{\sf y}$ is the empty string. ### 4.2.1 Notation for VDF chains -We naturally extend the notion for VDFs as described in §A.3 to VDF chains. The _total number of VDF steps in a VDF chain_ as in eq.(5) is simply the sum of the steps in its VDFs +We naturally extend the notion for VDFs as described in §A.3 to VDF chains. We naturally extend the notion for VDFs as described in §A.3 to VDF chains. The _total number of VDF steps in a VDF chain_ as in eq.(5) is simply the sum of the steps in its VDFs $$ {\cal V}.{\sf t}\stackrel{\scriptsize \sf def}{=}\sum_{i=1}^\ell \tau_i.{\sf t} @@ -69,14 +64,15 @@ VDF chains give two basic security guarantees, the first is immutability analogo --- -**Proposition 3** (immutability and sequentiality of VDF chains). *Like a hash chain, a VDF chain is *immutable* in the sense that it's computationally infeasible to come up with two different VDF chains* +**Proposition 3** (immutability and sequentiality of VDF chains). **Proposition 3** (immutability and sequentiality of VDF chains). *Like a hash chain, a VDF chain is *immutable* in the sense that it's computationally infeasible to come up with two different VDF chains* $$ +{\cal V}=z_0,\tau_1,z_1,\tau_2,z_2,\ldots,\tau_\ell \qquad {\cal V}=z_0,\tau_1,z_1,\tau_2,z_2,\ldots,\tau_\ell \qquad {\cal V}'=z'_0,\tau'_1,z'_1,\tau'_2,z'_2,\ldots,\tau'_{\ell'} $$ -where the last VDF outputs collide, i.e., $\tau_\ell.{\sf y}=\tau'_{\ell'}.{\sf y}$. Here different means that either they have different length $\ell\neq \ell'$ and neither is a prefix of the other. Or (if $\ell=\ell'$) there exists an $i$ s.t. either $z_i\neq z'_i$ or $\tau_i.{\sf y}\neq \tau'_i.{\sf y}$ or $\tau.{\sf t}\neq \tau'.{\sf t}$. Note that we ignore the proofs $\tau.\pi$ when comparing chains (we just use them to determine whether the chain is valid) as they must not be unique. +where the last VDF outputs collide, i.e., $\tau_\ell.{\sf y}=\tau'_{\ell'}.{\sf y}$. Here different means that either they have different length $\ell\neq \ell'$ and neither is a prefix of the other. Or (if $\ell=\ell'$) there exists an $i$ s.t. either $z_i\neq z'_i$ or $\tau_i.{\sf y}\neq \tau'_i.{\sf y}$ or $\tau.{\sf t}\neq \tau'.{\sf t}$. Note that we ignore the proofs $\tau.\pi$ when comparing chains (we just use them to determine whether the chain is valid) as they must not be unique. Here different means that either they have different length $\ell\neq \ell'$ and neither is a prefix of the other. Or (if $\ell=\ell'$) there exists an $i$ s.t. either $z_i\neq z'_i$ or $\tau_i.{\sf y}\neq \tau'_i.{\sf y}$ or $\tau.{\sf t}\neq \tau'.{\sf t}$. Note that we ignore the proofs $\tau.\pi$ when comparing chains (we just use them to determine whether the chain is valid) as they must not be unique. -Moreover a VDF chain is _sequential_, meaning that not only the individual VDFs must be computed sequentially (which follows from the security definition of VDFs), but also the VDFs in the chain were computed sequentially. I.e., computing a chain ${\cal V}$ as above requires $\sum_{i=1}^\ell \tau_i.{\sf t}$ sequential steps. +Moreover a VDF chain is _sequential_, meaning that not only the individual VDFs must be computed sequentially (which follows from the security definition of VDFs), but also the VDFs in the chain were computed sequentially. I.e., computing a chain ${\cal V}$ as above requires $\sum_{i=1}^\ell \tau_i.{\sf t}$ sequential steps. I.e., computing a chain ${\cal V}$ as above requires $\sum_{i=1}^\ell \tau_i.{\sf t}$ sequential steps. --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/longest-chain-protocols.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/longest-chain-protocols.md index dc5744e42d..594a54c6dd 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/longest-chain-protocols.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/longest-chain-protocols.md @@ -8,7 +8,7 @@ slug: /longest-chain-protocols Before we can outline the specification of the $\textrm{{\sf Chia}}$ blockchain and its rationale in more detail, we first must understand the general challenges one faces when constructing a PoSpace based blockchain and some of the relevant literature on how to address these challenges. -Ultimately, we want to argue security assuming only that sufficient fraction of the resource (space, fast VDFs) is controlled by _rational_ parties. Towards this, in this Section we first discuss how to achieve security assuming sufficiently many parties are _honest_, and then in §3 how _rational_ behavior is incentivized by ensuring that deviating from the protocol will not give any (or very little) extra reward to parties. +Ultimately, we want to argue security assuming only that sufficient fraction of the resource (space, fast VDFs) is controlled by _rational_ parties. Towards this, in this Section we first discuss how to achieve security assuming sufficiently many parties are _honest_, and then in §3 how _rational_ behavior is incentivized by ensuring that deviating from the protocol will not give any (or very little) extra reward to parties. Towards this, in this Section we first discuss how to achieve security assuming sufficiently many parties are _honest_, and then in §3 how _rational_ behavior is incentivized by ensuring that deviating from the protocol will not give any (or very little) extra reward to parties.
alt text @@ -21,7 +21,7 @@ As mentioned in the introduction, just replacing proofs of work in Bitcoin with In longest-chain blockchains the challenge used to determine the miner/farmer who can add a block is derived from the chain itself. In Bitcoin, where the challenge for a block is simply the hash of the previous block, a miner can influence the PoW challenge by trying out different transaction sets or time stamps. While such "grinding" through different challenges gives no advantage in PoW based cryptocurrencies, it's a problem once we use an efficient proof system. -To prevent such grinding we adopt an approach from Spacemint [PKF+18] and _split the chain_ in two parts which we'll call trunk and foliage. The trunk contains only canonical proofs, and the challenges depend only on values contained in the trunk. This way the only choice a farmer has to influence the challenge is by withholding a winning block. The foliage contains all the remaining "grindeable" content, in particular transactions and time-stamps. +To prevent such grinding we adopt an approach from Spacemint [PKF+18] and _split the chain_ in two parts which we'll call trunk and foliage. The trunk contains only canonical proofs, and the challenges depend only on values contained in the trunk. This way the only choice a farmer has to influence the challenge is by withholding a winning block. The foliage contains all the remaining "grindeable" content, in particular transactions and time-stamps. The trunk contains only canonical proofs, and the challenges depend only on values contained in the trunk. This way the only choice a farmer has to influence the challenge is by withholding a winning block. The foliage contains all the remaining "grindeable" content, in particular transactions and time-stamps. ## 2.2 Double-Dipping @@ -29,7 +29,7 @@ Even once grinding is no longer an option, an adversary can in private create an To limit the impact of double-dipping an early version [CP19] of $\textrm{{\sf Chia}}$ consensus specified that also the honest parties do a very limited form of double-dipping and try to extend the best $3$ blocks they see at every depth, this rule was (by simulations) shown to increase the space required by an adversary from the $26.9\%$ mentioned above, to $38.5\%$. -The deployed $\textrm{{\sf Chia}}$ protocol uses _correlated randomness_ to limit the impact of double dipping. This elegant idea was introduced in [BDK+19], and basically suggest to only use every $k$th block to compute the challenges.[^1] The authors of [BDK+19] determine the exact fraction of the _resource_ the adversary must control to break security as a function of $k$ (as mentioned, it's $2.718$ for $k=1$, and goes to $1$ as $k$ increases). $\textrm{{\sf Chia}}$ uses a variant where a challenge depends on one out of _at least_ (not exactly) $k=16$ blocks. Their analysis also applies to this setting, and with $k=16$ states that by double dipping the adversary can boost their resource by a factor of $1.47$, which means they must control at least a $\frac{1}{1+1.47}=0.405$ fraction of the resource for an attack. +The deployed $\textrm{{\sf Chia}}$ protocol uses _correlated randomness_ to limit the impact of double dipping. The deployed $\textrm{{\sf Chia}}$ protocol uses _correlated randomness_ to limit the impact of double dipping. This elegant idea was introduced in [BDK+19], and basically suggest to only use every $k$th block to compute the challenges.[^1] The authors of [BDK+19] determine the exact fraction of the _resource_ the adversary must control to break security as a function of $k$ (as mentioned, it's $2.718$ for $k=1$, and goes to $1$ as $k$ increases). $\textrm{{\sf Chia}}$ uses a variant where a challenge depends on one out of _at least_ (not exactly) $k=16$ blocks. Their analysis also applies to this setting, and with $k=16$ states that by double dipping the adversary can boost their resource by a factor of $1.47$, which means they must control at least a $\frac{1}{1+1.47}=0.405$ fraction of the resource for an attack. $\textrm{{\sf Chia}}$ uses a variant where a challenge depends on one out of _at least_ (not exactly) $k=16$ blocks. Their analysis also applies to this setting, and with $k=16$ states that by double dipping the adversary can boost their resource by a factor of $1.47$, which means they must control at least a $\frac{1}{1+1.47}=0.405$ fraction of the resource for an attack. The resource considered in [BDK+19] is simply stake, while in $\textrm{{\sf Chia}}$ it's the product of space and VDF speed. Concerning VDFs, while for the honest parties the only thing that matters is the _speed_ of the three VDFs controlled by the fastest honest time lord, for an adversary the speed as well as the number of VDFs available to them matter. In the security analysis we can simply assume the adversary controls an unbounded number of VDFs, as that's when the analysis from [BDK+19] applies. This is how eq.(2) $space_h\cdot vdf_h > space_a \cdot vdf_a \cdot 1.47$ in §1.1 was derived. @@ -44,6 +44,6 @@ A major issue with longest-chain blockchains based on efficient proof systems i Existing proposals to achieve security under such _dynamic availability_ include check-pointing, which is problematic as parties that join for the first time or have not followed the chain for a longer period need additional trust assumptions to decide which chain to follow. Unlike for grinding and double-dipping, the attacks that become possible due to bootstrapping are quite different for proofs of space and proofs of stake. In the latter one must consider old keys that hold no stake in the current chain, but still can be used to bootstrap from a past block. To address this it was suggested to have honest parties use key-evolution schemes [BGK+18] so the current keys cannot be used to create blocks in the past. Key-evolution is problematic as it's clearly not rational for honest parties to do; they could sell their keys or lose their stake in case of a deep reorg. -The essence of the bootstrapping problem is the fact that one cannot ensure that time has passed in-between the creation of subsequent blocks. $\textrm{{\sf Chia}}$ solves this problem by combining proofs of space with _proofs of time_, concretely, verifiable delay functions (VDFs), which enforce that some inherently sequential computation (which requires time linear in the length of the computation) was performed in-between the creation of blocks. $\textrm{{\sf Chia}}$ combines those three countermeasures (splitting the chain, correlated randomness and proofs of time) into a single design which is secure if the resources controlled by the honest parties satisfy the bound from Eq. +The essence of the bootstrapping problem is the fact that one cannot ensure that time has passed in-between the creation of subsequent blocks. The essence of the bootstrapping problem is the fact that one cannot ensure that time has passed in-between the creation of subsequent blocks. $\textrm{{\sf Chia}}$ solves this problem by combining proofs of space with _proofs of time_, concretely, verifiable delay functions (VDFs), which enforce that some inherently sequential computation (which requires time linear in the length of the computation) was performed in-between the creation of blocks. $\textrm{{\sf Chia}}$ combines those three countermeasures (splitting the chain, correlated randomness and proofs of time) into a single design which is secure if the resources controlled by the honest parties satisfy the bound from Eq. $\textrm{{\sf Chia}}$ combines those three countermeasures (splitting the chain, correlated randomness and proofs of time) into a single design which is secure if the resources controlled by the honest parties satisfy the bound from Eq. [^1]: Using the same challenge for $k>1$ blocks has already been suggested in [PKF+18], but this is a different requirement (as the challenge can still depend on all blocks) and adds much less security than correlated randomness for small $k$. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/rational-attackers.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/rational-attackers.md index 551137c968..c26f12b576 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/rational-attackers.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/rational-attackers.md @@ -8,9 +8,9 @@ slug: /rational-attackers In §2 we discussed how costless simulation opens attack vectors for double spending in longest-chain blockchains and how these are addressed in $\textrm{{\sf Chia}}$. To show security we assumed that a sufficient fraction of the resource is controlled by _honest_ parties who follow the protocol rules. In reality it's unrealistic to assume that parties will behave altruistically, instead we need to argue that it's _rational_ for parties to follow the protocol rules. Unfortunately costless simulation also makes this task much more challenging than in a PoW based system. -In analogy to _selfish mining_ in Bitcoin, we refer to strategies by which a party gets more rewards than they would by following the protocol rules as _selfish farming_. To argue that rational parties will behave honestly it's necessary to bound the efficacy of selfish mining/farming strategies. +In analogy to _selfish mining_ in Bitcoin, we refer to strategies by which a party gets more rewards than they would by following the protocol rules as _selfish farming_. To argue that rational parties will behave honestly it's necessary to bound the efficacy of selfish mining/farming strategies. To argue that rational parties will behave honestly it's necessary to bound the efficacy of selfish mining/farming strategies. -In §3.1 below we first discuss selfish mining and why we don't observe it in Bitcoin even though it's possible in principle. As directly analyzing the security of a longest-chain protocol against selfish mining/farming is very challenging we take a modular approach. In §3.2 we first identify two properties – _no slowdown_ and _delayed gratification_ illustrated in Figure 5 – which are satisfied by Bitcoin, and then show in §3.3 that they imply robustness against selfish mining (through the notion of chain quality) of the level as achieved by Bitcoin. In §3.4 and §3.5 we then sketch how those notions are achieved in $\textrm{{\sf Chia}}$. +In §3.1 below we first discuss selfish mining and why we don't observe it in Bitcoin even though it's possible in principle. As directly analyzing the security of a longest-chain protocol against selfish mining/farming is very challenging we take a modular approach. In §3.1 below we first discuss selfish mining and why we don't observe it in Bitcoin even though it's possible in principle. As directly analyzing the security of a longest-chain protocol against selfish mining/farming is very challenging we take a modular approach. In §3.2 we first identify two properties – _no slowdown_ and _delayed gratification_ illustrated in Figure 5 – which are satisfied by Bitcoin, and then show in §3.3 that they imply robustness against selfish mining (through the notion of chain quality) of the level as achieved by Bitcoin. In §3.4 and §3.5 we then sketch how those notions are achieved in $\textrm{{\sf Chia}}$. In §3.4 and §3.5 we then sketch how those notions are achieved in $\textrm{{\sf Chia}}$. ## 3.1 Selfish Mining in Bitcoin @@ -26,25 +26,25 @@ While Bitcoin prevents double spending assuming a majority of the hashing power The Bitcoin blockchain is split in epochs, each with a targeted duration of two weeks, and only at the end of an epoch the difficulty is reset to accommodate for the variation of the hashing power. Assuming the network is reliable, within an epoch, a selfish miner cannot create more blocks than they would get by honest mining. This follows from a crucial property of proofs of work: there's no way to find more proofs of a given difficulty (and thus blocks) in a given time window than simply following the protocol and always working on the known longest chain. The only thing selfish mining does in Bitcoin is to make honest parties waste their hashing power, so after the next difficulty reset (which only happens every 2 weeks) the difficulty is lower than it should be, and only at this point the selfish miner makes some extra profit. Another property of PoW based chains like Bitcoin is that an adversary cannot slow down chain growth. We capture these two desirable properties separately below. -**Delayed Gratification:** A chain where an adversary cannot increase the number of blocks they find in expectation within an epoch of same difficulty by deviating from the honest strategy is said to have the _delayed gratification_ property. In $\textrm{{\sf Chia}}$, by "not deviating" we mean that the adversary simply runs an honest farmer using its available space, and additionally, should the adversary control VDFs that are faster than the fastest honest time lord, they are also assumed to run a time lord. Intuitively, delayed gratification is a good deterrent to selfish mining by itself as it limits selfish mining to adversaries who follow a "long term" agenda. +**Delayed Gratification:** A chain where an adversary cannot increase the number of blocks they find in expectation within an epoch of same difficulty by deviating from the honest strategy is said to have the _delayed gratification_ property. In $\textrm{{\sf Chia}}$, by "not deviating" we mean that the adversary simply runs an honest farmer using its available space, and additionally, should the adversary control VDFs that are faster than the fastest honest time lord, they are also assumed to run a time lord. Intuitively, delayed gratification is a good deterrent to selfish mining by itself as it limits selfish mining to adversaries who follow a "long term" agenda. In $\textrm{{\sf Chia}}$, by "not deviating" we mean that the adversary simply runs an honest farmer using its available space, and additionally, should the adversary control VDFs that are faster than the fastest honest time lord, they are also assumed to run a time lord. Intuitively, delayed gratification is a good deterrent to selfish mining by itself as it limits selfish mining to adversaries who follow a "long term" agenda. **No Slowdown:** A chain where an adversary (no matter what fraction of the resource they control) cannot slow down the expected block arrival time by interacting with the chain is said to have the _no slowdown_ property. ## 3.3 Chain Quality -A longest-chain blockchain is said to have _chain quality_ $\rho$ if the fraction of blocks mined by honest miners is at least $\rho$ (with high probability and considering a sufficiently large number of blocks). Chain quality was introduced in [GKL15] as a metric to quantify how susceptible a chain is to selfish mining. Ideally, assuming an adversarial miner who controls an $\alpha$ fraction of the resource, the chain quality should be $\rho=1-\alpha$ as this means that the adversary cannot increase its fraction of blocks by deviating. +A longest-chain blockchain is said to have _chain quality_ $\rho$ if the fraction of blocks mined by honest miners is at least $\rho$ (with high probability and considering a sufficiently large number of blocks). Chain quality was introduced in [GKL15] as a metric to quantify how susceptible a chain is to selfish mining. Ideally, assuming an adversarial miner who controls an $\alpha$ fraction of the resource, the chain quality should be $\rho=1-\alpha$ as this means that the adversary cannot increase its fraction of blocks by deviating. Chain quality was introduced in [GKL15] as a metric to quantify how susceptible a chain is to selfish mining. Ideally, assuming an adversarial miner who controls an $\alpha$ fraction of the resource, the chain quality should be $\rho=1-\alpha$ as this means that the adversary cannot increase its fraction of blocks by deviating. By the Proposition below delayed gratification and the no slowdown property imply a bound on _chain quality_ which matches the bound proven for Bitcoin (when ignoring network delays). --- -**Proposition 1** (Delayed Gratification and No Slowdown implies Chain Quality). _Consider a longest-chain protocol which has the delayed gratification and no slowdown property against an adversary who controls an $\alpha$ fraction of the global resource, then the chain quality is $1-\frac{\alpha}{1-\alpha}$ (compared to the ideal $1-\alpha$)._ +**Proposition 1** (Delayed Gratification and No Slowdown implies Chain Quality). **Proposition 1** (Delayed Gratification and No Slowdown implies Chain Quality). _Consider a longest-chain protocol which has the delayed gratification and no slowdown property against an adversary who controls an $\alpha$ fraction of the global resource, then the chain quality is $1-\frac{\alpha}{1-\alpha}$ (compared to the ideal $1-\alpha$)._ -_Proof._ Consider an adversarial miner ${\cal A}$ with an $\alpha$ fraction of the resource and let $\ell$ denote the (expected) number of blocks to be found if everyone would mine honestly. By the no slowdown property, no matter what ${\cal A}$ does the number of blocks found is at least $\ell'\ge (1-\alpha)\cdot\ell$. By delayed gratification, at most $\alpha\cdot\ell$ of those blocks were created by ${\cal A}$, we get a chain quality of +_Proof._ Consider an adversarial miner ${\cal A}$ with an $\alpha$ fraction of the resource and let $\ell$ denote the (expected) number of blocks to be found if everyone would mine honestly. By the no slowdown property, no matter what ${\cal A}$ does the number of blocks found is at least $\ell'\ge (1-\alpha)\cdot\ell$. By delayed gratification, at most $\alpha\cdot\ell$ of those blocks were created by ${\cal A}$, we get a chain quality of By the no slowdown property, no matter what ${\cal A}$ does the number of blocks found is at least $\ell'\ge (1-\alpha)\cdot\ell$. By delayed gratification, at most $\alpha\cdot\ell$ of those blocks were created by ${\cal A}$, we get a chain quality of -$$ -\begin{aligned} \textit{chain quality}&=\frac{\text{honest blocks}}{\text{total blocks}}\\ &=\frac{\ell' - \alpha \cdot \ell}{\ell'}\\ &=1-\frac{\alpha\cdot\ell}{\ell'}\\ &\ge 1-\frac{\alpha\cdot\ell}{(1-\alpha)\cdot \ell}\\ &=1-\frac{\alpha}{1-\alpha} \hspace{10em}\square \end{aligned} -$$ +$$ \begin{aligned} \textit{chain quality}&=\frac{\text{honest blocks}}{\text{total blocks}}\\ +&=\frac{\ell' - \alpha \cdot \ell}{\ell'}\\ &=1-\frac{\alpha\cdot\ell}{\ell'}\\ +&\ge 1-\frac{\alpha\cdot\ell}{(1-\alpha)\cdot \ell}\\ &=1-\frac{\alpha}{1-\alpha} \hspace{10em}\square \end{aligned} $$ --- @@ -113,7 +113,7 @@ For example the difference in the $g$-greedy and the $D$-distance greedy protoco Unlike the chain specification, which can only be changed by a hard fork once the chain is deployed, the chain selection rule can easily be adapted by the farmers and/or time lords even after the launch. Finding a chain-selection rule for the $\textsf{Chia}$ chain which provably achieves no-slowdown is an interesting open problem. -Under the additional assumption that an adversary does not control VDFs which are _faster_ than the fastest honest time lord, a very simple chain selection rule achieving no-slowdown exists: always follow the chain with accumulated most VDF steps. Of course this rule would be terrible in practice as security completely breaks if the adversary has an even slightly faster VDF than the fastest honest time lord. For example, such an adversary could create an "empty" chain by refusing to infuse any blocks. +Under the additional assumption that an adversary does not control VDFs which are _faster_ than the fastest honest time lord, a very simple chain selection rule achieving no-slowdown exists: always follow the chain with accumulated most VDF steps. Of course this rule would be terrible in practice as security completely breaks if the adversary has an even slightly faster VDF than the fastest honest time lord. For example, such an adversary could create an "empty" chain by refusing to infuse any blocks. Of course this rule would be terrible in practice as security completely breaks if the adversary has an even slightly faster VDF than the fastest honest time lord. For example, such an adversary could create an "empty" chain by refusing to infuse any blocks. A more sensible rule is to simply follow the _heaviest_ fork like in Bitcoin. Unfortunately, unlike in Bitcoin, in $\textsf{Chia}$ the heaviest fork is not necessarily the fork which will be heaviest in the future assuming all honest parties adapt it: a fork $A$ might have one more block infused than some fork $B$, but if $B$ is way ahead in the VDF computation extending $B$ might give a better chain (in expectation) in the future. Thus, when using this rule, by releasing $B$ an adversary might slow down the chain. The currently deployed chain selection rule for farmers and time lords is basically to follow the heaviest fork, but with some heuristics to avoid clear cases where switching to a heavier chain is slowing down growth. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/recovering-from-51-percent-attacks.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/recovering-from-51-percent-attacks.md index c80a4ab305..8b20242a42 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/recovering-from-51-percent-attacks.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/recovering-from-51-percent-attacks.md @@ -10,11 +10,15 @@ In this Section we have a look at two closely related security properties of lon We discussed in §2 the main security issues of a PoSpace based longest-chain blockchain arise from the fact that PoSpace is an efficient proof system. PoSpace shares those security challenges with PoStake, and all three countermeasures summarized in Figure 3 (namely splitting the chain to prevent grinding, correlated randomness to prevent double-dipping and using VDFs to prevent bootstrapping) can readily be applied in the stake setting, correlated randomness was even originally proposed for stake [BDK+19]. But as we'll discuss below, when it comes to security under dynamic availability or 51% attacks there are fundamental differences between space and stake. In particular, using proofs of space in combination with VDFs one can handle both attacks basically as well as with proofs of work, while proofs of stake cannot, even in combination with VDFs. +{' '} +
+ ![](/img/green-paper/table-1.png)
Table 1: Summary of the ability to heal from malicious majority and provide security under dynamic availability of longest-chain protocols based various proof systems. -
+ +
## 6.1 Recovery from $51\%$ Attacks @@ -27,31 +31,31 @@ There's also a key difference between PoStake and PoSpace. By using VDFs in addi While Bitcoin provides no security if more than half of the hashrate is controlled by an adversary, it is "self-healing" in the sense that once the majority of the hashrate is again controlled by honest parties, Bitcoin regains (after some delay) all its security properties. -A bit more formally, let ${\sf PoW}_h(t)$ and ${\sf PoW}_a(t)$ denote the hashing power of the honest and adversarial parties at clock time $t$, respectively. For $t_0eq.(11)
+
eq.(11)
If this holds the adversary can simply start at time $t_0$ to mine a chain in private, and release it at time $t_1$. By the first inequality the adversaries chain will be heavier than the honest one with probability at least $0.5$, and by the 2nd the honest block added at time $t$ will be buried by $k$ blocks with probability $0.5$, so both hold and we have a successful double spending attack with probability at least $\approx 0.5^2=0.25$ (it can actually be a bit less than that as the two events are negatively correlated). To be secure it's not sufficient that no $t_0,t_1$ as in eq.(11) exist, but one needs to be "sufficiently far" from this situation to guarantee that double spending can only happen with some tiny probability. From the standard Chernoff bound it follows that the probability that a fork starting at a block added at time $t_0$ and being released at time $t_1$ will be successful (i.e., have higher weight than the honest chain) is exponentially small in the number of expected honest blocks ${\sf PoW}_h(t_0,t_1)/D$ and the square of the honest to adversarial advantage, i.e., -$$ -\begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ &\le -\exp\left(\frac{\mathsf{PoW}_h(t_0,t_1)}{D} \cdot\left( \frac{\mathsf{PoW}_h(t_0,t_1)}{\mathsf{PoW}_a(t_0,t_1)}-1 \right)^2\right) \end{aligned} -$$ +$$ \begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ +&\le -\exp\left(\frac{\mathsf{PoW}_h(t_0,t_1)}{D} \cdot\left( \frac{\mathsf{PoW}_h(t_0,t_1)}{\mathsf{PoW}_a(t_0,t_1)}-1 \right)^2\right) \end{aligned} $$ -
eq.(12)
+
eq.(12)
### 6.1.2 Recovering from PoStake Majority @@ -65,11 +69,11 @@ A longest-chain protocol using only PoSpace (like Spacemint [eq.(13)
+
eq.(13)
A difference to the PoW setting is the additional $1.47$ factor boosting the adversary's resource which is necessary to account for the fact that they can do some bounded double dipping. @@ -108,18 +110,16 @@ A blockchain based on some resource is _secure under dynamic availability_ if it Using notation from §6.1.1, for a PoW based chain that means that for some $f>1$ (that captures the advantage of the honest parties) and any time $t$ we have $$ -{\sf PoW}_a(t)\le f\cdot {\sf PoW}_h(t) -$$ +{\sf PoW}_a(t)\le f\cdot {\sf PoW}_h(t) $$ -
eq.(14)
+
eq.(14)
To see that Bitcoin is secure under dynamic availability we can reuse our inequality eq.(12) which using $\frac{{\sf PoW}_h(t_0,t_1)}{{\sf PoW}_a(t_0,t_1)}\ge f$ simplifies to (recall that $\frac{{\sf PoW}_h(t_0,t_1)}{D}$ is the expected number of honest blocks in the $t_0$ to $t_1$ window) -$$ -\begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ &\le -\exp\left(\frac{\mathsf{PoW}_h(t_0,t_1)}{D} \cdot\left(f-1 \right)^2\right) \end{aligned} -$$ +$$ \begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ +&\le -\exp\left(\frac{\mathsf{PoW}_h(t_0,t_1)}{D} \cdot\left(f-1 \right)^2\right) \end{aligned} $$ -
eq.(15)
+
eq.(15)
Which simply means that the probability that an adversary will be able to create any particular a fork decreases exponentially in the length of the fork. @@ -128,18 +128,16 @@ Which simply means that the probability that an adversary will be able to create Analogously to PoW just outlined, and using notation from §6.1.4 we can define dynamic availability for PoST as used in $\textsf{Chia}$ by requiring that at any time $t$ $$ -{\sf PoST}_a(t)\le f\cdot {\sf PoST}_h(t) -$$ +{\sf PoST}_a(t)\le f\cdot {\sf PoST}_h(t) $$ -
eq.(16)
+
eq.(16)
With this eq.(13) becomes -$$ -\begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ &\le -\exp\left(\frac{\mathsf{PoST}_h(t_0,t_1)}{D} \cdot\left( \frac{f}{1.47}-1 \right)^2\right) \end{aligned} -$$ +$$ \begin{aligned} &\text{Pr}\left[\text{fork starting at } t_0 \text{ and released at } t_1 \text{ heavier than honest chain}\right] \\ +&\le -\exp\left(\frac{\mathsf{PoST}_h(t_0,t_1)}{D} \cdot\left( \frac{f}{1.47}-1 \right)^2\right) \end{aligned} $$ -
eq.(17)
+
eq.(17)
Thus like in Bitcoin, in $\textsf{Chia}$ the probability of a successful fork decreases exponentially fast in the length of the fork. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/the-chia-blockchain.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/the-chia-blockchain.md index 908e7b6e5e..ddd1c35d46 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/the-chia-blockchain.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/green-paper/the-chia-blockchain.md @@ -19,11 +19,11 @@ In this section we finally outline the design of the $\textsf{Chia}$ blockchain ### 5.1.1 Variables -| 变量 | Definition | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------- | -| $T_i$ | Time parameter of $i$-th slot (# of VDF steps per sub-slot). Recalibrated once per day for 10 minutes per sub-slot target. | -| $\mathsf{spi}_i$ | $$\mathsf{spi}_i \stackrel{\text{\tiny def}}{=} \frac{T_i}{64}$$ | -| $D_i$ | Difficulty parameter of $i$-th slot. Recalibrated once per day for 32 blocks per slot target | +| 变量 | Definition | +| ----------------- | -------------------------------------------------------------------------------------------------------------------------- | +| $T_i$ | Time parameter of $i$-th slot (# of VDF steps per sub-slot). Recalibrated once per day for 10 minutes per sub-slot target. | +| $\mathsf{spi}_i$ | $$\mathsf{spi}_i \stackrel{\text{\tiny def}}{=} \frac{T_i}{64}$$ | +| $D_i$ | Difficulty parameter of $i$-th slot. Recalibrated once per day for 32 blocks per slot target | ### 5.1.2 Step to Epoch @@ -35,71 +35,62 @@ To describe the $\textsf{Chia}$ chains it will be convenient to introduce some The VDF chains we'll consider (${\cal RC}$ and ${\cal CC}$) will be split into slots where the starting point of a new slot will always be an infusion point. For a point ${\sf point}={\cal V}[t]$ on such a chain we denote with -| Point | Definition | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ${\sf point}.{\sf D}$ | the total depth, i.e., the number of steps of this point since genesis | -| ${\sf point}.{\sf d}$ | the depth of this point in the current slot | -| ${\sf point}.{\sf t}$ | the depth of this point in its VDF | -| ${\sf point}.{\sf x}$ | the value of the VDF chain at this point | -| ${\sf point}.\pi$ | a proof certifying the VDF computation up to this point | -| ${\sf point}^+$ | If ${\sf point}$ is an infusion point where some value $v$ gets infused, then we denote with ${\sf point}$ the point before infusion, and with $${\sf point}^+ = {\sf VDF.sample}({\sf point}.{\sf x},v)$$ the point after infusion | +| Point | Definition | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ${\sf point}.{\sf D}$ | the total depth, i.e., the number of steps of this point since genesis | +| ${\sf point}.{\sf d}$ | the depth of this point in the current slot | +| ${\sf point}.{\sf t}$ | the depth of this point in its VDF | +| ${\sf point}.{\sf x}$ | the value of the VDF chain at this point | +| ${\sf point}.\pi$ | a proof certifying the VDF computation up to this point | +| ${\sf point}^+$ | If ${\sf point}$ is an infusion point where some value $v$ gets infused, then we denote with ${\sf point}$ the point before infusion, and with $${\sf point}^+ = {\sf VDF.sample}({\sf point}.{\sf x},v)$$ the point after infusion | The following points on the $\textsf{Chia}$ VDF chains will be defined -| Point | Definition | -| --------------------- | ------------------------------------------------------------------------------------------ | -| ${\sf cc\_sp}_{i,j}$ | The $j$th **challenge chain signage point** in the $i$th slot (eq.(6)) | -| ${\sf rc\_sp}_{i,j}$ | The $j$th **reward chain signage point** in the $i$th slot (eq.(9)) | +| Point | Definition | +| ------------------------- | ----------------------------------------------------------------------------------------------- | +| ${\sf cc\_sp}_{i,j}$ | The $j$th **challenge chain signage point** in the $i$th slot (eq.(6)) | +| ${\sf rc\_sp}_{i,j}$ | The $j$th **reward chain signage point** in the $i$th slot (eq.(9)) | | ${\sf cc\_sp}(\beta)$ | he ${\sf cc\_sp}_{i,j}$ used as challenge to compute the PoSpace $\sigma$ in block $\beta$ | -| ${\sf rc\_sp}(\beta)$ | The ${\sf rc\_sp}_{i,j}$ whose signature $\mu_{{\sf rc\_sp}}$ is in $\beta$ | -| ${\sf rc\_ip}(\beta)$ | The infusion point of $\beta$ into ${\cal RC}$ (eq.(10) | +| ${\sf rc\_sp}(\beta)$ | The ${\sf rc\_sp}_{i,j}$ whose signature $\mu_{{\sf rc\_sp}}$ is in $\beta$ | +| ${\sf rc\_ip}(\beta)$ | The infusion point of $\beta$ into ${\cal RC}$ (eq.(10) | The _signage point interval_ is the number of VDF steps between signage points, for the $i$th slot it's $$ -{\sf spi}_i \stackrel{\scriptsize \sf def}{=}T_i/64 -$$ +{\sf spi}_i \stackrel{\scriptsize \sf def}{=}T_i/64 $$ so e.g., the depth of the $j$th signage point in the $i$th slot is $\mathsf{rc\_sp}_{i,j}.\mathsf{d} = \mathsf{cc\_sp}_{i,j}.\mathsf{d} = j \cdot \mathsf{spi}_i$. A block in the $i$th slot will be infused 3 to 4 signage point intervals past its signage point. -$$ -3\cdot {\sf spi}_i\ <\ -{\sf rc\_ip}(\beta_T).{\sf d}\ -\ {\sf rc\_sp}(\beta_T).{\sf d}\ < \ 4\cdot {\sf spi}_i -$$ +$$ 3\cdot {\sf spi}_i\ <\ +{\sf rc\_ip}(\beta_T).{\sf d}\ -\ {\sf rc\_sp}(\beta_T).{\sf d}\ < \ 4\cdot {\sf spi}_i $$ The first signage point in a slot is the last signage point after infusion $$ -{\sf rc\_sp}_{i+1,0}={\sf rc\_sp}_{i,\tau_i\cdot 64}^+ -$$ +{\sf rc\_sp}_{i+1,0}={\sf rc\_sp}_{i,\tau_i\cdot 64}^+ $$ The $i$th slot starts at total depth $$ -{\sf rc\_sp}_{i,0}.{\sf D}=\sum_{j=1}^{i-1}T_j\cdot \kappa_j -$$ +{\sf rc\_sp}_{i,0}.{\sf D}=\sum_{j=1}^{i-1}T_j\cdot \kappa_j $$ ## 5.2 The Challenge Chain The challenge chain ${\cal CC}$ is a VDF chain whose data and VDF values we'll denote as $$ -{\cal CC}={\sf ic}_0, \tau^{{\cal CC}}_1,{\sf ic}_1,\tau^{\cal CC}_2,{\sf ic}_2,\ldots -$$ +{\cal CC}={\sf ic}_0, \tau^{{\cal CC}}_1,{\sf ic}_1,\tau^{\cal CC}_2,{\sf ic}_2,\ldots $$ Here $\tau^{\cal CC}_i$ is the VDF computation for the $i$th slot. Usually its number of VDF steps is the current time parameter $T_i$ (and should take 10 minutes to compute), but in exceptional cases it can be an integer multiple $\kappa_i\in\mathbb{N}$ of that as we enforce a 16 block minimum per slot -$$ -\tau^{\cal CC}_i.{\sf t} = \kappa_i\cdot T_i \qquad\textrm{typically $\kappa_i=1$} -$$ +$$ \tau^{\cal CC}_i.{\sf t} = \kappa_i\cdot T_i \qquad\textrm{typically $\kappa_i=1$} $$ The value ${\sf ic}_i$ infused at the beginning of slot $i+1$ depends on the first block in slot $i$, we'll explain how exactly in §5.5. As the VDF $\tau^{\cal CC}_i$ of the $i$th slot is computed by a time lord, they release equidistant points of this computation called the _challenge chain signage points_, one every ${\sf spi}_i=T_i/64$ VDF steps or around $9.375=600/64$ seconds $$ -{\sf cc\_sp}_{i,0},{\sf cc\_sp}_{i,1},\ldots,{\sf cc\_sp}_{i,\tau_i\cdot 64}\quad\textrm{where}\quad {\sf cc\_sp}_{i,j}\stackrel{\scriptsize \sf def}{=}\tau^{\cal CC}_i[j\cdot {\sf spi}_i] -$$ +{\sf cc\_sp}_{i,0},{\sf cc\_sp}_{i,1},\ldots,{\sf cc\_sp}_{i,\tau_i\cdot 64}\quad\textrm{where}\quad {\sf cc\_sp}_{i,j}\stackrel{\scriptsize \sf def}{=}\tau^{\cal CC}_i[j\cdot {\sf spi}_i] $$
eq.(6)
@@ -115,21 +106,17 @@ The reward chain ${\cal RC}$ is a VDF chain that the time lords evaluate in para Whenever a farmer receives new signage points ${\sf cc\_sp}_{i,j},{\sf rc\_sp}_{i,j}$ they first check whether this points lie on a heaviest chain (cf. the discussion in §1.5) and their VDF proofs verify. If the this is the case, the farmer checks they can create a winning PoSpace proof. This process will, for a subset of the plots, produce a PoSpace $\sigma$ and some additional value $\sigma.{\sf required\_iterations}$. Whether this PoSpace is a winning proof is now determined by the time parameter $T_i$ as -$$ -\textrm{winning condition : } \sigma.{\sf required\_iterations} < {\sf spi}_i\quad (=T_i/64) -$$ +$$ \textrm{winning condition : } \sigma.{\sf required\_iterations} < {\sf spi}_i\quad (=T_i/64) $$
eq.(7)
:::tip Design Choice 2: Why 32 Blocks in Expectation and not Exactly? -With our winning condition we have 32 blocks per slot _in expectation_ depending on a challenge. We could have used a different design to enforce _exactly_ 32 challenges, but then it would be impossible to achieve our Objective 1.(c), which asks that whether a plot wins must depend solely on the challenge. +With our winning condition we have 32 blocks per slot _in expectation_ depending on a challenge. We could have used a different design to enforce _exactly_ 32 challenges, but then it would be impossible to achieve our Objective 1.(c), which asks that whether a plot wins must depend solely on the challenge. ::: We could have used a different design to enforce _exactly_ 32 challenges, but then it would be impossible to achieve our Objective 1.(c), which asks that whether a plot wins must depend solely on the challenge. ::: If a farmer has a winning PoSpace $\sigma$ they can produce a block $\beta=(\beta_T,\beta_F)$ which contains the foliage block $\beta_F$ and the trunk block $\beta_T$. The actual $\textsf{Chia}$ blocks are more sophisticated than our description below, but in this writeup we focus on the entries which are absolutely necessary for functionality and security of the chain and ignore entries which are there for efficiency like weight proofs for light clients or pooling. They key entries in a valid trunk block -$$ -\beta_T=(\sigma,\mu_{{{\sf rc\_sp}}}) -$$ +$$ \beta_T=(\sigma,\mu_{{{\sf rc\_sp}}}) $$ are @@ -142,22 +129,19 @@ $\mu_{\sf rc\_sp}\gets {{\sf Sig.sign}}(S.sk,{\sf rc\_sp}_{i,j})$, a signature u The reward chain ${\cal RC}$ is a VDF chain that time lords compute in parallel to ${\cal CC}$. Like ${\cal CC}$, ${\cal RC}$ can be spilt in a sequence of slots. $$ -{\cal RC}={\cal RC}_1,{\cal RC}_2,\ldots -$$ +{\cal RC}={\cal RC}_1,{\cal RC}_2,\ldots $$ While in ${\cal CC}$ the $i$th slot just contains a VDF $\tau^{\cal CC}_i$ and the value ${\sf ic}_i$ infused at the end, each slot ${\cal RC}_i$ of the ${\cal RC}$ chain $$ -{\cal RC}_i=\tau^{\cal RC}_{i,1},\beta_1,\tau^{\cal RC}_{i,2},\beta_2\ldots, \beta_{b_i} \tau^{\cal RC}_{i,b_i+1},({\sf ic}_i,\tau^{\cal CC}_{i}.{\sf y}) -$$ +{\cal RC}_i=\tau^{\cal RC}_{i,1},\beta_1,\tau^{\cal RC}_{i,2},\beta_2\ldots, \beta_{b_i} \tau^{\cal RC}_{i,b_i+1},({\sf ic}_i,\tau^{\cal CC}_{i}.{\sf y}) $$
eq.(8)
is a VDF chain with typically around $33$ infused values: around 32 blocks $b_i$ and at the end of the slot also the ${\cal CC}$ and ${\sf i}{\cal CC}$ points at the same depth. The ${\cal RC}$ signage points are $$ -{\sf rc\_sp}_{i,j}\stackrel{\scriptsize \sf def}{=}{\cal RC}_i[j\cdot {\sf spi}_i] -$$ +{\sf rc\_sp}_{i,j}\stackrel{\scriptsize \sf def}{=}{\cal RC}_i[j\cdot {\sf spi}_i] $$
eq.(9)
@@ -180,28 +164,21 @@ Recall that the challenge chain ${\cal CC}$ is used to create PoSpace challenges Concretely, the infused challenge of the $i$th slot is the output of a VDF computation $$ -{\sf ic}_i\stackrel{\scriptsize \sf def}{=}\tau.{\sf y}\qquad \tau={\sf VDF.solve}(x,t) -$$ +{\sf ic}_i\stackrel{\scriptsize \sf def}{=}\tau.{\sf y}\qquad \tau={\sf VDF.solve}(x,t) $$ on some challenge $x$ and time $t$ which are defined as follows. Let $\beta_T=(\sigma,\mu_{{{\sf rc\_sp}}})$ be the first trunk block infused into the $i$th slot ${\cal RC}_i$ past the 3rd signage point, using notion as in eq.(10) -$$ -\beta_T=\beta_j \textrm{ where }j=\min\{k\ :\ \beta_k.{\sf d}>3\cdot {\sf spi}\} -$$ +$$ \beta_T=\beta_j \textrm{ where }j=\min\{k\ :\ \beta_k.{\sf d}>3\cdot {\sf spi}\} $$ now the challenge $x$ is derived from the PoSpace in this block and the value of ${\cal CC}$ at the depth of its infusion point -$$ -\quad x\gets {\sf VDF.sample}(\sigma,{\cal CC}[{\sf rc\_ip}(\beta_T).{\sf D}].{\sf y}) -$$ +$$ \quad x\gets {\sf VDF.sample}(\sigma,{\cal CC}[{\sf rc\_ip}(\beta_T).{\sf D}].{\sf y}) $$ the number of steps $t$ is the the remaining number of VDF steps in the slot, so the value ${\sf ic}_i$ will be available at the end of the slot when it's required, but not earlier -$$ -t={\sf cc\_ip}_{i,0}.{\sf D}- {\sf rc\_ip}(\beta).{\sf D} -$$ +$$ t={\sf cc\_ip}_{i,0}.{\sf D}- {\sf rc\_ip}(\beta).{\sf D} $$ :::danger Security Notice 1: Why iCC depends only on σ We only use $\sigma$, not the entire trunk block $\beta_T=(\sigma,\mu_{{{\sf rc\_sp}}})$, to compute the infused challenge ${\sf ic}_i$. This is crucial to ensure that the challenges depend only on a single challenge per slot. Had we infused the entire $\beta_T$ (as we do into ${\cal RC}$), the challenges would depend on all blocks (as $\mu_{{\sf rc\_sp}}$ depends on ${\cal RC}$ which infuses all blocks) and we would not get security against double dipping. @@ -229,15 +206,11 @@ To limit the impact of double-dipping we use correlated randomness [
-Your Linux installation may not come with Python's development tools installed by default. To be sure that these tools are installed, run: +Your Linux installation may not come with Python's development tools installed by default. Your Linux installation may not come with Python's development tools installed by default. To be sure that these tools are installed, run: ```bash sudo apt-get install -y build-essential python3-dev @@ -145,6 +145,31 @@ pip install chia-dev-tools --no-deps Install pytest: +```bash +pip install pytest +``` ./venv/bin/activate +``` + +Install the prerequisites: + +```bash +python3 -m pip install --upgrade pip setuptools wheel +``` + +Install the tool: + +```bash +pip install . +``` + +Install chia dev tools: + +```bash +pip install chia-dev-tools --no-deps +``` + +Install pytest: + ```bash pip install pytest ``` @@ -201,6 +226,23 @@ pip install pytest :::note You might receive an error such as ERROR: Failed building wheel for CAT-admin-tool. This is likely safe to ignore. As long as you can run cats --help without errors, the tool has been installed properly. ::: +``` + +Install Chia dev tools: + +```bash +pip install chia-dev-tools --no-deps +``` + +Install pytest: + +```bash +pip install pytest +``` + +:::note +You might receive an error such as ERROR: Failed building wheel for CAT-admin-tool. This is likely safe to ignore. As long as you can run cats --help without errors, the tool has been installed properly. +::: @@ -225,7 +267,7 @@ To get started, you will create a single-issuance CAT. This is the default way t :::note -A TAIL is a Chialisp program that defines the rules for issuing and melting tokens. Learn more about the [Token and Asset Issuance Limitations program](https://chialisp.com/cats/#tail). +A TAIL is a Chialisp program that defines the rules for issuing and melting tokens. Learn more about the [Token and Asset Issuance Limitations program](https://chialisp.com/cats/#tail). Learn more about the [Token and Asset Issuance Limitations program](https://chialisp.com/cats/#tail). ::: @@ -233,7 +275,7 @@ A CAT with a single-issuance TAIL will be useful for anyone who wants to create First, figure out how many tokens you want to issue. Because creating a single token takes 1,000 mojos, you will multiply your supply by 1,000 to figure out how much TXCH (or XCH on mainnet) is needed. For example, if you want to issue 1 million tokens, you'll need 1 billion mojos (1/1000 of a TXCH/XCH). -Take note of your _Receive Address_ in the Chia GUI. (Alternatively, run `chia wallet get_address` from a terminal window.) You'll need this address for the next step. +Take note of your _Receive Address_ in the Chia GUI. (Alternatively, run `chia wallet get_address` from a terminal window.) You'll need this address for the next step. (Alternatively, run `chia wallet get_address` from a terminal window.) You'll need this address for the next step. After confirming you are within the admin tool directory, run: @@ -281,7 +323,7 @@ First, figure out how many tokens you want to issue. Because creating a single t Just as with the Single Issuance CAT, we recommend that you include a fee with your transaction. This fee will ensure that your transaction is processed in front of any dust in the mempool. Whether you're running on testnet or mainnet, the recommended fee amount is 100 million mojos (`-m 100000000`). Even though you will run the `cats` command multiple times, the fee will only be applied once, when the transaction is pushed to the network. ::: -Run `chia wallet get_address` from a terminal window to get a new receive address. You will use this address shortly. +Run `chia wallet get_address` from a terminal window to get a new receive address. You will use this address shortly. You will use this address shortly. Run `chia keys show`. Take note of your **fingerprint** and **master public key**. @@ -373,7 +415,7 @@ When you are ready to issue your CAT to mainnet, the first step is to switch to chia configure -t false ``` -The second step is to generate a new key pair and store the mnemonic in a secure manner. You can generate your key by clicking `Add Wallet` and `Create New` from the `Wallet Keys` login screen of the GUI. This will work in the same manner as earlier for our testnet CAT. +The second step is to generate a new key pair and store the mnemonic in a secure manner. The second step is to generate a new key pair and store the mnemonic in a secure manner. You can generate your key by clicking `Add Wallet` and `Create New` from the `Wallet Keys` login screen of the GUI. This will work in the same manner as earlier for our testnet CAT. This will work in the same manner as earlier for our testnet CAT. :::danger We recommend the new keypair being used exclusively for the CAT ownership. @@ -397,6 +439,6 @@ Finally, you can go through the same process to create a CAT now using real XCH Congratulations! You've created your first CAT. What now? -Well, hopefully you can share your CAT with the world and get some traction. In the meantime, you can learn more about the [Single Issuance TAIL](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/cat_wallet/puzzles/genesis_by_coin_id.clsp) and [Multi Issuance TAIL](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/cat_wallet/puzzles/delegated_tail.clsp). +Well, hopefully you can share your CAT with the world and get some traction. Well, hopefully you can share your CAT with the world and get some traction. In the meantime, you can learn more about the [Single Issuance TAIL](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/cat_wallet/puzzles/genesis_by_coin_id.clsp) and [Multi Issuance TAIL](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/cat_wallet/puzzles/delegated_tail.clsp). This guide was for fungible tokens. Now you can learn about [non-fungible tokens](/guides/nft-intro). diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-issuance.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-issuance.md index a456565c45..9a37338603 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-issuance.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-issuance.md @@ -31,15 +31,15 @@ Now that you have a CSV file containing the necessary information, you can run t 1. Open a new terminal window and run the following to clone the CAT Admin Tool repository, using the `main` branch: - ```bash - git clone https://github.com/Chia-Network/CAT-admin-tool.git -b main - ``` +```bash +git clone https://github.com/Chia-Network/CAT-admin-tool.git -b main +``` 2. Change to the cloned repository: - ```bash - cd CAT-admin-tool - ``` +```bash +cd CAT-admin-tool +``` 3. Create a new virtual environment and then activate it: @@ -60,22 +60,24 @@ python -m venv venv - -```bash + + ```bash python3 -m venv venv . ./venv/bin/activate -``` - +``` ./venv/bin/activate + ``` + - -```bash + + ```bash python3 -m venv venv . ./venv/bin/activate -``` - +``` ./venv/bin/activate + ``` + - + 4. Install the latest versions of `pip`, `setuptools` and `wheel`: @@ -95,37 +97,36 @@ python -m pip install --upgrade pip setuptools wheel - -```bash + + ```bash python3 -m pip install --upgrade pip setuptools wheel ``` - + - -```bash + + ```bash python3 -m pip install --upgrade pip setuptools wheel ``` - + - + 5. Install the CAT Admin Tool: - ```bash - pip install . +```bash +pip install . +pip install . pip install chia-dev-tools --no-deps pip install pytest - ``` +``` - :::note You can safely ignore the following errors: +:::note You can safely ignore the following errors: - ``` - ERROR: Failed building wheel for CAT-admin-tool +``` +ERROR: Failed building wheel for CAT-admin-tool ERROR: pip's dependency resolver... - ``` - - ::: +``` :::tip Python 3.9+ may be required on macOS @@ -133,12 +134,12 @@ Python 3.9+ may be required on macOS 6. The CAT Admin Tool should now be installed and configured properly. To test it, run: - ```bash - cats --help +```bash +cats --help cdv --help - ``` +``` - You should get a usage statement for each command. At this point, you're ready to create your new CAT2 coins. +You should get a usage statement for each command. At this point, you're ready to create your new CAT2 coins. ## Secure the Bag (Single Issuance) {#secure-single} @@ -151,10 +152,10 @@ This section will show you how to create a tree of CAT2 coins that are identical If you are unsure whether your CAT used a single- or multi-issuance TAIL, step 1 will show you how to view the TAIL that was used to create it. 1. Figure out the total number of XCH mojos that were issued for your CAT1. - - Navigate to [taildatabase.com](https://www.taildatabase.com). - - Search for your CAT. We'll use Spacebucks for this example. - - You'll see _Supply_ (and a number) under the title on the right side of your screen. The number indicates the number of tokens issued. However, you need to multiply this number by 1,000 in order to calculate the number of XCH mojos used for the issuance. For example, Spacebucks had an issuance of 1 billion (1,000,000,000) tokens, which is equivalent to 1 trillion (1,000,000,000,000) XCH mojos. +- Navigate to [taildatabase.com](https://www.taildatabase.com). +- Search for your CAT. We'll use Spacebucks for this example. +- You'll see _Supply_ (and a number) under the title on the right side of your screen. The number indicates the number of tokens issued. However, you need to multiply this number by 1,000 in order to calculate the number of XCH mojos used for the issuance. For example, Spacebucks had an issuance of 1 billion (1,000,000,000) tokens, which is equivalent to 1 trillion (1,000,000,000,000) XCH mojos. - Click the _Chialisp_ button. This will show you the TAIL that was used for issuance. If it was a single-issuance CAT, it likely used `genesis_by_coin_id`. If you are unsure, compare the TAIL shown with the [TAIL in GitHub](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/genesis_by_coin_id.clvm). Take note of this TAIL as you will need to input its hex version in a subsequent step (if you used one of our reference TAILs, then you already have a copy of this file). 2. Sync a Chia wallet that has at least as many XCH mojos as the original issuance. @@ -165,25 +166,25 @@ If you are unsure whether your CAT used a single- or multi-issuance TAIL, step 1 - You can run either the light wallet or a full node. - You are recommended to have enough mojos to cover transaction fees for the reissuance. The recommended amount is five hundred thousand (500,000) mojos per coin to be reissued. - You are **required** to have a single coin that is large enough to cover the entire reissuance. Even if your XCH balance is sufficient, it may be separated into multiple small coins. The easiest way to ensure that you have a sufficiently large coin is to send a transaction to yourself of at least the total value required. - ::: +::: 3. Use the CAT Admin Tool to select a coin that will be used for issuing the CAT2 tokens. - From a terminal window you'll need to run the `cats` command. The arguments needed for this command include: +From a terminal window you'll need to run the `cats` command. The arguments needed for this command include: - - `--tail` – The TAIL program that was originally used (usually this is `genesis_by_coin_id`), in hex file format. - - `--send-to` – Where to send the tokens when they are initially issued. This is a placeholder only – you can enter any XCH address here. The value is required, but it will be ignored. - - `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. - - `--as-bytes` – This tells the tool to output the spend bundle in bytes instead of JSON. - - `--select-coin` – This tells the tool to select a specific coin from your wallet. +- `--tail` – The TAIL program that was originally used (usually this is `genesis_by_coin_id`), in hex file format. +- `--send-to` – Where to send the tokens when they are initially issued. This is a placeholder only – you can enter any XCH address here. The value is required, but it will be ignored. +- `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. +- `--as-bytes` – This tells the tool to output the spend bundle in bytes instead of JSON. +- `--select-coin` – This tells the tool to select a specific coin from your wallet. - The command to run is: +The command to run is: - ```bash - cats --tail --send-to
--amount --as-bytes --select-coin - ``` +```bash +cats --tail --send-to
--amount --as-bytes --select-coin +``` - Here's an example of the command to reissue Spacebucks: +Here's an example of the command to reissue Spacebucks: - -```bash -cats --tail ./reference_tails/genesis_by_coin_id.clsp.hex --send-to xch1rh6punh4fy70y80ef4g89c9hqvm54dtl0fvyc4ejdccp3y6p04fqn5x8x8 --amount 1000000000000 --as-bytes --select-coin + + ```bash +cats --tail ./reference_tails/delegated_tail.clsp.hex --curry 0x8a7afe10d00899b94cf0d407b85e1b9fca21868bcf158563fe9432b60e36db7136055186221fbd27ecc7fc0d5b99ef1b --send-to xch1rd7hejemt57amqtxq8azqg90hgxyhd9shwyjuppq5ez2jn4rlznscn4efy --amount 6000000000 --as-bytes --solution "(a (q 2 (i 47 (q 8) (q 2 (i (= 45 2) () (q 8)) 1)) 1) (c (q . 0x11038a7e107cb7e17a503ba201d94166018deecd777314e4697c5269d9f37fb6) 1))" --signature b75390ee21b001b7a721f719ff045e3dc2a1072ab0824a8e75c881398db0fbed8fde5c62bbdfe629dce5da3d77834559016acd6d403f9b90d3102da2e9452461457514088af0cabe0b8a8493fc9c09d1785f1322abc8958ecf7907eba0e0abcc ``` - + The last line of the output will be something like: @@ -226,18 +227,18 @@ This is the Coin ID of the coin that you will use for reissuance. Keep this valu 4. Obtain the target puzzle hash by running the "secure_the_bag" command. The important arguments here are: - - `--tail` – The TAIL program that was originally used (usually this is `genesis_by_coin_id`), in hex file format. - - `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. - - `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. - - `--curry` – The value of `Name:` from the above output. Note that you need to prepend `0x` to this argument, so for the above example, this value would start with `0x8f4`. +- `--tail` – The TAIL program that was originally used (usually this is `genesis_by_coin_id`), in hex file format. +- `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. +- `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. +- `--curry` – The value of `Name:` from the above output. Note that you need to prepend `0x` to this argument, so for the above example, this value would start with `0x8f4`. - The command to run is: +The command to run is: - ```bash - secure_the_bag --tail --amount --secure-the-bag-targets-path --prefix xch --curry - ``` +```bash +secure_the_bag --tail --amount --secure-the-bag-targets-path --prefix xch --curry +``` - Here's an example of the command to secure the bag for Spacebucks: +Here's an example of the command to secure the bag for Spacebucks: - + The command will create a tree of coins. This could take a long time, depending on how many coins need to be created. While it's in progress, it will output the percent complete. After it is finished, it will output the puzzle hash and address of the new coin to be created. @@ -283,15 +284,15 @@ You'll need both of these values later. 5. Push the transaction to the network. This will actually create the coin tree (_Secure the Bag_). The arguments are the same as above, with one exception: - `--send-to` – The XCH address from the "Secure the bag root address:" of the above output +`--send-to` – The XCH address from the "Secure the bag root address:" of the above output - The command to run is: +The command to run is: - ```bash - cats --tail --send-to --amount --as-bytes --curry <0x Coin ID> - ``` +```bash +cats --tail --send-to --amount --as-bytes --curry <0x Coin ID> +``` - For this example, the command looks like this: +For this example, the command looks like this: - + You will need to confirm that you want to push the transaction, then you will receive the `Asset ID` and `Eve Coin ID`. For this example, the following was the result: @@ -351,10 +352,10 @@ You need to use the same public/private key pair to sign the CAT2 issuance as yo 1. Figure out the total number of XCH mojos that were issued for your CAT1. - - Navigate to [taildatabase.com](https://www.taildatabase.com). - - Search for your CAT. - - You'll see _Supply_ (and a number) under the title on the right side of your screen. The number indicates the number of tokens issued. However, you need to multiply this number by 1,000 in order to calculate the number of XCH mojos used for the issuance. In this example, we'll use an issuance of 6 million (6,000,000) tokens, which is equivalent to 6 billion (6,000,000,000) XCH mojos. - - Click the _Chialisp_ button. This will show you the TAIL that was used for issuance. If it was a multi-issuance CAT, it likely used `delegated_tail`. If you are unsure, compare the TAIL shown with the [TAIL in GitHub](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/delegated_tail.clvm). Take note of this TAIL as you will need to input its hex version in a subsequent step (if you used one of our reference TAILs, then you already have a copy of this file). +- Navigate to [taildatabase.com](https://www.taildatabase.com). +- Search for your CAT. +- You'll see _Supply_ (and a number) under the title on the right side of your screen. The number indicates the number of tokens issued. However, you need to multiply this number by 1,000 in order to calculate the number of XCH mojos used for the issuance. In this example, we'll use an issuance of 6 million (6,000,000) tokens, which is equivalent to 6 billion (6,000,000,000) XCH mojos. +- Click the _Chialisp_ button. This will show you the TAIL that was used for issuance. If it was a multi-issuance CAT, it likely used `delegated_tail`. If you are unsure, compare the TAIL shown with the [TAIL in GitHub](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/delegated_tail.clvm). Take note of this TAIL as you will need to input its hex version in a subsequent step (if you used one of our reference TAILs, then you already have a copy of this file). 2. Sync a Chia wallet that has at least as many XCH mojos as the original issuance. @@ -364,25 +365,25 @@ You need to use the same public/private key pair to sign the CAT2 issuance as yo - You can run either the light wallet or a full node. - You are recommended to have enough mojos to cover transaction fees for the reissuance. The recommended amount is five hundred thousand (500,000) mojos per coin to be reissued. - You are **required** to have a single coin that is large enough to cover the entire reissuance. Even if your XCH balance is sufficient, it may be separated into multiple small coins. The easiest way to ensure that you have a sufficiently large coin is to send a transaction to yourself of at least the total value required. - ::: +::: 3. Use the CAT Admin Tool to select a coin that will be used for issuing the CAT2 tokens. - From a terminal window you'll need to run the `cats` command. The arguments needed for this command include: +From a terminal window you'll need to run the `cats` command. The arguments needed for this command include: - - `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. - - `--send-to` – Where to send the tokens when they are initially issued. This is a placeholder only – you can enter any XCH address here. The value is required, but it will be ignored. - - `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. - - `--as-bytes` – This tells the tool to output the spend bundle in bytes instead of JSON. - - `--select-coin` – This tells the tool to select a specific coin from your wallet. +- `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. +- `--send-to` – Where to send the tokens when they are initially issued. This is a placeholder only – you can enter any XCH address here. The value is required, but it will be ignored. +- `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. +- `--as-bytes` – This tells the tool to output the spend bundle in bytes instead of JSON. +- `--select-coin` – This tells the tool to select a specific coin from your wallet. - The command to run is: +The command to run is: - ```bash - cats --tail --send-to
--amount --as-bytes --select-coin - ``` +```bash +cats --tail --send-to
--amount --as-bytes --select-coin +``` - Here's an example of the command: +Here's an example of the command: - + The last line of the output will be something like: @@ -425,18 +426,18 @@ This is the Coin ID of the coin that you will use for reissuance. Keep this valu 4. Obtain the target puzzle hash by running the "secure_the_bag" command. The important arguments here are: - - `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. - - `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. - - `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. - - `--curry` – The value of `Name:` from the above output. Note that you need to prepend `0x` to this argument, so for the above example, this value would start with `0x110`. +- `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. +- `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. +- `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. +- `--curry` – The value of `Name:` from the above output. Note that you need to prepend `0x` to this argument, so for the above example, this value would start with `0x110`. - The command to run is: +The command to run is: - ```bash - secure_the_bag --tail --amount --secure-the-bag-targets-path --prefix xch --curry - ``` +```bash +secure_the_bag --tail --amount --secure-the-bag-targets-path --prefix xch --curry +``` - Here's an example of the command to secure the bag: +Here's an example of the command to secure the bag: - + The command will create a tree of coins. This could take a long time, depending on how many coins need to be created. While it's in progress, it will output the percent complete. After it is finished, it will output the puzzle hash and address of the new coin to be created. @@ -482,13 +483,13 @@ You should now have obtained the `Secure the bag root puzzle hash` and the `Secu 5. Using the coin ID obtained from the `cats` command above, curry the ID into the `genesis_by_coin_id` puzzle. - The command to run is: +The command to run is: - ```bash - cdv clsp curry -a - ``` +```bash +cdv clsp curry -a +``` - In this example, the command will be: +In this example, the command will be: - + The output will be a new CLVM puzzle: @@ -560,7 +561,7 @@ cdv clsp curry ./reference_tails/genesis_by_coin_id.clsp.hex -a 0x11038a7e107cb7 ``` - + The output will be the treehash of the puzzle you calculated in the previous step: @@ -570,46 +571,46 @@ The output will be the treehash of the puzzle you calculated in the previous ste 7. Sign the treehash that you just calculated. This will effectively sign the puzzle containing the coin you selected. - The command to run is: +The command to run is: - ```bash - chia keys sign -d -f -t m -b - ``` +```bash +chia keys sign -d -f -t m -b +``` - Where `` is the fingerprint of the wallet that holds the coin you previously selected. This fingerprint can be obtained by running `chia keys show`. +Where `` is the fingerprint of the wallet that holds the coin you previously selected. This fingerprint can be obtained by running `chia keys show`. - For this example, the command is: +For this example, the command is: - ```bash - chia keys sign -d 3a56fa8cdf70dfd0e894af58359d72cb04658a1b0628a4ffe0dcc02099c9863b -f 1131363750 -t m -b - ``` +```bash +chia keys sign -d 3a56fa8cdf70dfd0e894af58359d72cb04658a1b0628a4ffe0dcc02099c9863b -f 1131363750 -t m -b +``` - The output will be the public key used for signing, as well as the signature obtained: +The output will be the public key used for signing, as well as the signature obtained: - ``` - Public key: 8a7afe10d00899b94cf0d407b85e1b9fca21868bcf158563fe9432b60e36db7136055186221fbd27ecc7fc0d5b99ef1b +``` +Public key: 8a7afe10d00899b94cf0d407b85e1b9fca21868bcf158563fe9432b60e36db7136055186221fbd27ecc7fc0d5b99ef1b Signature: b75390ee21b001b7a721f719ff045e3dc2a1072ab0824a8e75c881398db0fbed8fde5c62bbdfe629dce5da3d77834559016acd6d403f9b90d3102da2e9452461457514088af0cabe0b8a8493fc9c09d1785f1322abc8958ecf7907eba0e0abcc - ``` +``` 8. The final step is to create the coin using the `secure the bag root address` as the target address. - The command to run is: +The command to run is: - ``` - cats --tail --curry --send-to --amount --as-bytes --solution "" --signature - ``` +``` +cats --tail --curry --send-to --amount --as-bytes --solution "" --signature +``` - The arguments needed are: +The arguments needed are: - - `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. - - `--curry` – The public key obtained in the previous step. Be sure to prefix it with `0x`. - - `--send-to` – The `secure the bag root address`, obtained from in a previous step. - - `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. - - `--as-bytes` – Output the spend bundle in bytes (don't change this). - - `--solution` – The output of the `curry` command from a previous step (in quotes). - - `--signature` – The signature obtained from the previous step. +- `--tail` – The TAIL program that was originally used (usually this is `delegated_tail`), in hex file format. +- `--curry` – The public key obtained in the previous step. Be sure to prefix it with `0x`. +- `--send-to` – The `secure the bag root address`, obtained from in a previous step. +- `--amount` – The total number of mojos for this issuance. You need to have this many mojos in your wallet. This number must match the actual number of mojos that were originally issued. +- `--as-bytes` – Output the spend bundle in bytes (don't change this). +- `--solution` – The output of the `curry` command from a previous step (in quotes). +- `--signature` – The signature obtained from the previous step. - For this example, the command to execute is: +For this example, the command to execute is: @@ -640,7 +642,7 @@ cats --tail ./reference_tails/delegated_tail.clsp.hex --curry 0x8a7afe10d00899b9 ``` - + The output of this command will contain the Asset ID and Eve Coin ID for your issuance: @@ -710,7 +712,7 @@ unwind_the_bag --eve-coin-id 9fe3e95308949cb9c49333f829922dc7118cd3e2fdf365cde66 ``` - + This command could take a long time to finish running. Afterward, you will have an exact copy of your CAT1 issuance, but in CAT2 form. @@ -726,50 +728,50 @@ At this point, you can navigate to [taildatabase.com](https://www.taildatabase.c 1. We used Spacebucks in the single-issuance example, so we'll obtain the puzzle hash of a wallet that contains some CAT1 Spacebucks. First, run: - ```bash - chia keys show - ``` +```bash +chia keys show +``` - This will show the `First wallet address` of the key pair that contains Spacebucks: +This will show the `First wallet address` of the key pair that contains Spacebucks: - ``` - First wallet address: xch1qzz5xrd05698f2n2tt4qm500kys6p4w79ph7s2xrlau3drfugl3qqh9j4l - ``` +``` +First wallet address: xch1qzz5xrd05698f2n2tt4qm500kys6p4w79ph7s2xrlau3drfugl3qqh9j4l +``` 2. Use the `cdv decode` command to obtain the puzzle hash that corresponds to this wallet address: - ```bash - cdv decode xch1qzz5xrd05698f2n2tt4qm500kys6p4w79ph7s2xrlau3drfugl3qqh9j4l - ``` +```bash +cdv decode xch1qzz5xrd05698f2n2tt4qm500kys6p4w79ph7s2xrlau3drfugl3qqh9j4l +``` - Which outputs: +Which outputs: - ``` - 0085430dafa68a74aa6a5aea0dd1efb121a0d5de286fe828c3ff79168d3c47e2 - ``` +``` +0085430dafa68a74aa6a5aea0dd1efb121a0d5de286fe828c3ff79168d3c47e2 +``` 3. If you want to verify that the puzzle hash is actually due to receive some tokens, you can check the CSV file. In this case, puzzle hash `0085...` should receive 42 thousand (42,000) barfs. 4. Run the `unwind_the_bag` command to send the appropriate amount to that puzzle hash. Be sure to run this command from the wallet that has the appropriate funds in it. - The important values for this command are: +The important values for this command are: - - `--eve-coin-id` – Obtained from the final "secure the bag" command above. - - `--tail-hash` – The `Asset ID:` from the final "secure the bag" command above. - - `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. - - `--unwind-fee` – An optional blockchain fee in mojos, will be applied to each spend. - - `--wallet-id` – The ID of the wallet from which to unwind (typically `1`). - - `--unwind-target-puzzle-hash` – The puzzle hash obtained from the `cdv decode` command above. +- `--eve-coin-id` – Obtained from the final "secure the bag" command above. +- `--tail-hash` – The `Asset ID:` from the final "secure the bag" command above. +- `--secure-the-bag-targets-path` – The full path to the CSV file that contains the snapshot of this CAT. +- `--unwind-fee` – An optional blockchain fee in mojos, will be applied to each spend. +- `--wallet-id` – The ID of the wallet from which to unwind (typically `1`). +- `--unwind-target-puzzle-hash` – The puzzle hash obtained from the `cdv decode` command above. - The command to run is: +The command to run is: - ```bash - unwind_the_bag --eve-coin-id --tail-hash --secure-the-bag-targets-path --unwind-fee --wallet-id --unwind-target-puzzle-hash - ``` +```bash +unwind_the_bag --eve-coin-id --tail-hash --secure-the-bag-targets-path --unwind-fee --wallet-id --unwind-target-puzzle-hash +``` - You may have noticed that this command is identical to [the command that unwinds the whole bag](#unwind), with the addition of the `--unwind-target-puzzle-hash` flag that ensures only coins are sent to a specific address. +You may have noticed that this command is identical to [the command that unwinds the whole bag](#unwind), with the addition of the `--unwind-target-puzzle-hash` flag that ensures only coins are sent to a specific address. - In this example, the command to unwind the bag is: +In this example, the command to unwind the bag is: - + This command could take a long time, depending on the total number of coins to unwind. You will need to verify the spend of each individual coin to unwind, and the command will monitor the blockchain for the coin(s) to be spent. The end result should be that the appropriate number of coins are sent to the puzzle hash, which you can then verify in your Chia wallet (assuming you control that wallet). :::note -Each puzzle hash in the bag can only receive one airdrop. When you later unwind the bag for each puzzle hash, any puzzle hashes that have already received an airdrop will be skipped. They will _not_ receive a second airdrop. +Each puzzle hash in the bag can only receive one airdrop. When you later unwind the bag for each puzzle hash, any puzzle hashes that have already received an airdrop will be skipped. They will _not_ receive a second airdrop. ::: When you later unwind the bag for each puzzle hash, any puzzle hashes that have already received an airdrop will be skipped. They will _not_ receive a second airdrop. ::: 5. The puzzle hashes from the CSV file are actually _inner_ puzzle hashes, so searching for them on chain using `cdv rpc coinrecords` is more complex than it normally would be. However, you can still verify that the bag was successfully unwound for that puzzle hash by searching for the hint: @@ -841,7 +843,7 @@ chia rpc full_node get_coin_records_by_hint '{"hint": " - + You should see matching coin_records for each entry in the CSV file, along with its corresponding value. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-snapshot.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-snapshot.md index 13985c6cae..e6e2e341fa 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-snapshot.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cat2-upgrade/cat2-snapshot.md @@ -49,7 +49,7 @@ values={[ :::caution Ensure that you replace `` and `` with the actual folders -::: +::: ```powershell Set-Alias -Name chia "C:\Users\\AppData\Local\chia-blockchain\app-\resources\app.asar.unpacked\daemon\chia.exe" @@ -64,12 +64,15 @@ Set-Alias -Name chia "C:\Users\\AppData\Local\chia-blockchain\app- +- If you previously installed Chia from a **binary build**, then ensure that the `chia` binary's directory is included in your `PATH`. + 1. If you previously installed Chia from a **binary build**, then ensure that the `chia` binary's directory is included in your `PATH`. 2. If you previously installed Chia **from source**, then navigate to the `chia-blockchain` directory and activate your virtual environment: ```bash . ./activate +``` ./activate ``` @@ -85,6 +88,7 @@ alias chia="/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon/c ```bash . ./activate +``` ./activate ``` @@ -111,11 +115,10 @@ alias chia="/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon/c 3. `START_HEIGHT` - The height of the blockchain to start creating the snapshot from (default: `0`). If you are attempting to obtain all records for your CAT, the recommended start height is `1146800`, which is just before CAT1 was introduced. 4. `TARGET_HEIGHT` - The height of the blockchain to end the snapshot (no default - must be set). The recommended height is `2311760`, which is the last block at which CAT1 is valid. -:::caution -Running this process with the recommended block heights could take over 40 hours to complete. You may wish to test it first by setting the `TARGET_HEIGHT` to `1146900`. This will pull data from only 100 blocks, which should only take a few seconds. + :::caution Running this process with the recommended block heights could take over 40 hours to complete. You may wish to test it first by setting the `TARGET_HEIGHT` to `1146900`. This will pull data from only 100 blocks, which should only take a few seconds. ::: -In order to set these variables, you are recommended to put them into a file called `.env` at the root of the `CAT-addresses` project. The tool will automatically read the variables in this file. For example: + In order to set these variables, you are recommended to put them into a file called `.env` at the root of the `CAT-addresses` project. The tool will automatically read the variables in this file. For example: ` - a string to be prepended to the output file name - `` - the TAIL hash you obtained from taildatabase.com - `--coins` - an **optional** flag that will add information about individual coins to the output (which might be helpful for auditing purposes) - ::: +::: :::note -This command will not create any directories, so make sure `` already exists before running it. Otherwise, you will receive a `FileNotFoundError`. +This command will not create any directories, so make sure `` already exists before running it. Otherwise, you will receive a `FileNotFoundError`. ::: Otherwise, you will receive a `FileNotFoundError`. ::: ## Fix EOL Characters {#fix-eol} diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cr-cat-tutorial.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cr-cat-tutorial.md index ce0f156592..8307fd3a2d 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cr-cat-tutorial.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/cat/cr-cat-tutorial.md @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'; ## Intro -Credential Restricted Chia Asset Tokens (CR-CATs) are CATs whose ownership is restricted to people or other entities who possess a required set of Verifiable Credentials (VCs). This guide will show you how to mint CR-CATs, as well as how to distribute them accordingly. +Credential Restricted Chia Asset Tokens (CR-CATs) are CATs whose ownership is restricted to people or other entities who possess a required set of Verifiable Credentials (VCs). This guide will show you how to mint CR-CATs, as well as how to distribute them accordingly. This guide will show you how to mint CR-CATs, as well as how to distribute them accordingly. For additional resources, see the following: @@ -19,16 +19,16 @@ For additional resources, see the following: :::warning -The commands in this guide are only examples. Be sure to replace the listed values with values from your local system. +The commands in this guide are only examples. The commands in this guide are only examples. Be sure to replace the listed values with values from your local system. -This guide was creating using testnet10. The example commands use a fee of 100 million mojos, which will be rather high for mainnet usage. If running on mainnet, be sure to adjust your fees accordingly. +This guide was creating using testnet11. This guide was creating using testnet10. The example commands use a fee of 100 million mojos, which will be rather high for mainnet usage. If running on mainnet, be sure to adjust your fees accordingly. If running on mainnet, be sure to adjust your fees accordingly. ::: ## Definitions - **Decentralized Identifier (DID)** -- An identifier that enables verifiable, decentralized digital identity -- **Verifiable Credential (VC)** -- Allows someone or something to prove that a subject belongs to a certain category or categories, such as being a US citizen. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. +- **Verifiable Credential (VC)** -- Allows someone or something to prove that a subject belongs to a certain category or categories, such as being a US citizen. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. - **Chia Asset Tokens (CATs)** -- Fungible tokens on the Chia blockchain ## Setup @@ -39,24 +39,25 @@ In order to mint CR-CATs, you will need to have: - A synced Chia wallet, running version 2.0 or later (a full node is _not_ required) - At least one DID to be used as a trusted provider -- A sufficient amount of XCH or TXCH for the minting. As a reminder, each CAT consists of 1000 mojos. If you want to mint 1 billion CATs, you will need 1 trillion mojos (1 XCH) for the minting. +- A sufficient amount of XCH or TXCH for the minting. As a reminder, each CAT consists of 1000 mojos. A sufficient amount of XCH or TXCH for the minting. As a reminder, each CAT consists of 1000 mojos. If you want to mint 1 billion CATs, you will need 1 trillion mojos (1 XCH) for the minting. - Sufficient funds to cover blockchain fees, the amount of which depends on how busy the blockchain is at any moment We have faucets available if you don't have sufficient funds to get started: -- [testnet](https://testnet10-faucet.chia.net/) +- [testnet](https://testnet11-faucet.chia.net/) - [mainnet](https://faucet.chia.net/) :::warning important -It is possible to brick\* funds by sending them to an address without the appropriate credentials, as will be demonstrated later in this guide. You are therefore recommended to test minting CR-CATs on the testnet or on a simulator prior to minting them on mainnet. If you are unsure of how to configure your wallet to use the testnet, see our [guide](https://docs.chia.net/guides/chialisp-testnet-setup). +It is possible to brick\* funds by sending them to an address without the appropriate credentials, as will be demonstrated later in this guide. You are therefore recommended to test minting CR-CATs on the testnet or on a simulator prior to minting them on mainnet. You are recommended to test minting VCs on the testnet prior to minting them on mainnet. If you are unsure of how to configure your wallet to use the testnet, see our [guide](https://docs.chia.net/guides/chialisp-testnet-setup). \* Technically, the funds will remain recoverable, but this process will not be easy. ::: +::: ### DID and VC Setup -CR-CATs require at least one authorized provider that can issue VCs that are allowed to trade the CATs. This tutorial will use a DID as the authorized provider. +CR-CATs require at least one authorized provider that can issue VCs that are allowed to trade the CATs. This tutorial will use a DID as the authorized provider. This tutorial will use a DID as the authorized provider. :::info @@ -139,7 +140,7 @@ The VC is also viewable from the GUI: #### VC Holder Wallet -- Holds a VC with launcher ID `5b5389e77b7ec8e9ebd7d92136254418ca674e382031d29aaa6ab75b7822792b` and two proofs: `test_proof1` and `test_proof2`. This VC was provided by the Authorized Provider wallet. +- Holds a VC with launcher ID `5b5389e77b7ec8e9ebd7d92136254418ca674e382031d29aaa6ab75b7822792b` and two proofs: `test_proof1` and `test_proof2`. This VC was provided by the Authorized Provider wallet. This VC was provided by the Authorized Provider wallet. - Does not own a DID - This wallet will receive some CR-CATs from the Authorized Provider @@ -205,7 +206,7 @@ Chia Wallet: ### CAT Admin Tool -CR-CATS are issued from the CAT-admin-tool repository. Follow the instructions below to install it for your specific OS: +CR-CATS are issued from the CAT-admin-tool repository. Follow the instructions below to install it for your specific OS: Follow the instructions below to install it for your specific OS: @@ -300,7 +315,7 @@ Your environment should be all set, but let's make sure: - Run `cdv --help`. You should get another usage statement. -The CAT admin tool also comes bundled with a version of Chia. If your wallet is not currently running, be sure to start it now: +The CAT admin tool also comes bundled with a version of Chia. If your wallet is not currently running, be sure to start it now: If your wallet is not currently running, be sure to start it now: ```bash chia start wallet @@ -322,9 +337,9 @@ For a comprehensive list of all options available with the CAT admin tool, as we ### Automatic CATs -Before continuing, it is a good idea to verify that new CATs will automatically be added to your wallet. The setting for this is located in `~/.chia/mainnet/config/config.yaml`. (Note that this file is in a `mainnet` folder regardless of whether you are running on a testnet or mainnet.) +Before continuing, it is a good idea to verify that new CATs will automatically be added to your wallet. The setting for this is located in `~/.chia/mainnet/config/config.yaml`. (Note that this file is in a `mainnet` folder regardless of whether you are running on a testnet or mainnet.) The setting for this is located in `~/.chia/mainnet/config/config.yaml`. (Note that this file is in a `mainnet` folder regardless of whether you are running on a testnet or mainnet.) -Edit this file and search for `automatically_add_unknown_cats`. You are recommended to set this option's value to `true`. Be sure to restart your wallet if you modify this option, so your new CR-CATs will automatically be added to your wallet. +Edit this file and search for `automatically_add_unknown_cats`. You are recommended to set this option's value to `true`. Edit this file and search for `automatically_add_unknown_cats`. You are recommended to set this option's value to `true`. Be sure to restart your wallet if you modify this option, so your new CR-CATs will automatically be added to your wallet. If you prefer not to use this option, you can also manually add new CATs with the [add_token](/wallet-cli#add_token) command. @@ -351,7 +366,7 @@ With all of these setup steps complete, you are ready to mint CR-CATs! The process for minting Restricted CATs is nearly identical to the process for minting standard CATs. In both cases, any TAIL may be used. This tutorial will only demonstrate how to use a single-issuance TAIL. If you are interested in using other TAILs, or if you would like a more comprehensive list of instructions, see the [CAT creation tutorial](/guides/cat-creation-tutorial). -For starters, you will need to obtain an address to send the CR-CATs to after they have been minted. From the Authorized Provider's wallet run the following command: +For starters, you will need to obtain an address to send the CR-CATs to after they have been minted. From the Authorized Provider's wallet run the following command: From the Authorized Provider's wallet run the following command: ```bash chia wallet get_address --new-address @@ -373,6 +388,7 @@ Response (truncated): ```bash ... +... Profile 1: -Total Balance: 1.0 -Pending Total Balance: 1.0 @@ -383,7 +399,7 @@ Profile 1: ... ``` -In this example, we will create one thousand CR-CATs. Each CR-CAT will consist of 1000 mojos (same as standard CATs), so this example will require one million mojos, plus a transaction fee, for the issuance. +In this example, we will create one thousand CR-CATs. In this example, we will create one thousand CR-CATs. Each CR-CAT will consist of 1000 mojos (same as standard CATs), so this example will require one million mojos, plus a transaction fee, for the issuance. When minting CR-CATs, you have two options for applying restrictions: @@ -392,7 +408,7 @@ When minting CR-CATs, you have two options for applying restrictions: For this example, we will use the `-v` option. -We also need to add the `-sc` flag to select a valid coin to spend. Here is a summary of the options that will be used in this example: +We also need to add the `-sc` flag to select a valid coin to spend. Here is a summary of the options that will be used in this example: Here is a summary of the options that will be used in this example: - `-l` -- the TAIL to use - `-t` -- the address to send the CR-CATs to upon being minted @@ -408,7 +424,7 @@ And here is the example command: cats -l ./reference_tails/genesis_by_coin_id.clsp.hex -t txch1yx4tdtqksjh7mk84deglwyq4j8td8jchyc8sdgem2hnuulmhzdhqct9wpr -a 1000000 -m 100000000 -d did:chia:1w4gf5eyensd37xa0x7aj27fe4cr9tqmf46m272suve5n4q2draesd0t54c -v "test_proof1" -sc ``` -The response will list the details of a coin from your wallet. For example: +The response will list the details of a coin from your wallet. For example: For example: ```bash { @@ -419,13 +435,13 @@ The response will list the details of a coin from your wallet. For example: Name: 1d9cb45618bdd9d70a0959ab8d91cafcbc1acbf7bd31a9e5286fd30622796783 ``` -The value of `Name:` will be used next. If you received an error containing `Can't spend more than wallet balance:`, then you do not have sufficient funds to cover the amount specified in the `-a` and `-m` options. +The value of `Name:` will be used next. The value of `Name:` will be used next. If you received an error containing `Can't spend more than wallet balance:`, then you do not have sufficient funds to cover the amount specified in the `-a` and `-m` options. Next, run the same command again, but replace `-sc` with `-c 0x`, or `-c 0x1d9cb45618bdd9d70a0959ab8d91cafcbc1acbf7bd31a9e5286fd30622796783` in this example. :::warning important -When minting CR-CATs with the commands from this tutorial, you must prepend `0x` to the coin ID in the following command. If you fail to do this, the command will appear to succeed, but it will actually fail. The reasons for not showing an error are twofold: +When minting CR-CATs with the commands from this tutorial, you must prepend `0x` to the coin ID in the following command. If you fail to do this, the command will appear to succeed, but it will actually fail. The reasons for not showing an error are twofold: If you fail to do this, the command will appear to succeed, but it will actually fail. The reasons for not showing an error are twofold: 1. You are technically allowed to curry anything with this command's underlying CLVM puzzle, so omitting the `0x` is valid syntax, even though it won't work in this case. 2. The wallet client asynchronously sends the command to the node, so the wallet client does not know when the command fails. @@ -438,13 +454,13 @@ For example, this command will mint the CR-CATs using the `-c` option: cats -l ./reference_tails/genesis_by_coin_id.clsp.hex -t txch1yx4tdtqksjh7mk84deglwyq4j8td8jchyc8sdgem2hnuulmhzdhqct9wpr -a 1000000 -m 100000000 -d did:chia:1w4gf5eyensd37xa0x7aj27fe4cr9tqmf46m272suve5n4q2draesd0t54c -v "test_proof1" -c 0x1d9cb45618bdd9d70a0959ab8d91cafcbc1acbf7bd31a9e5286fd30622796783 ``` -As a result, a new spend bundle will be created for the minting. You will be prompted whether to submit it to the network: +As a result, a new spend bundle will be created for the minting. You will be prompted whether to submit it to the network: You will be prompted whether to submit it to the network: ```bash The transaction has been created, would you like to push it to the network? (Y/N) ``` -Respond with `Y` and you should be shown the `Asset ID` and `Eve Coin ID` for this CR-CAT. For example: +Respond with `Y` and you should be shown the `Asset ID` and `Eve Coin ID` for this CR-CAT. For example: For example: ```bash Successfully pushed the transaction to the network @@ -462,6 +478,7 @@ Response (truncated): ```bash ... +... CAT 3ba9e16dca39f3fb...: -Total Balance: 1000.0 (1000000 mojo) -Balance Pending VC Approval: 0.0 (0 mojo) @@ -483,11 +500,11 @@ This information is also viewable in the GUI:
-The Authorized Provider now has control of all 1000 of the issued CR-CATs. This type of CAT is distinguished in the GUI by a padlock icon and `Restricted CAT`. The Authorized Provider also possesses a VC with the required proof (`test_proof1`), so a green icon appears when viewing the CAT. +The Authorized Provider now has control of all 1000 of the issued CR-CATs. This type of CAT is distinguished in the GUI by a padlock icon and `Restricted CAT`. The Authorized Provider now has control of all 1000 of the issued CR-CATs. This type of CAT is distinguished in the GUI by a padlock icon and `Restricted CAT`. The Authorized Provider also possesses a VC with the required proof (`test_proof1`), so a green icon appears when viewing the CAT. ## Send CR-CATs -Now that you have minted the CR-CATs, you can send them elsewhere. First, we'll send some to the VC Holder's wallet, which already has a VC that contains the required proof. +Now that you have minted the CR-CATs, you can send them elsewhere. Now that you have minted the CR-CATs, you can send them elsewhere. First, we'll send some to the VC Holder's wallet, which already has a VC that contains the required proof. ### Sending from the GUI @@ -517,7 +534,7 @@ From the VC Holder's wallet, click this button to finalize the transaction:
-An on-chain transaction is required for the approval to be processed. This is necessary to guard against unauthorized wallets holding CR-CATs, as will be demonstrated later in this tutorial. Enter a transaction fee and click `APPROVE PENDING TRANSACTIONS`: +An on-chain transaction is required for the approval to be processed. An on-chain transaction is required for the approval to be processed. This is necessary to guard against unauthorized wallets holding CR-CATs, as will be demonstrated later in this tutorial. Enter a transaction fee and click `APPROVE PENDING TRANSACTIONS`: Enter a transaction fee and click `APPROVE PENDING TRANSACTIONS`:
Approve pending transactions @@ -548,7 +565,7 @@ CAT 3ba9e16dca39f3fb...: -Wallet ID: 5 ``` -From the CLI, run a standard `send` command. In this example, we will use the following flags: +From the CLI, run a standard `send` command. In this example, we will use the following flags: In this example, we will use the following flags: - `-i` -- The `Wallet ID` of the CR-CAT - `-a` -- The number of CR-CATs to send @@ -563,11 +580,12 @@ Response: ```bash Submitting transaction... +Submitting transaction... Transaction submitted to nodes: [{'peer_id': 'b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab', 'inclusion_status': 'SUCCESS', 'error_msg': None}] Run 'chia wallet get_transaction -f 3152280463 -tx 0xab577bdce7fdd1be8b4e0634ad69aa5cff66f6d9dc7d26e0119d1a3a740f91e8' to get status ``` -After a few minutes, run the command from the previous command's output to view the transaction. For example: +After a few minutes, run the command from the previous command's output to view the transaction. For example: For example: ```bash chia wallet get_transaction -f 3152280463 -tx 0xab577bdce7fdd1be8b4e0634ad69aa5cff66f6d9dc7d26e0119d1a3a740f91e8 @@ -581,6 +599,8 @@ Status: Confirmed Amount sent: 100 CAT 3ba9e16dca39f3fb... To address: txch1yzjq802ym3lv9aupl6nyvv6s24fdm9wpnte2rvhk04arr3jyt4js2287gz Created at: 2023-09-22 09:21:25 +To address: txch1yzjq802ym3lv9aupl6nyvv6s24fdm9wpnte2rvhk04arr3jyt4js2287gz +Created at: 2023-09-22 09:21:25 ``` **After switching to the VC Holder's wallet**, you should see the CR-CATs that are pending approval (in this case `100.0 (100000 mojo)`): @@ -618,7 +638,7 @@ CAT 3ba9e16dca39f3fb...: -Wallet ID: 3 ``` -The VC Holder still needs to approve the new CR-CATs in order to add them to the wallet balance. This is accomplished with the `approve_r_cats` command. In this example, we will use the following flags: +The VC Holder still needs to approve the new CR-CATs in order to add them to the wallet balance. This is accomplished with the `approve_r_cats` command. In this example, we will use the following flags: This is accomplished with the `approve_r_cats` command. In this example, we will use the following flags: - `-i` -- The `Wallet ID` of the CR-CAT - `-a` -- The amount to approve @@ -680,7 +700,7 @@ In this example, as the **Authorized Provider**, click `CREATE AN OFFER` from th
-Next, fill out the Offer Builder. For this example, we will offer to trade 99 CR-CATs for 0.1 TXCH: +Next, fill out the Offer Builder. Next, fill out the Offer Builder. For this example, we will offer to trade 99 CR-CATs for 0.1 TXCH:
Offer Builder @@ -690,7 +710,7 @@ Next, fill out the Offer Builder. For this example, we will offer to trade 99 CR After creating the Offer, Authorized Provider can save it as a local file or post it to a marketplace. -For this example, we will change to the **VC Holder** wallet and load the Offer file. This wallet contains a VC with the required proof to hold this CR-CAT (`test_proof1`). Enter an optional blockchain fee and click `ACCEPT OFFER`: +For this example, we will change to the **VC Holder** wallet and load the Offer file. This wallet contains a VC with the required proof to hold this CR-CAT (`test_proof1`). Enter an optional blockchain fee and click `ACCEPT OFFER`: In this example, the recipient is the VC Holder's wallet. This wallet holds the credential with the required proof (`test_proof1`) for holding this CR-CAT. Because the proof exists, a green `APPROVE` button will appear. Enter an optional blockchain fee and click `ACCEPT OFFER`:
Accept Offer @@ -698,7 +718,7 @@ For this example, we will change to the **VC Holder** wallet and load the Offer
-While the on-chain transaction to accept the Offer is pending, the 99 CR-CATs will be displayed in the VC Holder's `Pending Balance`. Note that the `Pending Balance for Approval` is `0` in this case: +While the on-chain transaction to accept the Offer is pending, the 99 CR-CATs will be displayed in the VC Holder's `Pending Balance`. Note that the `Pending Balance for Approval` is `0` in this case: Note that the `Pending Balance for Approval` is `0` in this case:
Pending Offer Acceptance @@ -706,7 +726,7 @@ While the on-chain transaction to accept the Offer is pending, the 99 CR-CATs wi
-After the transaction has been confirmed, the balance is updated. When receiving CR-CATs via an Offer, there is no need to perform another transaction to approve of the incoming tokens. This is because the proof requirement is already baked into the Offer file. +After the transaction has been confirmed, the balance is updated. After the transaction has been confirmed, the balance is updated. When receiving CR-CATs via an Offer, there is no need to perform another transaction to approve of the incoming tokens. This is because the proof requirement is already baked into the Offer file. This is because the proof requirement is already baked into the Offer file.
Completed Offer @@ -718,7 +738,7 @@ At this point, the VC Holder wallet has full possession of the CR-CATs. ### CLI Offers -Offers for CR-CATs can also be created and accepted via the CLI. For this example, the **Authorized Provider** will create an Offer using the following flags: +Offers for CR-CATs can also be created and accepted via the CLI. Offers for CR-CATs can also be created and accepted via the CLI. For this example, the **Authorized Provider** will create an Offer using the following flags: - `-o` -- The Offer amount, using the syntax ``:`` - `-r` -- The requested amount, using the syntax ``:` -Even though the recipient is not allowed to hold these CR-CATs, the transaction itself is valid. However, just as in the examples at the beginning of this tutorial, the XCH Wallet will receive the CR-CATs in the `Pending Balance for Approval` section of the GUI. In this case, the required proof (in the red circle below) is not present. +Even though the recipient is not allowed to hold these CR-CATs, the transaction itself is valid. Even though the recipient is not allowed to hold these CR-CATs, the transaction itself is valid. However, just as in the examples at the beginning of this tutorial, the XCH Wallet will receive the CR-CATs in the `Pending Balance for Approval` section of the GUI. In this case, the required proof (in the red circle below) is not present. In this case, the required proof (in the red circle below) is not present. The XCH Wallet can still attempt to approve these CR-CATs: @@ -884,22 +904,22 @@ The status of these CR-CATs is as follows: - The XCH Wallet is not allowed to send them elsewhere - The Authorized Provider's wallet no longer holds them -Note that even though nothing can be done with the funds in this state, they are still not bricked. The XCH Wallet will gain access to the funds if it obtains a VC with the required proof. However, assuming the XCH Wallet was not supposed to hold the correct VC in the first place, the Authorized Provider will presumably be reluctant to issue a VC to this wallet. +Note that even though nothing can be done with the funds in this state, they are still not bricked. The XCH Wallet will gain access to the funds if it obtains a VC with the required proof. Note that even though nothing can be done with the funds in this state, they are still not bricked. The XCH Wallet will gain access to the funds if it obtains a VC with the required proof. However, assuming the XCH Wallet was not supposed to hold the correct VC in the first place, the Authorized Provider will presumably be reluctant to issue a VC to this wallet. :::info -For the reasons discussed above, exercise caution when sending CR-CATs to another wallet. In fact, because of the risk of making the funds difficult (if not impossible) to access, we recommend that you don't send CR-CATs in this way. +For the reasons discussed above, exercise caution when sending CR-CATs to another wallet. For the reasons discussed above, exercise caution when sending CR-CATs to another wallet. In fact, because of the risk of making the funds difficult (if not impossible) to access, we recommend that you don't send CR-CATs in this way. Instead, you should use Offers to distribute CR-CATs, as they provide two important advantages: -- If the recipient is allowed to hold the CR-CATs, they will be able to accept an Offer to receive those CATs. Once the Offer is complete, they will not need to submit an approval transaction. +- If the recipient is allowed to hold the CR-CATs, they will be able to accept an Offer to receive those CATs. Once the Offer is complete, they will not need to submit an approval transaction. Once the Offer is complete, they will not need to submit an approval transaction. - If the recipient is not allowed to hold the CR-CATs, they will not be able to accept an Offer to receive those CATs in the first place. ::: ### Offers for CR-CATs -Let's say the owner of the XCH Wallet locates a CR-CAT Offer. Upon viewing the offer, the wallet's owner will see that the required proof is grayed out, indicating that it is not present: +Let's say the owner of the XCH Wallet locates a CR-CAT Offer. Let's say the owner of the XCH Wallet locates a CR-CAT Offer. Upon viewing the offer, the wallet's owner will see that the required proof is grayed out, indicating that it is not present:
Offer where required providers missing diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-primitive-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-primitive-guide.md index ef9a719981..d17d335e02 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-primitive-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-primitive-guide.md @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'; ## Intro -This document will show you how to use Chia's standalone clawback primitive. 欢迎钱包开发者将其整合到开发的GUI钱包中。 +This document will show you how to use Chia's standalone clawback primitive. 欢迎钱包开发者将其整合到开发的GUI钱包中。 欢迎钱包开发者将其整合到开发的GUI钱包中。 有关其他技术资源,请参阅以下内容: @@ -18,17 +18,17 @@ This document will show you how to use Chia's standalone clawback primitive. 欢 :::warning 一些重要提醒 -- The standalone clawback primitive doesn't implement wallet functionality to handle incoming clawbacks and resync deleted coin stores. Rather, it's for developers to understand the process of how clawbacks work. -- Chia Network, Inc has added a user-friendly implementation of the clawback primitive to version 1.8.2 of the reference wallet. +- The standalone clawback primitive doesn't implement wallet functionality to handle incoming clawbacks and resync deleted coin stores. Rather, it's for developers to understand the process of how clawbacks work. Rather, it's for developers to understand the process of how clawbacks work. +- Chia Network Inc has added a user-friendly implementation of the clawback primitive to version 1.8.2 of the reference wallet. - A **synced full node** AND a synced wallet are required to use the clawback primitive. -- You are recommended to test the clawback primitive on either the testnet or a simulator before moving to mainnet. For your reference, this guide will use testnet10. +- You are recommended to test the clawback primitive on either the testnet or a simulator before moving to mainnet. For your reference, this guide will use a testnet. - The clawback primitive currently only supports XCH/TXCH. It does not support CATs or NFTs. The `-w` flag will be ignored if it points to a non-XCH (or TXCH) wallet. ::: --- -### 关于可撤回交易(clawback) +## 关于可撤回交易(clawback) 可撤回交易原语的目的是防止将Chia资产发送到一个错误的地址。 可撤回交易的原理很简单:它是一种中间硬币,直到时间锁定过期之前,无法发送到目标地址。 与此同时,发送者可以"撤回"该硬币,将其以标准XCH的形式退回到他们的钱包中。 @@ -43,7 +43,7 @@ This document will show you how to use Chia's standalone clawback primitive. 欢 - It contains Alice's address as its clawback destination (Alice -- and no one else -- can modify this later) - It contains Bob's address as its final destination (Bob -- and no one else -- can modify this later) - The clawback coin therefore contains the following logic for how it may be spent: - - Before 1 hour has elapsed since the coin's creation, Alice can use [p2_1_of_n](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/p2_m_of_n_delegate_direct.clvm) to spend the coin using the same public/private key pair that created the coin. When the coin is spent in this way, a new coin is created using [p2_puzzle_hash](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/p2_puzzle_hash.clvm). Typically, this coin will be created in Alice's wallet, but it could be created in another wallet instead. The new coin uses the standard Chia puzzle. This is the `clawback` case. + - Before 1 hour has elapsed since the coin's creation, Alice can use [p2_1_of_n](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/p2_m_of_n_delegate_direct.clvm) to spend the coin using the same public/private key pair that created the coin. When the coin is spent in this way, a new coin is created using [p2_puzzle_hash](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/p2_puzzle_hash.clvm). Typically, this coin will be created in Alice's wallet, but it could be created in another wallet instead. The new coin uses the standard Chia puzzle. This is the `clawback` case. When the coin is spent in this way, a new coin is created using [p2_puzzle_hash](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/p2_puzzle_hash.clvm). Typically, this coin will be created in Alice's wallet, but it could be created in another wallet instead. The new coin uses the standard Chia puzzle. This is the `clawback` case. - Before 1 hour has elapsed since the coin's creation, nobody other than Alice may spend it - After 1 hour, the timelock elapses. At this point Bob can spend the clawback coin. When this spend occurs, by default a new standard XCH coin is created in Bob's wallet. Bob can also pass in a different address than the one he originally specified if he so chooses. - Note that the coin's clawback logic is in place for the life of the coin. This means that until the coin is spent, Alice is able to claw it back. This is true regardless of the coin's age. Because of this, after the timelock expires, Bob must spend the clawback coin in order to receive the XCH in his wallet. After this spend has completed, the clawback coin no longer exists, and the spend is final. @@ -66,7 +66,7 @@ The values used in the commands from this guide are just examples. You will need --- -### Install the clawback primitive +## Install the clawback primitive The clawback primitive is included in the `Chia-Network` organization's `chia-clawback-primitive` GitHub repository. @@ -105,6 +105,7 @@ python -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -113,6 +114,7 @@ python3 -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -142,7 +144,7 @@ At this point, you are ready to use the clawback primitive. --- -### Create a clawback coin +## Create a clawback coin For this example, we will use two wallets: a Sender and a Recipient. The Sender has a balance of 10 TXCH and the Recipient has 0 TXCH. @@ -209,7 +211,7 @@ Timelock: 600 seconds Time left: 518 seconds ``` -### Claw back a coin +## Claw back a coin This guide will continue from the previous section, where we created a new clawback coin, which has not yet been spent. As a reminder, these are the clawback coin's details: @@ -280,7 +282,7 @@ Chia Wallet: At this point, the clawback coin no longer exists. The Sender is of course free to create new clawback coins as they see fit. -### Claim a clawback coin +## Claim a clawback coin In this section, we'll show how to claim a clawback coin. First, the Sender creates a new clawback coin with a 60-second timelock: @@ -392,7 +394,7 @@ However, there is a small window of time where the timer has expired, but a bloc You are trying to claim the coin too early ``` -In this case, the Recipient needs to wait for one more transaction block to be farmed before proceeding with the `claim` call. As a reminder, a new transaction block is farmed every 52 seconds, on average. +In this case, the Recipient needs to wait for one more transaction block to be farmed before proceeding with the `claim` call. As a reminder, a new transaction block is farmed every 52 seconds, on average. As a reminder, a new transaction block is farmed every 52 seconds, on average. ::: @@ -442,11 +444,11 @@ The spend is now complete and can no longer be clawed back. The funds are stored --- -### Other cases +## Other cases So far, we have shown the standard clawback and completion spends. There are also a few edge cases and errors worth discussing. -#### Sender performs a clawback after the timelock +### Sender performs a clawback after the timelock After the timelock expires, the Recipient may claim the clawback coin. Until this is done, the Sender can still claw back the coin. @@ -532,7 +534,7 @@ Chia Wallet: Because the Sender can always claw back a clawback coin while it exists, the Recipient cannot assume that they will receive the clawback coin, even after the timelock has expired. However, after the Recipient has claimed the clawback coin and it has appeared in the Recipient's wallet as regular XCH/TXCH, the coin can no longer be clawed back. -#### Recipient attempts to claim clawback coin before timelock has expired +### Recipient attempts to claim clawback coin before timelock has expired Before the timelock expires, a clawback coin may not be spent to its Recipient's address. For example, let's say the following clawback coin exists. Note that its `Time left:` is still greater than 0 seconds: @@ -564,7 +566,7 @@ Result: You are trying to claim the coin too early ``` -#### Someone other than the Sender attempts to claw back a coin +### Someone other than the Sender attempts to claw back a coin For this example, the Sender creates a new clawback coin: @@ -653,7 +655,7 @@ Traceback (most recent call last): ValueError: Couldn't find a matching key for puzzle hash: ee3144040e80747af2f6ec56ed7567d22ca83ea3470e09bb9d95347a80cd2d29. ``` -#### Someone other than the Recipient attempts to claim a clawback spend +### Someone other than the Recipient attempts to claim a clawback spend For this example, someone other than the Recipient is made aware of the Coin ID of a pending clawback coin: @@ -715,7 +717,7 @@ Traceback (most recent call last): ValueError: Couldn't find a matching key for puzzle hash: c08dfae2aab3b3b3cbffdd4c1f1e4bf2df278785e5ca67524d6e518e79f134c3. ``` -#### Sender claws back coin to a new wallet +### Sender claws back coin to a new wallet The Sender has the option of performing a clawback where the coin is sent to any wallet. Let's say the Sender creates a clawback coin: @@ -763,7 +765,7 @@ Chia Wallet: -Wallet ID: 1 ``` -#### Recipient claims a clawback coin in a new wallet address +### Recipient claims a clawback coin in a new wallet address The Recipient also has the option of spending a clawback coin to a new address. @@ -833,7 +835,7 @@ Chia Wallet: -Wallet ID: 1 ``` -#### Sender or Recipient attempts to show a clawback coin before it has been created +### Sender or Recipient attempts to show a clawback coin before it has been created Two important rules to keep in mind: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-user-guide.md index 62fcaa8bfe..cda71653b8 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/clawback/clawback-user-guide.md @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'; ## Intro -This document is a guide for using the clawback functionality introduced in version 1.8.2 of Chia's reference wallet. _Clawback_ is a new feature that offers protection against sending XCH to the wrong address. +This document is a guide for using the clawback functionality introduced in version 1.8.2 of Chia's reference wallet. This document is a guide for using the clawback functionality introduced in version 1.8.2 of Chia's reference wallet. _Clawback_ is a new feature that offers protection against sending XCH to the wrong address. If you are a developer or a CLI user, see the following resources for more info: @@ -18,8 +18,8 @@ If you are a developer or a CLI user, see the following resources for more info: In order to use Chia clawbacks, you must have: -- Version 1.8.2 or later of Chia's reference light wallet or full node. See our [downloads page](https://www.chia.net/downloads/) to obtain a copy. -- A sufficient amount of XCH or TXCH to send a transaction and pay fees. If you do not have a sufficient amount, you can obtain some from our [mainnet](https://faucet.chia.net/) and [testnet](https://testnet10-faucet.chia.net/) faucets. +- Version 1.8.2 or later of Chia's reference light wallet or full node. See our [downloads page](https://www.chia.net/downloads/) to obtain a copy. See our [downloads page](https://www.chia.net/downloads/) to obtain a copy. +- A sufficient amount of XCH or TXCH to send a transaction and pay fees. A sufficient amount of XCH or TXCH to send a transaction and pay fees. If you do not have a sufficient amount, you can obtain some from our [mainnet](https://faucet.chia.net/) and [testnet](https://testnet10-faucet.chia.net/) faucets. --- @@ -35,11 +35,11 @@ The following demonstrates an example workflow of this process: - The sender and receiver both see the pending 1-XCH transaction in their wallets - The sender can choose to return the 1 XCH to his/her wallet (this is a _clawback_) - The receiver cannot yet claim the money - - The sender and receiver could communicate off-chain. For example, the sender could call the receiver and ask if the pending transaction appears in their wallet. + - The sender and receiver could communicate off-chain. The sender and receiver could communicate off-chain. For example, the sender could call the receiver and ask if the pending transaction appears in their wallet. - If yes, then both parties can be confident that the money was sent to the correct address - If no, then the money was sent to an incorrect address, so the sender will claw it back 4. After 10 minutes, if the sender has not clawed the 1 XCH back, the receiver can claim it -5. After the receiver has claimed the money, it appears in both wallets as a normal transaction. At this point, the transaction is complete; clawback is no longer possible +5. After the receiver has claimed the money, it appears in both wallets as a normal transaction. At this point, the transaction is complete; clawback is no longer possible At this point, the transaction is final. It can no longer be clawed back. The "intermediate location" is actually a coin with two rules: @@ -56,7 +56,7 @@ This guide will show you how to perform the above workflow. ### Review Settings -Before initiating a clawback transaction, it's a good idea to review your wallet's settings. Click `Settings` (the gear icon in the lower-left corner of your wallet) and click the `CUSTODY` menu. +Before initiating a clawback transaction, it's a good idea to review your wallet's settings. Click `Settings` (the gear icon in the lower-left corner of your wallet) and click the `CUSTODY` menu. Click `Settings` (the gear icon in the lower-left corner of your wallet) and click the `CUSTODY` menu. From this menu: @@ -82,8 +82,8 @@ From the `SEND` menu as shown below, enter the recipient's address, the amount t :::note -- Prior to initiating the transaction, the sender's wallet from this example contained 5 TXCH. The amount to be sent was 1 TXCH. -- This example was executed on Chia's testnet, which has higher fee requirements than mainnet. For this reason, a large fee of 100 million mojos was added. +- Prior to initiating the transaction, the sender's wallet from this example contained 5 TXCH. The amount to be sent was 1 TXCH. The amount to be sent was 1 TXCH. +- This example was executed on Chia's testnet, which has higher fee requirements than mainnet. For this reason, a large fee of 100 million mojos was added. For this reason, a large fee of 100 million mojos was added. ::: @@ -100,7 +100,7 @@ After you have entered these parameters, click the dropdown for `Add option to c --- -Add the time (days, minutes, hours) during which the transaction will be able to be clawed back. In this case, we'll use 10 minutes. +Add the time (days, minutes, hours) during which the transaction will be able to be clawed back. In this case, we'll use 10 minutes. In this case, we'll use 10 minutes. Optionally add a memo to describe this transaction, and click `SEND`. @@ -115,7 +115,7 @@ Optionally add a memo to describe this transaction, and click `SEND`. --- -The transaction has been added to the mempool. This means that it is still in the `Pending` state for inclusion on the blockchain. At this point, there is no indication in the GUI that this is a clawback transaction. +The transaction has been added to the mempool. This means that it is still in the `Pending` state for inclusion on the blockchain. The transaction has been added to the mempool. This means that it is still in the `Pending` state for inclusion on the blockchain. At this point, there is no indication in the GUI that this is a clawback transaction.
-At this point, the transaction is final. The sender has the same amount of XCH they started with, minus the two transaction fees. Due to the clawback, the original "receiver" did not receive anything. +At this point, the transaction is final. At this point, the transaction is final. The sender has the same amount of XCH they started with, minus the two transaction fees. Due to the clawback, the original "receiver" did not receive anything. Due to the clawback, the original "receiver" did not receive anything. --- @@ -196,7 +196,7 @@ To avoid confusion, the sender's wallet in this example uses a light theme, and ::: -Just like before, start by creating a new transaction and adding a clawback time and an optional memo. We'll use 10 minutes in this example. +Just like before, start by creating a new transaction and adding a clawback time and an optional memo. We'll use 10 minutes in this example. We'll use 10 minutes in this example.
@@ -48,6 +49,9 @@ python3 -m venv venv . ./venv/bin/activate python -m pip install --upgrade pip setuptools wheel pip install . +``` ./venv/bin/activate +python -m pip install --upgrade pip setuptools wheel +pip install . ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp-and-typescript.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp-and-typescript.md index c75e3a121f..a843f9d613 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp-and-typescript.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp-and-typescript.md @@ -19,10 +19,10 @@ You can do RPC calls with pretty much any language, but to create larger applica This guide is meant to be an example that will give you some basic experience. We will be using Node.js with TypeScript to create a signature enforced coin. We'll use multiple TypeScript libraries for this project, which are open source if you want to see the details on how they work. -- [BLS Signatures](https://npmjs.com/package/@rigidity/bls-signatures) -- [CLVM](https://npmjs.com/package/@rigidity/clvm) -- [RPCs](https://npmjs.com/package/@rigidity/chia) -- [Wallet Helper](https://npmjs.com/package/@rigidity/chia-wallet) +- [BLS Signatures](https://npmjs.com/package/chia-bls) +- [CLVM](https://npmjs.com/package/clvm-lib) +- [RPCs](https://npmjs.com/package/chia-rpc) +- [Wallet Helper](https://npmjs.com/package/chia-wallet-lib) - [DotEnv](https://npmjs.com/package/dotenv) - [BIP39](https://npmjs.com/package/bip39) @@ -291,7 +291,7 @@ You can retrieve your network's Genesis challenge in the terminal with: chia show -s ``` -Testnet10 has the genesis `ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2`. You can see this in `~/.chia/mainnet/config/config.yaml` as well with: +Testnet10 has the genesis `ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2`. You can see this in `~/.chia/mainnet/config/config.yaml` as well with: You can see this in `~/.chia/mainnet/config/config.yaml` as well with: ```bash less ~/.chia/mainnet/config/config.yaml @@ -384,7 +384,7 @@ npm run start ## Crafting a Solution -THe solution for this puzzle consists of a list of conditions. To write Chialisp within JavaScript we can use the `Program.fromSource()` method. We will use a `51` (`CREATE_COIN`) condition delivering the value to our wallet puzzle hash. +The solution for this puzzle consists of a list of conditions. To write Chialisp within JavaScript we can use the `Program.fromSource()` method. We will use a `51` (`CREATE_COIN`) condition delivering the value to our wallet puzzle hash. ```typescript // Calculate an unused address we can send the value to. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp.md index 96f1d979d8..8553e7b26e 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/chialisp.md @@ -122,7 +122,7 @@ Which should produce the following output: 42 ``` -So Chialisp can calculate the [meaning of life]()! +So Chialisp can calculate the [meaning of life](https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy)! --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/intro-to-chialisp.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/intro-to-chialisp.md index f3852f4042..c8796dea15 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/intro-to-chialisp.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/intro-to-chialisp.md @@ -132,7 +132,7 @@ Which should produce the following output: 42 ``` -So Chialisp can calculate the [meaning of life]()! +So Chialisp can calculate the [meaning of life](https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy)! --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/introduction.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/introduction.md index 0ed1abf190..9e2f12c48d 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/introduction.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/introduction.md @@ -264,6 +264,24 @@ Genesis Challenge: ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291c Current Blockchain Status: Not Synced. Peak height: 1462514 Time: Wed Aug 31 2022 13:49:51 EDT Height: 1462514 +Estimated network space: 1.181 TiB +Current difficulty: 708 +Current VDF sub_slot_iters: 70778880 +Total iterations since the start of the blockchain: 3364480016373 + + Height: | Hash: + 1462514 | d799fedae1ef226669f61ad843c5ae7947b42e596664f39fd68fcd299e076916 + 1462513 | 0764f546d9186da788485ce69ebe91969e8cf9495722d9567d67e54e3e3e6ed3 + 1462512 | d6132b015365b7609d0b5179b9daf9e4fd2ad7a9040ec1d13e15df65660cf69e + 1462511 | 8ae2273b4a86fd9af85837c538faa75b572014ac281c6c51ad1eb4ce2a7f8072 + 1462510 | fb392a40b7e3bf38c8628311224b5aaa4a32ecdea403c16ae5d3c48d16b57f47 + 1462509 | 012b1f9213bf823e6b73408019f18ff8330e46b911ba78c1d64fd5019d6cc6d9 + 1462508 | e0f66ca2e00566eee9a3ce4028b6aa11771aa42c9bce34f296d89f42d1a909ce + 1462507 | c900e2fb449db0def030a3c0e6a8bff5d23f6470730236120bcac442b2f1ab0f + 1462506 | 39db9fe7658b545dcf45e8e99797c937b7b93a041485ef28bf9cda2b3529ac0a + 1462505 | ca343b0e985fe9dafb7cba7cee0c1515c6bddd732e2542b8fbd49ac8d90c13f3 Peak height: 355514 + Time: Wed Feb 14 2024 13:49:51 EDT Height: 355514 + Estimated network space: 1.181 TiB Current difficulty: 708 Current VDF sub_slot_iters: 70778880 @@ -288,7 +306,7 @@ Ideally, you'll see within this response a value like `Current Blockchain Status
Testnet Database -For many things you will need a synced full node. Fortunately, an official [testnet database](https://downloads.chia.net/testnet10/) download is available, which can be a much faster option than syncing from scratch. +For many things you will need a synced full node. For many things you will need a synced full node. Fortunately, an official [testnet database](https://downloads.chia.net/testnet10/) download is available, which can be a much faster option than syncing from scratch. Once this file is downloaded, stop your node: @@ -314,7 +332,7 @@ chia show --state ## Getting TXCH -For the rest of this workshop you will need some TXCH (Testnet Chia). You can get some for free from the [official Chia faucet](https://testnet10-faucet.chia.net/). +For the rest of this workshop you will need some TXCH (Testnet Chia). You can get some for free from the [official Chia faucet](https://testnet11-faucet.chia.net/). For this you will need a receive address. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/signatures.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/signatures.md index d0ee8890a2..1400aa87a4 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/signatures.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/signatures.md @@ -350,7 +350,7 @@ To sign the message we will actually need the `coin_id` and the genesis challeng less ~/.chia/mainnet/config/config.yaml ``` -and then search for `genesis_challenge`, picking the one for the appropriate network (such as testnet10). The value will be a hex string such as `ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2` (that is the value for testnet10). +and then search for `genesis_challenge`, picking the one for the appropriate network (such as testnet10). The value will be a hex string such as `ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2` (that is the value for testnet10). ::: The value will be a hex string such as `37a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615` (that is the value for testnet11). ::: ## Get Coin Id diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/state.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/state.md index 2418cf041a..ce5e0618f4 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/state.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/crash-course/state.md @@ -280,6 +280,12 @@ cdv clsp build message.clsp ## Initial Setup +Install NPM: + +```bash +pip install npm +``` + Install the needed dependencies: ```bash @@ -404,6 +410,13 @@ GENESIS=d25b25b897564035695996922aa0f9ff9d611bd38cd2ecd0d2383a99a70dfc15 EVE_COIN_ID=5fe284bfa91c32fd274179769f5b808c916e5135e603cb292a90e04e5867bd1a ``` +:::info +The hash used in `GENESIS` can be found in your chia environments config.yaml file. +Mainnet Genesis = `ccd5bb71183532bff220ba46c268991a3ff07eb358e8255a65c30a2dce0e5fbb` +Testnet11 Genesis = `37a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615` +For the simulator and other testnets please refer to the instances config.yaml `$CHIA_ROOT/config/config.yaml`. +::: + Write the following code to sync the state: ```ts title=index.ts diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-description.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-description.md index 7c685e1f43..018c9f50b9 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-description.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-description.md @@ -13,7 +13,7 @@ Other relevant documents: ## Singleton Structure -The prefarm uses a [singleton](https://chialisp.com/singletons 'Description of Chia singletons') with the following features: +The prefarm uses a [singleton](https://chialisp.com/singletons "Description of Chia singletons") with the following features: 1. **Multisig** -- required to perform actions on the singleton, where: @@ -42,7 +42,7 @@ The singleton comes in two layers -- one permanent and one non-permanent. ### Permanent layer | Setting | Prefarm Value | Description | -| :------ | :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:------- |:------------- |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `wt` | 30 days | Withdrawal Timelock -- When attempting to begin a withdrawal, this is the minimum number of seconds that must have elapsed since the last withdrawal, rekey or clawback. | | `pc` | 90 days | Payment Clawback -- The minimum number of seconds that must elapse after initiating a withdrawal before the withdrawal can be completed. Clawbacks are possible during this window. | | `rt` | 15 days | Rekey Timelock -- When attempting to begin a standard rekey, this is the minimum number of seconds that must have elapsed since the last withdrawal, rekey or clawback. For a slow rekey, this amount gets added for each key less than `m` (in addition to the amount of time that would have been required in a standard rekey). | @@ -52,10 +52,10 @@ The singleton comes in two layers -- one permanent and one non-permanent. ### Non-permanent layer | Setting | Initial
Value | Description | -| :------ | :---------------- | :-------------------------------------------------------------------------- | -| `m` | 3 | The initial number of pubkeys required to do a withdrawal or standard rekey | -| `n` | 5 | The maximum number of pubkeys required to do a withdrawal or standard rekey | -| `pks` | | A comma separated list of pubkey files that will control this money | +|:------- |:----------------------- |:--------------------------------------------------------------------------- | +| `m` | 3 | The initial number of pubkeys required to do a withdrawal or standard rekey | +| `n` | 5 | The maximum number of pubkeys required to do a withdrawal or standard rekey | +| `pks` | | A comma separated list of pubkey files that will control this money | ## Allowed Actions @@ -123,10 +123,10 @@ The amount of time before the rekey can begin depends on the number of keys used The following table illustrates a few examples of initiation timelock lengths, for various values of `m` and `k`. For this table, `rt` is set to 15 days and `sp` is set to 45 days (these are both denominated in seconds). The table assumes that `n` (5) and the minimum `k` (1) have not been modified from their default values: | `m` | `k` | Days | Comment | -| :-: | :-: | :--: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|:---:|:---:|:----:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 3 | 3 | 15 | Standard rekey, no penalty | -| 3 | 2 | 75 | Slow rekey, `sp` day penalty + 2 \* standard `rt` days | -| 3 | 1 | 90 | Slow rekey, `sp` day penalty + 3 \* `rt` days | +| 3 | 2 | 75 | Slow rekey, `sp` day penalty + 2 \* standard `rt` days | +| 3 | 1 | 90 | Slow rekey, `sp` day penalty + 3 \* `rt` days | | 1 | 1 | 15 | This is a case where, after a prior rekey, `m` was reduced to 1. There is no penalty, even with a single key | | 5 | 3 | 90 | In this case, a lock level increase has been performed, so 5 of 5 keys are required to avoid a penalty | | 5 | 1 | 120 | This is the longest possible initiation timelock duration when `n` is 5 and the minimum `k` is 1. In this case, `m` has been increased to 5, and 1 key is being used for the rekey | @@ -190,23 +190,23 @@ The following table lists the action/consequence, given the current value of `m`
-| `m` | Keys Sniffed | Keys Stolen | Keys Lost | -| :-- | :------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------- | :------------------------------------------------------- | -| 3 | 0-2: normal rekey
3: lock level increase to 4, normal rekey
4: lock level increase to 5, normal rekey
5: deadlocked | 0-2: normal rekey
3-5: drained | 0-2: normal rekey
3-4: slow rekey
5: bricked | -| 4 | 0-3: normal rekey
4: lock level increase to 5, normal rekey
5: deadlocked | 0-1: normal rekey
2: slow rekey
3-5: drained | 0-1: normal rekey
2-4: slow rekey
5: bricked | -| 5 | 0-4: normal rekey
5: deadlocked | 0: normal rekey
1-2: slow rekey
3-5: drained | 0: normal rekey
1-4: slow rekey
5: bricked | +| `m` | Keys Sniffed | Keys Stolen | Keys Lost | +|:--- |:------------------------------------------------------------------------------------------------------------------------------------------------------- |:-------------------------------------------------------------------- |:-------------------------------------------------------------------- | +| 3 | 0-2: normal rekey
3: lock level increase to 4, normal rekey
4: lock level increase to 5, normal rekey
5: deadlocked | 0-2: normal rekey
3-5: drained | 0-2: normal rekey
3-4: slow rekey
5: bricked | +| 4 | 0-3: normal rekey
4: lock level increase to 5, normal rekey
5: deadlocked | 0-1: normal rekey
2: slow rekey
3-5: drained | 0-1: normal rekey
2-4: slow rekey
5: bricked | +| 5 | 0-4: normal rekey
5: deadlocked | 0: normal rekey
1-2: slow rekey
3-5: drained | 0: normal rekey
1-4: slow rekey
5: bricked | --- ## Source Code -The source code for the custody solution is in the [internal-custody GitHub repository](https://github.com/Chia-Network/internal-custody 'Chia internal custody solution'). +The source code for the custody solution is in the [internal-custody GitHub repository](https://github.com/Chia-Network/internal-custody "Chia internal custody solution"). There are two configuration files, one public (for observers) and one private. ### Public Configuration -An observer can track the prefarm's configuration information from [prefarm_info.py](https://github.com/Chia-Network/internal-custody/blob/main/cic/drivers/prefarm_info.py#L8-L18 'public configuration information'), which contains the following variables: +An observer can track the prefarm's configuration information from [prefarm_info.py](https://github.com/Chia-Network/internal-custody/blob/main/cic/drivers/prefarm_info.py#L8-L18 "public configuration information"), which contains the following variables: - `launcher_id`: `bytes32` -- This is pre-set; the user cannot change it - `puzzle_root`: `bytes32` -- This is pre-set; the user cannot change it @@ -218,7 +218,7 @@ An observer can track the prefarm's configuration information from [prefarm_info ### Private Configuration -The necessary information to spend the prefarm is located in [puzzle_root_construction.py](https://github.com/Chia-Network/internal-custody/blob/main/cic/drivers/puzzle_root_construction.py#L26-L34 'private configuration information'). This information is considered private. However, if an attacker obtained this information, it would still be insufficient to spend the prefarm because valid signatures would be required. However, the Merkle tree would be considered sniffed, so a rekey would be required. +The necessary information to spend the prefarm is located in [puzzle_root_construction.py](https://github.com/Chia-Network/internal-custody/blob/main/cic/drivers/puzzle_root_construction.py#L26-L34 "private configuration information"). This information is considered private. However, if an attacker obtained this information, it would still be insufficient to spend the prefarm because valid signatures would be required. However, the Merkle tree would be considered sniffed, so a rekey would be required. This code contains the following variables: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-user-guide.md index 613ac04cd3..8dfbc98c62 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/custody-tool-user-guide.md @@ -36,11 +36,11 @@ The custody tool uses many parameters, each of which is important. You are highl ### Requirements -- A synced full node (mainnet, testnet, or [simulator](/guides/simulator-user-guide 'Simulator user guide')) -- A synced [Chia wallet](https://docs.chia.net/installation 'Chia installation instructions') -- [Python](https://www.python.org/downloads/ 'Python downloads page') 3.9 or greater **(will not work with 3.8.x)** -- [Git command line tool](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git 'How to install the Git command line tool') -- [Powershell 6](https://www.howtogeek.com/731885/how-to-check-the-powershell-version-in-windows-10/ 'How to check your Powershell version') or greater (Windows only) +- A synced full node (mainnet, testnet, or [simulator](/guides/simulator-user-guide "Simulator user guide")) +- A synced [Chia wallet](https://docs.chia.net/installation "Chia installation instructions") +- [Python](https://www.python.org/downloads/ "Python downloads page") 3.9 or greater **(will not work with 3.8.x)** +- [Git command line tool](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git "How to install the Git command line tool") +- [Powershell 6](https://www.howtogeek.com/731885/how-to-check-the-powershell-version-in-windows-10/ "How to check your Powershell version") or greater (Windows only) - Visual C++ Redistributable (Windows only) ### Steps to install @@ -80,6 +80,7 @@ python -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -88,6 +89,7 @@ python3 -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -226,7 +228,7 @@ If you are generating only one key per computer, you will need to copy the .pk ( ## Initialize the singleton -The custody tool uses the Chialisp [singleton](https://chialisp.com/singletons 'Your guide to Chialisp singletons') primitive. This section will show you how to set up a custody singleton for testing. +The custody tool uses the Chialisp [singleton](https://chialisp.com/singletons "Your guide to Chialisp singletons") primitive. This section will show you how to set up a custody singleton for testing. ### Create the permanent layer @@ -246,13 +248,13 @@ The `cic init` command will initialize the permanent layer of the singleton. **N For this guide, we'll create an example singleton that uses the values listed in the table below. As a reminder, these settings correspond to those used in the [flow chart](https://docs.chia.net/assets/files/chia-custody-tool-5e6e2f18e8f98c0faaf11bdf5fea5971.png). | Flag  | Example
Value | Description | -| :--------- | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-d` | keys_and_sb | The directory where the keys and spend bundles will be stored. | -| `-wt` | 600 seconds | Withdrawal Timelock -- the minimum number of seconds that must have elapsed since the last withdrawal, rekey or clawback before a withdrawal can be initiated. | -| `-pc` | 1200 seconds | Payment Claw back -- the minimum number of seconds that must elapse after initiating a withdrawal before the withdrawal can be completed. Clawbacks are possible during this window. | -| `-rt` | 300 seconds | Rekey Timelock -- when attempting to begin a standard rekey, this is the minimum number of seconds that must have elapsed since the last withdrawal, rekey or claw back. For a slow rekey, this amount gets added for each key less than `m`. | -| `-rc` | 600 seconds | Rekey Claw back -- the minimum number of seconds that must elapse after initiating a rekey before the rekey can be completed. Claw backs are possible during this window. | -| `-sp` | 900 seconds | Slow rekey Penalty -- this amount gets added to the Rekey Timelock when a slow rekey is being performed. | +|:---------- |:----------------------- |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-d` | keys_and_sb | The directory where the keys and spend bundles will be stored. | +| `-wt` | 600 seconds | Withdrawal Timelock -- the minimum number of seconds that must have elapsed since the last withdrawal, rekey or clawback before a withdrawal can be initiated. | +| `-pc` | 1200 seconds | Payment Claw back -- the minimum number of seconds that must elapse after initiating a withdrawal before the withdrawal can be completed. Clawbacks are possible during this window. | +| `-rt` | 300 seconds | Rekey Timelock -- when attempting to begin a standard rekey, this is the minimum number of seconds that must have elapsed since the last withdrawal, rekey or claw back. For a slow rekey, this amount gets added for each key less than `m`. | +| `-rc` | 600 seconds | Rekey Claw back -- the minimum number of seconds that must elapse after initiating a rekey before the rekey can be completed. Claw backs are possible during this window. | +| `-sp` | 900 seconds | Slow rekey Penalty -- this amount gets added to the Rekey Timelock when a slow rekey is being performed. | :::info notes regarding the above table @@ -620,7 +622,7 @@ This test will run through the complete sequence of withdrawing money from the s This command generates an unsigned spend bundle which requires specific keys. Signers can take this spend bundle to an HSM for signing. -To begin the payment process, use the `cic payment` command. For this example, we'll use the following arguments (see the [CLI reference](/custody-tool#payment 'payment command') for all options): +To begin the payment process, use the `cic payment` command. For this example, we'll use the following arguments (see the [CLI reference](/custody-tool#payment "payment command") for all options): - `-f` : The name of the file in which to save the unsigned spend bundle - `-pks`: The public keys that will be used to sign the withdrawal. Exactly `m` keys must be included. The only keys allowed to sign are those that were originally used in the `derive_root` command diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/prefarm-audit.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/prefarm-audit.md index b3373aaad7..cb5d4e9b59 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/prefarm-audit.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/custody/prefarm-audit.md @@ -3,7 +3,7 @@ slug: /custody/prefarm-audit-tutorial title: Prefarm Audit Tutorial --- -Chia Network Inc's prefarm is secured by a complex set of custodial rules. This document describes how to use the custody tool to audit the prefarm configuration. A moderate level of technical proficiency is probably needed to understand the details. For a high-level overview of the prefarm custody wallets, see our [blog post](https://www.chia.net/2022/10/29/a-new-home-for-the-prefarm/). +Chia Network Inc's prefarm is secured by a complex set of custodial rules. This document describes how to use the custody tool to audit the prefarm configuration. A moderate level of technical proficiency is probably needed to understand the details. For a high-level overview of the prefarm custody wallets, see our [blog post](https://www.chia.net/2022/10/29/a-new-home-for-the-prefarm/). This document describes how to use the custody tool to audit the prefarm configuration. A moderate level of technical proficiency is probably needed to understand the details. For a high-level overview of the prefarm custody wallets, see our [blog post](https://www.chia.net/2022/10/29/a-new-home-for-the-prefarm/). Other relevant documents: @@ -76,7 +76,7 @@ xch1jj0gm4ahhlu3ke0r0fx955v8axr6za7rzz6hc0y26lewa7zw6fws5nwvv6 :::info -NOTE: A high level of technical proficiency is needed to understand the details of this manual process for what the cic tool does above. This process is a high-level guide and does not display expected results for each step. The [chia-dev-tools](https://github.com/Chia-Network/chia-dev-tools#install) are needed for this audit. +NOTE: A high level of technical proficiency is needed to understand the details of this manual process for what the cic tool does above. This process is a high-level guide and does not display expected results for each step. NOTE: A high level of technical proficiency is needed to understand the details of this manual process for what the cic tool does above. This process is a high-level guide and does not display expected results for each step. The [chia-dev-tools](https://github.com/Chia-Network/chia-dev-tools#install) are needed for this audit. ::: @@ -91,7 +91,7 @@ NOTE: A high level of technical proficiency is needed to understand the details 4. `BASE_REKEY_TIMELOCK` = integer of the rekey timelock. 5. `SLOW_REKEY_PENALTY` = integer of the slow rekey penalty. 3. Curry the necessary parameters into singleton_top_layer_v1_1.clsp `(SINGLETON_STRUCT INNER_PUZZLE)`: - 1. `SINGLETON_STRUCT` = a tree with the following elements in order `(MOD_HASH . (LAUNCHER_ID . LAUNCHER_PUZZLE_HASH))`: + 1. `SINGLETON_STRUCT` = a tree with the following elements in order `(MOD_HASH . (LAUNCHER_ID . LAUNCHER_PUZZLE_HASH))`: (LAUNCHER_ID . LAUNCHER_PUZZLE_HASH)): 1. `MOD_HASH` = singleton_top_layer puzzle sha256 tree hash without its curried arguments. 2. `LAUNCHER_ID` = the ID of the singleton we are committed to paying. 3. `LAUNCHER_PUZZLE_HASH` = the puzzle hash of the launcher. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-cli-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-cli-guide.md index 4db1e71076..a3a06ee3c0 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-cli-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-cli-guide.md @@ -94,6 +94,12 @@ Coin ID: 0xde53700207e23c74088bd6feaadf39f36248729880ffe112b9420fa27c861d5c ::: +:::note + +This guide will use a CLI command to create a DAO. If preferred, you can also create a DAO with the [create_new_wallet](/wallet-rpc/#create_new_wallet) wallet RPC (see Example 4). + +::: + The command to create a DAO is `chia dao create`. This command contains many options -- see [the documentation](/dao-cli#create) for a complete list. Most of the options are not required. However, we will change several of them because their default values are more appropriate for real-world DAOs. For this example, we will specify the following values: @@ -274,6 +280,12 @@ The DAO now has 5 TXCH in its treasury. But there isn't much point in creating a ### Join a DAO +:::note + +This guide will use a CLI command to join an existing DAO. If preferred, you can also join a DAO with the [create_new_wallet](/wallet-rpc/#create_new_wallet) wallet RPC (see Example 5). + +::: + For this example, we will begin with a wallet that contains 3 TXCH. This will become the wallet for **DAO participant 1**: ```bash diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-known-issues.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-known-issues.md index e79d65ea9c..b8128c96f6 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-known-issues.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dao/dao-known-issues.md @@ -6,7 +6,9 @@ title: DAO Known Issues import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -This page contains a comprehensive list of known DAO issues. Be sure to read this list carefully before using the DAO primitive. +DAOs are currently under development. Be sure to read this list carefully before using the DAO primitive. + +As of Chia version 2.1.4, the following DAO issues are known to exist: ## Proposal Spam @@ -14,7 +16,10 @@ Under normal circumstances, an attacker can create a malicious proposal to drain However, prior to creating this proposal, the attacker can use proposal spam to improve the chances of the attack's success. -The DAO wallet subscribes to `PROPOSAL` coins by hinting the `TREASURY_ID` in the `memos` field upon the coin's creation. There is a limit on the number of items a `full_node` will return to a wallet based on a subscribed puzzle_hash (including hinted coins): \* `trusted_max_subscribe_response_items`: 500000 \* `max_subscribe_response_items`: 100000 +The DAO wallet subscribes to `PROPOSAL` coins by hinting the `TREASURY_ID` in the `memos` field upon the coin's creation. To release the coins, launch the wallet from `main`, and then run the [release_coins](/dao-cli#release_coins) command. + +- There is a limit on the number of items a `full_node` will return to a wallet based on a subscribed puzzle_hash (including hinted coins): \* `trusted_max_subscribe_response_items`: 500000 \* `max_subscribe_response_items`: 100000 +- Mitigation: This issue only exists in the 2.1.2 release. The attacker can take advantage of this limit by creating multiple coins, each of which contains a hint equal to the `TREASURY_ID`. Eventually a wallet will no longer get any additional coin states for newer coins from a `full_node` via the coin state subscription. This is the "proposal spam" part of the attack. @@ -31,8 +36,8 @@ In the event that such proposals are voted on by users, because the proposals ca The current mitigation to this is that the wallet will filter out any proposals which either don't meet the proposal minimum amount or don't have valid timer coins. It is strongly suggested to use the `show_proposal` command with any proposal that you intend to vote on, and check that it is valid. -## Resync with locked DAO CATs +## Changing a DAO's settings -This issue occurs when you have a balance of locked DAO CATs which have voted on one or more open proposals, then you delete and resync the wallet DB. Once the proposals have closed, attempting to unlock the coins from voting mode will fail due to missing lineage proofs for the locked coins. +Because each proposal is voted on and enacted independently, it is possible to have a situation where a proposal to change one or more of the DAO's settings passes while another proposal is active. In this case, the active proposal will take on the _new_ rules imposed by the proposal to change the DAO's settings. This situation could cause the existing proposal to fail, even if it would have passed under the original rules. Other side effects are also possible. -Mitigation: This issue only exists in the 2.1.2 release. It has already been fixed in the `main` branch. To release the coins, launch the wallet from `main`, and then run the [release_coins](/dao-cli#release_coins) command. +Because of this anomaly, a vote for a proposal to change the DAO's settings could affect any of the DAO's other active proposals. Therefore, members are strongly encouraged to examine all open proposals when deciding whether to vote for a proposal to change the DAO's settings. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-permissions.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-permissions.md index 97b4722a9a..dee976c9f3 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-permissions.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-permissions.md @@ -86,7 +86,7 @@ Functionality: Configure a store for uploading Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :-------------------------- | +|:--------- |:------ |:-------- |:--------------------------- | | store_id | STRING | True | The store ID, in hex format | Response: `{"handle_upload": [true|false]}` @@ -100,7 +100,7 @@ Functionality: Configure a store for downloading from a mirror Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :------------------------------------- | +|:--------- |:------ |:-------- |:-------------------------------------- | | store_id | STRING | True | The store ID, in hex format | | url | STRING | True | The URL of the mirror to download from | @@ -118,11 +118,11 @@ Functionality: Upload data to a store Request Parameters: -| Parameter | Type | Required | Description | -| :----------------- | :----- | :------- | :-------------------------- | -| store_id | STRING | True | The store ID, in hex format | +| Parameter | Type | Required | Description | +|:-------------------- |:------ |:-------- |:--------------------------- | +| store_id | STRING | True | The store ID, in hex format | | full_tree_filename | STRING | True | Name of full tree dat file | -| diff_filename | STRING | True | Name of delta dat file | +| diff_filename | STRING | True | Name of delta dat file | Response: `{"uploaded": [true|false]}` @@ -139,7 +139,7 @@ Functionality: Download a data file from a URI Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :------------------------------------------------- | +|:--------- |:------ |:-------- |:-------------------------------------------------- | | url | STRING | True | The URI for the download, eg `"server_info.url"` | | filename | STRING | True | The name of the file to download, eg `"file1.dat"` | @@ -158,7 +158,7 @@ Functionality: Add missing files to a store Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :----------------------------------------------------------------------- | +|:--------- |:------ |:-------- |:------------------------------------------------------------------------ | | store_id | STRING | True | The store ID, in hex format | | files | LIST | True | The list of files to be added, for example: `["file1.dat", "file2.dat"]` | @@ -233,10 +233,10 @@ Functionality: Add a new store Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :---------------------------------------------------------------------------------------------------------- | +|:--------- |:------ |:-------- |:----------------------------------------------------------------------------------------------------------- | | store_id | STRING | True | The store ID, in hex format | -| bucket | STRING | True\* | The name of the S3 bucket [* Either `bucket` or `urls` or both is required] | -| urls | LIST | True\* | A list of s3 URLs, for example `["s3://one", "s3://two"]` [* Either `bucket` or `urls` or both is required] | +| bucket | STRING | True\* | The name of the S3 bucket [* Either `bucket` or `urls` or both is required] | +| urls | LIST | True\* | A list of s3 URLs, for example `["s3://one", "s3://two"]` [* Either `bucket` or `urls` or both is required] | Success Response: `{"success": true, "id": store id}` @@ -255,7 +255,7 @@ Functionality: Remove a store Request Parameters: | Parameter | Type | Required | Description | -| :-------- | :----- | :------- | :-------------------------- | +|:--------- |:------ |:-------- |:--------------------------- | | store_id | STRING | True | The store ID, in hex format | Response: `{"success": [true|false], "store_id":store id in hex if successful}` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-user-guide.md index e373fabae3..b9e07116b5 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/datalayer/datalayer-user-guide.md @@ -63,8 +63,8 @@ This example would require anyone-can-spend DataLayer proofs of inclusion (these 有关其他技术资源,请参阅以下内容: -- [DataLayer RPC API](/datalayer-rpc/ 'DataLayer RPC API') -- [DataLayer CLI Reference](/datalayer-cli/ 'DataLayer CLI Reference') +- [DataLayer RPC API](/datalayer-rpc/ "DataLayer RPC API") +- [DataLayer CLI Reference](/datalayer-cli/ "DataLayer CLI Reference") - [DataLayer Permission Guide](/guides/datalayer-permissions/) -- a new feature as of Chia 1.8.0 - [DataLayer blog post](https://www.chia.net/2022/09/20/enabling-data-for-web3-announcing-chia-datalayer/) @@ -221,7 +221,7 @@ sudo pfctl -sr | grep 8575 ::: -3. (optional) If you are going to use a DataLayer as a Service (DLaaS) plugin, you can add custom headers to `~/.chia/mainnet/config/config.yaml`. For example, you might update the config as follows: +3. (optional) If you are going to use a DataLayer as a Service (DLaaS) plugin, you can add custom headers to `~/.chia/mainnet/config/config.yaml`. For example, you might update the config as follows: For example, you might update the config as follows: ```yaml data_layer: @@ -278,7 +278,7 @@ Regardless of the status of `FULL NODE`, you may safely proceed with this tutori - Green dot = full node is synced - `FULL NODE` is missing = you are running in `Wallet Mode` -::: +:::
Synced wallet @@ -339,8 +339,8 @@ Keeping all of this in mind, **it is typically safe to insert data sets of up to Chia DataLayer doesn't have a GUI. The commands in this tutorial will use the command line interface (CLI). As a reminder, here is the complete reference for the CLI, as well as all available Remote Procedure Calls (RPCs): -- [DataLayer RPC API](/datalayer-rpc/ 'DataLayer RPC API') -- [DataLayer CLI Reference](/datalayer-cli/ 'DataLayer CLI Reference') +- [DataLayer RPC API](/datalayer-rpc/ "DataLayer RPC API") +- [DataLayer CLI Reference](/datalayer-cli/ "DataLayer CLI Reference") ### Create a data store diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-bulk-mint.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-bulk-mint.md index eb165805fc..1f00e9b0a8 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-bulk-mint.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-bulk-mint.md @@ -23,7 +23,7 @@ The number of NFTs per spend bundle is hard-coded at 25 in this tool. It may be
Note about Python RuntimeError on Windows -If you are running on Windows, you might occasionally see a Python Runtime Error. This is a [known issue in Python](https://github.com/aio-libs/aiohttp/issues/4324 'More info about this issue') and can be safely ignored. For example: +If you are running on Windows, you might occasionally see a Python Runtime Error. This is a [known issue in Python](https://github.com/aio-libs/aiohttp/issues/4324 "More info about this issue") and can be safely ignored. For example: ```bash chia stop -d all @@ -48,7 +48,7 @@ daemon: {'ack': True, 'command': 'exit', 'data': {'success': True}, 'destination We strongly recommend that you test the bulk minting tool either on the testnet or by using the [simulator](/guides/simulator-user-guide) before attempting to use it on mainnet. In addition, you will need to run a fully synced node in order to use this tool (this is true for testnet, mainnet and the simulator). -For this guide, we will use the testnet. If you do not already have a synced testnet node, you can safely [download a copy of the database](https://www.chia.net/downloads/#database-checkpoint). **Do not attempt this on mainnet.** [Click here to begin the download.](https://download.chia.net/testnet10/blockchain_v2_testnet10.sqlite.gz "Chia's testnet10 database download site") Save the file to your Downloads folder. +For this guide, we will use the testnet. If you do not already have a synced testnet node, you can safely [download a copy of the database](https://www.chia.net/downloads/#database-checkpoint). **Do not attempt this on mainnet.** [Click here to begin the download.](https://download.chia.net/testnet11/blockchain_v2_testnet11.sqlite.gz "Chia's testnet11 database download site") Save the file to your Downloads folder. :::note At the time of this writing, the file you will download is around 50 GB, compressed. Uncompressed, it will be around 100 GB. However, this file increases in size every day. You may want to double check that you have plenty of free space before proceeding with the download. @@ -68,7 +68,7 @@ chia stop -d all If you don't already have the `git` CLI tool installed, [follow these instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to install it ::: -1. Clone the [chia-nft-minting-tool](https://github.com/Chia-Network/chia-nft-minting-tool 'chia-nft-minting-tool') GitHub repository, which contains the bulk minting tool. +1. Clone the [chia-nft-minting-tool](https://github.com/Chia-Network/chia-nft-minting-tool "chia-nft-minting-tool") GitHub repository, which contains the bulk minting tool. In order to clone this repository, first open a PowerShell (Windows) or terminal (Linux and MacOS) window. Next, run the `git clone` command: @@ -105,6 +105,7 @@ python -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -113,6 +114,7 @@ python3 -m venv venv ```bash python3 -m venv venv . ./venv/bin/activate +``` ./venv/bin/activate ``` @@ -143,7 +145,7 @@ If you previously had been running Chia on mainnet, then your peers table will b - `~/.chia/mainnet/db/peers.dat` - `~/.chia/mainnet/wallet/db/wallet_peers.dat` - ::: +::: 2. We recommend that you use `INFO` level logging instead of the default `WARNING` level. To do this, run: @@ -196,7 +198,7 @@ If you ever need to display your address, run `chia keys show`. This command wil 6. In order to continue, you will need to have some TXCH in your wallet. If your total balance is 0, you can obtain 1 TXCH from our faucet. Copy the value of "First wallet address:" from the output of the `chia keys show` command. It will be a long string beginning with "txch". -Open our [testnet faucet page](https://testnet10-faucet.chia.net "Chia's testnet10 faucet link"). Paste your address and click "Submit". +Open our [testnet faucet page](https://testnet10-faucet.chia.net "Chia's testnet10 faucet link"). Paste your address and click "Submit". Paste your address and click "Submit". You will receive this message: `Accepted. Your request is in the queue and will be processed in the order it was received.` At some point you will receive 1 TXCH. Depending on how busy the faucet and the testnet are, this could take several minutes. However, you don't need to wait for your coins to arrive before continuing. @@ -206,7 +208,7 @@ You will receive this message: `Accepted. Your request is in the queue and will mkdir ~/.chia/mainnet/db ``` -8. If you downloaded a copy of the testnet database, you will need to wait for the download to complete before continuing. After the download has completed, use an archive manager such as [7-Zip](https://www.7-zip.org/ "7-Zip's website") to extract the file. You should now have a file in your Downloads folder called `blockchain_v2_testnet10.sqlite`. +8. If you downloaded a copy of the testnet database, you will need to wait for the download to complete before continuing. After the download has completed, use an archive manager such as [7-Zip](https://www.7-zip.org/ "7-Zip's website") to extract the file. If you downloaded a copy of the testnet database, you will need to wait for the download to complete before continuing. After the download has completed, use an archive manager such as [7-Zip](https://www.7-zip.org/ "7-Zip's website") to extract the file. You should now have a file in your Downloads folder called `blockchain_v2_testnet10.sqlite`. Move the database to the folder you just created: @@ -597,7 +599,7 @@ This can be safely ignored. 4. Submit the spend bundles created in the output file (output.pkl in this example). This command has two flags: - `-m`: an optional transaction fee, in mojos. This is a fee to be used for inclusion in the blockchain, completely separate from the royalty percentage. This fee will be applied once per spend bundle of 25 NFTs. The bulk mint tool will not verify that you have enough money to cover this fee beforehand - - `-o`: _Not set._ In this example, we don't provide this option as we will be air-dropping them to their targeted address in the `metadata.csv`. We declared these spend bundles to include a targeted address in the previous command. We would not be able to create offers for NFTs where we are offering the NFT if we are not the owner. (The air-drop address is the NFT owner.) + - `-o`: _Not set._ In this example, we don't provide this option as we will be air-dropping them to their targeted address in the `metadata.csv`. We declared these spend bundles to include a targeted address in the previous command. We would not be able to create offers for NFTs where we are offering the NFT if we are not the owner. (The air-drop address is the NFT owner.) We declared these spend bundles to include a targeted address in the previous command. We would not be able to create offers for NFTs where we are offering the NFT if we are not the owner. (The air-drop address is the NFT owner.) ```bash chianft submit-spend-bundles -m 10 output.pkl diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-intro.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-intro.md index 4685df45e6..bfa66bf165 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-intro.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-intro.md @@ -63,7 +63,7 @@ The cost for minting and modifying NFTs is significantly higher. The following c If the mempool is not full, then a 1-mojo fee will be sufficient for any of these spends to be included in the next transaction block. To view the current status of the mempool, see the [Mempool Cost](https://dashboard.chia.net/d/46EAA05E/mempool-transactions-and-fees?orgId=1&viewPanel=40) table on our dashboard site. (If the green line representing the current mempool cost is close to the red line representing the maximum cost, then the mempool is full, and the following table should be used.) | Operation | Cost (approx) | Min fee (mojos) | Cost in USD at $30/XCH | -| :------------------------------ | ------------: | :-------------- | :--------------------- | +|:------------------------------- | -------------:|:--------------- |:---------------------- | | Minting NFT without DID | 53 million | 265 million | $0.00795 | | Minting NFT with DID | 123 million | 615 million | $0.01845 | | Adding a URI to NFT without DID | 41 million | 205 million | $0.00615 | @@ -126,6 +126,8 @@ values={[ Be sure to replace `` and `` with the actual folder names. +` with the actual folder names. + ```bash Set-Alias -Name chia "C:\Users\\AppData\Local\chia-blockchain\app-\resources\app.asar.unpacked\daemon\chia.exe" ``` @@ -148,7 +150,7 @@ To install Chia from source, follow our [installation guide](https://docs.chia.n ### Switching to testnet -By default, Chia will run on mainnet. To switch to the testnet (recommended) for this guide, see [our testnet instructions](https://docs.chia.net/testnets). +By default, Chia will run on mainnet. By default, Chia will run on mainnet. To switch to the testnet (recommended) for this guide, see [our testnet instructions](https://docs.chia.net/testnets). ## Configuration @@ -243,7 +245,7 @@ Chia Wallet: In order to continue, you'll need to have some TXCH in your wallet. If your total balance is 0, you can obtain 1 TXCH from our faucet. Copy the value of "First wallet address:" from the output of the `chia keys show` command. It will be a long string beginning with "txch". -Open our [testnet faucet page](https://testnet10-faucet.chia.net "Chia's testnet10 faucet link"). Paste your address and click "Submit". +Open our [testnet faucet page](https://testnet10-faucet.chia.net "Chia's testnet10 faucet link"). Paste your address and click "Submit". Paste your address and click "Submit". You'll receive this message: `Accepted. Your request is in the queue and will be processed in the order it was received.` At some point you'll receive 1 TXCH. Depending on how busy the faucet and the testnet are, this could take several minutes. However, you don't need to wait for your coins to arrive before continuing. @@ -393,7 +395,7 @@ Chia NFTs use a list to store image URIs, so it is possible to add multiple loca ## NFT Metadata Standards -Since the original release of this guide, a CHia Improvement Proposal ([CHIP](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0001.md#what-is-a-chip 'CHIP explanation')) that standardizes the JSON metadata schema for Chia NFTs has been finalized. +Since the original release of this guide, a CHia Improvement Proposal ([CHIP](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0001.md#what-is-a-chip "CHIP explanation")) that standardizes the JSON metadata schema for Chia NFTs has been finalized. See [CHIP-7](https://github.com/Chia-Network/chips/blob/main/assets/chip-0007/schema.json) for the correct formatting. Usage of this CHIP is recommended in order to give marketplaces the best opportunity to parse your NFTs' metadata properly. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-rpc.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-rpc.md index 623331d5a5..646c91e6ae 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-rpc.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/nft/nft-rpc.md @@ -58,7 +58,7 @@ chia rpc wallet create_new_wallet '{"wallet_type": "nft_wallet"}' ::: :::info -If you already created an NFT wallet using the CLI command from the previous section, you can skip to the next section, [Obtain an image and its hash](#obtain-an-image-and-its-hash 'Obtain an image and its hash'). +If you already created an NFT wallet using the CLI command from the previous section, you can skip to the next section, [Obtain an image and its hash](#obtain-an-image-and-its-hash "Obtain an image and its hash"). ::: In this section, we'll start with a brand new wallet fingerprint. However, you'll still need an existing DID to set up a new DID with this RPC. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/observer-wallet-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/observer-wallet-guide.md new file mode 100644 index 0000000000..8a98cff94c --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/observer-wallet-guide.md @@ -0,0 +1,112 @@ +--- +slug: /guides/observer-wallet-guide +title: Observer Wallet Guide +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Intro + +### About + +An observer wallet is a wallet that cannot be used for sending transactions. In other words, it is a read-only wallet. This is a powerful concept for HODLers and farmers alike. + +:::info + +Currently, you need to understand how to use a command line interface (CLI) in order to set up an observer wallet. Eventually, we will make this setup easier for GUI users. + +::: + +Until the introduction of observer wallets, the Chia reference wallet always stored each public/private key pair locally. It was possible to maintain an offline key, for example in order to receive farmer rewards, but checking the balance required using a blockchain explorer. However, as a privacy feature, Chia wallets generate a new address each time they receive money. A blockchain explorer is therefore not always able to provide an accurate view of a wallet's history. + +With an observer wallet, you can view your wallet's history and balance without the risk of funds being stolen by someone who gains access to your computer. + +### Current Status + +The concept of an observer wallet was first introduced to Chia's reference wallet in version 2.4.0. In this version, it is possible to create an observer wallet from a command line, and use it with the GUI. The user experience will improve as more features get added, but for now the core functionality is in place. + +Eventually, we will add the ability to sign transactions using an external signer. + +## Set up + +This guide assumes you have a wallet set up in non-observer mode, and that you want to set up the same wallet in observer mode on a new computer where Chia is also installed. + +The first step is to obtain the wallet's master public key from the original computer. Open a command prompt or terminal window, and enter the following: + +```bash +chia keys show +``` + +Locate your wallet's fingerprint. You will see something like the following: + +```bash +Showing all public keys derived from your master key: + +Label: Testnet11 Small +Fingerprint: +Master public key (m): +Farmer public key (m/12381/8444/0/0): +Pool public key (m/12381/8444/1/0): +First wallet address:
+``` + +Save a copy of the key shown with `Master public key (m):` in a text file. This file must only contain the public key, and it must be on a single line. Copy this file to the computer on which you want to load the wallet in observer mode. + +From your second computer, run the following command to add your wallet in observer mode: + +```bash +chia keys add -f -l "" +``` + +Be sure to enter the actual file path, as well as whatever name you want to call your observer wallet. The output will look something like the following: + +```bash +Added public key with fingerprint +``` + +You may also see a warning such as the following, which can be safely ignored: + +```bash +WARNING: using a farmer address which we might not have the private keys for. We searched the first 50 addresses. Consider overriding with +WARNING: using a pool address which we might not have the private keys for. We searched the first 50 addresses. Consider overriding with +``` + +Your observer wallet has been added. + +## Usage + +If your observer wallet is not immediately displayed in the GUI, click `View` --> `Reload`, and it should appear: + +

+ observer wallet +

+
+ +Your observer wallet should now be displayed. It might have a different icon than the original wallet. Click this wallet to view it: + +

+ observer wallet +

+
+ +You can now send funds to this wallet, and its balance will be updated, just like a non-observer wallet's balance. You can even redirect your farming rewards to this wallet: + +

+ observer wallet +

+
+ +By definition, observer wallets are read-only. To test this, you can try sending funds to another wallet: + +

+ observer wallet +

+
+ +This should result in an error: + +

+ observer wallet +

+
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/seeder-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/seeder-user-guide.md index 1ed4b401ac..a4c14c8a9b 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/seeder-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/seeder-user-guide.md @@ -5,15 +5,15 @@ slug: /guides/seeder-user-guide # Seeder User Guide -The Chia Seeder & Crawler is a tool to keep track of the most reliable nodes on the Chia network. Each instance of the Chia Seeder maintains its own separate list of IP addresses of these nodes. +The Chia Seeder & Crawler is a tool to keep track of the most reliable nodes on the Chia network. Each instance of the Chia Seeder maintains its own separate list of IP addresses of these nodes. Each instance of the Chia Seeder maintains its own separate list of IP addresses of these nodes. -It does so by crawling through the network, periodically revisiting known nodes from its list. If a node is either no longer available, or has exhibited untoward behavior, the Chia Seeder instance removes that node from its list. +It does so by crawling through the network, periodically revisiting known nodes from its list. It does so by crawling through the network, periodically revisiting known nodes from its list. If a node is either no longer available, or has exhibited untoward behavior, the Chia Seeder instance removes that node from its list. -The Chia Seeder runs a mini-DNS server. Anyone can obtain an entry point into Chia’s decentralized and permissionless network via a simple DNS request for reliable node IPs. +The Chia Seeder runs a mini-DNS server. The Chia Seeder runs a mini-DNS server. Anyone can obtain an entry point into Chia’s decentralized and permissionless network via a simple DNS request for reliable node IPs. -The Chia Seeder has very low memory and CPU requirements. +The Chia Seeder has very low memory and CPU requirements. It runs a faux full_node process and does not need its own node. -Chia’s core developers have already been running an instance of the Chia Seeder for some time. You can view the current status of this instance by running: +Chia’s core developers have already been running an instance of the Chia Seeder for some time. You can view the current status of this instance by running: You can view the current status of this instance by running: ```bash # IPv4 @@ -33,7 +33,7 @@ Features: ## Expectations for Chia Seeder operators -The Chia network core developers endeavor to minimize the level of trust in the DNS servers associated with a Chia Seeder. In this regard, it is expected for each Chia Seeder to be run by an individual or organization recognized as well-intentioned within the Chia community. +The Chia network core developers endeavor to minimize the level of trust in the DNS servers associated with a Chia Seeder. In this regard, it is expected for each Chia Seeder to be run by an individual or organization recognized as well-intentioned within the Chia community. In this regard, it is expected for each Chia Seeder to be run by an individual or organization recognized as well-intentioned within the Chia community. This entails following good host security practices, maintaining control of the underlying infrastructure, and not transferring control of the Chia Seeder they operate. @@ -50,6 +50,7 @@ There are additional operation considerations for inclusion in the `initial-conf ```bash $ sh install.sh $ . ./activate +$ chia init ./activate $ chia init ``` @@ -57,11 +58,11 @@ You most certainly will want to specify your own configuration of a domain name ## Special instructions on Ubuntu -On Ubuntu, it is possible that systemd-resolved already binds port 53. The Chia Seeder's built-in DNS server is run on the same port, and systemd-resolved takes precedence by default. +On Ubuntu, it is possible that systemd-resolved already binds port 53. On Ubuntu, it is possible that systemd-resolved already binds port 53. The Chia Seeder's built-in DNS server is run on the same port, and systemd-resolved takes precedence by default. Special instructions to free port 53 are provided here (points #2 and #3): https://github.com/team-exor/generic-seeder#exclamation-special-instructions-for-ubuntu-users-exclamation -This amounts to editing `/etc/systemd/resolved.conf` so as to disable binding of systemd-resolved to port 53 by setting `DNSStubListener=no`, or, alternatively, entirely disabling the systemd-resolved service. Note that you will likely need to add a nameserver in '/etc/resolv.conf'. +This amounts to editing `/etc/systemd/resolved.conf` so as to disable binding of systemd-resolved to port 53 by setting `DNSStubListener=no`, or, alternatively, entirely disabling the systemd-resolved service. Note that you will likely need to add a nameserver in '/etc/resolv.conf'. Note that you will likely need to add a nameserver in '/etc/resolv.conf'. ```bash # Example resolv.conf @@ -88,12 +89,14 @@ For a local DNS server setup, you will need control of a top-level domain (TLD) :::note Note that while it may be possible to use an existing domain, it is recommended to register a new domain name to specifically run the Chia Seeder address. ::: +::: -Proceed by logging into your domain registrar and navigating to the section pertaining to managing DNS records for your domain. Next, click or activate the button or mechanism for creating a new DNS record. Finally, create new type "A" and "AAAA" DNS record(s) for `vps.example.com`, which point at the ipv4 and ipv6 address(s) of the server running the seeder along with another new DNS record of type "NS" at `my-chia-seeder.example.com` with the nameserver set to the servers hostname, `vps.example.com`. +Proceed by logging into your domain registrar and navigating to the section pertaining to managing DNS records for your domain. Next, click or activate the button or mechanism for creating a new DNS record. Proceed by logging into your domain registrar and navigating to the section pertaining to managing DNS records for your domain. Next, click or activate the button or mechanism for creating a new DNS record. Finally, create new type "A" and "AAAA" DNS record(s) for `vps.example.com`, which point at the ipv4 and ipv6 address(s) of the server running the seeder along with another new DNS record of type "NS" at `my-chia-seeder.example.com` with the nameserver set to the servers hostname, `vps.example.com`. :::note Note that these names are examples, and as long as the "NS" record points at the hostname of the server, the seeder will work. ::: +::: You can check that this is the case by running the following command (please ensure that you have `dig` on your system by installing the `dnsutils` or `bind9-dnsutils` package; for instance, on Ubuntu, `$ sudo apt install dnsutils` or `$ sudo apt install bind9-dnsutils`): @@ -110,21 +113,21 @@ my-chia-seeder.example.com. 86400 IN NS vps.example.com For another example on how to set-up "A" and "NS" records for your domain using DigitalOcean, please refer to the following video, from 9:40 onward: https://www.youtube.com/watch?v=DsaxbwwVEXk&t=580s -For AWS Route 53 - in the hosted zone you want to use e.g. `example.com` add a "NS"/nameserver record with the `Record name` of `my-chia-seeder` and a value of `vps.example.com`. As of January 2023, the Route 53 web user interface requires you first enter text into the `Record name` field as the Record type of MX will otherwise be greyed out in the pulldown. Then you will create both an A and a AAAA record for `vps.example.com` that corresponds to your vps's IP addresses. +For AWS Route 53 - in the hosted zone you want to use e.g. `example.com` add a "NS"/nameserver record with the `Record name` of `my-chia-seeder` and a value of `vps.example.com`. As of January 2023, the Route 53 web user interface requires you first enter text into the `Record name` field as the Record type of MX will otherwise be greyed out in the pulldown. Then you will create both an A and a AAAA record for `vps.example.com` that corresponds to your vps's IP addresses. As of January 2023, the Route 53 web user interface requires you first enter text into the `Record name` field as the Record type of MX will otherwise be greyed out in the pulldown. Then you will create both an A and a AAAA record for `vps.example.com` that corresponds to your vps's IP addresses. -In `config.yaml` the `domain_name` is `my-chia-seeder.example.com.` and the `nameserver` is `vps.example.com.`. Note the trailing periods. The main thing to change in `soa` is adding a correct contact email in `rname` and optionally changing the `serial_number`. +In `config.yaml` the `domain_name` is `my-chia-seeder.example.com.` and the `nameserver` is `vps.example.com.`. Note the trailing periods. The main thing to change in `soa` is adding a correct contact email in `rname` and optionally changing the `serial_number`. Note the trailing periods. The main thing to change in `soa` is adding a correct contact email in `rname` and optionally changing the `serial_number`. ## Running ```bash -$ . ./activate +$ . $ . ./activate $ chia start seeder ``` will run both a crawler and a DNS server. Alternatively, ```bash -$ . ./activate +$ . $ . ./activate $ chia start crawler ``` @@ -145,12 +148,12 @@ If you tail the logs as you start up the node you should see the node connect an 2023-01-14T15:19:31.010 full_node chia.full_node.full_node: INFO Received 32 peers from DNS seeder, using rdtype = AAAA. ``` -Sometimes dns takes a moment so seeing some initial flakiness here is not cause for concern. Just stop again, delete `peers.dat` and try the test again. +Sometimes dns takes a moment so seeing some initial flakiness here is not cause for concern. Sometimes dns takes a moment so seeing some initial flakiness here is not cause for concern. Just stop again, delete `peers.dat` and try the test again. ## Stopping ```bash -$ . ./activate +$ . $ . ./activate $ chia stop -d all ``` @@ -158,12 +161,12 @@ $ chia stop -d all There are a couple of criteria we all look for when adding a seeder to the initial config file. -You must have an ICANN registered domain name. Your seeder host must support IPv6 and IPv4. +You must have an ICANN registered domain name. You must have an ICANN registered domain name. Your seeder host must support IPv6 and IPv4. -We ask that you commit to a monthly uptime of 99.9% which is available enough to be reliable but also leaves flexibility to not need to run a cluster and gives you time for a reboot once in a while to keep up with things like security patches. We will be monitoring all of the seeders listed in the most recent version of `initial-config.yaml`. We highly recommend that you enable monitoring of your seeder as well. We are heavy users of [Uptime Robot](https://uptimerobot.com/) but anything similar will do. +We ask that you commit to a monthly uptime of 99.9% which is available enough to be reliable but also leaves flexibility to not need to run a cluster and gives you time for a reboot once in a while to keep up with things like security patches. We will be monitoring all of the seeders listed in the most recent version of `initial-config.yaml`. We highly recommend that you enable monitoring of your seeder as well. We are heavy users of [Uptime Robot](https://uptimerobot.com/) but anything similar will do. We will be monitoring all of the seeders listed in the most recent version of `initial-config.yaml`. We highly recommend that you enable monitoring of your seeder as well. We are heavy users of [Uptime Robot](https://uptimerobot.com/) but anything similar will do. -Being a known community member - the better you're known (pseudonymously is fine) - the more likely you are to be added. You should have an account on [Keybase](https://keybase.io/) and we will need to know your Keybase handle, as you will be added to a seeder operator's private channel. +Being a known community member - the better you're known (pseudonymously is fine) - the more likely you are to be added. Being a known community member - the better you're known (pseudonymously is fine) - the more likely you are to be added. You should have an account on [Keybase](https://keybase.io/) and we will need to know your Keybase handle, as you will be added to a seeder operator's private channel. -The final criteria is geographical dispersion. If you are hosting in a region where we don't have a seeder, you are more likely to be added. We will want to know what country (and region if it's a large country e.g. North West US) - generally - your seeder will reside in to facilitate this. +The final criteria is geographical dispersion. The final criteria is geographical dispersion. If you are hosting in a region where we don't have a seeder, you are more likely to be added. We will want to know what country (and region if it's a large country e.g. North West US) - generally - your seeder will reside in to facilitate this. We will want to know what country (and region if it's a large country e.g. North West US) - generally - your seeder will reside in to facilitate this. The easiest way to propose being added is to open a pull request for [initial-config.yaml](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/initial-config.yaml) and include the information required from the four points above. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/simulator-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/simulator-user-guide.md index 10f52faeef..db6aa5a210 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/simulator-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/simulator-user-guide.md @@ -12,7 +12,7 @@ This document will guide you through the process of setting up Chia's Simulator. - [Simulator CLI Reference](/simulator-cli) :::note -It is possible to run the simulator and either Chia's testnet or mainnet simultaneously. This is because the simulator will use its own ports and directories. +It is possible to run the simulator and either Chia's testnet or mainnet simultaneously. This is because the simulator will use its own ports and directories. ::: This is because the simulator will use its own ports and directories. ::: --- @@ -24,7 +24,7 @@ The simulator is included in the `chia-blockchain` GitHub repository (the same r After you have installed from source and have activated your virtual environment (you should see `(venv)` on the left side of your command prompt), you are all set to install the simulator. :::warning -If you installed Chia from the binary installation file, you cannot use this installation to run the simulator. Instead, follow the instructions linked above to create a new installation from source, then return to this guide. +If you installed Chia from the binary installation file, you cannot use this installation to run the simulator. Instead, follow the instructions linked above to create a new installation from source, then return to this guide. ::: Instead, follow the instructions linked above to create a new installation from source, then return to this guide. ::: ## Setup instructions @@ -89,7 +89,7 @@ Make sure your CHIA_ROOT Environment Variable is set to: C:\Users\\.chia\s ### Configure the environment -Now that you have created the simulator, you can set the `CHIA_ROOT` environment variable to point to the simulator's installation directory. This will enable you to run the simulator from outside of `chia-blockchain`: +Now that you have created the simulator, you can set the `CHIA_ROOT` environment variable to point to the simulator's installation directory. This will enable you to run the simulator from outside of `chia-blockchain`: This will enable you to run the simulator from outside of `chia-blockchain`: :::note -By setting the `CHIA_ROOT` path to the simulator in the current shell window (rather than globally), this enables you to run the simulator in tandem with a full node running on either the testnet or on mainnet. This is because the simulator uses different ports than a normal full node. +By setting the `CHIA_ROOT` path to the simulator in the current shell window (rather than globally), this enables you to run the simulator in tandem with a full node running on either the testnet or on mainnet. This is because the simulator uses different ports than a normal full node. ::: This is because the simulator uses different ports than a normal full node. ::: ## Usage instructions @@ -137,6 +137,7 @@ This command is the equivalent of `chia start node` on testnet and mainnet. :::note You will need to have your `CHIA_ROOT` set before using this command, otherwise it will try to connect to your mainnet or testnet node. ::: +::: Run the following command to start the wallet: diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/custom-puzzle-lock.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/custom-puzzle-lock.md index 6aea346065..dfcf04b844 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/custom-puzzle-lock.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/custom-puzzle-lock.md @@ -98,7 +98,7 @@ A solution to this puzzle then needs to contain the compiled puzzle we want to h **Example solution for the password-locked coin:** ```chialisp -((a (q 2 (i (= (sha256 5) (q . 0x2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824)) (q 4 (c 2 (c 11 (c 23 ()))) ()) (q 8)) 1) (c (q . 51) 1))) +((a (q 2 (i (= (sha256 5) (q . 0x2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824)) (q 4 (c 2 (c 11 (c 23 ()))) ()) (q 8)) 1) (c (q . 51) 1))) 0x2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824)) (q 4 (c 2 (c 11 (c 23 ()))) ()) (q 8)) 1) (c (q . 51) 1))) ``` The resulting hash for this example puzzle is again `0x4843c869bba5f65aa1e806cd372dae5668ca3b69640d067e86837ca96b324e71`. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-cli.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-cli.md index 90ac9a7c8c..4237631503 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-cli.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-cli.md @@ -381,7 +381,7 @@ Wallet ID 4 type COLOURED_COIN CAT King Cole (Asset ID: 1121996b75cce3c746369ace ## Create an expiring Offer (RPC) -In this example, we will offer 0.1 CATs (`Launcher ID: 91aa...004r`) in exchange for 1 TXCH (`Wallet ID: 1`). In addition, we will add an expiry timestamp so that this Offer will expire on Jan. 1, 2024. This is accomplished with the `max_time` flag: +In this example, we will offer 0.1 CATs (`Launcher ID: 91aa...004r`) in exchange for 1 TXCH (`Wallet ID: 1`). In addition, we will add an expiry timestamp so that this Offer will expire on Jan. 1, 2024: In addition, we will add an expiry timestamp so that this Offer will expire on Jan. 1, 2024. This is accomplished with the `max_time` flag: ```bash chia rpc wallet create_offer_for_ids '{"offer":{"1":1000000000000,"91aa49303fd325cf8029cc0ee5e19ac78ec33d641d63b50d0ba859309a73004d":-100},"fee":10000000,"driver_dict":{},"validate_only":false, "max_time": 1704070800}' diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-gui.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-gui.md index 0b4a7f18b5..ddb08929f7 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-gui.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/offers-gui.md @@ -1,5 +1,5 @@ --- -slug: /guides/offers-gui-tutorial-old +slug: /guides/offers-gui-tutorial title: Offers - GUI --- diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/video-series/multiple-issuance-cat.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/video-series/multiple-issuance-cat.md index 775d2e9dc6..30f9622ced 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/video-series/multiple-issuance-cat.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/tutorials/video-series/multiple-issuance-cat.md @@ -3,7 +3,7 @@ slug: /guides/multiple-issuance-cat-video-series title: Multiple Issuance CAT --- -In this video, Matt Hauff (aka @quexington), walks you through creating a multiple issuance Chia Asset Token (CAT). Watch the [Single Issuance CAT video](https://chialisp.com/docs/tutorials/single_issuance_CAT 'Video tutorial to create a single-issuance CAT') first before watching this one. +In this video, Matt Hauff (aka @quexington), walks you through creating a multiple issuance Chia Asset Token (CAT). Watch the [Single Issuance CAT video](https://chialisp.com/docs/tutorials/single_issuance_CAT "Video tutorial to create a single-issuance CAT") first before watching this one.
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/verifiable-credentials-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/verifiable-credentials-guide.md index a2ba03e5de..1bc89c590a 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/verifiable-credentials-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/verifiable-credentials-guide.md @@ -20,18 +20,18 @@ For additional resources, see the following: :::warning -The commands in this guide are only examples. Be sure to replace the listed values with values from your local system. +The commands in this guide are only examples. The commands in this guide are only examples. Be sure to replace the listed values with values from your local system. -This guide was creating using testnet10. The example commands use a fee of 100 million mojos, which will be rather high for mainnet usage. If running on mainnet, be sure to adjust your fees accordingly. +This guide was creating using testnet11. This guide was creating using testnet10. The example commands use a fee of 100 million mojos, which will be rather high for mainnet usage. If running on mainnet, be sure to adjust your fees accordingly. If running on mainnet, be sure to adjust your fees accordingly. ::: ## Definitions - **Decentralized Identifier (DID)** -- A decentralized way to represent an identity of an organization, a person, or any other entity -- **Verifiable Credential (VC)** -- Allows someone or something to prove that a subject belongs to a certain category or categories, such as being a US citizen. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. +- **Verifiable Credential (VC)** -- Allows someone or something to prove that a subject belongs to a certain category or categories, such as being a US citizen. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. One type of VC is issued by a Know Your Customer (KYC) provider, who must perform this verification. - In Chia terminology, VCs depend on DIDs. In other words, a DID is required in order to mint a VC on Chia's blockchain. + In Chia terminology, VCs depend on DIDs. In Chia terminology, VCs depend on DIDs. In other words, a DID is required in order to mint a VC on Chia's blockchain. - **Proofs** -- Key-value pairs that are attached to a VC @@ -46,11 +46,11 @@ In order to mint a VC, you will need to have: - One mojo to create a VC singleton - Sufficient funds to cover blockchain fees, the amount of which depend on how busy the blockchain is at any moment -You are recommended to test minting VCs on the testnet prior to minting them on mainnet. If you are unsure of how to configure your wallet to use the testnet, see our [guide](https://docs.chia.net/guides/chialisp-testnet-setup). +You are recommended to test minting VCs on the testnet prior to minting them on mainnet. You are recommended to test minting VCs on the testnet prior to minting them on mainnet. If you are unsure of how to configure your wallet to use the testnet, see our [guide](https://docs.chia.net/guides/chialisp-testnet-setup). We also have faucets available if you don't have sufficient funds to get started: -- [testnet](https://testnet10-faucet.chia.net/) +- [testnet](https://testnet11-faucet.chia.net/) - [mainnet](https://faucet.chia.net/) ### Entities Involved @@ -60,7 +60,7 @@ VC issuance and usage involves at least two entities: 1. Credential subject / holder -- the individual or entity who has applied for a VC (aka the _subject_) or currently holds a VC (aka the _holder_) 2. Proof provider / credential issuer -- the entity that creates and signs the VC, thus asserting the claims about the holder's identity, attributes, or qualifications, and provides a proof for those claims in a credential that is issued to the holder -To test issuing, minting, and revoking VCs, you will need to create separate wallets to represent both of these entities. The two wallets can coexist on the same computer. +To test issuing, minting, and revoking VCs, you will need to create separate wallets to represent both of these entities. The two wallets can coexist on the same computer. The two wallets can coexist on the same computer. :::info note @@ -74,20 +74,20 @@ For this guide, the Verifier is the blockchain itself. ### DID Creation -The proof provider **must** have a DID in order to mint a VC. In order to create a DID, run the following command from a terminal window or command prompt: +The proof provider **must** have a DID in order to mint a VC. The proof provider **must** have a DID in order to mint a VC. In order to create a DID, run the following command from a terminal window or command prompt: ```bash chia wallet did create -m 0.0001 ``` -The response will include the ID of the newly created DID (it will begin with `did:chia:`). Save your local DID ID for later (it will be different from the one displayed here): +The response will include the ID of the newly created DID (it will begin with `did:chia:`). Save your local DID ID for later (it will be different from the one displayed here): Save your local DID ID for later (it will be different from the one displayed here): ```bash Successfully created a DID wallet with name None and id 2 on key 1725104286 Successfully created a DID did:chia:1rnvmwp3wmglslk942mwsrmf7dlkluytyna8mgewel44h4ne3nd9slhtddg in the newly created DID wallet ``` -The DID will be created with an on-chain transaction. After this transaction has been confirmed, you can view your DID by running `chia wallet show`: +The DID will be created with an on-chain transaction. The DID will be created with an on-chain transaction. After this transaction has been confirmed, you can view your DID by running `chia wallet show`: ```bash chia wallet show @@ -124,7 +124,7 @@ This section will show you how to mint, transfer, and revoke a VC using Chia's ` ### Create proofs -First, you must add proofs to the local database. To do this, run the [add_proof_reveal](/vc-cli#add_proof_reveal) command. You can add multiple proofs by reusing the `proof` parameter. For example: +First, you must add proofs to the local database. First, you must add proofs to the local database. To do this, run the [add_proof_reveal](/vc-cli#add_proof_reveal) command. You can add multiple proofs by reusing the `proof` parameter. For example: You can add multiple proofs by reusing the `proof` parameter. For example: ```bash chia wallet vcs add_proof_reveal --proof test_proof1 --proof test_proof2 @@ -152,7 +152,7 @@ Be sure to note your own root hash, as you will need it when minting a VC. :::warning important -When using the CLI to add proofs, the value of each proof will be `1`. This is not configurable in the CLI. If you need to use different values, see the [RPC guide](#rpc-guide) instead. +When using the CLI to add proofs, the value of each proof will be `1`. This is not configurable in the CLI. If you need to use different values, see the [RPC guide](#rpc-guide) instead. This is not configurable in the CLI. If you need to use different values, see the [RPC guide](#rpc-guide) instead. ::: @@ -197,9 +197,9 @@ To address: txch1wrr3hew9nr8ukenv3nwq0fg78h4uh5pm9shyqjl4rmfz9nuqcyxqcy8lth Created at: 2023-06-23 12:34:13 ``` -By default, the VC will be minted to the same wallet that runs this command. However, you can also use the `--target-address` parameter to mint the VC to a different address. +By default, the VC will be minted to the same wallet that runs this command. By default, the VC will be minted to the same wallet that runs this command. However, you can also use the `--target-address` parameter to mint the VC to a different address. -When a VC is first minted, it will not contain any proofs. You can verify this by running the `get` command: +When a VC is first minted, it will not contain any proofs. You can verify this by running the `get` command: You can verify this by running the `get` command: ```bash chia wallet vcs get @@ -215,13 +215,13 @@ Coin ID: 8942dc321387287084a92e6451a01505e6771df81daa86937679eb1ef67abb4a Inner Address: txch1wrr3hew9nr8ukenv3nwq0fg78h4uh5pm9shyqjl4rmfz9nuqcyxqcy8lth ``` -This command shows the `Launcher ID` (the VC's ID), which you will need for the next command. In addition, the `Coin ID` will be required in case the proofs need to be revoked later. +This command shows the `Launcher ID` (the VC's ID), which you will need for the next command. In addition, the `Coin ID` will be required in case the proofs need to be revoked later. In addition, the `Coin ID` will be required in case the proofs need to be revoked later. -Previously, you added your desired proofs to the local database and calculated the root hash. The next step is to add this root hash to the VC, and simultaneously send it to the new holder. This is accomplished by spending the VC. +Previously, you added your desired proofs to the local database and calculated the root hash. Previously, you added your desired proofs to the local database and calculated the root hash. The next step is to add this root hash to the VC, and simultaneously send it to the new holder. This is accomplished by spending the VC. This is accomplished by spending the VC. ### Add proofs to a VC -Use the [update_proofs](/vc-cli#update_proofs) command to add proofs to a VC. This command must be run from the proof provider's wallet (the wallet that contains the DID used for minting). +Use the [update_proofs](/vc-cli#update_proofs) command to add proofs to a VC. This command must be run from the proof provider's wallet (the wallet that contains the DID used for minting). This command must be run from the proof provider's wallet (the wallet that contains the DID used for minting). The `--new-proof-hash` parameter is required; this hash was included in the response from running the `add_proof_reveal` command. @@ -258,7 +258,7 @@ To address: txch1ehkl33dypc7mg820c7j94zfg8pz5j5lqtx7253nmxft52ryvzw8stx7czc Created at: 2023-06-23 12:48:15 ``` -After this transaction has been confirmed on the blockchain, the new **credential holder** can confirm that the proofs are included. First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: +After this transaction has been confirmed on the blockchain, the new **credential holder** can confirm that the proofs are included. First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: ```bash chia wallet vcs add_proof_reveal --proof test_proof1 --proof test_proof2 @@ -276,7 +276,7 @@ Next, the credential holder can run the [get](/vc-cli#get) command: chia wallet vcs get ``` -In this case, one VC is shown, along with the proof hash and both proofs. If the proofs were not manually added to the local database, they would not show in this command, and the GUI would show the VC as invalid. +In this case, one VC is shown, along with the proof hash and both proofs. In this case, one VC is shown, along with the proof hash and both proofs. If the proofs were not manually added to the local database, they would not show in this command, and the GUI would show the VC as invalid. ```bash Proofs: @@ -292,13 +292,13 @@ Proof Hash: f063e22557705b14425b8fca60018796b4364eb6354f45d0b99431a71d3043e5 ### Revoke a VC -Typically, the proof provider only needs to mint a VC, add proofs, and transfer the VC to the new holder. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. +Typically, the proof provider only needs to mint a VC, add proofs, and transfer the VC to the new holder. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. -In cases such as this, the proof provider needs to _revoke_ the credentials, ie to remove all proofs from a VC. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. +In cases such as this, the proof provider needs to _revoke_ the credentials, ie to remove all proofs from a VC. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. The only wallet that is allowed to revoke credentials is the proof provider's (the wallet that contains the DID used to mint the VC). -In order to run the [revoke](/vc-cli#revoke) command, the proof provider will need to know the parent coin ID (the `-p` parameter). Because VCs are singletons, their parent coin IDs will change every time the VC is spent (every time a change is made). +In order to run the [revoke](/vc-cli#revoke) command, the proof provider will need to know the parent coin ID (the `-p` parameter). Because VCs are singletons, their parent coin IDs will change every time the VC is spent (every time a change is made). Because VCs are singletons, their parent coin IDs will change every time the VC is spent (every time a change is made). For testing purposes, the **holder's wallet** can obtain the parent coin ID by running the [vc_get](/vc-rpc#vc_get) RPC. The parent coin ID is the value of the `"parent_coin_info"`. In a production environment, the proof provider will track the VC on-chain and obtain this info immediately prior to revoking the VC. @@ -312,22 +312,23 @@ As a result, the VC will be recreated in the same wallet, but without any proofs ```bash VC successfully revoked! +Proofs successfully updated! Relevant TX records: -Transaction 286cc31575aa167c4b34cbc0a768a162caefb6afea77560db0693934ac3fbf1e +Transaction 76f5ea8475d695e798518cd405070dc22542e31fc85220ff7d2ca7b44852a45b Status: Pending -Amount sent: 1E-12 XCH -To address: txch1ehkl33dypc7mg820c7j94zfg8pz5j5lqtx7253nmxft52ryvzw8stx7czc -Created at: 2023-06-23 13:33:50 +Amount sent: 0 XCH +To address: txch10xjm79zct87gc8ux5vzrhnnt03zjn4ntn5y95w37rsfmp4rxjycquqctuc +Created at: 2023-06-15 10:15:27 -Transaction ae6378e84742ab6abb07df666291093938ec9e06ae8e2b4066d7386d94289ba3 +Transaction f9eebb0520d024aaf4ae176d554c0f806b8d724d21d5da03b5f541fafd69c99f Status: Pending -Amount sent: 0 XCH -To address: txch1mahlm65l8q9frcqcfveekx3a29cd74w6gfajqy05ukz2afrzg03syqkz3p -Created at: 2023-06-23 13:33:50 +Amount sent: 1E-12 XCH +To address: txch1dlyh9rwd9y6clt3pjjs3gh25ck9vlfx7qwqvvru27dmhgtn80z9s2rruam +Created at: 2023-06-15 10:15:28 ``` -After these transactions have been confirmed on-chain, the VC no longer contains any proofs. The holder can verify this: +After these transactions have been confirmed on-chain, the VC no longer contains any proofs. The holder can verify this: The holder can verify this: ```bash chia wallet vcs get @@ -343,7 +344,7 @@ Proofs: ## RPC Guide -This section will show you how to mint, transfer, and revoke a VC using Chia's [wallet RPC](/vc-rpc). The RPC commands will generally give more detailed responses than their CLI equivalents, but the functionality will be mostly the same. +This section will show you how to mint, transfer, and revoke a VC using Chia's `wallet` [CLI commands](/vc-cli). A similar walk-through using RPCs will be presented in the [next section](#rpc-guide). This section will show you how to mint, transfer, and revoke a VC using Chia's [wallet RPC](/vc-rpc). The RPC commands will generally give more detailed responses than their CLI equivalents, but the functionality will be mostly the same.
Note about Windows command escaping @@ -366,7 +367,7 @@ chia rpc wallet vc_get '\"vc_id\": \"13ba084e78475327e41c60df5a108965d7a283f065b ### Create proofs -First, you must add proofs to the local database. To do this, run the [vc_add_proofs](/vc-rpc#vc_add_proofs) command. `"proofs"` is a dictionary of key-value pairs. Unlike the equivalent CLI command, this command allows you to use any string value. +First, you must add proofs to the local database. First, you must add proofs to the local database. To do this, run the [vc_add_proofs](/vc-rpc#vc_add_proofs) command. `"proofs"` is a dictionary of key-value pairs. Unlike the equivalent CLI command, this command allows you to use any string value. `"proofs"` is a dictionary of key-value pairs. Unlike the equivalent CLI command, this command allows you to use any string value. ```json chia rpc wallet vc_add_proofs '{"proofs": {"example_proof_1": "example_value_1", "example_proof_2": "example_value_2"}}' @@ -386,7 +387,7 @@ The next step is to calculate the root hash for the proofs you just added. A VC's proofs are presented as a Merkle tree, the root hash of which is stored on-chain. -When looking up proofs, a hash called a _Proof of Inclusion_ is all that is required to be presented. Any third-party observers of the blockchain won't be able to identify who the VC corresponds to, but the KYC Provider will know this information as the issuer of the VC. +When looking up proofs, a hash called a _Proof of Inclusion_ is all that is required to be presented. When looking up proofs, a hash called a _Proof of Inclusion_ is all that is required to be presented. Any third-party observers of the blockchain won't be able to identify who the VC corresponds to, but the KYC Provider will know this information as the issuer of the VC. In order to construct a Merkle tree from a set of proofs: @@ -492,6 +493,42 @@ const calculate_root_hash = (proofs) => { return result; }; +console.log( + calculate_root_hash({ + example_proof_1: 'example_value_1', + example_proof_2: 'example_value_2', + }), +); '01' : '', 'hex'), + ]), + ); + } + + // Only supporting pairs containing string keys and boolean values + throw new Error('Unsupported type passed to hash function'); + } +}; + +// Convert sorted listed to binary tree to be hashed +const list_to_binary_tree = (objects) => { + if (objects.length == 1) { + return objects[0]; + } + + const mid = Math.floor(objects.length / 2); + const first_half = objects.slice(0, mid); + const second_half = objects.slice(mid, objects.length); + + return [list_to_binary_tree(first_half), list_to_binary_tree(second_half)]; +}; + +const calculate_root_hash = (proofs) => { + const kv_pairs = Object.entries(proofs); + const sorted = sort_pairs(kv_pairs); + const binary_tree = list_to_binary_tree(sorted); + const result = tree_hash(binary_tree); + return result; +}; + console.log( calculate_root_hash({ example_proof_1: 'example_value_1', @@ -500,7 +537,7 @@ console.log( ); ``` -The script will output the proof hash for the proofs your entered. In this example, the output is: +The script will output the proof hash for the proofs your entered. In this example, the output is: In this example, the output is: `96c9597578333c840f895f30af6d40b9f6c0d69100db1a13ae2e26e4c94acdd3` @@ -508,7 +545,7 @@ The script will output the proof hash for the proofs your entered. In this examp :::info -If you want to retrieve your original proofs from a proof hash, run the [vc_get_proofs_for_root](/vc-rpc#vc_get_proofs_for_root) command. For example: +If you want to retrieve your original proofs from a proof hash, run the [vc_get_proofs_for_root](/vc-rpc#vc_get_proofs_for_root) command. For example: For example: ```json chia rpc wallet vc_get_proofs_for_root '{"root": "96c9597578333c840f895f30af6d40b9f6c0d69100db1a13ae2e26e4c94acdd3"}' @@ -532,7 +569,7 @@ Note that this command will only succeed if you have already added the correspon ### Mint a VC -To mint a VC, run the [vc_mint](/vc-rpc#vc_mint) command. The `did_id` parameter is required. This is the DID owned by the minting wallet. You may also optionally pass in a `target_address`, where the VC will be delivered. If this parameter is missing, the VC will be sent to the same wallet that owns the DID: +To mint a VC, run the [vc_mint](/vc-rpc#vc_mint) command. The `did_id` parameter is required. This is the DID owned by the minting wallet. You may also optionally pass in a `target_address`, where the VC will be delivered. If this parameter is missing, the VC will be sent to the same wallet that owns the DID: The `did_id` parameter is required. This is the DID owned by the minting wallet. You may also optionally pass in a `target_address`, where the VC will be delivered. If this parameter is missing, the VC will be sent to the same wallet that owns the DID: ```json chia rpc wallet vc_mint '{"did_id": "did:chia:1rnvmwp3wmglslk942mwsrmf7dlkluytyna8mgewel44h4ne3nd9slhtddg", "target_address": "txch1yfcclacd6sch2w9dz394zjuq7pqnmz5g7mrqac0hjhwpzmyahe9sqetxaz", "fee": 100000000}' @@ -662,21 +699,21 @@ As a result, the spend bundle used to mint the VC will be output: } ``` -When a VC is first minted, it will not contain any proofs. +When a VC is first minted, it will not contain any proofs. You can verify this by running the `get` command: Previously, you added your desired proofs to the local database and calculated the root hash. The next step is to add your root hash to the VC. ### Add proofs to a VC -In Chia, a singleton is a primitive standard that allows a coin to be recreated with different properties when it is spent. Chia VCs are singletons; use the [vc_spend](/vc-rpc#vc_spend) command to spend a VC and recreate it with a new set of proofs. +In Chia, a singleton is a primitive standard that allows a coin to be recreated with different properties when it is spent. In Chia, a singleton is a primitive standard that allows a coin to be recreated with different properties when it is spent. Chia VCs are singletons; use the [vc_spend](/vc-rpc#vc_spend) command to spend a VC and recreate it with a new set of proofs. The `new_proof_hash` parameter is required; this is the root hash you previously obtained. -The `new_puzhash` parameter is typically used, but not required. This parameter allows you to recreate the VC singleton in a different wallet (ie to send the VC to the new holder in the same command that is used to add the proof hash). +The `new_puzhash` parameter is typically used, but not required. This parameter allows you to recreate the VC singleton in a different wallet (ie to send the VC to the new holder in the same command that is used to add the proof hash). This parameter allows you to recreate the VC singleton in a different wallet (ie to send the VC to the new holder in the same command that is used to add the proof hash). :::note -`new_puzhash` requires a _puzzle hash_ and not a wallet address. If you are not sure how to convert a wallet address to a puzzle hash, the [Chia.tt explorer](https://chia.tt/convert) includes a handy puzzle hash converter tool. If you prefer to do this conversion programmatically, use the `decode` command from the [chia-dev-tools](https://github.com/Chia-Network/chia-dev-tools) repository. +`new_puzhash` requires a _puzzle hash_ and not a wallet address. If you are not sure how to convert a wallet address to a puzzle hash, the [Chia.tt explorer](https://chia.tt/convert) includes a handy puzzle hash converter tool. If you prefer to do this conversion programmatically, use the `decode` command from the [chia-dev-tools](https://github.com/Chia-Network/chia-dev-tools) repository. If you are not sure how to convert a wallet address to a puzzle hash, the [Chia.tt explorer](https://chia.tt/convert) includes a handy puzzle hash converter tool. If you prefer to do this conversion programmatically, use the `decode` command from the [chia-dev-tools](https://github.com/Chia-Network/chia-dev-tools) repository. ::: @@ -812,7 +849,7 @@ The response includes the spend bundle used to spend the VC: } ``` -After this transaction has been confirmed on the blockchain, the new **credential holder** can confirm that the proofs are included. First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: +After this transaction has been confirmed on the blockchain, the new **credential holder** can confirm that the proofs are included. First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: First, the credential holder needs to run the same command as the proof provider to add the proofs to the local database. For example: ```json chia rpc wallet vc_add_proofs '{"proofs": {"example_proof_1": "example_value_1", "example_proof_2": "example_value_2"}}' @@ -915,9 +952,9 @@ Response: ### Revoke a VC -Typically, the proof provider only needs to mint a VC, add proofs, and transfer the VC to the new holder. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. +Typically, the proof provider only needs to mint a VC, add proofs, and transfer the VC to the new holder. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. However, at some point, a holder's proofs may change. For example, a holder might have originally proven that they were not a US citizen, and then they later became a US citizen. -In cases such as this, the proof provider needs to _revoke_ the credentials, ie to remove all proofs from a VC. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. +In cases such as this, the proof provider needs to _revoke_ the credentials, ie to remove all proofs from a VC. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. (The holder will continue to hold the VC, but it will no longer contain any proofs.) We don't allow the proof provider to take back the VC itself because it is possible for it to custody other assets, though we don't support this yet. The only wallet that is allowed to revoke credentials is the proof provider's (the wallet that contains the DID used to mint the VC). @@ -1083,7 +1120,7 @@ As a result, the VC will be recreated in the same wallet, but without any proofs } ``` -After these transactions have been confirmed on-chain, the VC no longer contains any proofs. The holder can verify this: +After these transactions have been confirmed on-chain, the VC no longer contains any proofs. The holder can verify this: The holder can verify this: ```json chia rpc wallet vc_get_list diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-developer-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-developer-guide.md index 148ae04d85..1449ad791d 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-developer-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-developer-guide.md @@ -10,40 +10,58 @@ import TabItem from '@theme/TabItem'; This guide will help developers to create dApps on Chia's blockchain using [WalletConnect](https://walletconnect.com/). It will be expanded upon as more tools are introduced. +For more info, see our WalletConnect [command documentation](/walletconnect-commands/). + --- ## RPC Calls The following table shows each RPC for Chia WalletConnect dApps, along with a description of what each RPC does, and a link to the equivalent Chia RPC: -| WalletConnect RPC | Chia Wallet RPC | Description | -| :------------------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ | -| addCattoken | [create_new_wallet](/wallet-rpc#create_new_wallet) | Create a new wallet for CATs | -| CancelOffer | [cancel_offer](/wallet-rpc#cancel_offer) | Cancel an offer | -| checkOfferValidity | [check_offer_validity](/wallet-rpc#check_offer_validity) | Check if an offer is valid | -| CreateOfferForIDs | [create_offer_for_ids](/wallet-rpc#create_offer_for_ids) | Create a new offer | -| getAllOffers | [get_all_offers](/wallet-rpc#get_all_offers) | Show the details of all offers for this wallet | -| getCATAssetId | [cat_get_asset_id](/wallet-rpc#cat_get_asset_id) | Retrieve a the asset ID from a CAT wallet | -| getCurrentAddress | [get_next_address](/wallet-rpc#get_next_address)\* | Set `new_address` to `false` to use the current address | -| getNextAddress | [get_next_address](/wallet-rpc#get_next_address)\* | Set `new_address` to `true` to create a new address | -| getNFTCount | [nft_count_nfts](/nft-rpc/#nft_count_nfts) | Count the number of NFTs in a wallet | -| getNFTInfo | [nft_get_info](/nft-rpc/#nft_get_info) | Get info about an NFT | -| getNFTs | [nft_get_nfts](/nft-rpc/#nft_get_nfts) | Show all NFTs in a given wallet | -| getOfferData | [get_offer](/wallet-rpc#get_offer) | Show the details of one offer | -| getOfferRecord | [get_all_offers](/wallet-rpc#get_all_offers) | Show the details of all offers for this wallet | -| getOffersCount | [get_offers_count](/wallet-rpc#get_offers_count) | Obtain the number of offers from the current wallet | -| getOfferSummary | [get_offer_summary](/wallet-rpc#get_offer_summary) | Show a summary of an offer | -| getPublicKey | [get_public_key](/daemon-rpc#get_public_key) | Request the user to provide their master public key | -| getSyncStatus | [get_sync_status](/wallet-rpc#get_sync_status) | Show whether the current wallet is syncing or synced | -| getTransaction | [get_transaction](/wallet-rpc#get_transaction) | Get a transaction's details from its ID | -| getWalletBalance | [get_wallet_balance](/wallet-rpc#get_wallet_balance) | Obtain the balance (and related info) from a wallet | -| getWallets | [get_wallets](/wallet-rpc#get_wallets) | Show all wallets associated with the current fingerprint, including (by default) coin information | -| LogIn | [log_in](/wallet-rpc#log_in) | Log into the wallet with the specified key | -| SendTransaction | [send_transaction](/wallet-rpc#send_transaction) | Send a transaction | -| SignMessageByAddress | [sign_message_by_address](/wallet-rpc#sign_message_by_address) | Sign a message using an XCH address without incurring an on-chain transaction | -| SignMessageById | [sign_message_by_id](/wallet-rpc#sign_message_by_id) | Sign a message using a DID or NFT ID without incurring an on-chain transaction | -| SpendCat | [cat_spend](/wallet-rpc#cat_spend) | Send CAT funds to another wallet | -| takeOffer | [take_offer](/wallet-rpc#take_offer) | Take an offer | -| transferNFT | [nft_transfer_nft](/nft-rpc#nft_transfer_nft) | Transfer an NFT to a new wallet address | -| VerifySignature | [verify_signature](wallet-rpc#verify_signature) | Given a public key, message and signature, verify if it is valid | -| waitForConfirmation | | | +| WalletConnect RPC | Chia Wallet RPC | Description | +|:--------------------- |:-------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------- | +| addCATtoken | [create_new_wallet](/wallet-rpc#create_new_wallet) | Create a new wallet for CATs | +| addVCProofs | [vc_add_proofs](/vc-rpc/#vc_add_proofs) | Add a set of proofs to the DB that can be used when spending a VC | +| cancelOffer | [cancel_offer](/wallet-rpc#cancel_offer) | Cancel an offer | +| checkOfferValidity | [check_offer_validity](/wallet-rpc#check_offer_validity) | Check if an offer is valid | +| createNewDIDWallet | [create_new_wallet](/did-rpc/#create_new_wallet) | Create a new DID wallet | +| createOfferForIDs | [create_offer_for_ids](/wallet-rpc#create_offer_for_ids) | Create a new offer | +| getAllOffers | [get_all_offers](/wallet-rpc#get_all_offers) | Show the details of all offers for this wallet | +| getCATAssetId | [cat_get_asset_id](/wallet-rpc#cat_get_asset_id) | Retrieve a the asset ID from a CAT wallet | +| getCATWalletInfo | [get_wallets](/wallet-rpc/#get_wallets) | Get CAT Wallet Info | +| getCurrentAddress | [get_next_address](/wallet-rpc#get_next_address)\* | Set `new_address` to `false` to use the current address | +| getNextAddress | [get_next_address](/wallet-rpc#get_next_address)\* | Set `new_address` to `true` to create a new address | +| getNFTsCount | [nft_count_nfts](/nft-rpc/#nft_count_nfts) | Count the number of NFTs in a wallet | +| getNFTInfo | [nft_get_info](/nft-rpc/#nft_get_info) | Get info about an NFT | +| getNFTs | [nft_get_nfts](/nft-rpc/#nft_get_nfts) | Show all NFTs in a given wallet | +| getNFTWalletsWithDIDs | [nft_get_wallets_with_dids](/nft-rpc/#nft_get_wallets_with_dids) | Show all NFT wallets that are associated with DIDs | +| getOfferData | [get_offer](/wallet-rpc#get_offer) | Show the details of one offer | +| getOfferRecord | [get_all_offers](/wallet-rpc#get_all_offers) | Show the details of all offers for this wallet | +| getOffersCount | [get_offers_count](/wallet-rpc#get_offers_count) | Obtain the number of offers from the current wallet | +| getOfferSummary | [get_offer_summary](/wallet-rpc#get_offer_summary) | Show a summary of an offer | +| getProofsForRoot | [vc_get_proofs_for_root](/vc-rpc/#vc_get_proofs_for_root) | Given a specified VC root, get any proofs associated with that root | +| getPublicKey | [get_public_key](/daemon-rpc#get_public_key) | Request the user to provide their master public key | +| getSyncStatus | [get_sync_status](/wallet-rpc#get_sync_status) | Show whether the current wallet is syncing or synced | +| getTransaction | [get_transaction](/wallet-rpc#get_transaction) | Get a transaction's details from its ID | +| getVC | [vc_get](/vc-rpc/#vc_get) | Given a launcher ID, get the Verifiable Credential | +| getVCList | [vc_get_list](/vc-rpc/#vc_get_list) | Get a list of Verifiable Credentials | +| getWalletAddresses | [get_wallet_addresses](/daemon-rpc/#get_wallet_addresses) | Get wallet addresses for one or more wallet keys | +| getWalletBalance | [get_wallet_balance](/wallet-rpc#get_wallet_balance) | Obtain the balance (and related info) from a wallet | +| getWalletBalances | [get_wallet_balances](/wallet-rpc/#get_wallet_balances) | Request the asset balances for specific wallets associated with the current wallet key | +| getWallets | [get_wallets](/wallet-rpc#get_wallets) | Show all wallets associated with the current fingerprint, including (by default) coin information | +| logIn | [log_in](/wallet-rpc#log_in) | Log into the wallet with the specified key | +| mintNFT | [nft_mint_nft](/nft-rpc/#nft_mint_nft) | Mint an NFT | +| revokeVC | [vc_revoke](/vc-rpc/#vc_revoke) | Revoke an on chain VC provided the correct DID is available | +| sendTransaction | [send_transaction](/wallet-rpc#send_transaction) | Send a transaction | +| setDIDName | [did_set_wallet_name](/did-rpc/#did_set_wallet_name) | Set the name of a DID wallet | +| setNFTDID | [nft_set_nft_did](/nft-rpc/#nft_set_nft_did) | Set the DID for an NFT | +| showNotification | [get_notifications](/wallet-rpc/#get_notifications) | Show notification with offer or general announcement | +| signMessageByAddress | [sign_message_by_address](/wallet-rpc#sign_message_by_address) | Sign a message using an XCH address without incurring an on-chain transaction | +| signMessageById | [sign_message_by_id](/wallet-rpc#sign_message_by_id) | Sign a message using a DID or NFT ID without incurring an on-chain transaction | +| spendCAT | [cat_spend](/wallet-rpc#cat_spend) | Send CAT funds to another wallet | +| spendClawbackCoins | [spend_clawback_coins](/wallet-rpc/#spend_clawback_coins) | Claw back or claim claw back transaction | +| takeOffer | [take_offer](/wallet-rpc#take_offer) | Take an offer | +| transferNFT | [nft_transfer_nft](/nft-rpc#nft_transfer_nft) | Transfer an NFT to a new wallet address | +| spendVC | [vc_spend](/vc-rpc/#vc_spend) | Add Proofs To Verifiable Credential | +| verifySignature | [verify_signature](wallet-rpc#verify_signature) | Given a public key, message and signature, verify if it is valid | +| waitForConfirmation | | | diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-user-guide.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-user-guide.md index 3d66259e9f..337df5750f 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-user-guide.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/walletconnect/walletconnect-user-guide.md @@ -23,7 +23,7 @@ This guide will show you how to use [WalletConnect](https://walletconnect.com/) ## Install the sample dApp -In order to help you get started with WalletConnect, we have created a sample dApp to run Chia wallet RPCs. In this section, we'll install and run the dApp locally. We'll also obtain a link to connect the dApp to a Chia reference wallet. +In order to help you get started with WalletConnect, we have created a sample dApp to run Chia wallet RPCs. In this section, we'll install and run the dApp locally. We'll also obtain a link to connect the dApp to a Chia reference wallet. In this section, we'll install and run the dApp locally. We'll also obtain a link to connect the dApp to a Chia reference wallet. If you would like to connect your Chia reference wallet to a different dApp, then feel free to skip ahead to the [next section](#configure-walletconnect). @@ -59,7 +59,7 @@ Example result: ➜ press h to show help ``` -In this example, the dApp was started locally on port 5173. This is the default port; your dApp may need to use a different port if 5173 is already being used for something else. +In this example, the dApp was started locally on port 5173. In this example, the dApp was started locally on port 5173. This is the default port; your dApp may need to use a different port if 5173 is already being used for something else. 5. Access the sample dApp: @@ -71,7 +71,7 @@ If you see an error message such as `An error as occurred`, the most likely caus ::: -6. The `WalletConnect Example` screen should be displayed. Click `Link Wallet`: +6. The `WalletConnect Example` screen should be displayed. Click `Link Wallet`: Click `Link Wallet`:
Click Connect @@ -146,7 +146,7 @@ If you used this guide to set up the sample dApp, this was the link you obtained
-7. By default, the wallet that is currently synced will be selected (in the red circle below). Click the `Select Keys` dropdown if you want to connect other wallets, then click `CONTINUE`: +7. By default, the wallet that is currently synced will be selected (in the red circle below). By default, the wallet that is currently synced will be selected (in the red circle below). Click the `Select Keys` dropdown if you want to connect other wallets, then click `CONTINUE`:
Dropdown menu @@ -242,7 +242,7 @@ Returning to the sample dApp, a new dialog with the response will appear. In thi
-You have now installed, configured, and used the sample dApp. Feel free to test the other functions, as well as create your own! + You have now installed, configured, and used the sample dApp. Feel free to test the other functions, as well as create your own! --- @@ -253,7 +253,7 @@ By default, you can only run dApp methods against the wallet key that is current Click the gear icon in the lower left corner of the reference wallet, then click the `INTEGRATION` tab. Two switches will appear at the top of this panel: - `Enable WalletConnect` -- This setting was activated when you enabled WalletConnect earlier in the guide. -- `Key Switching` -- If you activate this setting, your dApp will be able to switch between multiple wallet keys. The selected wallet will need to sync whenever you switch between keys. +- `Key Switching` -- If you activate this setting, your dApp will be able to switch between multiple wallet keys. The selected wallet will need to sync whenever you switch between keys. The selected wallet will need to sync whenever you switch between keys.
Level | Size
(GiB) | Relative
Size | Reward
Increase | Min Spec
Harvester | -| :---------- | :--------------- | :------------------ | :-------------------- | :------------------------ | -| C0 | 101.4 | 100% | 0% | Pi 4 | -| C1 | 87.5 | 86.3% | 15.9% | Pi 4 | -| C2 | 86.0 | 84.8% | 17.9% | Pi 4 | -| C3 | 84.5 | 83.3% | 20.0% | Pi 4 | -| C4 | 82.9 | 81.8% | 22.3% | Desktop CPU | -| C5 | 81.3 | 80.2% | 24.7% | Fast CPU | -| C6 | 79.6 | 78.5% | 27.4% | Fast CPU | -| C7 | 78.0 | 76.9% | 29.8% | GPU | -| C9 | 75.2 | 74.2% | 34.8% | GPU | +|:----------------- |:---------------------- |:------------------------- |:--------------------------- |:------------------------------- | +| C0 | 101.4 | 100% | 0% | Pi 4 | +| C1 | 87.5 | 86.3% | 15.9% | Pi 4 | +| C2 | 86.0 | 84.8% | 17.9% | Pi 4 | +| C3 | 84.5 | 83.3% | 20.0% | Pi 4 | +| C4 | 82.9 | 81.8% | 22.3% | Desktop CPU | +| C5 | 81.3 | 80.2% | 24.7% | Fast CPU | +| C6 | 79.6 | 78.5% | 27.4% | Fast CPU | +| C7 | 78.0 | 76.9% | 29.8% | GPU | +| C9 | 75.2 | 74.2% | 34.8% | GPU | The right column (Min Spec Harvester) shows the minimum type of computer required for harvesting at each compression level, where: - `Pi 4` refers to Chia's minimum spec hardware, the [Raspberry Pi 4](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) with 4 GB of RAM for CLI farming, or 8 GB for GUI farming. - `Desktop CPU` refers to a power-sipping computer such as the [ASUS Chromebox](https://www.androidcentral.com/best-chromebox). - `Fast CPU` refers to a computer with a higher-end CPU such as an Intel Xeon. -- `GPU` refers to a computer with an Nvidia CUDA-class GPU. The minimum amount of DRAM required is around 600-700 MB for C7 harvesting. For example, a GTX 1060 will work. +- `GPU` refers to a computer with an Nvidia CUDA-class GPU. The minimum amount of DRAM required is around 600-700 MB for C7 harvesting. For example, a GTX 1060 will work. The minimum amount of DRAM required is around 600-700 MB for C7 harvesting. For example, a GTX 1060 will work. :::info @@ -53,15 +53,15 @@ A few things to keep in mind regarding these recommendations: ### TCO spreadsheet -In order to calculate your potential profits from farming at various compression levels, you can use [this spreadsheet](https://docs.google.com/spreadsheets/d/1k6c-OBDtggXqnEfOPdMmq3646puzvOD7dWojwCH2v3c). Simply make a copy of it, then fill in the constants according to your farm. As you will see from the spreadsheet, the compression level you will ultimately choose will depend on a number of factors, such as electricity cost and the size of your farm. +In order to calculate your potential profits from farming at various compression levels, you can use [this spreadsheet](https://docs.google.com/spreadsheets/d/1k6c-OBDtggXqnEfOPdMmq3646puzvOD7dWojwCH2v3c). Simply make a copy of it, then fill in the constants according to your farm. As you will see from the spreadsheet, the compression level you will ultimately choose will depend on a number of factors, such as electricity cost and the size of your farm. Simply make a copy of it, then fill in the constants according to your farm. As you will see from the spreadsheet, the compression level you will ultimately choose will depend on a number of factors, such as electricity cost and the size of your farm. ### Max farm size estimator -The third-party website [xch.farm](https://xch.farm/max-farm-size) has tables for estimating your farm's maximum capacity depending on your CPU/GPU setup. Be sure to pay attention to the `June 2024` column when planning your farm. If your harvester is capable of handling your desired number of plots listed in this column, you should be good to go until 2027 or later. +The third-party website [xch.farm](https://xch.farm/max-farm-size) has tables for estimating your farm's maximum capacity depending on your CPU/GPU setup. Be sure to pay attention to the `June 2024` column when planning your farm. If your harvester is capable of handling your desired number of plots listed in this column, you should be good to go until 2027 or later. Be sure to pay attention to the `June 2024` column when planning your farm. If your harvester is capable of handling your desired number of plots listed in this column, you should be good to go until 2027 or later. ### BladeBit Simulate -The [standalone version of BladeBit](/plotting-software#bladebit-standalone) comes with a simulator that will determine the maximum size of your farm. The basic idea is that you pass in a compressed plot (C1-C9) and it will calculate the maximum number of plots/space your current harvester can handle. +The [standalone version of BladeBit](/plotting-software#bladebit-standalone) comes with a simulator that will determine the maximum size of your farm. The basic idea is that you pass in a compressed plot (C1-C9) and it will calculate the maximum number of plots/space your current harvester can handle. The basic idea is that you pass in a compressed plot (C1-C9) and it will calculate the maximum number of plots/space your current harvester can handle. See the [CLI reference](/plotters-cli#simulate) for a list of options using the simulator. @@ -73,7 +73,7 @@ The simulator's default values are typically fine, other than the filter size. F :::note -It is a good idea to create plots of various sizes (for example, one C3, one C7, and one C9) and then run the simulator against each of them. This will help you to plan for how many harvesters to use, the type of hardware to acquire, etc. +It is a good idea to create plots of various sizes (for example, one C3, one C7, and one C9) and then run the simulator against each of them. This will help you to plan for how many harvesters to use, the type of hardware to acquire, etc. This will help you to plan for how many harvesters to use, the type of hardware to acquire, etc. ::: @@ -91,17 +91,17 @@ The simulator will only work with compressed plots. ::: -The simulator can also be configured to run a real-time simulation against a farm of any given size. This will give you a much better idea of how your system will perform on mainnet. To activate this mode, use the following flags: +The simulator can also be configured to run a real-time simulation against a farm of any given size. This will give you a much better idea of how your system will perform on mainnet. To activate this mode, use the following flags: This will give you a much better idea of how your system will perform on mainnet. To activate this mode, use the following flags: - `--power