Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

segwit support#16

Merged
slush0 merged 3 commits into
slush0:masterfrom
theuni:segwit
Dec 13, 2016
Merged

segwit support#16
slush0 merged 3 commits into
slush0:masterfrom
theuni:segwit

Conversation

@theuni

@theuni theuni commented Nov 29, 2016

Copy link
Copy Markdown
Contributor

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 April 2, 2016 03:06
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

zsulocal commented Dec 1, 2016

Copy link
Copy Markdown

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

slush0 commented Dec 8, 2016

Copy link
Copy Markdown
Owner

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

wuhuaping commented Dec 9, 2016 via email

Copy link
Copy Markdown

@jameshilliard

Copy link
Copy Markdown

@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

theuni commented Dec 12, 2016

Copy link
Copy Markdown
Contributor Author

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

slush0 commented Dec 13, 2016

Copy link
Copy Markdown
Owner

Okay, done. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants