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

pool: Do not populate/use gentx2. #409

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Oct 12, 2023

This modifies the pool to report the entire partial header via the first generation tx field as intended and no longer populates the second generation tx field since it does not apply to Decred.

Some of the old ASICs hacked the stake version in there, but that is really not something that should have ever been done because the stratum "protocol" (which is not actually very well defined) already does not individually provide all of the information the Decred header needs nor does it provide an official way to extend it.

Further, the Decred header explicitly provides additional space which removes the need to create a new coinbase and update the merkle root.

So, in order to address these things, the field that was intended to serve for the coinbase (generate transaction) was repurposed to contain the serialized partial header for data after the previous block hash in the format it is to be hashed. Therefore, it should be providing the entire remaining partial header to ensure that any future modifications to the end of the header are available to miners without modification.

Given that the old ASICs no longer work with the network, this takes the opportunity to make the change.

This modifies the pool to report the entire partial header via the first
generation tx field as intended and no longer populates the second
generation tx field since it does not apply to Decred.

Some of the old ASICs hacked the stake version in there, but that is
really not something that should have ever been done because the stratum
"protocol" (which is not actually very well defined) already does not
individually provide all of the information the Decred header
needs nor does it provide an official way to extend it.

Further, the Decred header explicitly provides additional space which
removes the need to create a new coinbase and update the merkle root.

So, in order to address these things, the field that was intended to
serve for the coinbase (generate transaction) was repurposed to contain
the serialized partial header for data after the previous block hash in
the format it is to be hashed.  Therefore, it should be providing the
entire remaining partial header to ensure that any future modifications
to the end of the header are available to miners without modification.

Given that the old ASICs no longer work with the network, this takes the
opportunity to make the change.
@jholdstock jholdstock merged commit de6e42e into decred:master Oct 12, 2023
2 checks passed
@davecgh davecgh deleted the pool_no_gentx2 branch October 12, 2023 14:21
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