Skip to content

Commit

Permalink
GITBOOK-18: Add Nakamoto diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrogers authored and gitbook-bot committed Feb 14, 2024
1 parent d580178 commit 49bd9bc
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 5 deletions.
Binary file added .gitbook/assets/image (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 modified .gitbook/assets/image (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/image (17).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/image (2) (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 modified .gitbook/assets/image (2).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/image (3) (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 modified .gitbook/assets/image (3).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 modified .gitbook/assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions nakamoto-upgrade/nakamoto-in-10-minutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ This symbiotic relationship between Stackers and miners is what creates the capa

This elegant design creates a cooperative relationship between miners and stackers while achieving the best of both worlds with block production and transaction speed and security.

Here is a diagram outlining miner and signer behavior.

<figure><img src="../.gitbook/assets/image (1).png" alt=""><figcaption></figcaption></figure>

### Bitcoin Finality

Speaking of security, the concept of 100% Bitcoin finality is crucial to the design of Stacks. This is what turns Stacks into a true Bitcoin L2 and allows it to leverage all of the security inherent in Bitcoin.
Expand Down
4 changes: 4 additions & 0 deletions nakamoto-upgrade/nakamoto-in-depth/stackers-and-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ The weighted threshold signature is a Schnorr signature generated through a vari
When a miner produces a block, Stackers execute a distributed signing protocol to collectively generate a single Schnorr signature for the block. Crucially, the signing protocol will succeed only if at least X% of the reward slots are accounted for in the aggregate signature. Nakamoto is currently set to use a 70% signing threshold -- at least 70% of the reward slots (by proxy, 70% of the stacked STX) must sign a block in order to append it to the Stacks blockchain.

Nakamoto uses the [WSTS protocol with the FIRE extension](https://trust-machines.github.io/wsts/wsts.pdf), which admits a distributed key generation and signature generation algorithm pair whose CPU and network bandwidth complexity grows with the number of distinct Stackers. The FIRE extension enables WSTS to tolerate byzantine Stackers.

Here is a diagram outlining the relationship between signing and stacking.

<figure><img src="../../.gitbook/assets/image (17).png" alt=""><figcaption></figcaption></figure>
2 changes: 1 addition & 1 deletion stacks-101/post-conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ When you use a Stacks wallet like the Hiro web wallet and initiate a transaction

Here's what that looks like:

<figure><img src="../.gitbook/assets/image (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (1) (1).png" alt=""><figcaption></figcaption></figure>

In this example, if the smart contract does not transfer one fabulous-frog NFT and and take 50 STX from the user, the transaction will abort.

Expand Down
6 changes: 3 additions & 3 deletions stacks-101/stacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Stacking rewards Stacks (STX) token holders with bitcoin for providing a valuabl

### Stacking vs Staking

It is crucial to note that this has no impact on block production or validation. **Stacks is not a Proof-of-Stake network and **_**stacking**_** is different than **_**staking**_.
It is crucial to note that this has no impact on block production or validation. **Stacks is not a Proof-of-Stake network and \_stacking**_\*\* is different than \*\*_**staking**\_.

There are two primary differences between stacking in Stacks and staking in other PoS networks.

Expand Down Expand Up @@ -38,7 +38,7 @@ It is important to note that this control does not extend to being able to chang

In order to incentivize honest behavior on the part of validators, stake can be slashed as a punishment. Since PoX stackers do not have any say in transaction validity, this punishment mechanism does not exist and is not necessary in PoX.

<figure><img src="../.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (2) (1).png" alt=""><figcaption></figcaption></figure>

Stacking is a built-in action, required by the "proof-of-transfer" (PoX) mechanism. The PoX mechanism is executed by every miner on the Stacks network.

Expand All @@ -50,7 +50,7 @@ Stacking functionality is implemented as a smart contract, using Clarity. Read m

The Stacking mechanism can be presented as a flow of actions:

<figure><img src="../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (3) (1).png" alt=""><figcaption></figcaption></figure>

1. Make API calls to get details about the upcoming reward cycle
2. For a specific Stacks account, confirm eligibility
Expand Down
2 changes: 1 addition & 1 deletion stacks-101/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Transactions are the fundamental unit of execution in the Stacks blockchain. Eac

Transactions go through phases before being finally confirmed, and available for all, on the Stacks 2.0 network.

<figure><img src="../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>

* **Generate**: Transactions are assembled according to the encoding specification.
* **Validate and sign**: Transactions are validated to confirm they are well-formed. Required signatures are filled in.
Expand Down

0 comments on commit 49bd9bc

Please sign in to comment.