Skip to content

Commit 81af542

Browse files
kenrogerswileyjdjordonaldur
authored
Update sBTC docs for v1.1.0 changes (#1724)
* Update sBTC docs for v1.1.0 changes * Fix inaccuracies with sBTC system * Update concepts/sbtc/auxiliary-features/signer-wallet-rotation.md Co-authored-by: Daniel Jordon <[email protected]> * Update wallet rotation scenarios --------- Co-authored-by: wileyj <[email protected]> Co-authored-by: Daniel Jordon <[email protected]> Co-authored-by: aldur <[email protected]>
1 parent 9023ce2 commit 81af542

File tree

2 files changed

+37
-46
lines changed

2 files changed

+37
-46
lines changed
Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
11
# Signer Wallet Rotation
22

3-
Signer Wallet Rotation is a crucial security feature in the sBTC system that allows sBTC Signers to rotate their private keys securely.
3+
Signer wallet rotation allows sBTC signers to update their private keys and modify the signer set composition. This mechanism is how the network maintains security over time and adapts to changing participants.
44

5-
## Overview
5+
## How it works
66

7-
- sBTC Signers have the ability to rotate their private keys.
8-
- This feature enhances the long-term security of the sBTC system.
9-
- Key rotation is coordinated among signers and requires on-chain voting by the signers.
7+
The sBTC system uses a multi-signature wallet on Bitcoin to custody BTC deposits. When the system needs to change who controls this wallet - either by rotating keys or changing the signer set - it uses the rotation mechanism.
108

11-
## Process
9+
As of v1.1.0, the system supports:
1210

13-
1. Signers coordinate offline to initiate the key rotation process.
14-
2. Signers vote on-chain for the new signer set (new set of keys).
15-
3. Once the new signer set is determined, signers conduct a wallet handoff.
16-
4. The signers re-execute the Distributed Key Generation (DKG) process.
11+
- Adding new signers to the set
12+
- Removing existing signers
13+
- Replacing specific signers
14+
- Rotating keys for current signers
1715

18-
## Implementation
16+
When signers agree on a new configuration, the system automatically runs a Distributed Key Generation (DKG) protocol to create new signing shares for the updated group. Once complete, control of the sBTC wallet transfers to the new configuration.
1917

20-
The Signer Wallet Rotation process is facilitated by:
18+
## The rotation process
2119

22-
1. **Signer Key Rotation CLI**: Allows individual signers to initiate a private key rotation.
23-
2. **Key Rotation Clarity Contracts**: Handle the on-chain aspects of the rotation process.
20+
Here's what happens during a typical rotation:
2421

25-
## Security Considerations
22+
1. Signers coordinate off-chain to decide on the new signer set
23+
2. Each signer operator updates their configuration with the newly decided set
24+
3. Once all signers have configured the exact same set of signers, DKG occurs automatically
25+
4. The new signer set takes control of the sBTC wallet
2626

27-
- The rotation process must ensure that the sBTC UTxO remains secure throughout the transition.
28-
- Proper coordination among signers is crucial to prevent any disruption in sBTC operations.
29-
- The new keys must be thoroughly verified before being put into use.
27+
The Bitcoin UTXOs remain under continuous control throughout this process - there's no moment where funds are unsecured.
3028

31-
## Benefits
29+
## When rotation occurs
3230

33-
1. **Enhanced Security**: Regular key rotations reduce the risk of key compromise.
34-
2. **Flexibility**: Allows for the replacement of compromised or lost keys.
35-
3. **Continuity**: Enables long-term operation of the sBTC system with evolving security measures.
31+
Key rotation typically happens when:
3632

37-
## Best Practices
33+
**Signer changes**: When someone leaves the signer set or new participants join, the configuration must be updated to reflect the new membership.
3834

39-
- Signers should rotate their keys on a regular schedule (e.g., every 6 months).
40-
- Emergency rotation procedures should be in place for suspected key compromises.
41-
- The rotation process should be audited and tested regularly to ensure smooth execution when needed.
35+
**Security events**: If a key might be compromised, an emergency rotation can be initiated to secure the system.

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

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,18 @@ You will need `bitcoind` version 25 or higher.
5050

5151
Your Bitcoin node must include these settings for sBTC signer operation:
5252

53-
- `txindex=1`: Transaction indexing must be enabled
54-
- `server=1`: RPC server must be enabled
55-
- `zmqpubhashblock=tcp://*:28332`: ZMQ block hash notifications
56-
- `zmqpubrawblock=tcp://*:28332`: ZMQ raw block notifications
53+
- `txindex=1`: Transaction indexing must be enabled
54+
- `server=1`: RPC server must be enabled
5755

58-
### ZeroMQ (ZMQ) Configuration
56+
### RPC-Based Block Detection
5957

60-
The ZeroMQ configuration specified above enables real-time blockchain event
61-
notifications from Bitcoin Core to the sBTC signer.
58+
Starting with sBTC v1.1.0, the signer uses RPC polling instead of ZeroMQ for
59+
block detection.
6260

63-
The two required ZMQ endpoints serve distinct purposes:
64-
65-
- `zmqpubhashblock`: Broadcasts only block hashes for lightweight block
66-
detection
67-
- `zmqpubrawblock`: Broadcasts complete block data for transaction processing
68-
69-
This notification system creates a direct event stream when:
61+
The signer connects to Bitcoin Core via RPC and polls for new bitcoin blocks. This process works as follows:
7062

7163
1. Bitcoin Core validates a new block
72-
1. Block data publishes via ZMQ
64+
1. Signer detects the block via RPC polling
7365
1. Signer processes relevant sBTC transactions
7466

7567
### Example
@@ -84,9 +76,7 @@ bitcoind \
8476
-rpcport=${BITCOIN_RPC_PORT} \
8577
-rpcallowip=0.0.0.0/0 \
8678
-rpcallowip=::/0 \
87-
-txindex \
88-
-zmqpubhashblock="tcp://*:${BITCOIN_ZMQ_PORT}" \
89-
-zmqpubrawblock="tcp://*:${BITCOIN_ZMQ_PORT}"
79+
-txindex
9080
```
9181

9282
## 2. Configure your Stacks node
@@ -113,7 +103,6 @@ events_keys = [
113103
See
114104
[here](https://github.com/stacks-network/sbtc/blob/main/docker/mainnet/nodes/stacks/Config.toml.in).
115105

116-
117106
## 3. Configure your sBTC Signer
118107

119108
The signer configuration file (`signer-config.toml`) defines the signer's
@@ -133,7 +122,8 @@ Defines how the signer connects to Bitcoin Core:
133122
```toml
134123
[bitcoin]
135124
rpc_endpoints = ["http://user:pass@your-bitcoin-node:8332"]
136-
block_hash_stream_endpoints = ["tcp://localhost:28332"]
125+
# Note: block_hash_stream_endpoints are no longer used as of v1.1.0
126+
# The signer now uses RPC polling for block detection
137127
```
138128

139129
### Core Signer Parameters
@@ -172,6 +162,13 @@ See
172162
[here](https://github.com/stacks-network/sbtc/blob/main/docker/mainnet/docker-compose.yml)
173163
for a Docker Compose including all the required components.
174164

165+
{% hint style="warning" %}
166+
167+
When deploying with Docker, always use [immutable image tags](https://docs.docker.com/reference/cli/docker/image/pull/#pull-an-image-by-digest-immutable-identifier) - the image digests are provided below. Verify the attestation of these images using this [guide](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds#verifying-artifact-attestations-with-the-github-cli).
168+
169+
We publish our images on [GitHub Container Registry](https://github.com/stacks-sbtc/sbtc/pkgs/container/sbtc).
170+
{% endhint %}
171+
175172
## Monitoring
176173

177174
Monitoring Details TBD

0 commit comments

Comments
 (0)