Skip to content

[Miner] Don't create new keys when generating PoS blocks#982

Merged
random-zebra merged 1 commit into
PIVX-Project:masterfrom
random-zebra:2019_CreateNewBlockWithKey_move_reserveKey
Aug 14, 2019
Merged

[Miner] Don't create new keys when generating PoS blocks#982
random-zebra merged 1 commit into
PIVX-Project:masterfrom
random-zebra:2019_CreateNewBlockWithKey_move_reserveKey

Conversation

@random-zebra
Copy link
Copy Markdown

@random-zebra random-zebra commented Aug 11, 2019

This fixes the calls to CreateNewBlockWithKey with PoS blocks, which are not needed.
We simply call CreateNewBlock with an empy script for coinbase.

It should prevent the problem described in #956 (comment)

@random-zebra random-zebra added Wallet Block Generation Mining/Staking related issues labels Aug 11, 2019
@random-zebra random-zebra added this to the 4.0.0 milestone Aug 11, 2019
@random-zebra random-zebra self-assigned this Aug 11, 2019
key creation for coinbase output is a waste for PoS blocks and can be removed
@random-zebra random-zebra force-pushed the 2019_CreateNewBlockWithKey_move_reserveKey branch from f7d980a to 74e7fc7 Compare August 12, 2019 00:29
@furszy furszy self-requested a review August 12, 2019 01:06
Copy link
Copy Markdown

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, pretty direct 👍 .

utACK 74e7fc7

@random-zebra random-zebra changed the title [Miner] Don't create keys for PoS blocks in CreateNewBlockWithKey [Miner] Don't create new keys when generating PoS blocks Aug 12, 2019
@CaveSpectre11
Copy link
Copy Markdown

CaveSpectre11 commented Aug 12, 2019

Took a minute to follow; but then recalled the signature that ends up in tx[0] vout[0].

utACK 74e7fc7

@akshaynexus
Copy link
Copy Markdown

utACK 74e7fc7

Copy link
Copy Markdown

@Warrows Warrows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty straightforward indeed, utACK 74e7fc7

@random-zebra random-zebra merged commit 74e7fc7 into PIVX-Project:master Aug 14, 2019
random-zebra added a commit that referenced this pull request Aug 14, 2019
74e7fc7 [Miner] Don't create new keys when generating PoS blocks (random-zebra)

Pull request description:

  This fixes the calls to `CreateNewBlockWithKey` with PoS blocks, which are not needed.
  We simply call `CreateNewBlock` with an empy script for coinbase.

  It should prevent the problem described in #956 (comment)

ACKs for top commit:
  CaveSpectre11:
    utACK 74e7fc7
  akshaynexus:
    utACK 74e7fc7
  furszy:
    utACK [74e7fc7](74e7fc7)
  Warrows:
    Pretty straightforward indeed, utACK 74e7fc7

Tree-SHA512: bcb9752a689a058b6c33317136d16afd694b5da66c69cdd32a8b89b71059c5b2c5dc20c88045c52429fae99d45f508ea223f1b7d1afa5db3c77eb59befd48d51
@Fuzzbawls Fuzzbawls added the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Aug 16, 2019
@random-zebra random-zebra modified the milestones: 4.0.0, 3.4.0 Aug 25, 2019
@Fuzzbawls Fuzzbawls removed the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Block Generation Mining/Staking related issues Wallet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants