diff --git a/src/common/navigation.yaml b/src/common/navigation.yaml index 5091633b..e3042e19 100644 --- a/src/common/navigation.yaml +++ b/src/common/navigation.yaml @@ -45,19 +45,20 @@ sections: - path: /stacks-blockchain pages: - path: /overview - - path: /testnet-node - - path: /best-practices - - path: /wire-format - - path: /atlas - pages: - - path: /overview - - path: /how-atlas-works - - path: /usage sections: - title: Tutorials pages: - path: /managing-accounts - path: /sending-tokens + - path: /running-testnet-node + - title: Stacks 1.0 + pages: + - path: /stacks-1.0-info + - path: /best-practices + - path: /wire-format + - path: /atlas-overview + - path: /atlas-how-it-works + - path: /atlas-usage - path: /install-api - path: /installing-memcached - path: /stacks-wallet diff --git a/src/pages/index.md b/src/pages/index.md index e42b702c..408aae48 100644 --- a/src/pages/index.md +++ b/src/pages/index.md @@ -18,4 +18,4 @@ description: All you need to build decentralized apps and smart contracts. ## Explore [@page-reference | grid-small] -| /ecosystem/overview, /ecosystem/stacks-token, /stacks-blockchain/testnet-node +| /ecosystem/overview, /ecosystem/stacks-token, /stacks-blockchain/running-testnet-node diff --git a/src/pages/stacks-blockchain/atlas/how-atlas-works.md b/src/pages/stacks-blockchain/atlas-how-it-works.md similarity index 100% rename from src/pages/stacks-blockchain/atlas/how-atlas-works.md rename to src/pages/stacks-blockchain/atlas-how-it-works.md diff --git a/src/pages/stacks-blockchain/atlas/overview.md b/src/pages/stacks-blockchain/atlas-overview.md similarity index 100% rename from src/pages/stacks-blockchain/atlas/overview.md rename to src/pages/stacks-blockchain/atlas-overview.md diff --git a/src/pages/stacks-blockchain/atlas/usage.md b/src/pages/stacks-blockchain/atlas-usage.md similarity index 100% rename from src/pages/stacks-blockchain/atlas/usage.md rename to src/pages/stacks-blockchain/atlas-usage.md diff --git a/src/pages/stacks-blockchain/best-practices.md b/src/pages/stacks-blockchain/best-practices.md index 299fc270..dda0ee3c 100644 --- a/src/pages/stacks-blockchain/best-practices.md +++ b/src/pages/stacks-blockchain/best-practices.md @@ -1,6 +1,6 @@ --- title: Best practices -descriptions: Helpful tips for getting a core node up and running. +description: Helpful tips for getting a core node up and running. --- ## Hardware and OS requirements diff --git a/src/pages/stacks-blockchain/managing-accounts.md b/src/pages/stacks-blockchain/managing-accounts.md index d82ca7a6..b95048e3 100644 --- a/src/pages/stacks-blockchain/managing-accounts.md +++ b/src/pages/stacks-blockchain/managing-accounts.md @@ -1,6 +1,6 @@ --- title: Managing accounts -description: Learn how to generate and review Stacks 2.0 accounts +description: Learn how to generate and review accounts icon: TestnetIcon duration: 15 minutes experience: beginners @@ -57,7 +57,7 @@ const apiConfig = new Configuration({ const privateKey = makeRandomPrivKey(); ``` -> Note: The code above also imports methods required for the next steps, including API configuration for the client library usage. +-> Note: The code above also imports methods required for the next steps, including API configuration for the client library usage. ## Step 3: Reviewing account info @@ -80,7 +80,7 @@ const stacksAddress = getAddressFromPrivateKey( console.log(accountInfo); ``` -> Note: A "principal" is any entity that can have a token balance. Find more details in the [Princials guide](/smart-contracts/principals). +-> Note: A "principal" is any entity that can have a token balance. Find more details in the [Princials guide](/smart-contracts/principals). The API will respond with a balance, nonce (starting at zero), and respective proofs: @@ -130,7 +130,7 @@ The API will respond with a new transaction ID and confirmation that the faucet } ``` -> Note: Wait a few minutes for the transaction to complete. You can review the status using the Explorer, by navigating to the following URL: `https://testnet-explorer.blockstack.org/txid/`. +-> Note: Wait a few minutes for the transaction to complete. You can review the status using the Explorer, by navigating to the following URL: `https://testnet-explorer.blockstack.org/txid/`. Assumping the faucet transaction was successfully processed, you can review the account history. We are expecting at least one transactions to show up in the account history. @@ -225,6 +225,6 @@ The API will respond with the following breakdown of token balances: } ``` -> Note: The `balance` field does **not** represent full Stacks token, but microstacks. 1,000,000 microstacks are worth 1 Stacks token. +-> Note: The `balance` field does **not** represent full Stacks token, but microstacks. 1,000,000 microstacks are worth 1 Stacks token. We can see that the current Stacks balance is `500000` microstacks, or `0.5` Stacks token. diff --git a/src/pages/stacks-blockchain/overview.md b/src/pages/stacks-blockchain/overview.md index e497c5af..56968465 100644 --- a/src/pages/stacks-blockchain/overview.md +++ b/src/pages/stacks-blockchain/overview.md @@ -20,7 +20,43 @@ replica as all other peers. _Non-enumerable_ means that the set of peers that are producing the blocks don’t know about one another — they don’t know their identities, or even how many exist and are online. They are indistinguishable. -## Roadmap +## Tutorials + +[@page-reference | grid-small] +| /stacks-blockchain/managing-accounts, /stacks-blockchain/sending-tokens, /stacks-blockchain/running-testnet-node + +## Capabilities + +### Clarity Smart Contracts + +A Smart Contract is code running on the Stacks Blockchain that executes autonomously. Clarity is the safest language for writing Smart Contracts, optimized for predictability and security. + +[@page-reference | inline] +| /smart-contracts/overview + +### Stacks Mining + +Anyone can be a Stacks Miner. There are no special hardware or software requirements, all you need is Bitcoin. Instead +of spending energy, Stacks miners transfer Bitcoin to holders of Stacks Token (Stacks) to mine a block. This mechanism is +called Proof of Transfer (PoX). + +[@page-reference | inline] +| /mining + +### Proof of Transfer (PoX) + +Proof of Transfer (PoX) is the consensus mechanism that leverages the security and stability of Bitcoin to create new +blockchains, without modifying the Bitcoin protocol. PoX makes it possible to reward network participants with Bitcoin. +An example of this is Stacking. + +### Stacking + +Stackers are Stacks (Stacks) Token holders who provide a valuable service to the network by locking up their Stacks for a certain +period of time. As a reward, Stackers receive the Bitcoin that miners transfer as part of Proof of Transfer (PoX). + +-> Proof of Transfer and Stacking are in active development and are coming soon + +## Design specification Stacks improvement proposals (SIPs) are aimed at describing the implementation of the Stacks blockchain, as well as proposing improvements. They should contain concise technical specifications of features or standards and the rationale @@ -39,18 +75,19 @@ system-wide issue, and for documenting design decisions. ## Testnet phases -- ✅ **Helium** is a developer local setup, mono-node, assembling SIP 001, SIP 002, SIP 004 and SIP 005. With this version, developers can not only run Stacks 2.0 on their development machines, but also write, execute, and test smart contracts. See the instructions below for more details. -- [ ] **Neon** is the upcoming version of our public testnet, that we're anticipating will ship in Q2 2020. This testnet will ship with SIP 003, and will be an open-membership public network, where participants will be able to validate and participate in mining testnet blocks. -- [ ] **Mainnet** is the fully functional version, that we're intending to ship in Q3 2020. +- ✅ **Phase 1 (Neon):** is a developer local setup, mono-node, assembling SIP 001, SIP 002, SIP 004 and SIP 005. With this version, developers can not only run Stacks 2.0 on their development machines, but also write, execute, and test smart contracts. +- ✅ **Phase 2 (Argon):** is the current version of our public testnet. This testnet includes SIP 003, and will be an open-membership public network, where participants will be able to validate and participate in mining testnet blocks. +- [ ] **Phase 3 (Krypton):** is the upcoming version that we're anticipating to ship in Q3 2020. This version focus on the PoX basics (miner get rewards, Stackers get BTC distributions, etc). +- [ ] **Phase 4 (Mainnet)** is the fully functional version, that we're intending to ship in Q4 2020. -## Features +## Testnet roadmap -✅ Live features       Upcoming +✅ Released features       Upcoming | | Phase 1 | **Phase 2** | Phase 3 | Phase 4 | | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----------- | ---------------------------------- | ---------------------------------- | | [Simple Proof of Transfer mining](https://github.com/blockstack/stacks-blockchain) | ✅ | ✅ | | | -| [Send and receive STX](https://github.com/blockstack/cli-blockstack) | ✅ | ✅ | | | +| [Send and receive Stacks](https://github.com/blockstack/cli-blockstack) | ✅ | ✅ | | | | [Deploy Clarity contracts](/smart-contracts/overview) | ✅ | ✅ | | | | [New Stacks Explorer](https://testnet-explorer.blockstack.org/) | | ✅ | | | | [stacks-transactions-js](https://github.com/blockstack/stacks-transactions-js) | | ✅ | | | @@ -60,36 +97,3 @@ system-wide issue, and for documenting design decisions. | New Stacks Wallet | | | | | | Testing upgrade to Stacks 2.0 | | | | | | Integration with Bitcoin testnet | | | | | - -## Stacks 2.0 features - -### Clarity Smart Contracts - -A Smart Contract is code running on the Stacks Blockchain that executes autonomously. When your Smart Contract has no -room for errors, Clarity is here to help. Clarity is the safest language for writing Smart Contracts, optimized for -predictability and security. - -[@page-reference | inline] -| /smart-contracts/overview - -### STX Mining - -Anyone can be a Stacks Miner. There are no special hardware or software requirements, all you need is Bitcoin. Instead -of spending energy, Stacks miners transfer Bitcoin to holders of Stacks Token (STX) to mine a block. This mechanism is -called Proof of Transfer (PoX). - -[@page-reference | inline] -| /mining - -### Proof of Transfer (PoX) - -Proof of Transfer (PoX) is the consensus mechanism that leverages the security and stability of Bitcoin to create new -blockchains, without modifying the Bitcoin protocol. PoX makes it possible to reward network participants with Bitcoin. -An example of this is Stacking. - -### Stacking - -Stackers are Stacks (STX) Token holders who provide a valuable service to the network by locking up their STX for a certain -period of time. As a reward, Stackers receive the Bitcoin that miners transfer as part of Proof of Transfer (PoX). - --> Proof of Transfer and Stacking are in active development and are coming soon diff --git a/src/pages/stacks-blockchain/testnet-node.md b/src/pages/stacks-blockchain/running-testnet-node.md similarity index 81% rename from src/pages/stacks-blockchain/testnet-node.md rename to src/pages/stacks-blockchain/running-testnet-node.md index b0fba799..45ee27d8 100644 --- a/src/pages/stacks-blockchain/testnet-node.md +++ b/src/pages/stacks-blockchain/running-testnet-node.md @@ -1,8 +1,8 @@ --- title: Running a testnet node -description: Learn how to set up and run a Stacks 2.0 testnet node. +description: Learn how to set up and run a testnet node. icon: TestnetIcon -duration: 30 minutes +duration: 15 minutes experience: beginners tags: - tutorial @@ -13,9 +13,15 @@ images: ## Introduction -The Stacks 2.0 testnet is currently in development. As part of the testnet, you can run a node and connect it to a public network. This guide will walk you through downloading and running your own node in the testnet network. +-> Note: The Stacks 2.0 testnet is currently in development. As part of the testnet, you can run a node and connect it to a public network. -### Prerequisites +This tutorial will walk you through the following steps: + +- Download and install the node +- Running the node +- Mining Stacks token + +## Requirements Note: If you use Linux, you may need to manually install [`libssl-dev`](https://wiki.openssl.org/index.php/Libssl_API) and other packages. In your command line, run the following to get all packages: @@ -35,7 +41,7 @@ In case you just installed Rust, you will be prompted to run the following comma source $HOME/.cargo/env ``` -### Download and install the `stacks-blockchain` repository +## Step 1: Installing the node Next, clone this repository: @@ -51,7 +57,7 @@ Install the Stacks node by running: cargo install --path ./testnet/stacks-node ``` -### Run your node +## Step 2: Running the node You're all set to run a node that connects to the testnet network. @@ -69,7 +75,7 @@ INFO [1588108047.585] [src/chainstate/stacks/index/marf.rs:732] First-ever block Awesome! Your node is now connected to the testnet network. Your node will receive new blocks when they are produced, and you can use your [node's RPC API](/core/smart/rpc-api) to send transactions, fetch information for contracts and accounts, and more. -### Mine Stacks token +## Step 3: Mining Stacks token Now that you have a running testnet node, you can easily set up a miner. diff --git a/src/pages/stacks-blockchain/sending-tokens.md b/src/pages/stacks-blockchain/sending-tokens.md index 6a860c34..b8e9083f 100644 --- a/src/pages/stacks-blockchain/sending-tokens.md +++ b/src/pages/stacks-blockchain/sending-tokens.md @@ -1,6 +1,6 @@ --- title: Sending tokens -description: Learn how to generate and broadcast Stacks 2.0 token transfers +description: Learn how to transfer tokens icon: TestnetIcon duration: 15 minutes experience: beginners @@ -67,7 +67,7 @@ const key = 'edf9aee84d9b7abc145504dde6726c64f369d37ee34ded868fabd876c26570bc01' const senderKey = createStacksPrivateKey(key); ``` -> Note: The code above also imports methods required for the next steps, including API configuration for the client library usage. +-> Note: The code above also imports methods required for the next steps, including API configuration for the client library usage. ## Step 3: Generating transaction @@ -127,7 +127,7 @@ Another way to estimate the fee is to use the `estimateTransfer()` function afte estimateTransfer(transaction); ``` -> Note: By setting a fee in the transaction builder function, the automatic fee estimation step will be skipped. +-> Note: By setting a fee in the transaction builder function, the automatic fee estimation step will be skipped. ### Handling nonces @@ -161,7 +161,7 @@ const serializedTx = transaction.serialize().toString('hex'); With the transaction ID, we can check the status of the transaction. Every transaction needs to be confirmed by the network and will be `pending` as soon as it is broadcasted. -> Note: A transactions is completed once it is confirmed and the status changes to `success`. Most transactions will be pending for several minutes before confirmed. You should implement polling in your app to refresh the status display. +-> Note: A transactions is completed once it is confirmed and the status changes to `success`. Most transactions will be pending for several minutes before confirmed. You should implement polling in your app to refresh the status display. ```js const transactions = new TransactionsApi(apiConfig); diff --git a/src/pages/stacks-blockchain/stacks-1.0-info.md b/src/pages/stacks-blockchain/stacks-1.0-info.md new file mode 100644 index 00000000..e0a697fa --- /dev/null +++ b/src/pages/stacks-blockchain/stacks-1.0-info.md @@ -0,0 +1,10 @@ +--- +title: Stacks 1.0 Info +description: Get familiar with the old Stacks 1.0 architecture +--- + +## Information + +Stacks 1.0 is an older blockchain architecture Blockstack. + +!> Stacks 1.0 arhcitecture is not compatible with Stacks 2.0. The information in this chapter is in reference to **deprecated** implementation details.