Skip to content
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

Add max coinbase out sigops to CoinbaseOutputDataSize #45

Open
wants to merge 37 commits into
base: sv2
Choose a base branch
from

Conversation

Sjors
Copy link
Owner

@Sjors Sjors commented Jun 18, 2024

Implements stratum-mining/sv2-spec#86 for the Template Provider.

Sjors and others added 23 commits June 18, 2024 19:10
Co-Authored-By: Christopher Coverdale <[email protected]>
Start out with a single method isTestChain() that's used by the getblocktemplate RPC.
This makes the options argument for BlockAssembler constructor mandatory,
dropping implicit use of ArgsManager. The caller i.e. the Mining
interface implementation now handles this.

In a future Stratum v2 change the Options object needs to be
mofified after arguments have been processed. Specifically
the pool communicates how many extra bytes it needs for
its own outputs (payouts, extra commitments, etc). This will need
to be substracted from what the user set as -blockmaxweight.

Such a change can be implemented in createNewBlock, after
ApplyArgsManOptions.
Set tip at the start of the function and only update it for a long poll.

Additionally have getTipHash return an optional, so the
caller can explicitly check that a tip exists.
Co-Authored-By: Christopher Coverdale <[email protected]>
Implemented starting from a copy of V2Transport and the V2TransportTester, modifying it to fit Stratum v2 and Noise Protocol requirements.

Co-Authored-By: Christopher Coverdale <[email protected]>
Co-Authored-By: Fi3
Co-authored-by: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
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
Stratum v2 requires pools to communicate the maximum bytes they intend to add to the coinbase outputs, as well as the maximum number of sigops.

This commit adds them to BlockAssembler::Options, so they can be set later.
These defaults are needed by the Mining interface in the next commit.
@Sjors
Copy link
Owner Author

Sjors commented Jul 19, 2024

I'll give this a rebase after bitcoin#30440 lands.

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