fix(stratum): Prevent share submissions with timestamps older than 2 …#131
Open
average-gary wants to merge 1 commit intobenjamin-wilson:masterfrom
Open
fix(stratum): Prevent share submissions with timestamps older than 2 …#131average-gary wants to merge 1 commit intobenjamin-wilson:masterfrom
average-gary wants to merge 1 commit intobenjamin-wilson:masterfrom
Conversation
…hours - Add timestamp validation for share submissions - Reject shares with timestamps older than 2 hours - Log rejected share details for debugging - Prevent potential Bitcoin Core time-too-old errors - Ensure submitted timestamps are within a reasonable time window
Author
Contributor
|
Technically, a submitted block should have a timestamp greater than the median time past of the previous block (not a fixed 2 hours), see: https://github.com/bitcoin/bitcoin/blob/90b2884ce4ba0121ba3800e21f9f00583aef4ecf/src/validation.cpp#L4189 If it's possible to get the MTP and use that, I'd prefer that. Else, if this works for testnet4 and there are no other objections, utACK for me. |
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.

…hours
Am running https://github.com/stratum-mining/benchmarking-tool and encountered an issue when hashing on public-pool. Because testnet4 has some timewarp shenanigans, the clock time is off and public-pool was not handling this well. I made this patch and now have mined 10 blocks on testnet4 with the patch.