Skip to content

Conversation

@jtimon
Copy link
Contributor

@jtimon jtimon commented Aug 28, 2017

The height is mandatory in the coinbase's nLockTime instead of in its script.
The miner still puts it in the script.
The new rule is active from the beginning instead of a given height, thus there's no need to implement bip30, which is removed.

@instagibbs
Copy link
Contributor

concept ACK, will review

@luke-jr
Copy link
Contributor

luke-jr commented Aug 29, 2017

At least with Bitcoin, height-based locktime must be greater than the current height, so setting this to equal should be invalid? For BitcoinHardfork/bitcoin#3, I set locktime=height-1 because of this.

@luke-jr
Copy link
Contributor

luke-jr commented Aug 29, 2017

Summary of extra-Github discussion:

  • You could also change the final check to <=, but this would be liable to create confusion between Bitcoin and Elements, so IMO height - 1 is the better solution.
  • Care needs to be taken, especially if removing the extranonce also, that the coinbase is not <2 bytes. Or remove that rule.
  • Removing and/or refactoring code that isn't a problem will make rebasing harder. For this reason, I suggest at least leaving the pindexPrev parameter in IncrementExtraNonce unused. But whether making rebasing easier is a goal, is a project-wide policy to decide, and should probably be discussed independently from this PR.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 30, 2017

Rebased, squashed, hopefully fixed nits.

@jtimon
Copy link
Contributor Author

jtimon commented Sep 30, 2017

Rebased on top of #276 and made a little bit more like https://github.com/BitcoinHardfork/bitcoin/pull/3/files as suggested by @luke-jr to reduce rebase disruption, no longer removing bip30 not bip34Height.
Also settled on not removing the extra nonce for now, that can be discussed in another PR.
Instead of consensus.HardforkTime, since we may have many and it's good to separate them, I'll use something like bitcoin/bitcoin#11426 for hardforks.

@jtimon jtimon changed the title HF: Remove bip30, Replace bip34 with simpler equivalent HF: Replace bip34 with simpler equivalent Oct 2, 2017
@jtimon jtimon added the 0.14.1 label Oct 10, 2017
@jtimon jtimon added 0.14.1 and removed 0.14.1 labels Oct 16, 2018
@instagibbs
Copy link
Contributor

Closing due to lack of activity and since we've launched Liquid without this change. Porting to master with backwards compatibility(in chain sense) still could work.

@instagibbs instagibbs closed this Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants