# CIP Proposal - Segwit Support (CIP 15)

**URL:** <https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741>\
**Category:** Counterparty\
**Created:** [September 13, 2017, 1:41am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741 "2017-09-13T01:41:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [September 13, 2017, 1:41am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/1 "2017-09-13T01:41:05Z")

</div>

Here is the link to the work-in-progress CIP. Tentatively titled CIP 15.

> <https://github.com/deweller/cips/blob/cip-15-segwit/cip-0015.md>

[UPDATED] Moved number from CIP 14 to 15

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [September 17, 2017, 4:34am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/2 "2017-09-17T04:34:41Z")

</div>

Does this CIP specify that it be possible to issue assets from a SW address?

I’m not asking for this, but just wondering.

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [September 22, 2017, 6:48pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/3 "2017-09-22T18:48:12Z")

</div>

To be clear, there are not segwit addresses - only segwit outputs. Regular 1xxx addresses can spend and receive segwit outputs as long as the wallet is compatible.

Yes. To answer your question - yes - all operations including issuances will send and receive segwit outputs.

The exception is BTC sends which will will use standard P2PKH addresses by default.

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [September 25, 2017, 1:56pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/4 "2017-09-25T13:56:16Z")

</div>

I’m assigning this CIP number 14 and submitting a PR for acceptance in draft status.

UPDATE: There is already a CIP 14 in progress. Assigning this to CIP 15.

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [September 29, 2017, 2:37pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/5 "2017-09-29T14:37:08Z")

</div>

With some more input from @rubensayshi, I updated the proposal in the pull request.

---

<div class="post-metadata">

**Author:** ![julian.smith](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/julian.smith/32/762_2.png) [@julian.smith](https://forums.counterparty.io/u/julian.smith)\
**Post date:** [November 7, 2017, 12:12am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/6 "2017-11-07T00:12:25Z")

</div>

@deweller Do you prefer unbridled open discussion on this here… or in the Github as issues. Telegraphing where I am heading with this… As an asset owner, my preference is to be able to not be forced to adopt Segwit transactions. If other asset holder’s and CP users (not me) want it - let 1000 flowers bloom. But I have unresolved issues with the topology of Segwit TX’s such that as an issuer and a Bitcoin user - they don’t notionally hold fungibility for me. So in short… I advocate any Segwit implementation be opt-in and refutable by issuer. A will-not-accept flag or explicit delineation be provided for. I don’t want that Counterparty at the protocol level imposes it wholesale on all users and token holders irrespective of any objections they may hold. That enforcement would be commercially incompatible with our own project’s use case of CP and a really frustrating and undesirable choice between two or three equally bad outcomes if CP protocol moves to a place I’m reticent to go to and follow. By two or three equally bad outcomes - Counterparty Classic (Pre-Segwit) forking or ERC-20 as a replacement… neither pathway is FTW as far as I can see.

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [November 16, 2017, 12:22am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/7 "2017-11-16T00:22:16Z")

</div>

This CIP proposes that all Counterparty transactions are Segwit transactions going forward.

Segwit transactions have the distinct advantage of saving a significant amount in transaction fees.

With that said, I expect the Counterparty APIs will still support the old-style base58 addresses for the forseeable future until such time that segwit is the overwhelming dominant transaction format on the network.

If Segwit does not gain transaction, then this proposal may never be implemented.

---

<div class="post-metadata">

**Author:** ![julian.smith](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/julian.smith/32/762_2.png) [@julian.smith](https://forums.counterparty.io/u/julian.smith)\
**Post date:** [December 2, 2017, 8:42pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/8 "2017-12-02T20:42:39Z")

</div>

I am averse to this implementation being made compulsory on Asset Owners. I was asked by @loon3 “out of curiosity, why don’t you like SegWit?”

So for me it’s a combination of the following:

1. SegWit solves for a non-problem - specifically damn obstinance in the ‘discussion’ (or lack thereof) around scaling E.G it went like:

2. The result of SegWit is the Satoshi fee per byte of data is made into dual-class citizen (SegWit Bytes vs Satoshi Transactions) whereas irrespective of where you put the signature (aka “witness data”) it is still in Mempool and hurting people’s RasPi’s

3. The mining incentive is skewed in a small block environment and is pushed toward rewarding lightning channels at scale - I don’t agree. I believe that 100% of the economic incentive should go to encouraging mining capital investment.

4. The growing SegWit Piñata:

- **Pre-SegWit** (such as in Bitcoin Cash) the upside of a 51% attack by miners was the ability to re-spend a miner’s own coins (double spend).

- **Post-Segwit** everyday more TX go into a 51% bounty pool of anyone-can-spend free money to take off the table… the network disruption of hurting Bitcoin will affect price for a time… but not forever with decent post 51% image management… in time the bounty of such attack should overcome short term reputation hit and loss-of-confidence in the system (given that many many user will be unaffected - specifically those with only Satoshi class UXTO’s)

In my view SegWit is toxic to the Bitcoin eco-system and is a material threat to the planet scale viability of Bitcoin as a currency.

Material Objections:

**"This CIP proposes that all Counterparty transactions are Segwit transactions going forward"**

1. For us this is a **breaking change** at a protocol level.
2. This change has impact on our financially invested 5m token holders.
3. This change, if mandatorily implemented so as to compel us as an issuers into accepting SegWit transactions as valid shall permanently push Blockfreight, Inc. off the Counterparty network if that change is implemented as currently proposed.
4. The universal and compulsory nature of the proposal is the issue.

Questions:

1. Is it viable to have asset owners determine if a SegWit transactions are permisible? Dis-allowable?

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [December 21, 2017, 10:34pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/9 "2017-12-21T22:34:51Z")

</div>

This is merged in draft status.

---

<div class="post-metadata">

**Author:** ![deweller](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/deweller/32/44_2.png) [@deweller](https://forums.counterparty.io/u/deweller)\
**Post date:** [December 21, 2017, 10:38pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/10 "2017-12-21T22:38:27Z")

</div>

@julian.smith - I will look into the feasibility of making segwit a configuration setting when this gets closer to the implementation phase.

---

<div class="post-metadata">

**Author:** ![Snorlax](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Snorlax](https://forums.counterparty.io/u/Snorlax)\
**Post date:** [January 16, 2018, 4:04am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/11 "2018-01-16T04:04:45Z")

</div>

SegWit will reduce fees. Bech32 P2WKPH (bc1…) is a superior address format, at least, as evidenced by Bitcoin Cash adopting it (bitcoincash:…) for its strong error detection.

But I would like to still preserve Bitcoin Cash users’ abilities to transact their Counterparty asset… I’m considering all the things a multi-chain Counterparty could facilitiate

---

<div class="post-metadata">

**Author:** ![foldinger](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@foldinger](https://forums.counterparty.io/u/foldinger)\
**Post date:** [June 17, 2018, 3:28pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/12 "2018-06-17T15:28:51Z")

</div>

I just thought about Bitcoin Segwit and Lightning support and found that even if counterparty does not support these the bitcoin transaction base load will reduce and fees get lower.

---

<div class="post-metadata">

**Author:** ![chiguireitor](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/chiguireitor/32/675_2.png) [@chiguireitor](https://forums.counterparty.io/u/chiguireitor)\
**Post date:** [October 16, 2018, 12:58pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/13 "2018-10-16T12:58:28Z")

</div>

Segwit pushed to develop

> <https://github.com/CounterpartyXCP/counterparty-lib/commit/4272fb9a28405758e43efdc79875ef6746aca192>

The CIP was changed to account for the complexity found during implementation and postergation of support for P2WSH on a later CIP. Milestones were changed to reflect the complexity and were spread out on more progressive deliveries.

This branch adds “regtest” support, all protocol changes are activated on regtest by default, so you can test segwit on a private network.

This commit covers milestone #1

---

<div class="post-metadata">

**Author:** ![jdogresorg](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jdogresorg/32/1349_2.png) [@jdogresorg](https://forums.counterparty.io/u/jdogresorg)\
**Post date:** [October 16, 2018, 4:10pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/14 "2018-10-16T16:10:40Z")

</div>

CIP 15 bounty has been updated to 850 XCP to account for additional work required on segwit development and XCP price drop since the CIP development bounty was raised.

> <https://github.com/CounterpartyXCP/cips/blob/master/cip-0015.md>

350 XCP transferred from XCP dev fund to cover additional development costs.  
[https://xchain.io/tx/8a6e1c26bf8546333d2c1a4f4c5ff32d0c0fe79eae526461b41f96791e47c8a5](https://xchain.io/tx/8a6e1c26bf8546333d2c1a4f4c5ff32d0c0fe79eae526461b41f96791e47c8a5)

Milestone #1 Payout (175 XCP)  
[https://xchain.io/tx/08ed268c602fc51b1957dfc37d67f8be12a501514fcea47d9a9456b450df7863](https://xchain.io/tx/08ed268c602fc51b1957dfc37d67f8be12a501514fcea47d9a9456b450df7863)

---

<div class="post-metadata">

**Author:** ![chiguireitor](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/chiguireitor/32/675_2.png) [@chiguireitor](https://forums.counterparty.io/u/chiguireitor)\
**Post date:** [October 17, 2018, 6:53am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/15 "2018-10-17T06:53:48Z")

</div>

Uggh… Bitcore (counterwallet’s library for dealing with Bitcoin) doesn’t support segwit, we will probably have to shove in bitcoinjs-lib in to support segwit for counterwallet… making the wallet load time even larger 😞

---

<div class="post-metadata">

**Author:** ![chiguireitor](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/chiguireitor/32/675_2.png) [@chiguireitor](https://forums.counterparty.io/u/chiguireitor)\
**Post date:** [October 23, 2018, 7:57am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/16 "2018-10-23T07:57:33Z")

</div>

> <https://github.com/CounterpartyXCP/counterwallet/commit/f0b74a0c78637b881814130e7ff599d4d627a180>

Almost done segwit support for counterwallet

---

<div class="post-metadata">

**Author:** ![chiguireitor](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/chiguireitor/32/675_2.png) [@chiguireitor](https://forums.counterparty.io/u/chiguireitor)\
**Post date:** [October 24, 2018, 12:57pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/17 "2018-10-24T12:57:25Z")

</div>

Segwit added to counterwallet on the develop branch

> <https://github.com/CounterpartyXCP/counterwallet/commit/2ee8747ea98e79f44e95de22d8bf68fdc1c018d9>

---

<div class="post-metadata">

**Author:** ![jdogresorg](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jdogresorg/32/1349_2.png) [@jdogresorg](https://forums.counterparty.io/u/jdogresorg)\
**Post date:** [October 24, 2018, 3:55pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/18 "2018-10-24T15:55:53Z")

</div>

Milestone #2 Payout (175 XCP)  
[https://xchain.io/tx/07d5e614288de065fd69211a39c10e4ffefcd2bacd8c5d6412bb8533f0a337aa](https://xchain.io/tx/07d5e614288de065fd69211a39c10e4ffefcd2bacd8c5d6412bb8533f0a337aa)

---

<div class="post-metadata">

**Author:** ![jdogresorg](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jdogresorg/32/1349_2.png) [@jdogresorg](https://forums.counterparty.io/u/jdogresorg)\
**Post date:** [December 29, 2018, 5:46am UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/19 "2018-12-29T05:46:58Z")

</div>

Milestone #3 Payout (350 XCP)  
[https://xchain.io/tx/8c762d8f046c28bbbbe5c93cea521e7cd5802a29652917f26c358911c980d3d8](https://xchain.io/tx/8c762d8f046c28bbbbe5c93cea521e7cd5802a29652917f26c358911c980d3d8)

---

<div class="post-metadata">

**Author:** ![jdogresorg](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jdogresorg/32/1349_2.png) [@jdogresorg](https://forums.counterparty.io/u/jdogresorg)\
**Post date:** [February 22, 2019, 5:59pm UTC](https://forums.counterparty.io/t/cip-proposal-segwit-support-cip-15/3741/20 "2019-02-22T17:59:38Z")

</div>

Milestone #4 Payout (150 XCP)  
[https://xchain.io/tx/0d6e3c481a750e6e415415bd3ef3370b956bb0da861065a9a3298360f2a7113a](https://xchain.io/tx/0d6e3c481a750e6e415415bd3ef3370b956bb0da861065a9a3298360f2a7113a)
