Stratum v2 Template Provider common functionality#49
Stratum v2 Template Provider common functionality#49Sjors wants to merge 9 commits into2024/06/sv2_connectionfrom
Conversation
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
91ea715 to
4c07541
Compare
|
Rebased after bitcoin#31325, bitcoin#31581. The rebase includes bitcoin#31376 which ensures that new templates account for the timewarp rule (important on testnet4 because of the MTP drift). The rebase also includes bitcoin#31583 which makes Using the latest version of bitcoin#31283 which has In anticipation of bitcoin#31384 I changed the |
6da01f6 to
deb8e90
Compare
4c07541 to
0d588c2
Compare
|
Rebased and included #45 / stratum-mining/sv2-spec#86. |
deb8e90 to
903fe1a
Compare
0d588c2 to
33d42ff
Compare
903fe1a to
7fb1a19
Compare
|
Possible thread issue, found by CI in #68: https://cirrus-ci.com/task/5072000852426752?logs=ci#L3303 |
|
Rebased after bitcoin#31384. |
|
Rebased in hopes of making #80 magically go away. |
|
I squashed 4c132d067586ede434f6d28d40b7de9d666efa9e "Incrementally update sv2 block template" into 61eeca1fc63779f5b22017db48bcb5d9d2d1404d "Sv2: construct and submit block templates" and then refactored the combined commit ad3120b to fix #80. Every client now has its own thread in the TemplateProvider. It could be improved further, e.g. the handshake is blocking and we're not using optimistic send, but I'm going to wait to see what @theuni comes up with in terms of an alternative approach to Connman. |
|
Occasional failing on CentOS probably means the tests need to be made more robust. https://cirrus-ci.com/task/5262823086882816 |
|
Rebased after bitcoin#31785 landed, which completes the interface changes needed for the Template Provider. Dropped the use of |
|
CI fails because since bitcoin#29307 we have to |
|
Note to self for the next update, apply: diff --git a/src/sv2/template_provider.cpp b/src/sv2/template_provider.cpp
index a4331c6cb3..d83b86be69 100644
--- a/src/sv2/template_provider.cpp
+++ b/src/sv2/template_provider.cpp
@@ -66,7 +66,7 @@ Sv2TemplateProvider::Sv2TemplateProvider(interfaces::Mining& mining) : m_mining{
version_pubkey_bytes[1] = 0;
m_authority_pubkey = XOnlyPubKey(authority_key.GetPubKey());
std::copy(m_authority_pubkey.begin(), m_authority_pubkey.end(), version_pubkey_bytes.begin() + 2);
- LogInfo("Template Provider authority key: %s\n", EncodeBase58Check(version_pubkey_bytes));
+ LogPrintLevel(BCLog::SV2, BCLog::Level::Info, "Template Provider authority key: %s\n", EncodeBase58Check(version_pubkey_bytes));
LogTrace(BCLog::SV2, "Authority key: %s\n", HexStr(m_authority_pubkey)); |
|
Last rebase before I'm going to split off the sv2 functionality into a fresh codebase. |
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 <chris.coverdale24@gmail.com> Co-Authored-By: Fi3
Co-authored-by: Christopher Coverdale <chris.coverdale24@gmail.com>
Incrementally update the template.
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
On by default. Allow Stratum v2 miners to opt out, pending more discussion on the BIP.
|
This code is now part of https://github.com/Sjors/sv2-tp; feedback and pull requests are welcome there! |
Moved from bitcoin#30475.
Based on:
And the following interface changes:
As well as:
-coinbaselocktime=0This contains all Template Provider functionality that can be used by both #68 and the IPC based sidecar alternative #48.