Skip to content

Per-pool share-warning toggle and aggregate large coinbase outputs#1678

Open
warioishere wants to merge 2 commits into
bitaxeorg:masterfrom
warioishere:feature/share-warning-and-many-outputs
Open

Per-pool share-warning toggle and aggregate large coinbase outputs#1678
warioishere wants to merge 2 commits into
bitaxeorg:masterfrom
warioishere:feature/share-warning-and-many-outputs

Conversation

@warioishere

@warioishere warioishere commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

I'm working on new minings modes for blitzpool (currently in testing) that pays miners directly via the coinbase tx — Group-Solo / PPLNS, with the share going straight to each miner's address instead of accumulating at the pool. Ocean is the only other pool I'm aware of that splits the reward across many outputs the same way. PPLNS is not the real intention to her but the Group-Solo Mode might be interessting for some group Pleb Miners that dont want to trust a single admin or a pair of admins managing a multisig wallet.

Two things break on the Bitaxe dashboard when mining on a pool like that:

  • The "your share is only X%" warning fires on every block. It's literally correct, but on a direct-payout pool it's expected behaviour, not a problem.
  • The decoder caps the output list at 6 entries. With 20–30 payout outputs in a single coinbase, the user's own output sometimes isn't even in the list.

This PR addresses both. Defaults are unchanged for normal solo / fee-based pools.

Share warning toggle

  • New per-pool checkbox under Advanced Options → "Share Warning".
  • Surfaced in /api/system/info as stratumShareWarning / fallbackStratumShareWarning.
  • Default true, so existing users see no change.
  • The dashboard's NOT_SOLO_MINING / NO_MINING_REWARD messages now check the active pool (primary vs fallback) and only fire if its toggle is on.

Larger output list with smart fill

  • MAX_COINBASE_TX_OUTPUTS raised from 6 to 32.
  • For txs with even more outputs, the decoder keeps the user's payout output and the highest-value entries; the rest is folded into a new "others" bucket (coinbaseOthersCount + coinbaseOthersValueSatoshis). OP_RETURN / witness commitment outputs are never evicted.
  • Total and user-value sums are still computed across all outputs, so the share percentage stays accurate.

Dashboard changes

  • The user's payout output is moved to the top of the list so it's always visible.
  • The list is capped at 5 visible rows — anything beyond that is rolled into a + N other recipient(s) summary line with the aggregated value. Includes outputs that fit in the array but didn't make the visible cap, plus any server-side overflow from coinbaseOthersCount.

Things I'm happy to change if you want it different

  • MAX = 32 is a round number that fits comfortably for the pools I know of. Could go higher or be made dynamic against PSRAM. Costs ~3.7 KB extra in GlobalState.
  • Visible row cap = 5 was picked so the Block Header card stays compact. Could be 4, 6, or made configurable.
  • I went with an explicit toggle because behaviour is predictable. An auto-detect ("more than N outputs and user is one of them → suppress") is also possible and would need no UI, but it's harder for the user to understand why the warning disappeared.
  • Reordering the user output to the top applies to all pools, not just PPLNS. Small UX win in general; can be hidden behind the toggle or skipped if you'd rather keep TX order.

Builds fine.

@github-actions

github-actions Bot commented Apr 26, 2026

Copy link
Copy Markdown

Test Results

 2 files  ±0   2 suites  ±0   0s ⏱️ ±0s
88 tests +5  88 ✅ +5  0 💤 ±0  0 ❌ ±0 
90 runs  +5  90 ✅ +5  0 💤 ±0  0 ❌ ±0 

Results for commit 7b1d73f. ± Comparison against base commit bba9e6a.

♻️ This comment has been updated with latest results.

@mutatrum

Copy link
Copy Markdown
Collaborator

Screenshots please 🙂

I run blitzpool, which is rolling out a new payout mode (currently in testing)
that pays miners directly via the coinbase tx -- PPLNS / group solo with the
share going straight to each miner's address. Ocean is the only other pool I'm
aware of that also splits the reward across many outputs. On this kind of pool
the dashboard's "your share is only X%" warning fires constantly because the
reward is split across many addresses, and the output list gets truncated so
the user's own payout is sometimes not even visible.

Share warning toggle
- New per-pool setting under Advanced Options ("Share Warning"), exposed via
  /api/system/info as stratumShareWarning / fallbackStratumShareWarning.
- Default is true, so existing behavior is preserved.
- The dashboard's NOT_SOLO_MINING / NO_MINING_REWARD warnings respect the
  setting of the currently active pool (primary or fallback).

Output limit and aggregation
- MAX_COINBASE_TX_OUTPUTS raised 6 -> 32 to cover typical PPLNS payout sizes.
- For txs with even more outputs than that, the decoder keeps the user's payout
  and the highest-value entries; the rest is folded into a new "others" bucket
  (coinbaseOthersCount + coinbaseOthersValueSatoshis). OP_RETURN / witness
  commitment outputs are never evicted. Total and user-value sums were already
  computed across all outputs, so the share percentage stays accurate.

Dashboard
- The user's payout output is moved to the top of the list so it's always
  visible without scrolling.
- A "+ N other recipient(s)" row at the bottom shows the aggregated remainder
  for txs with more outputs than fit in the array.
@warioishere warioishere force-pushed the feature/share-warning-and-many-outputs branch from 5769271 to b5777d1 Compare April 30, 2026 07:02
@warioishere

Copy link
Copy Markdown
Contributor Author

I also removed the red coloring when the share warning is disabled, and reduced MAX_COINBASE_TX_OUTPUTS back to 8, as we now only show 4 outputs and aggregated the rest so the card hight doesnt expand. Not sure if this is the best idea, maybe people want to see all outputs?

image image

@mutatrum

mutatrum commented May 4, 2026

Copy link
Copy Markdown
Collaborator

By having 2 separate max_item values the aggregation code is duplicated between frontend and backend. It's probably simpler to just keep it to the backend, at least for now. A cherry-on-top change would be to adjust the number of visible items on the frontend based on the size of the card, but that would be outside the scope of this PR.

Per review feedback, drop the duplicated aggregation logic in the
frontend. MAX_COINBASE_TX_OUTPUTS is now the single cap (4): the
backend smart-fills up to 4 outputs (user output guaranteed) and
aggregates everything else into coinbaseOthersCount /
coinbaseOthersValueSatoshis. The dashboard just renders what it
receives plus the "+ N other recipients" row from those fields.
@warioishere

Copy link
Copy Markdown
Contributor Author

you are right, MAX_COINBASE_TX_OUTPUTS ist the single soure now.

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.

2 participants