Pages:
Author

Topic: How to use Segwitaddress.ORG ? (Read 669 times)

hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 24, 2018, 09:46:34 AM
#45
I want to know that if Legacy address' privkey has SegWit address connected with it and it can get me a SegWit address starting with '3', didn't the SegWit devs make it possible to get a bech32 address too with that privkey? Or is there anything I'm currently unaware of?

That's sort of why I'm guessing you can't. I also seem to remember when I first upgraded to Electrum 3.0.0 and created my first Segwit wallet seeing a warning somewhere that it would not be possible to import these private keys into other wallet types.

That still leaves me wondering why anyone would want to use the same private key to generate different addresses. I cannot see any application that would benefit from that and it sets alarm bells off that it could make things less secure.


Edit: I've been thinking about it and I think this explains it but people with better technical knowledge may be able to answer it more fully.

A private key creates a legacy address. The 3 Segwit address is created from the legacy address, not from the private key. They are not meant to be associated, the Segwit address is just nested in the legacy address.
Another private key creates a bech32 address and that's all as it is native and doesn't need to be nested in anything.


Let's try this again. As I've only been learning about Segwit a couple of months this took a while to work out.

A legacy addresses private key doesn't have a Segwit address associated with it. The Segwit implementation using the 3 addresses is nesting Segwit in the old legacy address. That address is not intended to be used for anything else. It was only done this way as a tempory solution to provide backward compatibility of the address format (base58).

The native implementation of Segwit using bech32 addresses does not require any other address to make it work.

The devs didn't make it possible to do what you asking because there is no reason to.
legendary
Activity: 3052
Merit: 1273
January 24, 2018, 09:40:30 AM
#44
On a quick note, I would like to know that if it's possible to get SegWit addresses starting with '3' with our Legacy addresses' privkey, can't we use these privkeys to get bech32 addresses that are (maybe) connected to our Legacy addresses? Correct me if I'm wrong somewhere with the question here.

I'm not 100% sure here but I think the answer is no. Before I go trying to look that up I'm still completely baffled as to what you are trying to achieve and maybe if you could explain that I might get it.


I want to know that if Legacy address' privkey has SegWit address connected with it and it can get me a SegWit address starting with '3', didn't the SegWit devs make it possible to get a bech32 address too with that privkey? Or is there anything I'm currently unaware of?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 24, 2018, 08:45:29 AM
#43
I said that for my current bech32 addresses, that if I receive coins on different (bech32) addresses and all of them are in the same wallet:
Let's say 'A' address receives 0.03 BTC
'B' address receives 0.02 BTC
'C' address receives 0.05 BTC,
And if I am interested in sending the whole 0.1 BTC to someone in a single transaction, won't these addresses A, B & C will be included in that transaction and shown in the list?

Yes, that's what I was saying. It's a privacy issue and there are ways of combatting it such as in Electrum you can create as many wallets as you want and then use each one for different purposes. Then use a service like ChipMixer to further distance yourself from the source of the coins before combining them.

On a quick note, I would like to know that if it's possible to get SegWit addresses starting with '3' with our Legacy addresses' privkey, can't we use these privkeys to get bech32 addresses that are (maybe) connected to our Legacy addresses? Correct me if I'm wrong somewhere with the question here.

I'm not 100% sure here but I think the answer is no. Before I go trying to look that up I'm still completely baffled as to what you are trying to achieve and maybe if you could explain that I might get it.
legendary
Activity: 3052
Merit: 1273
January 24, 2018, 08:34:09 AM
#42
I'm aware of the fact that it breaches the code of anonymity for which bitcoin was created, but isn't it true that when we try to send all the funds in our wallet, it shows all the addresses in the list of the transaction when they are sent to one or more addresses?

If a transaction contains input from more than one address then it can be concluded that the addresses are in the same wallet, but I'm not sure how that is relevant to this.


I said that for my current bech32 addresses, that if I receive coins on different (bech32) addresses and all of them are in the same wallet:
Let's say 'A' address receives 0.03 BTC
'B' address receives 0.02 BTC
'C' address receives 0.05 BTC,
And if I am interested in sending the whole 0.1 BTC to someone in a single transaction, won't these addresses A, B & C will be included in that transaction and shown in the list?

