From 91b830bf8309829e04b7adee35178d3c53c853b5 Mon Sep 17 00:00:00 2001 From: Mitchell Cuevas Date: Fri, 31 May 2024 23:02:30 +0000 Subject: [PATCH] GITBOOK-140: Add Nakamoto vs. Primary testnet description + update --- SUMMARY.md | 1 + .../nakamoto-and-primary-testnet.md | 37 ++++++++ .../sample-configuration-files.md | 93 ++++++++++++++++++- stacks-101/testnet.md | 4 + 4 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 nakamoto-upgrade/nakamoto-and-primary-testnet.md diff --git a/SUMMARY.md b/SUMMARY.md index 2943f078e8..a4a7780ee1 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -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) diff --git a/nakamoto-upgrade/nakamoto-and-primary-testnet.md b/nakamoto-upgrade/nakamoto-and-primary-testnet.md new file mode 100644 index 0000000000..9ff834311e --- /dev/null +++ b/nakamoto-upgrade/nakamoto-and-primary-testnet.md @@ -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 + +
+ +Recent Testnet History (May 2024) + +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. + +
+ +### 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. + +
AttributesNakamoto TestnetPrimary Testnet
Stacking Cycle Length3 days1 week
DescriptionBleeding edge, more frequent upgrades with Release Candidates.Stable release updates ONLY, the last step before Mainnet.
Usage Recommendations
  • Use this if you don’t mind frequent resets and would like to test the latest features as they’re released
  • Use this if you prefer faster feedback loops to test various stacking-signer scenarios
  • Use this if you prefer more stable releases and don’t want frequent resets and updates
  • Use this if you don't need to be among the first to test new features
  • Use this if you prefer longer Stacking cycles
LifespanNakamoto Testnet will remain available until sBTC goes live on MainnetThe Primary Testnet will exist and be maintained forever.
+ +### 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") diff --git a/nakamoto-upgrade/signing-and-stacking/sample-configuration-files.md b/nakamoto-upgrade/signing-and-stacking/sample-configuration-files.md index bbdb8eb809..a465d656b7 100644 --- a/nakamoto-upgrade/signing-and-stacking/sample-configuration-files.md +++ b/nakamoto-upgrade/signing-and-stacking/sample-configuration-files.md @@ -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 @@ -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. @@ -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. diff --git a/stacks-101/testnet.md b/stacks-101/testnet.md index ade0335530..c5e46c9ae6 100644 --- a/stacks-101/testnet.md +++ b/stacks-101/testnet.md @@ -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. +{% 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.