Skip to content

Fix payout verification for split coinbase scriptSig - #614

Merged
GitGab19 merged 2 commits into
stratum-mining:mainfrom
GitGab19:improve-payout-verification
Jul 13, 2026
Merged

Fix payout verification for split coinbase scriptSig#614
GitGab19 merged 2 commits into
stratum-mining:mainfrom
GitGab19:improve-payout-verification

Conversation

@GitGab19

Copy link
Copy Markdown
Member

This is a follow-up PR to #497.

The main problem this solves is the payout verification on NewExtendedMiningJob messages which contain the last part of the scriptSig in the coinbase_tx_suffix, instead of having it entirely in the coinbase_tx_prefix.

I checked on the specs, and there's no mention to the fact that a coinbase_tx_suffix has to start with nSequence bytes, which was the assumption used by the mechanism introduced in #497.

I also added a new entry into the translator_mines_when_payout_matches_address_or_donation_identity IT to ensure we correctly deal with such cases.

The issue has been found while testing our tProxy against NexusPool endpoint, and this PR fixes that.

@GitGab19
GitGab19 requested a review from plebhash July 13, 2026 12:12
@plebhash

Copy link
Copy Markdown
Member

LGTM, but we should bump stratum-apps and translator_sv2

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. After Plebhash's comment on version bumps.

GitGab19 added 2 commits July 13, 2026 16:50
Decode the reconstructed coinbase transaction before checking outputs,
using prefix + zeroed extranonce + suffix instead of assuming the suffix
starts with outputs. Add coverage for NexusPool-style suffix scriptSig bytes.
@GitGab19
GitGab19 force-pushed the improve-payout-verification branch from 3546b87 to 69e6201 Compare July 13, 2026 14:50
@GitGab19
GitGab19 marked this pull request as draft July 13, 2026 14:55
@GitGab19

Copy link
Copy Markdown
Member Author

Turned this into draft since I want to discuss more about the version bumps we need to do here before merging this.

@GitGab19
GitGab19 marked this pull request as ready for review July 13, 2026 15:27
@GitGab19

Copy link
Copy Markdown
Member Author

Ok, I confirmed with @plebhash that the bumps are correct.

@GitGab19
GitGab19 merged commit 26e4bba into stratum-mining:main Jul 13, 2026
11 checks passed
@GitGab19
GitGab19 deleted the improve-payout-verification branch July 13, 2026 15:40
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.

3 participants