On a quick note, I would like to know that if it's possible to get SegWit addresses starting with '3' with our Legacy addresses' privkey, can't we use these privkeys to get bech32 addresses that are (maybe) connected to our Legacy addresses? Correct me if I'm wrong somewhere with the question here.
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 23, 2018, 03:43:51 AM
#41
Can you please throw some light over that bold part? I'm unsure of the issues with the current version of core and whether I should wait for the newer release of core (i.e.; 0.16)

Core is constantly being developed and if you go to github and download the latest commit in source code form and then compile it yourself then you have a newer version than the precompiled version (the official release if you like).
The Segwit functionality for the wallet was added in one of the commits for 0.15.0.1 but they delayed rolling into the 0.15.1 release and held it back for 0.16.0
One of the Core developers recently posted on this forum that he expects it to be released in February.

The reason why I'm interested in that is, when we have at least one thing fixed, we can use it to sign messages to prove that we possess it.

You can sign and verify a message with a bech32 address using Electrum. The Core implementation will use 3 addresses by default but also supports bech32 so should also be able to do this. I'm not sure what advantage there is in being able to sign a message from the underlying legacy address to '3' Segwit address if that is what you trying to achieve.

I'm aware of the fact that it breaches the code of anonymity for which bitcoin was created, but isn't it true that when we try to send all the funds in our wallet, it shows all the addresses in the list of the transaction when they are sent to one or more addresses?

If a transaction contains input from more than one address then it can be concluded that the addresses are in the same wallet, but I'm not sure how that is relevant to this.
legendary
Activity: 3052
Merit: 1273
January 23, 2018, 03:13:09 AM
#40
Example:
As I used my Legacy address' private key over the site mentioned in OP, I got an address starting with 3 and website claims it to be a SegWit address. That's what I'm asking, that if I get a SegWit address using my Legacy privkey, how will I be able to use that SegWit address? Which wallet is compatible to do that?

You can do this with a Core node. First import the private key and then from the console command line:

addwitnessaddress addr

where addr is the existing P2SH address.

You need to use the version of Core that you download and compile to actually use the Segwit address on Core as the code is not yet included on the precompiled one (scheduled to be in the next release 0.16.0).

I still personally would rather use a totally fresh private key and address and not reuse one.


Can you please throw some light over that bold part? I'm unsure of the issues with the current version of core and whether I should wait for the newer release of core (i.e.; 0.16)
The reason why I'm interested in that is, when we have at least one thing fixed, we can use it to sign messages to prove that we possess it. I'm aware of the fact that it breaches the code of anonymity for which bitcoin was created, but isn't it true that when we try to send all the funds in our wallet, it shows all the addresses in the list of the transaction when they are sent to one or more addresses?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 21, 2018, 09:58:02 AM
#39
I'm not interested in using both the addresses but to use a SegWit address that's related to our current Legacy address!? Can it seriously decrease the security level? I didn't mean that I want to use Legacy addresses that lie under SegWit, but vice-versa.

It is generally considered good practice not to reuse addresses. I know that is unavoidable for something like a signature campaign where you receive regular payment but when you send a transaction from an address then information about it is broadcast on the network. It is not a vulnerability, just being ultra safe, but that is why most wallets and services generate new addresses as soon as one is used.

Example:
As I used my Legacy address' private key over the site mentioned in OP, I got an address starting with 3 and website claims it to be a SegWit address. That's what I'm asking, that if I get a SegWit address using my Legacy privkey, how will I be able to use that SegWit address? Which wallet is compatible to do that?

You can do this with a Core node. First import the private key and then from the console command line:

addwitnessaddress addr

where addr is the existing P2SH address.

You need to use the version of Core that you download and compile to actually use the Segwit address on Core as the code is not yet included on the precompiled one (scheduled to be in the next release 0.16.0).

I still personally would rather use a totally fresh private key and address and not reuse one.
legendary
Activity: 3052
Merit: 1273
January 21, 2018, 09:43:02 AM
#38
As well, what I am interested in is that, can I use this "compressed" version, i.e.; the SegWit address that's connected to my Legacy address' private key? If yes, then how and from which wallet will I be able to receive funds over that SegWit address and use them to send?

I don't understand why you would want to reuse an old private key. The P2SH-P2WPKH (3) Segwit addresses all have an underlying legacy (1) address but wouldn't using both addresses decrease security?

