How to Signalize Support for Segregated Witness via User-Activated Soft Fork (UASF)

Bitcoin has gotten very political past years. Certain cocky miners with "secret" agenda spread propaganda to take power over the network.

Their political bullshit (with help of certain well-known well-off individuals) stalls Bitcoin innovationsand further divides the community.

If you're a Bitcoin business owner or just a regular user there's a way to show them who decides what the protocol looks like (hint: it's not miners).

UASF (BIP 148) or "User-Activated Soft Fork" is a clever way to incentivize miners (by economic forces) to switch to Segregated Witness which has super-majority support of both Bitcoin economy (1) (2) as well as fully validating nodes.

Today, I'll explain step by step how to install a full Bitcoin node that enforces UASF SegWit.

Please note that the following tutorial is written for Mac OS X and Debian based distributions. With certain modifications, you should be able to reproduce it on any Linux.

Open a terminal and follow the steps below.

#1a Install dependencies on Linux

Update system repositories and download new system updates:

sudo apt-get update && sudo apt-get upgrade

Install Bitcoin Core dependencies:

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libssl-dev libevent-dev bsdmainutils libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

You will also very likely need to install Berkeley DB 4.8 from source:

#1b Install dependencies on OS X

First, install Xcode command line tools:

xcode-select --install

Install libraries and other necessary tools using homebrew:

brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent librsvg

#2 Build Bitcoin Core with UASF from source

You need git to download Bitcoin Core.

If you don't have it yet, install it with sudo apt-get install git or brew install git depending on your OS.

Download Bitcoin Core source, then:

mkdir ~/source
cd ~/source
git clone https://github.com/UASF/bitcoin.git
cd bitcoin

Check for the latest available "uasfsegwit" tag.

Currently it's v0.14.2.uasfsegwit1.0. Switch to it:

git checkout tags/v0.14.2.uasfsegwit1.0

Start a build process:

Change a numeric value in -j4 to a number of physical cores of your CPU. If it has two cores use make -j2 then and so on.

Wait a couple of minutes to an hour depending on your hardware for the build process to finish.

Run unit tests to check if everything was compiled correctly:

Be patient, It will take a minute or so.

#3a Post-build steps for Linux

Install newly created binaries:

sudo make install

You can now run Bitcoin-Qt which should automatically be added to your application menu based on your Linux distribution.

Have a look at my older post if you want to run Bitcoin Core from a command line.

It explains how to sync the blockchain, how to run Bitcoin Core automatically via Systemd and how to open ports with iptables.

#3b Post-build steps for OS X

Create OS X App bundle:

This will create "Bitcoin Core.app" located in ~/source/bitcoin which can be dragged and dropped into /Applications folder.

#4 Support UASF with a User Agent (optional)

UASF is still being developed. If you don't feel like running a potentially buggy code, you can still signalize support for UASF by changing a User Agent.

Go to Bitcoin's app data where the blockchain is stored.

On Linux:

cd ~/.bitcoin

On OS X:

cd ~/Library/Application\ Support/Bitcoin/

Create bitcoin.conf and change the User Agent string:

touch bitcoin.conf
echo "uacomment=UASF-SegWit-BIP148" >> bitcoin.conf

If you did everything right your node should be ready to signalize support for Segregated Witness as UASF.

Run Bitcoin Core either through a command line or via an Application menu of your operating system.

In the first case:

bitcoin-cli getinfo | grep UASF

You should either see "UASF-Segwit:1.0(BIP148)" or "UASF-SegWit-BIP148" depending which above method you've chosen.

If you use Bitcoin-Qt, go to the application menu and click Help -> Debug Window. A window with the User Agent string should pop up:

Congrats your UASF SegWit-ready node is up and running.

5 Accept incoming connections

It's very important to open ports on your firewall so your node seeds the blockchain data to other nodes.

If you're on Linux, open TCP and UDP port 8333 with these two commands:

sudo iptables -A INPUT -p tcp --dport 8333 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 8333 -j ACCEPT

If your Bitcoin Core node runs on Mac OS X follow the official instructions.

In the case you're hidden behind a router, you will have to set up a port forwarding. Because there are thousands of different routers it's beyond the scope of this article.

However, you will want to point traffic on port 8333 to your internal IP address.

To find your internal IP:

ifconfig -a | grep inet | grep broadcast | awk '{print $2}'

Read more about port forwarding.

After opening ports, test whether you're accepting connections from other nodes. Scroll to the bottom of the page and click "Check node".

Yay! Everything works correctly.

#6 Run Bitcoin Core on system login (optional)

Go to Preferences -> Main and click "Start Bitcoin Core on system login".

If you run Bitcoin Core from a command line check these instructions.


I hope you find this tutorial useful. Please share it with your Bitcoin friends and favorite businesses if you think they might like the idea of users exercising their power.

Let me know in the comments below if you have any questions or need help.

P.S. If you don't feel like compiling, you may use official binaries signed by Luke-jr.

P.S2. If you're an Electrum user, feel free to use our UASF BIP148 Electrum server: bitcoin.freedomnode.com:50001