-
Notifications
You must be signed in to change notification settings - Fork 284
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
Fix bip9 signalling #842
Merged
nodech
merged 3 commits into
handshake-org:master
from
rithvikvibhu:fix-bip9-signalling
Aug 26, 2023
Merged
Fix bip9 signalling #842
nodech
merged 3 commits into
handshake-org:master
from
rithvikvibhu:fix-bip9-signalling
Aug 26, 2023
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
Tested this: GetBlockTemplateNo signalling (v=0):
With
With
getworkSignals all/both by default:
and confirm version = 3 ❯ node
> AbstractBlock = require('hsd/lib/primitives/abstractblock.js');
[class AbstractBlock extends Struct]
> AbstractBlock.fromMiner(Buffer.from('000000008c97e96400000000310350e263534903d8194fcf35eb69f3bbf5c82d00000000000000082f75e18de7b77385757b685791d99a0f9488fcaa445988cd310350e26353490bf76cae42d25c1a76ce8ea07abbd5f5fb93ad6b54764de3b3626937333e52c8b69115ae5ce121a67cba117c2ff82432dd0a9618994b1491bd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbac9de7fded5561d39537c5058f9f3a5ff6f317b3511339b0a796dd627828e7fe95e112d3202a2d22815bb866fe519ab599457a19f3a28e98ce522386a7ff50300000071880819', 'hex'))
AbstractBlock {
version: 3,
prevBlock: <Buffer 00 00 00 00 00 00 00 08 2f 75 e1 8d e7 b7 73 85 75 7b 68 57 91 d9 9a 0f 94 88 fc aa 44 59 88 cd>,
merkleRoot: <Buffer 7f e9 5e 11 2d 32 02 a2 d2 28 15 bb 86 6f e5 19 ab 59 94 57 a1 9f 3a 28 e9 8c e5 22 38 6a 7f f5>,
witnessRoot: <Buffer 0b ba c9 de 7f de d5 56 1d 39 53 7c 50 58 f9 f3 a5 ff 6f 31 7b 35 11 33 9b 0a 79 6d d6 27 82 8e>,
treeRoot: <Buffer 31 03 50 e2 63 53 49 0b f7 6c ae 42 d2 5c 1a 76 ce 8e a0 7a bb d5 f5 fb 93 ad 6b 54 76 4d e3 b3>,
reservedRoot: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,
time: 1693030284,
bits: 419989617,
nonce: 0,
extraNonce: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,
mask: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,
mutable: false,
_hash: null,
_maskHash: <Buffer 62 69 37 33 3e 52 c8 b6 91 15 ae 5c e1 21 a6 7c ba 11 7c 2f f8 24 32 dd 0a 96 18 99 4b 14 91 bd>
} |
nodech
reviewed
Aug 26, 2023
rithvikvibhu
force-pushed
the
fix-bip9-signalling
branch
from
August 26, 2023 09:34
99949f5
to
ab0fa43
Compare
nodech
added a commit
that referenced
this pull request
Aug 26, 2023
nodech
added a commit
that referenced
this pull request
Aug 26, 2023
Merged
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.
Currently, it is not possible to signal for deployments which are
force: false
. This PR changes that by reverting 2 previous commits:chain.computeBlockVersion()
MinerOptions.version
The way it's supposed to work is:
chain.computeBlockVersion
opts into all deploymentsGetBlockTemplate
then opts out for those not included inrules
But,
getwork
and other software (b/hstratum) that depend onMiner
directly, do not opt out at allTo prevent this, the 2 temporary measures taken ~3 years ago:
chain.computeBlockVersion
only set force deployments bitsPotential Breaking Change for miners
getblocktemplate
aren't affected, and can userules
to signalgetwork
will start signalling for all by default (includinghardening
)Since
getwork
now activateshardening
, it needs to be explicitly disabled in claim tests that use domains with weak keys (cloudflare
,nlnetlabs
,dnscrypt
, etc.)h/t @nodech who found all of this