I'm not interested in using both the addresses but to use a SegWit address that's related to our current Legacy address!? Can it seriously decrease the security level? I didn't mean that I want to use Legacy addresses that lie under SegWit, but vice-versa.

Example:
As I used my Legacy address' private key over the site mentioned in OP, I got an address starting with 3 and website claims it to be a SegWit address. That's what I'm asking, that if I get a SegWit address using my Legacy privkey, how will I be able to use that SegWit address? Which wallet is compatible to do that?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 21, 2018, 04:24:55 AM
#37
Thanks to Xynerise for answering that, I would have had to look up how to do that.

Can you please elaborate it? It's something I'm interested in learning, so not to commit such a mistake in future.
Can you determine which wallet/website should be used for each step?

I'm not sure but I think you need a Core node to do this.

As well, what I am interested in is that, can I use this "compressed" version, i.e.; the SegWit address that's connected to my Legacy address' private key? If yes, then how and from which wallet will I be able to receive funds over that SegWit address and use them to send?

I don't understand why you would want to reuse an old private key. The P2SH-P2WPKH (3) Segwit addresses all have an underlying legacy (1) address but wouldn't using both addresses decrease security?
legendary
Activity: 3052
Merit: 1273
January 20, 2018, 09:23:02 AM
#36
Yes, you can.

With your WIF private key, convert it to a COMPRESSED public key (segwit only supports compressed public keys)

Hash the pub key with sha256

Then hash the result with RIPEMD160

Then encode it with base58 to get the P2SH-P2WPKH address

