Skip to content

Conversation

@average-gary
Copy link

…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

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.

…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
@average-gary
Copy link
Author

image Error I was seeing on the node connected to public pool.

@remcoros
Copy link
Contributor

remcoros commented Oct 9, 2025

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.

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.

2 participants