Skip to content

Commit

Permalink
GITBOOK-14: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
berryjam authored and gitbook-bot committed Mar 9, 2024
1 parent e77101d commit 6c28eda
Show file tree
Hide file tree
Showing 69 changed files with 1,893 additions and 11 deletions.
Binary file added .gitbook/assets/1.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/colophon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
# mastering-bitcoin-3rd
---
cover: .gitbook/assets/colophon.png
coverY: 0
---

[翻译内容](https://berryjam.gitbook.io/mastering-bitcoin-3rd/)
# 关于本学习内容

<figure><img src=".gitbook/assets/colophon.png" alt=""><figcaption><p>精通比特币第三版封面</p></figcaption></figure>

## 译者介绍

区块链领域从业者

个人编写的区块链相关博客:[https://berryjam.github.io/](https://berryjam.github.io/)

个人github:[https://github.com/berryjam](https://github.com/berryjam)

精通比特币第三版于2023年12月发布,距离2017年发布的第二版过去6年。期间比特币又增加了很多新特性,和实现了不少新的改进提案。如2018年提出的升级提案Taproot,用来增强比特币的可扩展性、隐私性和灵活性,并成为构建BTC 2层重要特性。

另外除了翻译之外,本学习内容会加入一些从技术角度理解的注释,如第4章介绍私钥和公钥时,可能看完就会很快忘记其形式是怎么样,两者如何转换而来。私钥k本质上是一个256比特的大数,而公钥K是椭圆曲线的一个点坐标,通过K=k*G转换而来。那么怎么从大数转为二维(x,y)公钥呢?通过k次椭圆曲线的“加法”操作(切线与曲线相交点的x轴对称点),而G是生成点坐标,通过这就实现了转换。这样加上一些备注,会更方便记忆。
另外除了翻译之外,本学习内容会加入一些从技术角度理解的注释,如第4章介绍私钥和公钥时,可能看完就会很快忘记其形式是怎么样,两者如何转换而来。私钥k本质上是一个256比特的大数,而公钥K是椭圆曲线的一个点坐标,通过K=k\*G转换而来。那么怎么从大数转为二维(x,y)公钥呢?通过k次椭圆曲线的“加法”操作(切线与曲线相交点的x轴对称点),而G是生成点坐标,通过这就实现了转换。这样加上一些备注,会更方便记忆。

因此希望本翻译内容能够为大家带来更新的比特币学习内容和一些技术上的思考,闲暇时间翻译,欢迎指正讨论。

第三版包含以下内容:
- 比特币及其基础区块链的广泛介绍——适合非技术用户、投资者和企业高管
- 解释比特币的技术基础和加密货币,面向开发人员、工程师和软件及系统架构师
- 比特币去中心化网络、点对点架构、交易生命周期和安全原则的详细信息
- 新发展,如Schnorr 签名、无脚本式多签名、默克尔抽象语法树(MAST)、支付到合约(P2C)、Taproot 协议、Bech32 和 Bech32m 地址格式、手续费管理、无脚本式门限签名、致密区块过滤器、FIBRE区块转发系统、BIP8 和 speedy trial 激活软分叉的新方法等
- 深入探讨比特币应用,包括如何将该平台提供的构建块组合成强大的新工具
- 用户故事、类比、示例和代码片段,说明关键技术概念

原书购买链接:

* 比特币及其基础区块链的广泛介绍——适合非技术用户、投资者和企业高管。
* 解释比特币的技术基础和加密货币,面向开发人员、工程师和软件及系统架构师
* 比特币去中心化网络、点对点架构、交易生命周期和安全原则的详细信息
* 新发展,如Schnorr 签名、无脚本式多签名、默克尔抽象语法树(MAST)、支付到合约(P2C)、Taproot 协议、Bech32 和 Bech32m 地址格式、手续费管理、无脚本式门限签名、致密区块过滤器、FIBRE区块转发系统、BIP8 和 speedy trial 激活软分叉的新方法等
* 深入探讨比特币应用,包括如何将该平台提供的构建块组合成强大的新工具
* 用户故事、类比、示例和代码片段,说明关键技术概念

## 原书购买链接:

[Amazon](https://www.amazon.com/Mastering-Bitcoin-Programming-Open-Blockchain/dp/1098150090)
125 changes: 125 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Table of contents

* [关于本学习内容](README.md)

## 序言

* [写作比特币书籍](xu-yan/xie-zuo-bi-te-bi-shu-ji.md)
* [目标读者](xu-yan/mu-biao-du-zhe.md)
* [封面为什么有虫子?](xu-yan/feng-mian-wei-shi-mo-you-chong-zi.md)
* [自上一版以来的变化](xu-yan/zi-shang-yi-ban-yi-lai-de-bian-hua.md)

## 第一章. 介绍

* [综合介绍](di-yi-zhang-.-jie-shao/zong-he-jie-shao.md)
* [比特币的历史](di-yi-zhang-.-jie-shao/bi-te-bi-de-li-shi.md)
* [开始使用比特币](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/README.md)
* [选择比特币钱包](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/xuan-ze-bi-te-bi-qian-bao.md)
* [快速开始](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/kuai-su-kai-shi.md)
* [恢复码](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/hui-fu-ma.md)
* [比特币地址](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/bi-te-bi-di-zhi.md)
* [接收比特币](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/jie-shou-bi-te-bi.md)
* [获取你的第一枚比特币](di-yi-zhang-.-jie-shao/kai-shi-shi-yong-bi-te-bi/huo-qu-ni-de-di-yi-mei-bi-te-bi.md)
* [Imagery](di-yi-zhang-.-jie-shao/imagery.md)

## 第二章. 比特币是怎么运作的

* [Icons](di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/icons.md)
* [Buttons](di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/buttons.md)
* [Inputs](di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/inputs.md)

## 第三章. Bitcoin Core:参考实现

* [Icons](di-san-zhang-.-bitcoin-core-can-kao-shi-xian/icons.md)
* [Buttons](di-san-zhang-.-bitcoin-core-can-kao-shi-xian/buttons.md)
* [Inputs](di-san-zhang-.-bitcoin-core-can-kao-shi-xian/inputs.md)

## 第四章. 密钥和地址

* [Icons](di-si-zhang-.-mi-yue-he-di-zhi/icons.md)
* [Buttons](di-si-zhang-.-mi-yue-he-di-zhi/buttons.md)
* [Inputs](di-si-zhang-.-mi-yue-he-di-zhi/inputs.md)

## 第五章. 钱包恢复

* [Icons](di-wu-zhang-.-qian-bao-hui-fu/icons.md)
* [Buttons](di-wu-zhang-.-qian-bao-hui-fu/buttons.md)
* [Inputs](di-wu-zhang-.-qian-bao-hui-fu/inputs.md)

## 第六章. 交易

* [Icons](di-liu-zhang-.-jiao-yi/icons.md)
* [Buttons](di-liu-zhang-.-jiao-yi/buttons.md)
* [Inputs](di-liu-zhang-.-jiao-yi/inputs.md)

## 第七章. 授权与验证

* [Icons](di-qi-zhang-.-shou-quan-yu-yan-zheng/icons.md)
* [Buttons](di-qi-zhang-.-shou-quan-yu-yan-zheng/buttons.md)
* [Inputs](di-qi-zhang-.-shou-quan-yu-yan-zheng/inputs.md)

## 第八章. 数字签名

* [Icons](di-ba-zhang-.-shu-zi-qian-ming/icons.md)
* [Buttons](di-ba-zhang-.-shu-zi-qian-ming/buttons.md)
* [Inputs](di-ba-zhang-.-shu-zi-qian-ming/inputs.md)

## 第九章. 交易手续费

* [Icons](di-jiu-zhang-.-jiao-yi-shou-xu-fei/icons.md)
* [Buttons](di-jiu-zhang-.-jiao-yi-shou-xu-fei/buttons.md)
* [Inputs](di-jiu-zhang-.-jiao-yi-shou-xu-fei/inputs.md)

## 第十章. 比特币网络

* [Icons](di-shi-zhang-.-bi-te-bi-wang-luo/icons.md)
* [Buttons](di-shi-zhang-.-bi-te-bi-wang-luo/buttons.md)
* [Inputs](di-shi-zhang-.-bi-te-bi-wang-luo/inputs.md)

## 第十一章. 区块链

* [Icons](di-shi-yi-zhang-.-qu-kuai-lian/icons.md)
* [Buttons](di-shi-yi-zhang-.-qu-kuai-lian/buttons.md)
* [Inputs](di-shi-yi-zhang-.-qu-kuai-lian/inputs.md)

## 第十二章. 挖矿和共识算法

* [Icons](di-shi-er-zhang-.-wa-kuang-he-gong-shi-suan-fa/icons.md)
* [Buttons](di-shi-er-zhang-.-wa-kuang-he-gong-shi-suan-fa/buttons.md)
* [Inputs](di-shi-er-zhang-.-wa-kuang-he-gong-shi-suan-fa/inputs.md)

## 第十三章. 比特币安全

* [Icons](di-shi-san-zhang-.-bi-te-bi-an-quan/icons.md)
* [Buttons](di-shi-san-zhang-.-bi-te-bi-an-quan/buttons.md)
* [Inputs](di-shi-san-zhang-.-bi-te-bi-an-quan/inputs.md)

## 第十四章. 二层应用

* [Icons](di-shi-si-zhang-.-er-ceng-ying-yong/icons.md)
* [Buttons](di-shi-si-zhang-.-er-ceng-ying-yong/buttons.md)
* [Inputs](di-shi-si-zhang-.-er-ceng-ying-yong/inputs.md)

## 附录A. 比特币白皮书(by中本聪)

* [Icons](fu-lu-a.-bi-te-bi-bai-pi-shu-by-zhong-ben-cong/icons.md)
* [Buttons](fu-lu-a.-bi-te-bi-bai-pi-shu-by-zhong-ben-cong/buttons.md)
* [Inputs](fu-lu-a.-bi-te-bi-bai-pi-shu-by-zhong-ben-cong/inputs.md)

## 附录B. 比特币白皮书勘误表

* [Icons](fu-lu-b.-bi-te-bi-bai-pi-shu-kan-wu-biao/icons.md)
* [Buttons](fu-lu-b.-bi-te-bi-bai-pi-shu-kan-wu-biao/buttons.md)
* [Inputs](fu-lu-b.-bi-te-bi-bai-pi-shu-kan-wu-biao/inputs.md)

## 附录C. 比特币改进建议

* [Icons](fu-lu-c.-bi-te-bi-gai-jin-jian-yi/icons.md)
* [Buttons](fu-lu-c.-bi-te-bi-gai-jin-jian-yi/buttons.md)
* [Inputs](fu-lu-c.-bi-te-bi-gai-jin-jian-yi/inputs.md)

## 索引

* [Icons](suo-yin/icons.md)
* [Buttons](suo-yin/buttons.md)
* [Inputs](suo-yin/inputs.md)
48 changes: 48 additions & 0 deletions di-ba-zhang-.-shu-zi-qian-ming/buttons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Buttons

Buttons are used to perform actions in the product.

## Default

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false&viewMode=story" %}

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

```javascript
<Button
label="Label"
size="medium"
kind="default"
onClick={doTheThing}
/>
```

## Primary

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false;appearance:primary&viewMode=story" %}

```javascript
<Button
label="Label"
size="medium"
kind="primary"
onClick={doTheThing}
/>
```

## Secondary

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false;appearance:secondary&viewMode=story" %}

```javascript
<Button
label="Label"
size="medium"
kind="secondary"
onClick={doTheThing}
/>
```

_These examples are taken from the excellent_ [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/icon--labels)_._
14 changes: 14 additions & 0 deletions di-ba-zhang-.-shu-zi-qian-ming/icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Icons

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

An Icon is a piece of visual element, but we must ensure its accessibility while using it. It can have **2 purposes**:

* _**decorative only**_: for example, it illustrates a label next to it. We must ensure that it is ignored by screen readers, by setting aria-hidden attribute (ex: `<Icon icon="check" aria-hidden />`)
* _**non-decorative**_: it means that it delivers information. For example, an icon as only child in a button. The meaning can be obvious visually, but it must have a proper text alternative via `aria-label` for screen readers. (ex:`<Icon icon="print" aria-label="Print this document" />`)

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=icon--labels&args=&viewMode=story" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/icon--labels).
{% endembed %}
27 changes: 27 additions & 0 deletions di-ba-zhang-.-shu-zi-qian-ming/inputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Inputs

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

## Default

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--template" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=forms-input--template\&args=).
{% endembed %}

```javascript
<Styled(Input)
appearance="pill"
id="Basic"
label="label"
orientation="horizontal"
value="value"
/>
```

## Stacked

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--stacked" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--stacked).
{% endembed %}
48 changes: 48 additions & 0 deletions di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/buttons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Buttons

Buttons are used to perform actions in the product.

## Default

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false&viewMode=story" %}

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

```javascript
<Button
label="Label"
size="medium"
kind="default"
onClick={doTheThing}
/>
```

## Primary

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false;appearance:primary&viewMode=story" %}

```javascript
<Button
label="Label"
size="medium"
kind="primary"
onClick={doTheThing}
/>
```

## Secondary

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=button--basic&args=size:medium;containsIcon:false;appearance:secondary&viewMode=story" %}

```javascript
<Button
label="Label"
size="medium"
kind="secondary"
onClick={doTheThing}
/>
```

_These examples are taken from the excellent_ [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/icon--labels)_._
14 changes: 14 additions & 0 deletions di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Icons

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

An Icon is a piece of visual element, but we must ensure its accessibility while using it. It can have **2 purposes**:

* _**decorative only**_: for example, it illustrates a label next to it. We must ensure that it is ignored by screen readers, by setting aria-hidden attribute (ex: `<Icon icon="check" aria-hidden />`)
* _**non-decorative**_: it means that it delivers information. For example, an icon as only child in a button. The meaning can be obvious visually, but it must have a proper text alternative via `aria-label` for screen readers. (ex:`<Icon icon="print" aria-label="Print this document" />`)

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=icon--labels&args=&viewMode=story" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/icon--labels).
{% endembed %}
27 changes: 27 additions & 0 deletions di-er-zhang-.-bi-te-bi-shi-zen-mo-yun-zuo-de/inputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Inputs

{% hint style="info" %}
**Good to know:** you can embed a Storybook canvas by simple pasting the canvas link and hitting enter.
{% endhint %}

## Default

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--template" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/iframe.html?id=forms-input--template\&args=).
{% endembed %}

```javascript
<Styled(Input)
appearance="pill"
id="Basic"
label="label"
orientation="horizontal"
value="value"
/>
```

## Stacked

{% embed url="https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--stacked" %}
These examples are taken from the excellent [Storybook Example Design System](https://5ccbc373887ca40020446347-geedzbiswp.chromatic.com/?path=/story/forms-input--stacked).
{% endembed %}
Loading

0 comments on commit 6c28eda

Please sign in to comment.