Skip to content

send CoinbaseOutputConstraints based on PlebLotteryMiningServerConfig.coinbase_output_script#26

Merged
plebhash merged 3 commits intomainfrom
issue-24
Sep 5, 2025
Merged

send CoinbaseOutputConstraints based on PlebLotteryMiningServerConfig.coinbase_output_script#26
plebhash merged 3 commits intomainfrom
issue-24

Conversation

@lucasbalieiro
Copy link
Copy Markdown
Collaborator

@lucasbalieiro lucasbalieiro commented Jun 15, 2025

closes #24

  • PlebLotteryTemplateDistributionClientConfig now includes a cloned instance of PlebLotteryMiningServerConfig to perform coinbase constraint message calculations.
  • Calculations use total_sigops_cost counts from the bitcoin crate.
  • Added tests to cover the updated logic.
  • Reorganized config.rs to group related operations together for better structure and readability.

@lucasbalieiro lucasbalieiro requested a review from plebhash June 15, 2025 16:30
@lucasbalieiro lucasbalieiro marked this pull request as ready for review June 15, 2025 16:30
@lucasbalieiro lucasbalieiro force-pushed the issue-24 branch 2 times, most recently from 808d6dc to 55a87fb Compare June 15, 2025 17:23
@lucasbalieiro
Copy link
Copy Markdown
Collaborator Author

rebased to catch up with main

Removed unnecessary Deserialize impl.

changed coinbase_output_max_additional_size calculation to get it from a TxOut not a scriptbuff

@plebhash plebhash closed this Jun 19, 2025
@plebhash plebhash deleted the issue-24 branch June 19, 2025 16:21
@lucasbalieiro lucasbalieiro restored the issue-24 branch August 14, 2025 16:39
@lucasbalieiro
Copy link
Copy Markdown
Collaborator Author

@plebhash, resurrected this PR but now with changes to the sigops calculation based on our understand on stratum-mining/stratum#1838

@plebhash plebhash merged commit a6daeff into main Sep 5, 2025
3 checks passed
@plebhash plebhash deleted the issue-24 branch September 5, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

send CoinbaseOutputConstraints based on PlebLotteryMiningServerConfig.coinbase_output_script

2 participants