Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ Chia学院的课程页面经过精心设计,以增强学生的学习体验。

所有适用的课程都提供了Chialisp和clvm的可运行插件。 花些时间熟悉这些工具,并学习如何在整个课程中最好地利用它们。 每个插件都有一系列组件:

**语言:** 插件的语言(Chialisp或clvm)位于右上角。
**解决方案(Solution):** 顶部部分是输入或解决方案。
**谜题(Puzzle):** 底部部分是谜题。
**运行:** 每个插件在语言标识符右侧都有一个播放/运行按钮。
**语言:** 插件的语言(Chialisp或clvm)位于右上角。
**解决方案(Solution):** 顶部部分是输入或解决方案。
**谜题(Puzzle):** 底部部分是谜题。
**运行:** 每个插件在语言标识符右侧都有一个播放/运行按钮。
**结果:** 单击运行后,谜题的结果将出现在谜题下方。

:::info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ import Runnable from '@site/src/components/Runnable.tsx';

### 可运行的Chialisp和clvm插件

有关使用这些插件的信息,请参阅[学院概述](/academy-overview#可运行的chialisp和clvm插件)。
有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anchor links point to English slugs on Chinese pages

Medium Severity

The anchor fragment was changed from #可运行的chialisp和clvm插件 to #runnable-chialisp-and-clvm-plugins, but the target heading in the Chinese translation of academy-overview.md is ### 可运行的Chialisp和clvm插件. Docusaurus generates anchor IDs from the translated heading text, so the English-based anchor won't match — these links will fail to scroll to the intended section. The same issue appears across four translation files.

Additional Locations (2)

Fix in Cursor Fix in Web


#### Chialisp 插件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ So let's get started, the first thing you'll want to do is make sure you have th
## 常见问题

- **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)。
- **括号(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 家族的一部分,使用前缀表示法。 这意味着函数或运算符首先出现,其参数紧随其后。

---
Expand Down Expand Up @@ -180,7 +180,7 @@ So let's get started, the first thing you'll want to do is make sure you have th

### 可运行的Chialisp和clvm插件

有关如何使用这些插件的信息,请参阅[学院概述](/academy-overview#可运行的chialisp和clvm插件)
有关如何使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)

#### Chialisp 插件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ import Runnable from '@site/src/components/Runnable.tsx';

### 可运行的Chialisp和clvm插件

有关使用这些插件的信息,请参阅[学院概述](/academy-overview#可运行的chialisp和clvm插件)。
有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。

#### Chialisp 插件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ True

### 可运行的Chialisp和clvm插件

有关使用这些插件的信息,请参阅[学院概述](/academy-overview#可运行的chialisp和clvm插件)。
有关使用这些插件的信息,请参阅[学院概述](/academy-overview#runnable-chialisp-and-clvm-plugins)。

#### Chialisp 插件

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ A typical Chia transaction would look like the following:

Alice wants to send 1 XCH to Bob. Alice has five coins in her wallet: four worth 0.2 XCH apiece, and one worth 0.7 XCH. Her wallet automatically selects two of the coins worth 0.2 XCH and the 0.7 XCH coin to be spent. All three coin spends happen simultaneously, along with two new coin creations: one worth 1 XCH which goes to Bob's wallet, and one worth 0.1 XCH which goes to Alice's wallet as "change." Alice now has two coins worth 0.2 XCH and one worth 0.1 XCH. Bob has one coin worth 1 XCH. The total value owned by Alice and Bob has not changed -- it was 1.5 XCH both before and after the transaction was processed.

| Owner | Before | After |
| ----- | ----------------- | ---------------- |
| Owner | Before | After |
| ----- | ---------------------------------------------------- | --------------------------------------------------- |
| Alice | 1.5 XCH (5 coins) | 0.5 XCH (3 coin) |
| Bob | 0 XCH | 1.0 XCH (1 coin) |
| | | |
| Total | 1.5 XCH | 1.5 XCH |
| Bob | 0 XCH | 1.0 XCH (1 coin) |
| | | |
| Total | 1.5 XCH | 1.5 XCH |

## Advantages of the account model

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ Now that we've established that a Raspberry Pi 4 can, indeed, sync and farm, eve
There are three categories that go into determining a block's maximum cost:

1. Generator program cost, which is split into two parts

- Execution cost
- Signature validation cost

- Execution cost
- Signature validation cost
2. Generator program size (each byte has a cost)
3. Generator program coins (each new coin has a cost)

Expand Down Expand Up @@ -152,24 +150,24 @@ Please note that the costs and fees listed are for vanilla versions of these tra
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) |
| **Send 1 CAT** | 37,000,000 | 555,000,000 mojo (.000555 xch) \* |
| **Offer 1 CAT coin for 1 CAT coin + fee** | 135,000,000 | 675,000,000 mojo (.000675 xch) |
| 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) |
| **Send 1 CAT** | 37,000,000 | 555,000,000 mojo (.000555 xch) \* |
| **Offer 1 CAT coin for 1 CAT coin + fee** | 135,000,000 | 675,000,000 mojo (.000675 xch) |

### Exact spend bundle costs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ 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. |
| 1 | 1 | 1 | 1 | 50.0% | If the attacker has one timelord that's tied with the fastest honest timelord, then the attacker must control more space than the network's honest space. |
| ∞ | 1 | 1.34313 | 0.745 | 42.7% | With infinite timelords tied with the fastest honest timelord on the network, the attacker gains a double-dip advantage. |
| 1 | 2 | 1 | 0.5 | 33.3% | If the attacker has one timelord that's twice as fast as the fastest honest timelord, the attacker must control half as much space as the rest of the network. |
| ∞ | 2 | 1.4678 | 0.341 | 25.4% | With infinite 2x timelords, the attacker gains the maximum double-dip advantage. |
| 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. |
| 1 | 1 | 1 | 1 | 50.0% | If the attacker has one timelord that's tied with the fastest honest timelord, then the attacker must control more space than the network's honest space. |
| ∞ | 1 | 1.34313 | 0.745 | 42.7% | With infinite timelords tied with the fastest honest timelord on the network, the attacker gains a double-dip advantage. |
| 1 | 2 | 1 | 0.5 | 33.3% | If the attacker has one timelord that's twice as fast as the fastest honest timelord, the attacker must control half as much space as the rest of the network. |
| ∞ | 2 | 1.4678 | 0.341 | 25.4% | With infinite 2x timelords, the attacker gains the maximum double-dip advantage. |

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. |
| 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The code for these changes is held in two primary locations:
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.

Expand All @@ -64,11 +65,12 @@ Two important changes went into this update:
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.
- 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.
Loading
Loading