Bitcoin Forum

Bitcoin => Electrum => Topic started by: bitterbug on December 08, 2018, 10:34:26 AM



Title: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: bitterbug on December 08, 2018, 10:34:26 AM
Hi,

I would like to know a) if the outputs are randomized, when Electrum creates a transaction consisting of multiple outputs, and b) if so, is there a feature for toggling the 'random order' of the outputs i.e. from on to off and vice versa?

Thanks.


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: NeuroticFish on December 08, 2018, 10:58:53 AM
Hi,

I would like to know a) if the outputs are randomized, when Electrum creates a transaction consisting of multiple outputs, and b) if so, is there a feature for toggling the 'random order' of the outputs i.e. from on to off and vice versa?

Thanks.

I am not sure I understood your question but you should start with View-Show Addresses.
Then you can:

1. right-click and freeze an address, then that one will not be used in the following transaction(s).
2. right-click and spend from certain address(es), then only those will be used in the following transaction(s).
3. when you send a transaction, the from list contains a lot of inputs; you can delete some unwanted ones

Edit: you can search more about coin control in Electrum; I've looked for an image to explain it better and I found this link: https://bitcoinspakistan.com/blog/coin-control-in-electrum/


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: bitterbug on December 08, 2018, 12:29:16 PM
Quote
I am not sure I understood your question

Is there a way to order the transaction outputs, in Electrum, without creating the raw transaction yourself?


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: crairezx20 on December 08, 2018, 05:21:17 PM
Quote
I am not sure I understood your question

Is there a way to order the transaction outputs, in Electrum, without creating the raw transaction yourself?
What exactly do you want on electrum?

I think electrum will give you random tx output so there is no way to change the output or create your own TX outputs.


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: pooya87 on December 09, 2018, 04:08:06 AM
Quote
I am not sure I understood your question

Is there a way to order the transaction outputs, in Electrum, without creating the raw transaction yourself?

why do you care about the order of transaction outputs? it doesn't make a difference whether you mean the previous ones you are spending (which the wallet seems to sort alphabetically based on their transaction IDs) or the new outputs you create (which is in your control based on which address you pay first).


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: bitterbug on December 09, 2018, 06:54:21 AM
Quote
I am not sure I understood your question

Is there a way to order the transaction outputs, in Electrum, without creating the raw transaction yourself?
What exactly do you want on electrum?

I think electrum will give you random tx output so there is no way to change the output or create your own TX outputs.

crairezx20,

There is a feature for loading a transaction via a text file.

To me that suggests there most certainly is a way to construct a raw transaction yourself and broadcast it using Electrum.

Look at the 'Pay to many' menu option.


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: bitterbug on December 09, 2018, 07:02:07 AM
... or the new outputs you create (which is in your control based on which address you pay first).

pooya87,

Have you tried sending money to many outputs?

You may find the order of the new outputs has been randomized before the transaction is broadcast by Electrum.

It does seem this is simply a policy decision that the Electrum devs have taken. I was just wondering if there was a way to turn this randomize feature off for particular transactions I broadcast.


Title: Re: Is there a way to toggle randomized tx outputs, in Electrum?
Post by: Abdussamad on December 10, 2018, 12:10:08 AM
Inputs and outputs in transactions are sorted according to lexicographic order (https://github.com/kristovatlas/rfc/blob/master/bips/bip-li01.mediawiki) in Electrum. You can see this happening in BIP_LI01_sort() in transaction.py (https://github.com/spesmilo/electrum/blob/3.2.3/electrum/transaction.py#L984) which is called from make_unsigned_transaction (https://github.com/spesmilo/electrum/blob/3.2.3/electrum/wallet.py#L615) in wallet.py. So it's not random but it doesn't leak any additional information either.