Title: how to disable segwit in my build? Post by: danda on July 12, 2017, 11:03:43 PM I tried to ask this on bitcoin-dev list yesterday, but it seems to be stuck in moderation limbo, so I thought I'd ask here.
------ Hi! Up to now, I have purposefully been running bitcoin releases prior to 0.13.1 as a way to avoid the (possible) segwit activation, at least until such time as I personally am comfortable with it. At this time, I would like to have some of the more recent features, but without the possibility that my node will activate segwit, until I choose to. As I understand it, there is not any user setting that can disable segwit from activating on my node. If there was, I would use it. Please correct me if wrong. I am here to ask what is the simplest code change (fewest LOC changed) I can make to 0.14.2+ code that would disable segwit from activating and keep my node acting just like a legacy node with regards to consensus rules, even if/when the rest of the network activates segwit. I think, more generally, the same question applies to most any Bip9 versionbits feature. I'm not looking for reasons NOT to do it, only HOW to do it without unwanted side-effects. My first untested idea is just to change the segwit nTimeout in chainparams.cpp to a date in the past. But I figured I should ask the experts first. thanks. ps: full disclosure: I may be the only one who wants this, but if successful, I do plan to release my changes in case someone else wishes to run with status-quo consensus rules. Title: Re: how to disable segwit in my build? Post by: achow101 on July 12, 2017, 11:23:55 PM There are two lines that you want to change: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L100 and the line after it (101). Change those two lines so that the time is just 0 and that will disable segwit for your build.
Edit: Do this at your own risk. There may be unintended consequences of doing so as 0.13.1+ was designed without any segwit disabling capabilities in mind. You may end up partitioning yourself from nodes that will give you blocks in the non-segwit format. Title: Re: how to disable segwit in my build? Post by: danda on July 12, 2017, 11:53:14 PM There are two lines that you want to change: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L100 and the line after it (101). Change those two lines so that the time is just 0 and that will disable segwit for your build. awesome. That is what I was thinking after peeking at the code, but i wanted to be certain. thanks! Title: Re: how to disable segwit in my build? Post by: Quickseller on July 13, 2017, 04:32:58 AM Here is the relevant portion of the response that u/nullc aka gmaxwell sent in response to your inquiry:
Quote from: gmaxwell It is not simple to do so correctly, I couldn't tell you off the top of my head; a number of things must be changed it isn't as simple as disabling the activiation because of the segwit P2P changes. Nor is it a supported configuration. Even if it were now, it wouldn't be one we'd continue to support in the future after segwit is active, as we're likely to drop deployment/compat code. Title: Re: how to disable segwit in my build? Post by: amaclin on July 13, 2017, 11:36:46 AM keep my node acting just like a legacy node with regards to consensus rules, even if/when the rest of the network activates segwit. I think the simplest way to do it is to set protocol flags (version & services) to the value of 0.12.x client https://en.bitcoin.it/wiki/Protocol_documentation#version Edit: Do this at your own risk. |