Bitcoin Forum
May 11, 2024, 07:19:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is a transaction legal if it just sends funds back to itself?  (Read 813 times)
No_2 (OP)
Hero Member
*****
Offline Offline

Activity: 901
Merit: 1033


BTC: the beginning of stake-based public resources


View Profile
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?
1715455162
Hero Member
*
Offline Offline

Posts: 1715455162

View Profile Personal Message (Offline)

Ignore
1715455162
Reply with quote  #2

1715455162
Report to moderator
1715455162
Hero Member
*
Offline Offline

Posts: 1715455162

View Profile Personal Message (Offline)

Ignore
1715455162
Reply with quote  #2

1715455162
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715455162
Hero Member
*
Offline Offline

Posts: 1715455162

View Profile Personal Message (Offline)

Ignore
1715455162
Reply with quote  #2

1715455162
Report to moderator
1715455162
Hero Member
*
Offline Offline

Posts: 1715455162

View Profile Personal Message (Offline)

Ignore
1715455162
Reply with quote  #2

1715455162
Report to moderator
1715455162
Hero Member
*
Offline Offline

Posts: 1715455162

View Profile Personal Message (Offline)

Ignore
1715455162
Reply with quote  #2

1715455162
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mezzomix
Legendary
*
Offline Offline

Activity: 2618
Merit: 1253


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: 3388
Merit: 4653



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!