Repository navigation
3.x.x: allocate extranonce on subscribe and make the session sequence wrap-safe - #305
Merged
Merged
Conversation
Co-Authored-By: OpenAI Codex <[email protected]>
Member
Author
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4769888. Configure here.
Member
Author
|
Deep-review reached its terminal state at
This PR is ready for maintainer review/merge as the lazy-allocation slice. It remains |
This was referenced Sep 11, 2026
8 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allocate the existing four-byte extranonce when a connection first sends a valid
mining.subscribe. Connect-only traffic, health/configuration requests and authorization before subscription consume no shared sequence values. Repeated subscriptions reuse the allocated value; failed allocation leaves the connection unsubscribed. Connection errors use structured tracing.Refs #276. This is the lazy-allocation slice. Wrap-safe allocation and its collision/expiry/concurrent-frontend tests remain; this PR does not close #276. The wider IP/request budgets are P2.
Target:
3.x.x, directly and independently of #280. Rebased ontof394427, including the ledger ownership split and merged #299. No VERSION or CHANGELOG changes. The four-byte wire value and existing database allocator remain unchanged.The initial-job lifetime now starts at connection setup, so allocation time counts toward it. A full allocation timeout can consume that lifetime and close the connection after its error response; reconnect obtains a fresh value. The change does not reset or extend that timer.
Validation on the rebased branch:
(1, false); the first real subscription changed it to(1, true). CI invokes the test explicitly, and explicit invocation without a DSN fails.Documentation explains the subscription state, failure/timeout behavior, independent qualification and remaining wrap-safety work, with a link from the native README. All four local deep-review lanes found no actionable issue after rebase and qualification. GitHub deep-review is complete: 12 checks passed (including Cursor), no failures or pending checks, and no actionable review findings. The optional autofix check is disabled/skipped. See the terminal review comment for the ledger and lane limitations.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.