Wednesday 6 September 2017

We just enabled full Segwit support... and it works really well. Plus, we pay less for network fees.

I am running a Bitcoin-related service (YOLOdice) that accepts user deposits and sends withdrawals. On Monday we deployed a piece of code that generated Segwit deposit addresses for our users, plus whenever a user makes a withdrawal, the change is sent to a Segwit address too. After ~24h most of our hot wallet funds were stored in Segwit addresses.

Now a grain of salt: it's not straightforward. We run our wallet on Bitcoin Core. Bitcoin Core does NOT return Segwit addresses when you run getnewaddress, but it's easy to handle with addwitnessaddress. What's more critical, it does not generate Segwit change addresses, so you are forced to build the tx yourself. If you are interested, check how we do it at http://bit.ly/2gL28O5

Another grain of salt - block explorers handle "Segwit" transactions (those that have Segwit inputs) quite differently. Some show tx size with signatures, some with signatures stripped, some show tx weight. It can be confusing. Blocktrail.com and Blockchain.info have pretty different set of data to show, their fee/byte is quite different for same transactions.

Now a good thing: fees. Segwit makes the fees significantly smaller because of the way they are calculated (vsize, weight, you name it). I haven't encounted any problems with mining pools not accepting or delaying Segwit txes.

TL;DR: Segwit just works. If you are a service owner, moving to Segwit is not difficult and can save you some coins on network fees. Plus, it' cool!



Submitted September 06, 2017 at 02:31PM by ethan_nx http://bit.ly/2w6b7vc

No comments :

Post a Comment