Skip to content

Commit 8131228

Browse files
aldurkenrogers
authored andcommitted
Point to testnet config and small fixes
1 parent f9091e5 commit 8131228

File tree

1 file changed

+56
-35
lines changed

1 file changed

+56
-35
lines changed

guides-and-tutorials/sbtc/how-to-run-sbtc-signer.md

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,67 @@
11
# How to Run a sBTC Signer
22

33
{% hint style="warning" %}
4-
This documentation is for preview purposes only. This should not be used in production. The configuration files and the docker-compose setup will undergo some necessary changes before release, but the setup here is very close to what will be required in production.
4+
This documentation is for preview purposes only. This should not be used in production.
5+
{% endhint %}
6+
7+
## Testnet configuration
8+
9+
{% hint style="warning" %} If you are onboarding to the sBTC signers testnet,
10+
please see
11+
[here](https://github.com/stacks-network/sbtc/blob/fix/testnet_docker_compose/docker/testnet/README.md).
512
{% endhint %}
613

714
## Minimum System Requirements
815

9-
These are the **minimum required specs** to be able to run a sBTC signer, but it is recommended to have more than the minimum for optimal performance. Note that these are in addition to the hardware requirements for running a Stacks node, Bitcoin node, and Nakamoto signer outlined in the How to Run a Signer doc.
16+
Below are the **minimum required specs** to be able to run a sBTC signer.
1017

1118
- 1 cpu
1219
- 256MB memory
1320
- 50GB storage
1421

22+
Note that these are in _addition_ to the hardware requirements for running a
23+
Stacks node and Bitcoin node outlined in the [How to Run a Signer doc](../running-a-signer/README.md).
24+
1525
## 1. Configure your Bitcoin node
1626

1727
Your Bitcoin node must include these settings for sBTC signer operation:
1828

29+
### Settings
30+
1931
1. Required Settings:
2032

2133
- `txindex=1`: Transaction indexing must be enabled
2234
- `server=1`: RPC server must be enabled
2335
- `zmqpubhashblock=tcp://*:28332`: ZMQ block hash notifications
2436
- `zmqpubrawblock=tcp://*:28332`: ZMQ raw block notifications
2537

26-
2. Optional but Recommended:
38+
1. Optional but Recommended:
39+
2740
- `coinstatsindex=1`: Enables additional index for coin statistics
2841

29-
Reference configuration:
42+
### ZeroMQ (ZMQ) Configuration
43+
44+
ZeroMQ enables real-time blockchain event notifications from Bitcoin Core to the
45+
sBTC signer. The two required ZMQ endpoints serve distinct purposes:
46+
47+
- `zmqpubhashblock`: Broadcasts only block hashes for lightweight block
48+
detection
49+
- `zmqpubrawblock`: Broadcasts complete block data for transaction processing
50+
51+
This notification system creates a direct event stream when:
52+
53+
1. Bitcoin Core validates a new block
54+
1. Block data publishes via ZMQ
55+
1. Signer processes relevant sBTC transactions
56+
57+
### Reference configuration
3058

3159
<details>
3260

3361
<summary>bitcoin.conf example</summary>
3462

3563
```conf
36-
regtest=1 #chain=regtest
64+
regtest=1
3765
3866
[regtest]
3967
printtoconsole=1
@@ -78,30 +106,19 @@ fallbackfee=0.00001
78106

79107
</details>
80108

81-
### ZeroMQ (ZMQ) Configuration
82-
83-
ZeroMQ enables real-time blockchain event notifications from Bitcoin Core to the sBTC signer. The two required ZMQ endpoints serve distinct purposes:
84-
85-
- `zmqpubhashblock`: Broadcasts only block hashes for lightweight block detection
86-
- `zmqpubrawblock`: Broadcasts complete block data for transaction processing
87-
88-
This notification system creates a direct event stream when:
89-
90-
1. Bitcoin Core validates a new block
91-
2. Block data publishes via ZMQ
92-
3. Signer processes relevant sBTC transactions
93109

94110
## 2. Configure your signer
95111

96-
The signer configuration file (`signer-config.toml`) defines the signer's operation parameters. The configuration sections include:
112+
The signer configuration file (`signer-config.toml`) defines the signer's
113+
operation parameters. The configuration sections include:
97114

98115
### Bitcoin Connection Settings
99116

100117
Defines how the signer connects to Bitcoin Core:
101118

102119
```toml
103120
[bitcoin]
104-
rpc_endpoints = ["http://user:pass@your-bitcoin-node:4122"]
121+
rpc_endpoints = ["http://user:pass@your-bitcoin-node:18443"]
105122
block_hash_stream_endpoints = ["tcp://localhost:28332"]
106123
```
107124

@@ -113,7 +130,7 @@ Defines the signer's identity and network participation:
113130
[signer]
114131
private_key = "your-private-key" # 32 or 33-byte hex format
115132
network = "mainnet" # Network selection: mainnet, testnet, or regtest
116-
deployer = "sBTCContractDeployerAddress" # Address that deployed sbtc contracts (this will either be provided as a default value or given directly to signers)
133+
deployer = "<sBTCContractDeployerAddress>" # Address that deployed sbtc contracts (this will either be provided as a default value or given directly to signers)
117134
```
118135

119136
### P2P Network Configuration
@@ -122,25 +139,21 @@ Controls how the signer communicates with other network participants:
122139

123140
```toml
124141
[signer.p2p]
125-
listen_on = ["tcp://0.0.0.0:4122", "quic-v1://0.0.0.0:4122"]
142+
listen_on = ["tcp://0.0.0.0:4122"]
126143
```
127144

128-
The signer operates on port 4122 by default and supports both TCP and QUIC protocols for peer communication. The signer will attempt QUIC connections first for improved performance, automatically falling back to TCP if QUIC is unavailable or blocked on the network.
145+
The signer operates on port 4122 by default and supports both TCP and QUIC
146+
protocols for peer communication. The signer will attempt QUIC connections first
147+
for improved performance, automatically falling back to TCP if QUIC is
148+
unavailable or blocked on the network.
129149

130-
Complete reference configuration:
150+
### Reference configuration
131151

132152
<details>
133153

134154
<summary>signer-config.toml example</summary>
135155

136156
```toml
137-
# DISCLAIMER! READ!
138-
# This configuration file is an example of how it will likely look in production with some
139-
# values filled in with example placeholders like `your-private-key` and `your-bitcoin-node`.
140-
# The real production configuration will rely on some hardcoded values that can only be
141-
# known after initial seed node deployments. This file is not meant to be used as is, but one will
142-
# be created to be used later, and this documentation will be updated to reflect those changes.
143-
144157
# TODO(715): Provide sane/safe configuration defaults. Re-review all of them!
145158
# TODO(429): Add documentation for all configuration parameters.
146159

@@ -176,7 +189,7 @@ Complete reference configuration:
176189
# Required: true
177190
# Environment: SIGNER_EMILY__ENDPOINTS
178191
endpoints = [
179-
"https://emily-sbtc.com"
192+
"https://sbtc-emily.com"
180193
]
181194

182195
# !! ==============================================================================
@@ -401,11 +414,17 @@ public_endpoints = []
401414

402415
## 3. Set up your blocklist client
403416

404-
The blocklist client provides address screening services for the signer node. It interfaces with external API services to perform risk analysis on Bitcoin addresses. Default implementation uses Chainalysis, but supports custom implementations.
417+
The blocklist client provides address screening services for the signer node. It
418+
interfaces with external API services to perform risk analysis on Bitcoin
419+
addresses. Default implementation uses Chainalysis, but supports custom
420+
implementations.
405421

406-
Specifically, you'll want to use the [sanctioned addresses API](https://www.chainalysis.com/free-cryptocurrency-sanctions-screening-tools) in the `api_url` field of the `blocklist-client-config.toml` file. You can request an API key on that same page.
422+
Specifically, you'll want to use the [sanctioned addresses
423+
API](https://www.chainalysis.com/free-cryptocurrency-sanctions-screening-tools)
424+
in the `api_url` field of the `blocklist-client-config.toml` file. You can
425+
request an API key on that same page.
407426

408-
Reference configuration:
427+
### Reference configuration
409428

410429
<details>
411430

@@ -442,7 +461,9 @@ api_key = "your-api-key"
442461

443462
## 4. Set up your containers
444463

445-
As we crystalize the Docker configuration, the following section displays an example of what the Docker compose file will look like, so that Signers can peek at how the system will look like.
464+
As we crystalize the Docker configuration, the following section displays an
465+
example of what the Docker compose file will look like, so that Signers can peek
466+
at how the system will look like.
446467

447468
Remember, this is not production-ready yet and is only for demonstration purposes at the moment.
448469

0 commit comments

Comments
 (0)