File tree Expand file tree Collapse file tree 7 files changed +281
-14
lines changed
Expand file tree Collapse file tree 7 files changed +281
-14
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,18 @@ jdc_signature = "Sv2MinerSignature"
3535# https://github.com/bitcoin/bips/blob/master/bip-0380.mediawiki#appendix-b-index-of-script-expressions
3636# Although the `musig` descriptor is not yet supported and the legacy `combo` descriptor never
3737# will be. If you have an address, embed it in a descriptor like `addr(<address here>)`.
38+ #
39+ # For automatic address rotation (quantum-resistant payout hygiene), use a wildcard descriptor:
40+ # coinbase_reward_script = "wpkh(tpub.../0/*)"
41+ # This derives a fresh address for each block found. Requires coinbase_index_file.
3842coinbase_reward_script = " addr(tb1qpusf5256yxv50qt0pm0tue8k952fsu5lzsphft)"
3943
44+ # Coinbase rotation settings (only used when coinbase_reward_script has a wildcard)
45+ # Path to persist the current derivation index (required for rotation)
46+ # coinbase_index_file = "/var/lib/jdc/coinbase_index.dat"
47+ # Starting index if no persistence file exists (default: 0)
48+ # coinbase_start_index = 0
49+
4050# Enable this option to set a predefined log file path.
4151# When enabled, logs will always be written to this file.
4252# The CLI option --log-file (or -f) will override this setting if provided.
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ pub struct JobDeclaratorClientConfig {
8181fn default_monitoring_cache_refresh_secs ( ) -> u64 {
8282 15
8383}
84- }
8584
8685impl JobDeclaratorClientConfig {
8786 #[ allow( clippy:: too_many_arguments) ]
Original file line number Diff line number Diff line change @@ -132,9 +132,7 @@ impl JobDeclaratorClient {
132132 monitoring_addr,
133133 Some ( Arc :: new ( channel_manager. clone ( ) ) ) , // SV2 channels opened with servers
134134 Some ( Arc :: new ( channel_manager. clone ( ) ) ) , // SV2 channels opened with clients
135- std:: time:: Duration :: from_secs (
136- self . config . monitoring_cache_refresh_secs ( ) . unwrap_or ( 15 ) ,
137- ) ,
135+ std:: time:: Duration :: from_secs ( self . config . monitoring_cache_refresh_secs ( ) ) ,
138136 )
139137 . expect ( "Failed to initialize monitoring server" ) ;
140138
@@ -504,7 +502,7 @@ impl JobDeclaratorClient {
504502 monitoring_addr,
505503 Some ( Arc :: new( channel_manager_clone. clone( ) ) ) ,
506504 Some ( Arc :: new( channel_manager_clone. clone( ) ) ) ,
507- std:: time:: Duration :: from_secs( self . config. monitoring_cache_refresh_secs( ) . unwrap_or ( 15 ) ) ,
505+ std:: time:: Duration :: from_secs( self . config. monitoring_cache_refresh_secs( ) ) ,
508506 )
509507 . expect( "Failed to initialize monitoring server" ) ;
510508
Original file line number Diff line number Diff line change @@ -8,8 +8,18 @@ listen_address = "0.0.0.0:43333"
88# https://github.com/bitcoin/bips/blob/master/bip-0380.mediawiki#appendix-b-index-of-script-expressions
99# Although the `musig` descriptor is not yet supported and the legacy `combo` descriptor never
1010# will be. If you have an address, embed it in a descriptor like `addr(<address here>)`.
11+ #
12+ # For automatic address rotation (quantum-resistant payout hygiene), use a wildcard descriptor:
13+ # coinbase_reward_script = "wpkh(tpub.../0/*)"
14+ # This derives a fresh address for each block found. Requires coinbase_index_file.
1115coinbase_reward_script = " addr(tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8)"
1216
17+ # Coinbase rotation settings (only used when coinbase_reward_script has a wildcard)
18+ # Path to persist the current derivation index (required for rotation)
19+ # coinbase_index_file = "/var/lib/pool/coinbase_index.dat"
20+ # Starting index if no persistence file exists (default: 0)
21+ # coinbase_start_index = 0
22+
1323# Server Id (number to guarantee unique search space allocation across different Pool servers)
1424server_id = 1
1525
Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ pub struct PoolConfig {
4848 monitoring_address : Option < SocketAddr > ,
4949 #[ serde( default = "default_monitoring_cache_refresh_secs" ) ]
5050 monitoring_cache_refresh_secs : u64 ,
51+ #[ serde( default ) ]
52+ jds : Option < JDSPartialConfig > ,
5153
5254 /// Starting derivation index for coinbase rotation (default: 0).
5355 ///
5456 /// Only used when `coinbase_reward_script` contains a wildcard descriptor
5557 /// (e.g., `wpkh(xpub.../0/*)`). Ignored for static addresses.
5658 #[ serde( default ) ]
57- jds : Option < JDSPartialConfig > ,
58- monitoring_cache_refresh_secs : Option < u64 > ,
5959 coinbase_start_index : u32 ,
6060
6161 /// Path to persist the current coinbase derivation index.
@@ -72,7 +72,6 @@ pub struct PoolConfig {
7272fn default_monitoring_cache_refresh_secs ( ) -> u64 {
7373 15
7474}
75- }
7675
7776impl PoolConfig {
7877 /// Creates a new instance of the [`PoolConfig`].
Original file line number Diff line number Diff line change @@ -171,9 +171,7 @@ impl PoolSv2 {
171171 monitoring_addr,
172172 None , // Pool doesn't have channels opened with servers
173173 Some ( Arc :: new ( channel_manager. clone ( ) ) ) , // channels opened with clients
174- std:: time:: Duration :: from_secs (
175- self . config . monitoring_cache_refresh_secs ( ) . unwrap_or ( 15 ) ,
176- ) ,
174+ std:: time:: Duration :: from_secs ( self . config . monitoring_cache_refresh_secs ( ) ) ,
177175 )
178176 . expect ( "Failed to initialize monitoring server" ) ;
179177
You can’t perform that action at this time.
0 commit comments