-
Notifications
You must be signed in to change notification settings - Fork 382
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
HF: Move block.proof.challenge to Consensus::Params::signblockScript #114
HF: Move block.proof.challenge to Consensus::Params::signblockScript #114
Conversation
I think these changes should be proposed separately or in sequence. One changes the header format which can effect how the HSMs operate and will need more review from more people. |
As discussed with @instagibbs , since there's no hurry to do the hardfork, the first change can wait for review on the second one. |
utACK 38bf14a |
38bf14a
to
3bb2140
Compare
Needed rebase |
Sorry, some unittests are failing
|
Since the scriptPubKey for signing blocks never changes, there's no point in repeating it with every block header.
3bb2140
to
3d83e51
Compare
Updated with some feedback from @jonasnick |
Could you share the feedback here?
…On Apr 19, 2017 6:05 PM, "Jorge Timón" ***@***.***> wrote:
Updated with some feedback from @jonasnick <https://github.com/jonasnick>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFgC08kXNmbqbGx4CG1QtW6NBe-vJ1oBks5rxoUngaJpZM4L1d_Q>
.
|
Yes, sorry. |
EDIT: jtimon already answered I wanted to be able to get the signblockscript as hex somehow from the RPC which is why @jtimon added |
Using Bitcoin genesis mainnet hash for pegged-bitcoin asset id was a mistake in the first place.
Sorry, added one commit, potentially to squash to the previous one, or leave for #164 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a71aa8b
} | ||
|
||
bool CheckChallenge(const CBlockHeader& block, const CBlockIndex& indexLast, const Consensus::Params& params) | ||
{ | ||
return block.proof.challenge == indexLast.proof.challenge; | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What use is this stub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I thought we may want to change the challenges, for example, for key rotation. This function would allow to restrict the allowed transitions from one challenge to another. Since we're not using any of that, there's no point in maintaining the challenge field in the header, but we can leave the functions here in case we want to restore the field to do something like that later.
Replaced by #189 |
Replaces #111
Since the scriptPubKey for signing blocks never changes, there's no point in repeating it with every block header. This saves more space in memory the more signatures there are in a particular chain.
Also includes a hash of fedpegscript and signblockscript in the genesis block which is also a hf, but makes the genesis block depend on them.