(You'll have to convert the values to hex before hashing, bitcoin works with hexadecimal values, not strings or characters)

Can you please elaborate it? It's something I'm interested in learning, so not to commit such a mistake in future.
Can you determine which wallet/website should be used for each step?
As well, what I am interested in is that, can I use this "compressed" version, i.e.; the SegWit address that's connected to my Legacy address' private key? If yes, then how and from which wallet will I be able to receive funds over that SegWit address and use them to send?
sr. member
Activity: 322
Merit: 363
39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD
January 20, 2018, 07:31:23 AM
#35
One major question here:
As it all started with me using my private key over that website thinking that I will be getting a SegWit address over my Legacy address, I would like to ask you that is there anything that could convert my Legacy Address to SegWit itself? I'm not going to use my current Legacy address any more, but just out of curiosity, is there anything like a SegWit address already related to our Legacy Address (based on its private key)? If there is something like this, how will I be able to use that SegWit address? Where will I be able to use it from?

Just to remind you:
I used the last option over segwitaddress.org that says:
"Details

Enter a WIF private key to generate its corresponding segwit address.

WIF Private Key:", I put my private key and clicked on "Show Detail".

After that, all it gave was an address starting with 3 and my private key as well as a QR Code.
Yes, you can.

With your WIF private key, convert it to a COMPRESSED public key (segwit only supports compressed public keys)

Hash the pub key with sha256

Then hash the result with RIPEMD160

Then encode it with base58 to get the P2SH-P2WPKH address

(You'll have to convert the values to hex before hashing, bitcoin works with hexadecimal values, not strings or characters)
legendary
Activity: 3052
Merit: 1273
January 20, 2018, 06:24:23 AM
#34
One major question here:
As it all started with me using my private key over that website thinking that I will be getting a SegWit address over my Legacy address, I would like to ask you that is there anything that could convert my Legacy Address to SegWit itself? I'm not going to use my current Legacy address any more, but just out of curiosity, is there anything like a SegWit address already related to our Legacy Address (based on its private key)? If there is something like this, how will I be able to use that SegWit address? Where will I be able to use it from?

Just to remind you:
I used the last option over segwitaddress.org that says:
"Details

Enter a WIF private key to generate its corresponding segwit address.

WIF Private Key:", I put my private key and clicked on "Show Detail".

After that, all it gave was an address starting with 3 and my private key as well as a QR Code.
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 20, 2018, 02:27:22 AM
#33
Take an example.

Now I know why I didn't understand the question. That should not happen. In Electrum you can preview the transaction before sending it and it will show the precise fee, size and fee sat/byte. This will be accurate as to what is sent out on the network.


I actually asked that on what basis is transaction's weight unit decided?
But thanks for that link, I saw that the transaction size (rawtx) basically gets divided by 4 in order to get weight units (virtual size). Smiley

EDIT:
While we are talking about weight units (virtual size of transactions), I would like to ask that once everything goes SegWit and it comes fully in use, are we going to pay fees only on weight units and not the actual normal fees that we are paying currently through legacy addresses?

Since Segwit was activated on the network we are already all paying fees based on weighted units. A legacy transaction has every byte weighted at 4 as does a Segwit transaction with the exception of the witness data bytes which are weighted at 1.
Virtual size is simply an alternative way of displaying exactly the same thing but divided by 4 to make it look consistent with what we are used to.
Electrum's implementation is simply showing 'size' which is actually virtual size. The btc.com block explorer shows both the virtual size, the weight, and fee rate in BTC/kVb in a way that is consistent with Electrum. Some other block explorers have chosen to display it differently which can cause some confusion.

legendary
Activity: 3052
Merit: 1273
January 19, 2018, 12:43:11 PM
#32
That's totally understandable, but then, there were few bands in the image with the exact same size.
However, as I always send 10 - 15 sats/byte less than the exact amount as needed here, how does it guarantee that it will come in that band only?

I'm not quite understanding your question here. Have a look at the site and watch what happens when a block is found and you should have a very good idea what a good fee level is at the moment. If not can you expand on this question a bit and I'll try and help.

Take an example.
I see at bitcoinfees.earn.com that a fee level of 120-130 sats/byte is sufficient to get my transaction confirmed in the next few blocks (a few minutes or hours) and decide to use that fee. But when I use a Legacy address to send anything, it shows something different as fee.
Like, it shows that it is charging 0.00036 satoshis (for a 300 bytes transaction). But, after sending, I see that the fee/byte gets changed to ~135 - 140 sats/byte (may be due to compression and change in transaction size). That's why I said that I send 10 - 15 sats/byte less than what's shown sufficient at that fees website. Coming back to the question, as we are still unclear about the compression part, can you tell me that how to know what will be the exact size of transaction (after sending it and compression takes place) before we do it? Sending these much sats/byte doesn't really guarantee that my transaction will carry a fee in between the band that's shown here: https://dedi.jochen-hoenicke.de/queue/more/#2h


Can you explain about some % part, as based on what percentage a transaction's weight unit is decided? Where can I find more info about that?

Not too sure what exactly you want to know but try this
https://en.bitcoin.it/wiki/Weight_units

I actually asked that on what basis is transaction's weight unit decided?
But thanks for that link, I saw that the transaction size (rawtx) basically gets divided by 4 in order to get weight units (virtual size). Smiley

EDIT:
While we are talking about weight units (virtual size of transactions), I would like to ask that once everything goes SegWit and it comes fully in use, are we going to pay fees only on weight units and not the actual normal fees that we are paying currently through legacy addresses?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 19, 2018, 10:04:17 AM
#31
Where can I get this picture? Link please.

That was from https://dedi.jochen-hoenicke.de/queue/more/#2h
It's the second graph down on the page, usually easiest to see on that one.

That's totally understandable, but then, there were few bands in the image with the exact same size.
However, as I always send 10 - 15 sats/byte less than the exact amount as needed here, how does it guarantee that it will come in that band only?

I'm not quite understanding your question here. Have a look at the site and watch what happens when a block is found and you should have a very good idea what a good fee level is at the moment. If not can you expand on this question a bit and I'll try and help.

Still unclear about this. Let's take an example. I currently have nothing in that wallet, I will receive something this weekend in a fixed address (single bech32 adddress only). Does it still divide inputs to more than one even if I use a single address to send coins to just one or more than one addresses?

When you receive that payment your wallet will have one input. Then if you haven't spent it the next time you get a payment you will then have 2 inputs and they will be listed separately on that tab. Think of it like cash, if someone gives you a 10 cent coin and then you get another and so on until you have 10, you do not have a dollar bill you have ten 10 cent coins. It doesn't matter if they are sent to the same address or a different address in the same wallet, every transaction you receive is a separate input.

What exactly happens when I bump it up? Does both the transaction fee sizes, i.e.; the normal fee and the virtual fee both change in sizes?

There is only one fee. If you preview a transaction on Electrum it will show you a size. This is actually the virtual size as that is all you need to know about and what the fee is calculated on.
If you bump up the fee you are simply replacing the transaction with another one with a higher fee. Normally a wallet will not let you do this but with the Propose Replace-By-Fee feature, you can.

Can you explain about some % part, as based on what percentage a transaction's weight unit is decided? Where can I find more info about that?

Not too sure what exactly you want to know but try this
https://en.bitcoin.it/wiki/Weight_units

legendary
Activity: 3052
Merit: 1273
January 19, 2018, 09:16:26 AM
#30
SNIP

So in this picture of right now:


Where can I get this picture? Link please.


Quote
The 120+ sat per byte band is regularly getting little bits taken out of it.

That's totally understandable, but then, there were few bands in the image with the exact same size.
However, as I always send 10 - 15 sats/byte less than the exact amount as needed here, how does it guarantee that it will come in that band only?


Quote
Something you can use on Electrum is

View > Show Coins

and a new Coins tab appears. There you will see all your inputs listed. Electrum selects automatically which ones it will use in a transaction but here you have the advanced option to select that for yourself by using right click and spend.

Still unclear about this. Let's take an example. I currently have nothing in that wallet, I will receive something this weekend in a fixed address (single bech32 adddress only). Does it still divide inputs to more than one even if I use a single address to send coins to just one or more than one addresses?


Quote
Edit. Something else I just remembered. As you are new to Electrum go to Tools > Preferences then under Fees change Propose Replace-By-Fee to Always. Then you can always bump up the fee if you ever get a stuck transaction.

What exactly happens when I bump it up? Does both the transaction fee sizes, i.e.; the normal fee and the virtual fee both change in sizes?
Can you explain about some % part, as based on what percentage a transaction's weight unit is decided? Where can I find more info about that?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 19, 2018, 07:45:11 AM
#29
How is it even possible to check what fee/byte transactions are being taken in each block?

If you watch the bitcoinfees.earn.com site you will see when a block is found the bars for unconfirmed reduce in size. There will be a point on the price scale where that doesn't happen for prices lower, so the lowest priced bar that decreased is the point which you are looking for. I find it easier to see on the dedi.jochen-hoenicke.de site as it is the colour band that gets bitten into on each block. You can put your mouse over the band to highlight the price.

So in this picture of right now:



The 120+ sat per byte band is regularly getting little bits taken out of it.

But how will I be able to put more inputs if I have everything stored on a single address?
Does it mean that I will be getting no such "discounts" that you mentioned below?

I'm not suggesting you can get more discount, I was just trying to explain how it works. It is the witness data for each input that is discounted. That's where the saving comes from. Using more inputs makes a larger (therefore more expensive) transaction. The penalty for using lots of inputs is much less using Segwit than it is on a legacy transaction.

Something you can use on Electrum is

View > Show Coins

and a new Coins tab appears. There you will see all your inputs listed. Electrum selects automatically which ones it will use in a transaction but here you have the advanced option to select that for yourself by using right click and spend.

By these examples, are you trying to say that by using SegWit, I will not be getting anything like reduction in fee/byte in real, but due to it being done through a SegWit address, it will reduce the size of the transaction (which is actually the core purpose if I'm not wrong) and give it a virtual size, and that fee/byte (whatever the amount will be), will be multiplied by virtual size rather than 'rawtx'?

Yes, that was what I was trying to say. I probably confused the issue by getting into too much technical detail.
There is also a bit of confusion caused by different block explorers and software using different terminology. Some will quote it in 'Weighted Units' rather than giving 'virtual size'. All it really means is the transactions are not really smaller but they are treated as being smaller both for fee calculation and for how much data is allowed in a block. So it is cheaper to use and increases the capacity of the network.

You should be seeing that normal transactions are 30% to 40% less bytes than they would be if you were not using Segwit.

Edit. Something else I just remembered. As you are new to Electrum go to Tools > Preferences then under Fees change Propose Replace-By-Fee to Always. Then you can always bump up the fee if you ever get a stuck transaction.


legendary
Activity: 3052
Merit: 1273
January 19, 2018, 07:13:52 AM
#28
That was just the optimum fee at the time of that transaction. I use https://bitcoinfees.earn.com/ and https://dedi.jochen-hoenicke.de/queue/more/#2h to determine what fee/byte to use. Ignore the recommended fee and look at the data to see which fee level is the lowest that is getting included each time a block is found. Right now bitcoinfees.earn.com recommends 460 sat/byte but I would use 120 sat/byte and it would be confirmed quite quickly.

How is it even possible to check what fee/byte transactions are being taken in each block?
I only try to check that what fee level has the least transactions waiting to be confirmed, and send 10 - 15 sats/byte lesser than that amount (as it automatically increases after compression of the transaction). Still, sometimes need to wait longer as it's all mainly about luck nowadays.  Undecided


Quote
The saving with using Segwit is not that you can use a lower fee/byte but rather in the way the size of the transaction is calculated. Using that same transaction as an example you can see the btc.com block explorer shows a 'rawtx' size of 194 bytes and a 'virtual size' of 112 bytes. The fee is calculated on the virtual size. The implementation of Segwit replaced the 1Mb block size limit with a 4000 weighted unit block size limit. All data in a transaction is weighted at 4 per byte except witness data which is weighted at 1 per byte. So when you use a Segwit transaction you are receiving a weighting discount on the input scripts. The more inputs to a transaction the more discount. The outputs have no effect.

But how will I be able to put more inputs if I have everything stored on a single address?
Does it mean that I will be getting no such "discounts" that you mentioned below?


Quote
Edit: Something interesting that demonstrates the point just happened on the blockchain. A block just went through with a size of 1,588,136 which is unusually large.
https://btc.com/00000000000000000033a9758f74dd1c027e96d5be10f2e68dbda63feb9c7a94

Looking at what was in the block there are a large number of transaction like this one, all with 300 Segwit inputs and all going to the same output address.

https://btc.com/1a1997b7a16c3ea2f1dc21b95a8f838efb1146ddab3b4140ae69d7957c69557e

The transaction has a 'rawtx' of 51,497 bytes but a virtual size of only 27,309 bytes giving a saving of 47% to whoever was sending these. Looks like it is HitBTC.


By these examples, are you trying to say that by using SegWit, I will not be getting anything like reduction in fee/byte in real, but due to it being done through a SegWit address, it will reduce the size of the transaction (which is actually the core purpose if I'm not wrong) and give it a virtual size, and that fee/byte (whatever the amount will be), will be multiplied by virtual size rather than 'rawtx'?
hero member
Activity: 2576
Merit: 883
Freebitco.in Support https://bit.ly/2I9BVS2
January 19, 2018, 03:18:04 AM
#27
That's super cheap. Is it limited to certain transactions or it's for all types of transactions?
What's your average fee/byte for each transaction? I am currently paying more than 200 sats/byte. Sad

That was just the optimum fee at the time of that transaction. I use https://bitcoinfees.earn.com/ and https://dedi.jochen-hoenicke.de/queue/more/#2h to determine what fee/byte to use. Ignore the recommended fee and look at the data to see which fee level is the lowest that is getting included each time a block is found. Right now bitcoinfees.earn.com recommends 460 sat/byte but I would use 120 sat/byte and it would be confirmed quite quickly.

The saving with using Segwit is not that you can use a lower fee/byte but rather in the way the size of the transaction is calculated. Using that same transaction as an example you can see the btc.com block explorer shows a 'rawtx' size of 194 bytes and a 'virtual size' of 112 bytes. The fee is calculated on the virtual size. The implementation of Segwit replaced the 1Mb block size limit with a 4000 weighted unit block size limit. All data in a transaction is weighted at 4 per byte except witness data which is weighted at 1 per byte. So when you use a Segwit transaction you are receiving a weighting discount on the input scripts. The more inputs to a transaction the more discount. The outputs have no effect.

Edit: Something interesting that demonstrates the point just happened on the blockchain. A block just went through with a size of 1,588,136 which is unusually large.
https://btc.com/00000000000000000033a9758f74dd1c027e96d5be10f2e68dbda63feb9c7a94

Looking at what was in the block there are a large number of transaction like this one, all with 300 Segwit inputs and all going to the same output address.

https://btc.com/1a1997b7a16c3ea2f1dc21b95a8f838efb1146ddab3b4140ae69d7957c69557e

The transaction has a 'rawtx' of 51,497 bytes but a virtual size of only 27,309 bytes giving a saving of 47% to whoever was sending these. Looks like it is HitBTC.
sr. member
Activity: 322
Merit: 363
39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD
January 18, 2018, 04:52:21 PM
#26
Quote
To get the the reduced fee all outputs must be segwit?
No.
The outputs (destination addresses don't matter) as long as you're sending FROM a Segwit wallet.
Pages:
Jump to: