Skip to content
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

segwit support #16

Merged
merged 3 commits into from Dec 13, 2016
Merged

segwit support #16

merged 3 commits into from Dec 13, 2016

Conversation

@theuni
Copy link
Contributor

@theuni theuni commented Nov 29, 2016

Adds support for requesting segwit support in gbt calls, as well as the necessary commitment insertion.

Commitments will be inserted even before segwit activation, so it's possible to verify that the insertion works far in advance.

Compares the calculated commitment to the one provided by bitcoind, if present, as an extra sanity check.

theuni added 3 commits Apr 2, 2016
This has been removed for a while.
Rather than trying to de-serialize and re-serialize the transactions coming
from GBT, simply store them as binary and use them directly to form the block.

Also, override CBlock's checks that assume the merkle root represents the full
transaction hashes.
@zsulocal
Copy link

@zsulocal zsulocal commented Dec 1, 2016

BTCC Pool has already tested this PR and submit valid blocks on testnet. Block #1035755 only contains coinbase transaction and #1035760 contains segwit transactions. Apart from these two blocks, all coinbase transaction contain the tag '/BTCC/' , meaning mined by BTCC Pool.

@slush0
Copy link
Owner

@slush0 slush0 commented Dec 8, 2016

Thank you for this PR! I'm watching segwit.co closely and if adoption rise near 50% (I hope so), I'll merge this.

@wuhuaping
Copy link

@wuhuaping wuhuaping commented Dec 9, 2016

@jameshilliard
Copy link

@jameshilliard jameshilliard commented Dec 11, 2016

@slush0 FYI bitcoin 0.13.1 won't actually signal for SegWit activation without this patch so it would probably be a good idea to merge before hand.

@theuni
Copy link
Contributor Author

@theuni theuni commented Dec 12, 2016

What @jameshilliard said. Pools can't (or shouldn't be) signaling for segwit until they advertise that they can actually produce valid blocks with witnesses.

To be clear, this should have no negative effects on current mainnet mining, even before segwit activates. The commitment insertion is not harmful in either case.

In fact, this PR currently required for using this software on testnet, where segwit is already active. Otherwise, gbt simply refuses to give it a template.

@slush0 slush0 merged commit b2a24d7 into slush0:master Dec 13, 2016
@slush0
Copy link
Owner

@slush0 slush0 commented Dec 13, 2016

Okay, done. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants