forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stratum v2 Template Provider common functionality #49
Open
Sjors
wants to merge
16
commits into
2024/06/sv2_connection
Choose a base branch
from
2024/07/sv2-tp-common
base: 2024/06/sv2_connection
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
This was referenced Jul 19, 2024
3cf779b
to
b549fd6
Compare
6894e23
to
fc6ac1e
Compare
Updated to the latest interface changes proposed in bitcoin#30409 and #53. |
b549fd6
to
22d033c
Compare
491755c
to
16d2381
Compare
4f957ee
to
b69544c
Compare
ca73422
to
4fa25e0
Compare
Rebased for CMake |
One test still seems brittle:
|
b69544c
to
1ca68d2
Compare
1f720ff
to
1912743
Compare
1ca68d2
to
b578e0a
Compare
598f08a
to
436dc4d
Compare
Moved |
436dc4d
to
46fa8f1
Compare
b578e0a
to
489c9fb
Compare
7db898e
to
765af74
Compare
deb8e90
to
903fe1a
Compare
0d588c2
to
33d42ff
Compare
903fe1a
to
7fb1a19
Compare
33d42ff
to
96bc151
Compare
7fb1a19
to
2503578
Compare
96bc151
to
6b5dfc5
Compare
Possible thread issue, found by CI in #68: https://cirrus-ci.com/task/5072000852426752?logs=ci#L3303 |
2503578
to
360aedd
Compare
6b5dfc5
to
fe053b0
Compare
Rebased after bitcoin#31384. |
360aedd
to
49ea07a
Compare
This was preventing the (hidden) waitfornewblock, waitforblock and waitforblockheight methods from being used in the GUI. The check was added in d6a5dc4 when these RPC methods were first introduced. They could have been dropped when dca9231 refactored these methods to use waitTipChanged(), which already checks for shutdown. Making this change now simplifies the next commit.
The waitTipChanged() now returns nullopt if the node is shutting down. Previously it would return the last known tip during shutdown, but this creates an ambiguous circumstance in the scenario where the node is started and quickly shutdown, before notifications().TipBlock() is set. The getblocktemplate, waitfornewblock and waitforblockheight RPC are updated to handle this. Existing behavior is preserved. Co-authored-by: Ryan Ofsky <[email protected]>
Additionally it returns null if the node started to shutdown before TipBlock() was set.
Move the comparison to hashWatchedChain inside the while loop. Although this early return prevents the GetTransactionsUpdated() call in cases where the tip updates, it's only done to improve readability. The check itself is very cheap (although a more useful check might not be). Also add code comments.
On testnet we need to create a min diff template after 20 min.
The template provider will listen for a Job Declarator client. It can establish a connection and detect various protocol errors. Co-Authored-By: Christopher Coverdale <[email protected]> Co-Authored-By: Fi3
Co-authored-by: Christopher Coverdale <[email protected]>
Determine future_template only once
Co-authored-by: Vasil Dimov <[email protected]>
fe053b0
to
5c3f9cb
Compare
Rebased in hopes of making #80 magically go away. |
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.
Moved from bitcoin#30475.
Based on:
And the following interface changes:
This contains all Template Provider functionality that can be used by both #68 and the IPC based sidecar alternative #48.