Bitcoin Forum
September 23, 2017, 09:30:06 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Is a transaction legal if it just sends funds back to itself?  (Read 680 times)
No_2
Hero Member
*****
Offline Offline

Activity: 793


BTC: the beginning of stake-based public resources


View Profile WWW
December 07, 2015, 01:09:46 PM
 #1

I'm sure this has been asked before but I can't find an answer on-line.

Is a bitcoin transaction valid if:

    1. It has one input and output with the same address which send the same amount funds to one another, i.e. no miners fee?
    2. It has one input and output with the same address which send a reduced amount of funds to one another, i.e. there is a miners fee?

MetaLair: a blockchain and cryptocurrency consultancy
Twitter: @MetaLair | Facebook | Google+
1506159006
Hero Member
*
Offline Offline

Posts: 1506159006

View Profile Personal Message (Offline)

Ignore
1506159006
Reply with quote  #2

1506159006
Report to moderator
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1506159006
Hero Member
*
Offline Offline

Posts: 1506159006

View Profile Personal Message (Offline)

Ignore
1506159006
Reply with quote  #2

1506159006
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 1204

In the midst of an exam, will be very inactive.


View Profile WWW
December 07, 2015, 01:20:25 PM
 #2

I'm sure this has been asked before but I can't find an answer on-line.

Is a bitcoin transaction valid if:

    1. It has one input and output with the same address which send the same amount funds to one another, i.e. no miners fee?
    2. It has one input and output with the same address which send a reduced amount of funds to one another, i.e. there is a miners fee?

1. Yes. There is no miners fee.
2. There is miners fee. Bitcoins cannot disappear like this.

In general input must = output.

CMIIW, this is how I understood it.














 

 

█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
BitBlender 

 













 















 












 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
mezzomix
Legendary
*
Offline Offline

Activity: 1848


View Profile
December 07, 2015, 01:25:12 PM
 #3

The input amount that is not claimed by the outputs is the fee. Both transactions are valid.
DannyHamilton
Legendary
*
Offline Offline

Activity: 1918



View Profile
December 07, 2015, 05:23:16 PM
 #4

1. It has one input and output with the same address which send the same amount funds to one another, i.e. no miners fee?
2. It has one input and output with the same address which send a reduced amount of funds to one another, i.e. there is a miners fee?

Transactions don't actually use addresses.  Therefore, it is impossible for an input and an output to have the same address.

The input of a transaction is just a reference to a previously unspent output. It includes the transaction ID of the transaction that created the output, and an offset that indicates which of the outputs from that previous transaction are being spent in the new transaction.  It also includes a script that is used to satisfy any conditions that the previous transaction encumbered the output with (typically this is an ECDSA signature). As long as the outputs that are supplying value to the transaction are valid and not yet spent, and the script satisfies the encumbrance, then the input can be used to supply value to the transaction.

The outputs of a transaction are each an integer value (expressed in satoshis) and a script that encumbers the output with certain requirements that must be met in order to use the output as the input of some future transaction.  Typically the script encumbers the output with a need for a signature that can be verified with a public key that hashes (using RIPEMD160) to a given value.  As long as the sum of the values from all the outputs doesn't exceed the sum of the value provided to the transaction from the inputs, and the script is a valid script, then the output can be used by the transaction.

The output script doesn't need to know anything about the input script or anything about the previous output which the input references, so it really doesn't matter what "address" is used to represent either of those output scripts.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!