From 8e0d1412bd89718037c0c4351fa78a10e4e01d9a Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:40:36 +0200 Subject: [PATCH 1/7] update testnet configs to match stacks-core repo --- .../setting-up-a-primary-post-nakamoto-testnet-node.md | 10 ++-------- reference/sample-configuration-files.md | 5 +---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md b/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md index 6776eb2a1f..010daa87c3 100644 --- a/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md +++ b/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md @@ -40,9 +40,6 @@ stacker = true chain = "bitcoin" mode = "krypton" peer_host = "bitcoin.regtest.hiro.so" -username = "hirosystems" -password = "hirosystems" -rpc_port = 18443 peer_port = 18444 pox_prepare_length = 100 pox_reward_length = 900 @@ -111,7 +108,7 @@ start_height = 6 [[burnchain.epochs]] epoch_name = "3.0" -start_height = 2000701 +start_height = 56_457 EOF docker run -d \\ @@ -145,9 +142,6 @@ prometheus_bind = "0.0.0.0:9153" chain = "bitcoin" mode = "krypton" peer_host = "bitcoin.regtest.hiro.so" -username = "hirosystems" -password = "hirosystems" -rpc_port = 18443 peer_port = 18444 pox_prepare_length = 100 pox_reward_length = 900 @@ -216,7 +210,7 @@ start_height = 6 [[burnchain.epochs]] epoch_name = "3.0" -start_height = 2000701 +start_height = 56_457 ``` The important aspects that you’ll need to change are: diff --git a/reference/sample-configuration-files.md b/reference/sample-configuration-files.md index 5f0231f03c..46b0f3ac9b 100644 --- a/reference/sample-configuration-files.md +++ b/reference/sample-configuration-files.md @@ -309,9 +309,6 @@ stacker = true chain = "bitcoin" mode = "krypton" peer_host = "bitcoin.regtest.hiro.so" -username = "hirosystems" -password = "hirosystems" -rpc_port = 18443 peer_port = 18444 pox_prepare_length = 100 pox_reward_length = 900 @@ -382,7 +379,7 @@ start_height = 6 [[burnchain.epochs]] epoch_name = "3.0" -start_height = 2000701 +start_height = 56_457 ``` ### Mainnet Signer From cdd86fee4824e39840391ce8180b704a1bbd145d Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Thu, 10 Oct 2024 15:20:36 -0400 Subject: [PATCH 2/7] fix: remove unused config options from examples (#1653) * fix: remove unused config options from examples --- .../setting-up-a-primary-post-nakamoto-testnet-node.md | 4 ---- reference/sample-configuration-files.md | 7 ------- reference/stacks-node-configuration.md | 1 - 3 files changed, 12 deletions(-) diff --git a/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md b/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md index 010daa87c3..eb62f9135c 100644 --- a/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md +++ b/nakamoto-upgrade/nakamoto-activation-guide-for-signers/setting-up-a-primary-post-nakamoto-testnet-node.md @@ -51,8 +51,6 @@ auth_token = "12345" [[events_observer]] endpoint = "0.0.0.0.0:30000" -retry_count = 255 -include_data_events = false events_keys = ["stackerdb", "block_proposal", "burn_blocks"] [[ustx_balance]] @@ -148,8 +146,6 @@ pox_reward_length = 900 [[events_observer]] endpoint = "0.0.0.0.0:30000" -retry_count = 255 -include_data_events = false events_keys = ["stackerdb", "block_proposal", "burn_blocks"] # Set your auth token, which the signer uses diff --git a/reference/sample-configuration-files.md b/reference/sample-configuration-files.md index 46b0f3ac9b..8b103fbf27 100644 --- a/reference/sample-configuration-files.md +++ b/reference/sample-configuration-files.md @@ -105,7 +105,6 @@ pox_reward_length = 900 peer_host = "bitcoin.nakamoto.regtest.hiro.so" username = "hirosystems" password = "hirosystems" -burnchain_op_tx_fee = 5500 commit_anchor_block_within = 300000 rpc_port = 18543 peer_port = 18544 @@ -123,8 +122,6 @@ auth_token = "12345" [[events_observer]] # This endpoint is where your signer will communicate with your Stacks node endpoint = "127.0.0.1:30000" -retry_count = 255 -include_data_events = false events_keys = ["stackerdb", "block_proposal", "burn_blocks"] [[burnchain.epochs]] @@ -322,8 +319,6 @@ auth_token = "12345" [[events_observer]] # This endpoint is where your signer will communicate with your Stacks node endpoint = "127.0.0.1:30000" -retry_count = 255 -include_data_events = false events_keys = ["stackerdb", "block_proposal", "burn_blocks"] [[ustx_balance]] @@ -452,7 +447,5 @@ auth_token = "12345" [[events_observer]] # This endpoint is where your signer will communicate with your Stacks node endpoint = "127.0.0.1:30000" -retry_count = 255 -include_data_events = false events_keys = ["stackerdb", "block_proposal", "burn_blocks"] ``` diff --git a/reference/stacks-node-configuration.md b/reference/stacks-node-configuration.md index 856414862f..b50f0d1c52 100644 --- a/reference/stacks-node-configuration.md +++ b/reference/stacks-node-configuration.md @@ -144,6 +144,5 @@ peer_port = 8333 [[events_observer]] endpoint = "localhost:3700" -retry_count = 255 events_keys = ["*"] ``` From 1df099e03c79eb7e4c81fb586b127ef12d0df52a Mon Sep 17 00:00:00 2001 From: Brice Dobry Date: Fri, 11 Oct 2024 09:57:37 -0400 Subject: [PATCH 3/7] chore: update Nakamoto Testnet 3.0 start height --- reference/sample-configuration-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/sample-configuration-files.md b/reference/sample-configuration-files.md index 8b103fbf27..034f2984b0 100644 --- a/reference/sample-configuration-files.md +++ b/reference/sample-configuration-files.md @@ -158,7 +158,7 @@ start_height = 244 [[burnchain.epochs]] epoch_name = "3.0" -start_height = 2_000_250 +start_height = 72_280 [[ustx_balance]] address = "ST0DZFQ1XGHC5P1BZ6B7HSWQKQJHM74JBGCSDTNA" From a7e8e0441f0d490b3806fd66a9deee0a6a121d57 Mon Sep 17 00:00:00 2001 From: BowTiedWoo <168228753+BowTiedWoo@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:40:06 +0300 Subject: [PATCH 4/7] Remove Clarity Function Argument (#1655) --- reference/functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/functions.md b/reference/functions.md index 0be9424de7..e3a4f2abe9 100644 --- a/reference/functions.md +++ b/reference/functions.md @@ -2589,7 +2589,7 @@ This function returns (ok true) if the transfer is successful, or, on an error, Introduced in: **Clarity 1** -**input:** `uint, principal, principal, buff` +**input:** `uint, principal, principal` **output:** `(response bool uint)` From df761873890688cfd19c04ae7586e34feb17e7e7 Mon Sep 17 00:00:00 2001 From: Arturo Beccar-Varela <107512933+arturoBeccar@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:18:00 -0300 Subject: [PATCH 5/7] Correct typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f02db00e4..12e8f60b07 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Proof of Transfer (PoX) is the block production mechanism of the Stacks chain. E #### Clarity -Clarity is the smart contract language that Stacks uses. it has been designed from the ground up to make it easier or developers to write safe, secure smart contracts. Additionally, since it has been purpose-built for Stacks and Bitcoin, there are built-in functions for reading Bitcoin state, which means you can use Bitcoin state to perform actions in Clarity. For example, you could set up a check to make sure a particular Bitcoin transaction has occurred before executing a mint function in Clarity, which just so happens to be what happens with the third component: sBTC. +Clarity is the smart contract language that Stacks uses. it has been designed from the ground up to make it easier for developers to write safe, secure smart contracts. Additionally, since it has been purpose-built for Stacks and Bitcoin, there are built-in functions for reading Bitcoin state, which means you can use Bitcoin state to perform actions in Clarity. For example, you could set up a check to make sure a particular Bitcoin transaction has occurred before executing a mint function in Clarity, which just so happens to be what happens with the third component: sBTC. #### sBTC From c9b07559399c3785594596a7846a086ce2866d80 Mon Sep 17 00:00:00 2001 From: Hank Stoever Date: Wed, 16 Oct 2024 10:55:00 -0700 Subject: [PATCH 6/7] fix: updated nakamoto testnet config --- reference/sample-configuration-files.md | 78 +++++++++++-------------- 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/reference/sample-configuration-files.md b/reference/sample-configuration-files.md index 034f2984b0..c10bd6e3ba 100644 --- a/reference/sample-configuration-files.md +++ b/reference/sample-configuration-files.md @@ -10,9 +10,8 @@ Binaries will be provided roughly a week in advance and your normal upgrade proc If you are a signer, these are the current latest versions you'll want to be running. -* Signer - [2.5.0.0.5.2](https://hub.docker.com/layers/blockstack/stacks-signer/2.5.0.0.5.2/images/sha256-fc29a7c22f236f91270fb1aa58cfb4dd8dcd6b1daa0812e16df0bdc7643cb6ac?context=explore) -* Stacks Node - [2.5.0.0.7](https://hub.docker.com/layers/blockstack/stacks-core/2.5.0.0.7/images/sha256-71d3eb305b5c1b68cd44904a7bcd6e5f92542135a7218762cdf27a46acaff69b?context=explore) - +- Signer - [2.5.0.0.5.2](https://hub.docker.com/layers/blockstack/stacks-signer/2.5.0.0.5.2/images/sha256-fc29a7c22f236f91270fb1aa58cfb4dd8dcd6b1daa0812e16df0bdc7643cb6ac?context=explore) +- Stacks Node - [2.5.0.0.7](https://hub.docker.com/layers/blockstack/stacks-core/2.5.0.0.7/images/sha256-71d3eb305b5c1b68cd44904a7bcd6e5f92542135a7218762cdf27a46acaff69b?context=explore) ### Signer Configuration File Options @@ -25,18 +24,9 @@ The signer configuration file is a TOML file that contains the configuration opt | stacks\_private\_key | ✓ | Hex representation of the signer's Stacks private key used for communicating with the Stacks Node, including writing to the Stacker DB instance. | | network | ✓ | Network to use. One of "mainnet", "testnet" or "mocknet". | | auth\_password | ✓ | Authorization token for HTTP requests made from the signer to your Stacks node. | -| db\_path | ✓ | Path to the signer's database file or :memory: for an in-memory database. | -| metrics\_endpoint | | IP:PORT for Prometheus metrics collection. | -| event\_timeout\_ms | | Time to wait (in milliseconds) for a response from the stacker-db instance. | -| block\_proposal\_timeout\_ms | | Time to wait (in milliseconds) for a block response from miners. | -| dkg\_public\_timeout\_ms | | Timeout in (milliseconds) to gather DkgPublicShares messages. | -| dkg\_private\_timeout\_ms | | Timeout in (milliseconds) to gather DkgPrivateShares messages. | -| dkg\_end\_timeout\_ms | | Timeout in (milliseconds) to gather DkgEnd messages. | -| nonce\_timeout\_ms | | Timeout in (milliseconds) to gather nonces. | -| sign\_timeout\_ms | | Timeout in (milliseconds) to gather signature shares. | -| tx\_fee\_ustx | | The STX tx fee to use in microSTX. If not set, will default to 10000. | -| max\_tx\_fee\_ustx | | The max STX tx fee to use in microSTX when estimating fees. If not set, will use tx\_fee\_ustx. | - +| db\_path | ✓ | Path to the signer's database file | +| metrics\_endpoint | | IP:PORT for Prometheus metrics collection. | +| chain\_id | | An optional ChainID, only used for custom networks (like Nakamoto Testnet) | ### Example Configs @@ -45,30 +35,30 @@ Below are sample configuration files for running a Stacks node and signer provid ### Testnet Signer ```toml -# The IP address and port where your Stacks node can be accessed. -# The port 20443 is the default RPC endpoint for Stacks nodes. +# The IP address and port where your Stacks node can be accessed. +# The port 20443 is the default RPC endpoint for Stacks nodes. # Note that you must use an IP address - DNS hosts are not supported at this time. # This should be the IP address accessible via Docker, usually via a network. node_host = "127.0.0.1:20443" -# This is the location where the signer will expose an RPC endpoint for +# This is the location where the signer will expose an RPC endpoint for # receiving events from your Stacks node. endpoint = "127.0.0.1:30000" # Either “testnet” or “mainnet” network = "testnet" -# this is a file path where your signer will persist data. If using Docker, +# this is a file path where your signer will persist data. If using Docker, # this must be within a volume, so that data can be persisted across restarts db_path = "/var/stacks/signer.sqlite" -# an authentication token that is used for some HTTP requests made from the -# signer to your Stacks node. You’ll need to use this later on when configuring -# your Stacks node. You create this field yourself, rather than it being generated +# an authentication token that is used for some HTTP requests made from the +# signer to your Stacks node. You’ll need to use this later on when configuring +# your Stacks node. You create this field yourself, rather than it being generated # with your private key. auth_password = "$your_http_auth_token" -# This is the privateKey field from the keys you generated in the +# This is the privateKey field from the keys you generated in the # previous step. stacks_private_key = "$your_stacks_private_key" ``` @@ -83,7 +73,7 @@ Additions necessary specifically to run a signer are the `[connection_options]` ```toml [node] -# Set this based on where you downloaded +# Set this based on where you downloaded # the chain state archive as described in the How to Run a Signer guide: working_dir = "/stacks-blockchain/data" rpc_bind = "0.0.0.0:20443" @@ -98,6 +88,7 @@ stacker = true [burnchain] chain = "bitcoin" mode = "krypton" +chain_id = 0x80000100 magic_bytes = "N3" poll_time_secs = 30 pox_prepare_length = 100 @@ -109,9 +100,6 @@ commit_anchor_block_within = 300000 rpc_port = 18543 peer_port = 18544 #satoshis_per_byte = 20 -first_burn_block_height = 230 -first_burn_block_timestamp = 1714513150 -first_burn_block_hash = "654e1e9f66701d4f8a138b46d4cf0cc26665688175bcbb1700729efbf759e57d" # Set your auth token, which the signer uses # This should match the auth_password field of your signer config @@ -130,35 +118,35 @@ start_height = 0 [[burnchain.epochs]] epoch_name = "2.0" -start_height = 230 +start_height = 0 [[burnchain.epochs]] epoch_name = "2.05" -start_height = 240 +start_height = 1 [[burnchain.epochs]] epoch_name = "2.1" -start_height = 240 +start_height = 2 [[burnchain.epochs]] epoch_name = "2.2" -start_height = 241 +start_height = 3 [[burnchain.epochs]] epoch_name = "2.3" -start_height = 242 +start_height = 4 [[burnchain.epochs]] epoch_name = "2.4" -start_height = 243 +start_height = 5 [[burnchain.epochs]] epoch_name = "2.5" -start_height = 244 +start_height = 6 [[burnchain.epochs]] epoch_name = "3.0" -start_height = 72_280 +start_height = 1000 [[ustx_balance]] address = "ST0DZFQ1XGHC5P1BZ6B7HSWQKQJHM74JBGCSDTNA" @@ -339,7 +327,7 @@ amount = 10000000000000000 [fee_estimation] fee_estimator = "fuzzed_weighted_median_fee_rate" - + [[burnchain.epochs]] epoch_name = "1.0" start_height = 0 @@ -382,30 +370,30 @@ start_height = 56_457 This config is very similar to the testnet config, except the `network` field is changed. ```toml -# The IP address and port where your Stacks node can be accessed. -# The port 20443 is the default RPC endpoint for Stacks nodes. +# The IP address and port where your Stacks node can be accessed. +# The port 20443 is the default RPC endpoint for Stacks nodes. # Note that you must use an IP address - DNS hosts are not supported at this time. # This should be the IP address accessible via Docker, usually via a network. node_host = "127.0.0.1:20443" -# This is the location where the signer will expose an RPC endpoint for +# This is the location where the signer will expose an RPC endpoint for # receiving events from your Stacks node. endpoint = "127.0.0.1:30000" # Either “testnet” or “mainnet” network = "mainnet" -# this is a file path where your signer will persist data. If using Docker, +# this is a file path where your signer will persist data. If using Docker, # this must be within a volume, so that data can be persisted across restarts db_path = "/var/stacks/signer.sqlite" -# an authentication token that is used for some HTTP requests made from the -# signer to your Stacks node. You’ll need to use this later on when configuring -# your Stacks node. You create this field yourself, rather than it being generated +# an authentication token that is used for some HTTP requests made from the +# signer to your Stacks node. You’ll need to use this later on when configuring +# your Stacks node. You create this field yourself, rather than it being generated # with your private key. auth_password = "$your_http_auth_token" -# This is the privateKey field from the keys you generated in the +# This is the privateKey field from the keys you generated in the # previous step. stacks_private_key = "$your_stacks_private_key" @@ -419,7 +407,7 @@ With a mainnet Stacks node config, you'll need to change the bootstrap node fiel ```toml [node] -# Set this based on where you downloaded +# Set this based on where you downloaded # the chain state archive as described in the How to Run a Signer guide: working_dir = "/data-dir-somewhere" rpc_bind = "0.0.0.0:20443" From 6e5c4deb7e2850d15156c64d2abb663fe2a77646 Mon Sep 17 00:00:00 2001 From: Hank Stoever Date: Wed, 16 Oct 2024 10:57:34 -0700 Subject: [PATCH 7/7] fix: auto formatting list changes --- reference/sample-configuration-files.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/sample-configuration-files.md b/reference/sample-configuration-files.md index c10bd6e3ba..1e6546a448 100644 --- a/reference/sample-configuration-files.md +++ b/reference/sample-configuration-files.md @@ -10,8 +10,8 @@ Binaries will be provided roughly a week in advance and your normal upgrade proc If you are a signer, these are the current latest versions you'll want to be running. -- Signer - [2.5.0.0.5.2](https://hub.docker.com/layers/blockstack/stacks-signer/2.5.0.0.5.2/images/sha256-fc29a7c22f236f91270fb1aa58cfb4dd8dcd6b1daa0812e16df0bdc7643cb6ac?context=explore) -- Stacks Node - [2.5.0.0.7](https://hub.docker.com/layers/blockstack/stacks-core/2.5.0.0.7/images/sha256-71d3eb305b5c1b68cd44904a7bcd6e5f92542135a7218762cdf27a46acaff69b?context=explore) +* Signer - [2.5.0.0.5.2](https://hub.docker.com/layers/blockstack/stacks-signer/2.5.0.0.5.2/images/sha256-fc29a7c22f236f91270fb1aa58cfb4dd8dcd6b1daa0812e16df0bdc7643cb6ac?context=explore) +* Stacks Node - [2.5.0.0.7](https://hub.docker.com/layers/blockstack/stacks-core/2.5.0.0.7/images/sha256-71d3eb305b5c1b68cd44904a7bcd6e5f92542135a7218762cdf27a46acaff69b?context=explore) ### Signer Configuration File Options