Skip to content

stratum: a second mining.authorize pays the new address at once - #105

Open
asilgulsar1 wants to merge 1 commit into
LayerTwo-Labs:mainfrom
asilgulsar1:reauth-coinbase
Open

asilgulsar1 wants to merge 1 commit into
LayerTwo-Labs:mainfrom
asilgulsar1:reauth-coinbase

Conversation

@asilgulsar1

Copy link
Copy Markdown

We run simplepool in solo mode for eCash.com (ECX, BIP300/301) behind the CUSF enforcer. These came out of a review of the solo path before we rely on it.

handle_authorize replaced payout_address but kept cb_for_job_id. Until the next job, the cached coinbase for the current job, which pays the previous address, was handed out again and used to validate submits. Meanwhile shares and the blocks_found finder were recorded under the new address. This matters for proxies that authorize several users on one socket. The address is now switched under cb_lock, and the cache is dropped at the same time.

Test: test_reauthorize_pays_new_address (coinb2 must change after the second authorize).

Tested: make test passes on this branch alone, and the new test fails on main without the fix. This PR is independent of the five others opened alongside it, and all six merge together cleanly. Happy to add a CHANGELOG entry if you'd like one.

🤖 Generated with Claude Code

handle_authorize replaced payout_address but kept cb_for_job_id, so the
cached coinbase for the current job, which pays the previous address, was
handed out again (and used to validate submits) until the next job. Shares
and the blocks_found finder were recorded under the new address meanwhile.
The address is now switched under cb_lock and the cache dropped with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant