Enable SOLO mining mode on our Pool #135#269
Enable SOLO mining mode on our Pool #135#269therohityadav wants to merge 1 commit intostratum-mining:mainfrom
Conversation
|
https://github.com/average-gary/sv2-apps/tree/feat/public-solo-mode |
| } | ||
| } | ||
| } else { | ||
| self.coinbase_reward_script.script_pubkey().clone() |
There was a problem hiding this comment.
Wouldn't this just be self for Channel manager? I would think you want per Channel address and not for the broader Pool Channel Manager.
There was a problem hiding this comment.
Wouldn't this just be self for Channel manager? I would think you want per Channel address and not for the broader Pool Channel Manager.
You are correct that for Solo Mining we need the per-channel address. That logic is handled in the if block immediately above this.
This specific line is inside the else block, which handles Standard Mining. In Standard mode, the coinbase reward must go to the Pool's global wallet (self.coinbase_reward_script) so the pool can collect the funds and distribute shares later.
|
Can you resolve conflicts @therohityadav ? |
GitGab19
left a comment
There was a problem hiding this comment.
Can you add solo_mining parameter to Pool's config files?
Also, this PR still needs to check the solo mining mode in the handle_new_template and handle_set_new_prev_hash methods, since it's currently using the Pool's address there yet.
| required_extensions, | ||
| monitoring_address: None, | ||
| monitoring_cache_refresh_secs: 15, | ||
| solo_mining: false, |
There was a problem hiding this comment.
Why did you set this to false here?
| #[serde(default = "default_monitoring_cache_refresh_secs")] | ||
| monitoring_cache_refresh_secs: u64, | ||
| } | ||
|
|
| error!("SOLO Mining Error: Invalid address '{}' provided by user. Fallback to pool reward address.", user_identity); | ||
| self.coinbase_reward_script.script_pubkey().clone() |
There was a problem hiding this comment.
Here we should disconnect the the client, instead of doing fallback to pool's address.
| error!("SOLO Mining Error: Invalid address '{}' provided by user. Fallback to pool reward address.", user_identity); | ||
| self.coinbase_reward_script.script_pubkey().clone() |
There was a problem hiding this comment.
Here we should disconnect the the client, instead of doing fallback to pool's address.
|
Closing in favor of #321 |
Summary
Implemented the SOLO mining mode as requested in issue #135. This feature allows the pool to be toggled between standard and solo payout modes. When enabled, block rewards are redirected from the pool’s wallet to the Bitcoin address provided by the miner in the
user_identitystring.Technical Breakdown
solo_miningboolean toPoolConfigand updated theChannelManagerto track this state.mining_message_handler.rsto dynamically swap payout addresses in the coinbase transaction for both standard and extended mining channels.assume_checked()when parsing miner addresses to resolve network-validation errors in therust-bitcoinlibrary.capnproto.Verification
poolcrate.cargo fmt.Note: I am aware of the merge conflict shown in the UI and will rebase if required by the maintainers.