Conversation
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.
Closes #2346.
Each submitted solution validates each attempted mining candidate once and reuses that result. If the current solution is invalid and no previous candidate exists, the generator now returns a normal error with the PoW failure reason and cause, preserving the current candidate for later valid work. It no longer restarts on
cachedPreviousCandidate.get.A previous candidate is validated before block publication. If both candidates reject, the existing cache-clearing behavior is preserved. The previous-candidate log is emitted only when that candidate exists.
Review increments
Integration
This PR targets
master; #2429 targetsv6.0.7. Both now handle an absent previous candidate. Preserve that protection and this PR's single-validation behavior when integrating the overlapping changes.The cumulative diff still includes shared H/D/R support from #2535, G synchronization changes from #2511, and X cache wake-up from #2549. Integrate R before G and the relevant shared increments before the PoW change. The entire #2535 branch is not a prerequisite of #2511. See the tracker for integration order.
GitHub currently reports conflicts with
master. This focused update does not rebase the shared changes.Validation
At
36cff18ca, local Scala 2.12.20 / JDK 17 validation covers 47 distinct tests: 37 candidate-generation/property cases and 10 mining API cases. After strengthening cause and announcement assertions, the four affected actor cases were rerun and passed; unchanged coverage was reused.The new first-solution regression fails on
1fa1076e9withNone.getand an absent normal reply. It now verifies the error cause, retained cached-object identity, no block publication on rejection, and successful subsequent submission. The fallback cases check both valid and invalid previous solutions, publication behavior, and one validation per attempted header.Independent source review of the exact production and test increment found no remaining blockers. No current-head CI run is available yet; the preceding head's eight green checks do not validate this commit.