Skip to content

Commit

Permalink
GITBOOK-140: Add Nakamoto vs. Primary testnet description + update
Browse files Browse the repository at this point in the history
  • Loading branch information
cuevasm authored and gitbook-bot committed May 31, 2024
1 parent bd7c601 commit 91b830b
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 5 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [How to Stack (as a signer)](nakamoto-upgrade/signing-and-stacking/stacking-flow.md)
* [FAQ](nakamoto-upgrade/signing-and-stacking/faq.md)
* [Sample Configuration Files](nakamoto-upgrade/signing-and-stacking/sample-configuration-files.md)
* [Nakamoto & Primary Testnet](nakamoto-upgrade/nakamoto-and-primary-testnet.md)

## 🎓 Stacks 101 (Pre-Nakamoto) <a href="#stacks-101" id="stacks-101"></a>

Expand Down
37 changes: 37 additions & 0 deletions nakamoto-upgrade/nakamoto-and-primary-testnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: >-
There are two main options when it comes to testnets. The one you work with
will depend on your own testing needs and preferences.
---

# Nakamoto & Primary Testnet

<details>

<summary>Recent Testnet History (May 2024)</summary>

For the past month+, the Bitcoin Testnet slowly [became unusable](https://blog.lopp.net/griefing-bitcoin-testnet/) (learn more here). Given the Primary Stacks Testnet leverages Bitcoin to provide a realistic environment, the Stacks testnet also became unusable. To overcome this, the core developers spun up the [Nakamoto Testnet](https://explorer.hiro.so/?chain=testnet\&api=https://api.nakamoto.testnet.hiro.so) to unblock Signers and test ahead of 2.5. \
\
In the background, they have also been working to bring the Primary Testnet back in light of the Bitcoin Testnet issues. To acheieve this, they migrated the testnet to the Bitcoin Regtest network. As of May 31st, the Primary Testnet is back and ready to use.&#x20;

</details>

### Primary and Nakamoto Testnets

There are some notable differences between Primary Testnet and Nakamoto Testnet, this table can guide you in selecting the one most aligned with your needs.&#x20;

<table><thead><tr><th width="198">Attributes</th><th>Nakamoto Testnet</th><th>Primary Testnet</th></tr></thead><tbody><tr><td><strong>Stacking Cycle Length</strong></td><td>3 days</td><td>1 week </td></tr><tr><td><strong>Description</strong></td><td>Bleeding edge, more frequent upgrades with Release Candidates.</td><td>Stable release updates ONLY, the last step before Mainnet.</td></tr><tr><td><strong>Usage Recommendations</strong></td><td><ul><li>Use this if you don’t mind frequent resets and would like to test the latest features as they’re released</li><li>Use this if you prefer faster feedback loops to test various stacking-signer scenarios</li></ul></td><td><ul><li>Use this if you prefer more stable releases and don’t want frequent resets and updates</li><li>Use this if you don't need to be among the first to test new features</li><li>Use this if you prefer longer Stacking cycles</li></ul></td></tr><tr><td><strong>Lifespan</strong></td><td>Nakamoto Testnet will remain available until sBTC goes live on Mainnet</td><td>The Primary Testnet will exist and be maintained forever.</td></tr></tbody></table>

### Important notes on the Primary Testnet:

* Core devs are working on a BTC Regtest Explorer. In the meantime, Wallet, Explorer, and API links to BTC transactions will lead you nowhere. This is expected and will be addressed. All STX transactions are available to track on the [Explorer](https://explorer.hiro.so/?chain=testnet).
* You can start onboarding your Signer, deploy contracts and test your Apps. All functionality from the previous testnet is available.
* Old testnet data is archived and will remain [available](https://explorer.hiro.so/?chain=testnet\&api=https://api.old.testnet.hiro.so) until the end of June 2024
* **Faucet and tSTX:**
* The [Faucet address](https://explorer.hiro.so/address/ST2QKZ4FKHAH1NQKYKYAYZPY440FEPK7GZ1R5HBP2?chain=testnet) and limits stay the same. Learn more about faucets: [testnet.md](../stacks-101/testnet.md "mention")
* If you need more tSTX than the current daily limit to onboard your Signer on Primary Testnet, please reach out to your main point of contact in the ecosystem.

### Configuration Files for Signers

* [sample-configuration-files.md](signing-and-stacking/sample-configuration-files.md "mention")
* [#primary-testnet-config](signing-and-stacking/sample-configuration-files.md#primary-testnet-config "mention")
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Below are sample configuration files for running a Stacks node and signer provided in one place for convenience. You'll need to modify some of these according to the [How to Run a Signer](running-a-signer.md) doc.

{% hint style="info" %}
Learn more about the difference between the Nakamoto and Primary Testnets: [nakamoto-and-primary-testnet.md](../nakamoto-and-primary-testnet.md "mention")
{% endhint %}

### Testnet Signer

```toml
Expand Down Expand Up @@ -33,11 +37,7 @@ auth_password = "$your_http_auth_token"
stacks_private_key = "$your_stacks_private_key"
```

### Nakamoto Testnet Stacks Node

{% hint style="info" %}
Note that this example configuration file applies to the Nakamoto Testnet, not the Primary Testnet. The Primary Testnet is currently undergoing a major update and it is recommended to use the Nakamoto Testnet for the time being.
{% endhint %}
### Nakamoto Testnet Config

This is the configuration you'll need to run a Stacks follower node if you are also running a signer. Be sure to change the commented lines to the appropriate data for your setup. If you are not familiar with the process of setting up a signer, be sure to follow the [How to Run a Signer](running-a-signer.md) guide.

Expand Down Expand Up @@ -260,6 +260,89 @@ address = "ST0D135PF2R0S4B6S4G49QZC69KF19MSZ4Z5RDF5"
amount = 24378281250000
```

### Primary Testnet Config

```
[node]
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
bootstrap_node = "029266faff4c8e0ca4f934f34996a96af481df94a89b0c9bd515f3536a95682ddc@seed.testnet.hiro.so:30443"
prometheus_bind = "0.0.0.0:9153"
working_dir = "/hirosystems/data"
local_peer_seed = "{{ redacted }}"
[burnchain]
chain = "bitcoin"
mode = "krypton"
peer_host = "http://bitcoin.regtest.hiro.so"
username = "hirosystems"
password = "hirosystems"
rpc_port = 18443
peer_port = 18444
pox_prepare_length = 100
pox_reward_length = 900
[[events_observer]]
endpoint = "testnet-api-blue.testnet-api.svc.cluster.local:3700"
retry_count = 255
events_keys = ["*"]
[[ustx_balance]]
address = "ST2QKZ4FKHAH1NQKYKYAYZPY440FEPK7GZ1R5HBP2"
amount = 10000000000000000
[[ustx_balance]]
address = "ST319CF5WV77KYR1H3GT0GZ7B8Q4AQPY42ETP1VPF"
amount = 10000000000000000
[[ustx_balance]]
address = "ST221Z6TDTC5E0BYR2V624Q2ST6R0Q71T78WTAX6H"
amount = 10000000000000000
[[ustx_balance]]
address = "ST2TFVBMRPS5SSNP98DQKQ5JNB2B6NZM91C4K3P7B"
amount = 10000000000000000
[fee_estimation]
fee_estimator = "fuzzed_weighted_median_fee_rate"
[[burnchain.epochs]]
epoch_name = "1.0"
start_height = 0
[[burnchain.epochs]]
epoch_name = "2.0"
start_height = 0
[[burnchain.epochs]]
epoch_name = "2.05"
start_height = 1
[[burnchain.epochs]]
epoch_name = "2.1"
start_height = 2
[[burnchain.epochs]]
epoch_name = "2.2"
start_height = 3
[[burnchain.epochs]]
epoch_name = "2.3"
start_height = 4
[[burnchain.epochs]]
epoch_name = "2.4"
start_height = 5
[[burnchain.epochs]]
epoch_name = "2.5"
start_height = 6
[[burnchain.epochs]]
epoch_name = "3.0"
start_height = 2000701
```

### Mainnet Signer

This config is very similar to the testnet config, except the `network` field is changed.
Expand Down
4 changes: 4 additions & 0 deletions stacks-101/testnet.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Testnet

{% hint style="info" %}
With Nakamoto on the way, you may [find this page](../nakamoto-upgrade/nakamoto-and-primary-testnet.md) covering the Nakamoto vs. Primary Testnets useful.&#x20;
{% endhint %}

### About testnet

The testnet is a separate blockchain from the Stacks mainnet analogous to a staging environnement. It's a network used by developers to test their apps, smart contracts, or changes to the protocol in a production-like environment.
Expand Down

0 comments on commit 91b830b

Please sign in to comment.