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

Remove nonce restriction in block headers with hard fork #50

Closed
domob1812 opened this Issue Jul 13, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@domob1812
Collaborator

domob1812 commented Jul 13, 2018

Currently, the consensus rule is that the nNonce field in the actual block header (not the one used for PoW) must be set to zero. We introduced this restriction to make sure that we can put the field to planned use later as necessary.

As it turns out, it will be beneficial to remove this restriction - this allows miners using the Stratum protocol to use the field as extra nonce in the protocol. With this, a proper pool for Neoscrypt miners could be set up (merged mining is not affected).

Thus, we should remove this restriction together with the planned hard fork that will update the coin supply (#40).

@domob1812 domob1812 added this to the 1.1 milestone Oct 17, 2018

domob1812 added a commit that referenced this issue Oct 17, 2018

Allow non-zero nonce with POST_ICO fork.
This implements a hard fork scheduled at certain heights (500 on regtest,
12000 on testnet and not yet active on mainnet) that allows non-zero
nonce values in the main block header (not the fake header).  This solves
#50.

Forks are added to Consensus::Params similar to how they are handled in
Huntercoin.  For now, there's only this one, but there will likely be
more in the future; for instance, to change the standalone mining
algorithm or when we implement ephemeral timestamps.

The created POST_ICO fork will contain more things in the future, namely
a change to the block reward and block interval as described in
#40.
@domob1812

This comment has been minimized.

Collaborator

domob1812 commented Oct 17, 2018

This was implemented in 89f0ad2 on the fork branch. I create a pull request and merge it to master together with the changes for #40.

@domob1812 domob1812 self-assigned this Oct 17, 2018

domob1812 added a commit that referenced this issue Nov 4, 2018

Allow non-zero nonce with POST_ICO fork.
This implements a hard fork scheduled at certain heights (500 on regtest,
12000 on testnet and not yet active on mainnet) that allows non-zero
nonce values in the main block header (not the fake header).  This solves
#50.

Forks are added to Consensus::Params similar to how they are handled in
Huntercoin.  For now, there's only this one, but there will likely be
more in the future; for instance, to change the standalone mining
algorithm or when we implement ephemeral timestamps.

The created POST_ICO fork will contain more things in the future, namely
a change to the block reward and block interval as described in
#40.

domob1812 added a commit that referenced this issue Nov 5, 2018

Allow non-zero nonce with POST_ICO fork.
This implements a hard fork scheduled at certain heights (500 on regtest,
12000 on testnet and not yet active on mainnet) that allows non-zero
nonce values in the main block header (not the fake header).  This solves
#50.

Forks are added to Consensus::Params similar to how they are handled in
Huntercoin.  For now, there's only this one, but there will likely be
more in the future; for instance, to change the standalone mining
algorithm or when we implement ephemeral timestamps.

The created POST_ICO fork will contain more things in the future, namely
a change to the block reward and block interval as described in
#40.

domob1812 added a commit that referenced this issue Nov 6, 2018

Allow non-zero nonce with POST_ICO fork.
This implements a hard fork scheduled at certain heights (500 on regtest,
1M on testnet and mainnet for now, will be changed) that allows non-zero
nonce values in the main block header (not the fake header).  This solves
#50.

Forks are added to Consensus::Params similar to how they are handled in
Huntercoin.  For now, there's only this one, but there will likely be
more in the future; for instance, to change the standalone mining
algorithm or when we implement ephemeral timestamps.

The created POST_ICO fork will contain more things in the future, namely
a change to the block reward and block interval as described in
#40.

domob1812 added a commit that referenced this issue Nov 6, 2018

Merge #69: Implement "post ICO" fork
356be12 Set POST_ICO fork for testnet. (Daniel Kraft)
5752067 Increase block reward with POST_ICO fork. (Daniel Kraft)
dd40da9 Make block target spacing fork-able. (Daniel Kraft)
d7f7e84 Allow non-zero nonce with POST_ICO fork. (Daniel Kraft)

Pull request description:

  This implements the planned "post ICO" hard fork.  For now, it is scheduled at height 500 on regtest, 11k on testnet and 1M on mainnet.  The mainnet height will be defined later after a (hopefully) successful activation on testnet.

  This changes three things:

  1. The nonce values of main block headers no longer need to be zero (#50).
  2. The block intervals are changed and made algorithm-dependent:  Neoscrypt targets 40s and SHA-256d two minutes after the fork (for an average that is still 30s per block).  See #67 for the discussion.
  3. The block rewards are increased to 10 CHI on testnet and mainnet after the fork.  For testnet, that is the (arbitrary) value we will use.  For mainnet, the value will be changed when the actual fork height becomes known, so that we can calculate the correct value.  This implements #40.

Tree-SHA512: 20b0cc0ea020cdcf46bbb2476bdfe0799b02faffcaf23f0b312d76d351e735ff17ac294a6ad1b6dd865e5134ff15fa5a53a1b2869990efdbb51caa847ba827fd
@domob1812

This comment has been minimized.

Collaborator

domob1812 commented Nov 6, 2018

Closing this now, as the main coding is done. Finalisation of the fork is being tracked in #70.

@domob1812 domob1812 closed this Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment