Bitcoin Forum
May 02, 2024, 05:44:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: A transaction - UTXO’s, new output(s), input(s) and previous output(s).  (Read 319 times)
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 11:55:37 AM
Last edit: October 21, 2023, 09:46:21 AM by FbnGbz
Merited by vapourminer (1), ABCbits (1), hugeblack (1), hosseinimr93 (1)
 #1

Yes, it's my content... https://www.reddit.com/u/Fabs_-/s/sHSWMLSrYu

A transaction locks value (bitcoin) to a script, it does this by creating new output(s) (also referred to as (UTXO’s, Unspent Transaction Outputs), through creating input(s) onto a given script using different address-types, which makes sending and receiving bitcoin easier.

An address “locks” value (bitcoin) to be spent, say, a given address receives five deposits, consisting of : 0.1, 0.2, 0.3, 0.4 and 0.5 BTC.

The address now holds a combined value of 1.5 BTC, consisting of the five individual deposits. These individual deposits are UTXO’s, or new outputs, which means that the owner of the address in question now has five new outputs at his disposal. New outputs are Bitcoin’s version of deposits available to be spent.
The owner of the address above now decides to deposit his bitcoin onto another address, thus creating a new output through an input onto the receiving address, but what is, or does, an input do ?

An input refers to the process of creating a new output, that includes specifying which of the available UTXO’s are to be spent on new outputs, creating a chain-of-ownership, and authorizing the transaction with the owner’s digital signature, thus providing proof-of-ownership as well as signing the new output with the input’s specific script signature, ensuring that the new output can’t be altered on a later stage.

* Each transaction is signed by the owner through a digital signature, which is achieved by applying the private key to the transaction data, which produces a numerical signature, this numerical signature is referred to as a “digital signature”.

* UTXO’s are able to be poured into new UTXO’s with bigger or smaller values, i.e: two UTXO’s of 0.1 and 0.2 BTC respectively are poured together into one UTXO of 0.3 BTC, minus transaction fees.

* Each UTXO requires its own signature or unlocking/spending script

* The higher the amount of individual UTXO's used during a transaction, the bigger the data-size of that transaction becomes, thus increasing the amount of space that transaction needs within a block, increasing its transaction's fees.

The UTXO’s spent in the above transaction are now referred to as previous outputs, since they don’t hold any spendable value anymore.

Transactions also receive an identification number, referred to as a TXID (Transaction ID), which is created through hashing a transaction’s transaction data (the respective inputs and outputs) twice through the SHA256-function.



I've found the topic of UTXO's to be challenging to summarize and understand, and although i'm confident in the above being (mostly) correct, i'd welcome any constructive input helping to improve the summary as well as my understanding.


1714628698
Hero Member
*
Offline Offline

Posts: 1714628698

View Profile Personal Message (Offline)

Ignore
1714628698
Reply with quote  #2

1714628698
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
apogio
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
October 20, 2023, 12:12:04 PM
 #2

<~>

Did you write this?

Also, what is the question?

FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 12:19:51 PM
 #3

Hey there, yes, i've wrote it all myself. I wanna know if there's anything inherently wrong in what I've written, as well as if there's anything to change or add in order to make it better understandable as a whole.

Edit: Yes, that's me, too. I also ask for feedback on Reddit and SN, but I feel like there aren't as much people who know as much about the technical side as there are here. The content really is mine. Cheesy
apogio
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
October 20, 2023, 12:27:27 PM
 #4

From quick google search, i found this https://www.reddit.com/r/BitcoinBeginners/comments/179epf6/reworked_the_utxosummary_and_it_although_it_makes/. But since it's created just 4 days ago, there's possibly OP and user on reddit are same person.

Edit: Yes, that's me, too. I also ask for feedback on Reddit and SN, but I feel like there aren't as much people who know as much about the technical side as there are here. The content really is mine. Cheesy

Alright, sorry for asking!

He don't ask question, but ask for feedback about what he write.

Hey there, yes, i've wrote it all myself. I wanna know if there's anything inherently wrong in what I've written, as well as if there's anything to change or add in order to make it better understandable as a whole.

So yeah it looks good, I will read it again later and if needed I will update this post.


FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 12:29:29 PM
 #5

No worries, I'm glad to hear, thanks !
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4833



View Profile
October 20, 2023, 01:32:24 PM
 #6

I've found the topic of UTXO's to be challenging to summarize and understand, and although i'm confident in the above being (mostly) correct, i'd welcome any constructive input helping to improve the summary as well as my understanding.
If you do not want it to be challenging for newbies, you have to explain it with examples.

Example
Mr. A sent 0.1 BTC to Mr D to address 1, that is 1 UTXO
Mr. B sent 0.5 BTC to Mr D to address 1, that is 1 UTXO
Mr. C sent 0.3 BTC to Mr D to address 1, that is 1 UTXO

That is 3 UTXO counts with 0.9 BTC.

Sending it to same address 1 or different addresses belonging to Mr. D wallet that generates the addresses, the UTXO count is still 3.


Explaining UTXO but not explaining why it is important, most importantly in relation to transaction fee, that makes the explanation incomplete.

The more the UTXO to be used in a transaction, the more the fee.

If Mr. D has to spend the whole 0.9 BTC from Mr. A, B and C, the transaction fee would be higher if compared to the 0.9 BTC to be sent at once to him (1 UTXO), like Mr. A to send the whole 0.9 BTC at once which would be of the same fee if Mr. D use coin control to spend only just 1 UTXO sent from Mr A, B or C. The more the UTXO to be used in a transaction, the more the transaction fee of the transaction.

You can also explain how coin control can be used to avoid dust attack.

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

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

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

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

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

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











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











▄▄▄▄█
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 01:41:39 PM
 #7

Sharp, i'll think about a way of adding it. How come the transaction fee increases when multiple UTXO's are used, instead of one?
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5235



View Profile
October 20, 2023, 01:45:14 PM
 #8

A transaction locks value (bitcoin) to an address or a script,
It may worth mentioning that there are no addresses in the protocol level.
Bitcoin addresses are used for sending and receiving fund easier. Coins are always locked using scripts.


i.e: two UTXO’s of 0.1 and 0.2 BTC respectively are poured together into one UTXO of 0.3 BTC.
0.3 BTC minus transaction fee.


How come the transaction fee increases when multiple UTXO's are used, instead of one?
The more inputs/outputs your transaction contains, the bigger size of data you have to broadcast and the more fee you have to pay miners to include your transaction in the blockchain.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 02:07:29 PM
 #9

Clear, also; sharp input about the scripts and addresses, changed the summary accordingly, thanks.
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6258


Crypto Swap Exchange


View Profile WWW
October 20, 2023, 02:19:39 PM
 #10

Considering the OP has already plagiarized things from other places I doubt their original post here was theirs either.
Just my view I could be wrong.

https://bitcointalk.org/index.php?topic=1926895.msg63025525#msg63025525
And
https://bitcointalk.org/index.php?topic=1926895.msg63025721#msg63025721

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
October 20, 2023, 02:26:14 PM
 #11

Hey there, yes, i've wrote it all myself. I wanna know if there's anything inherently wrong in what I've written, as well as if there's anything to change or add in order to make it better understandable as a whole.

Edit: Yes, that's me, too. I also ask for feedback on Reddit and SN, but I feel like there aren't as much people who know as much about the technical side as there are here. The content really is mine. Cheesy
If the contents of your posts which are on other sites are truly yours, you should confirm this by signing a message here and in your other accounts, stating all your usernames you have copy pasted from, here they will ban you if you can't prove it.  Plagiarizing is taken very seriously.

🖤😏
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 02:36:31 PM
Merited by Kruw (1)
 #12

What a joke, honesty. What benefit would I have in blindly copying other's?! Fine. I'll have a post up on Reddit where I'll mention my username here, as well as my activity on Bitcoin talk.

https://www.reddit.com/u/Fabs_-/s/sHSWMLSrYu
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5235



View Profile
October 20, 2023, 02:45:04 PM
Last edit: October 20, 2023, 02:58:27 PM by hosseinimr93
 #13

What a joke, honesty. What benefit would I have in blindly copying other's?! Fine. I'll have a post up on Reddit r/Bitcoin, where I'll feature my account here, I'll link the post. What a joke.
FbnGbz, people here are trying to help you.
Your posts have been already reported for plagiarism and there's a big possibility that they will be removed by moderators soon and you will be banned.
According to the new post you made on reddit, it's clear that you have not plagiarized anything and the posts on reddit have been made by you.


I recommend you to edit the topics you made on this forum. Add something like "I have already posted this on reddit  and I have not plagiarized .............." so that moderators are aware of that whenever they handle the reports.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 02:54:45 PM
 #14

I have, what a pis-poor experience this forum has been so far, aside from a handful of sharp inputs.
tromp
Legendary
*
Offline Offline

Activity: 978
Merit: 1080


View Profile
October 20, 2023, 03:42:13 PM
 #15

* Each UTXO requires its own signature.
While that's usually the case, it's not required.

Each non-taproot UTXO requires its script to be satisfied, while a taproot UTXO can be satisfied either by signature or by its script. Scripts don't have to check signatures.
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 20, 2023, 03:51:02 PM
 #16

Hmm, I don't know how I should word this, nor would I say that I fully understand what you mean, could you expand on this?
FbnGbz (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 8


View Profile
October 21, 2023, 09:47:37 AM
 #17

I see, thanks. I'll have to dive deeper into this, I've edited the summary with your example, I like it.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
October 26, 2023, 04:57:34 AM
Merited by vapourminer (1), apogio (1)
 #18

. . . what a pis-poor experience this forum has been so far . . .

What a piss-poor attitude this is from someone that claims to want feedback without putting any effort into understanding the community etiquette or the spam, scams, trolls, and clout-chasers that experienced Bitcoin educators have had to put up with here for over a decade.

A little humility, a little patience, and a little effort to make it clear what you're doing and why will go a LONG way towards getting incredibly useful feedback and help from some of the most knowledgeable and experienced bitcoin experts in the world.
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
October 29, 2023, 06:30:39 PM
 #19

...
An address “locks” value (bitcoin) to be spent, say, a given address receives five deposits, consisting of : 0.1, 0.2, 0.3, 0.4 and 0.5 BTC.

The address now holds a combined value of 1.5 BTC, consisting of the five individual deposits. These individual deposits are UTXO’s, or new outputs, which means that the owner of the address in question now has five new outputs at his disposal. New outputs are Bitcoin’s version of deposits available to be spent.
The owner of the address above now decides to deposit his bitcoin onto another address, thus creating a new output through an input onto the receiving address, but what is, or does, an input do ?
...

It can be convenient to think of an address as a place where bitcoins are stored, but the concept becomes a little clumsy at the UTXO level of detail. An output's script typically contains an address.

An input is simply a reference to a previously created UTXO, plus the script necessary to unlock it. An input's script typically contains a signature.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
October 30, 2023, 12:17:52 AM
Merited by EFS (4), ABCbits (3)
 #20

...
An address “locks” value (bitcoin) to be spent, say, a given address receives five deposits, consisting of : 0.1, 0.2, 0.3, 0.4 and 0.5 BTC.

The address now holds a combined value of 1.5 BTC, consisting of the five individual deposits. These individual deposits are UTXO’s, or new outputs, which means that the owner of the address in question now has five new outputs at his disposal. New outputs are Bitcoin’s version of deposits available to be spent.
The owner of the address above now decides to deposit his bitcoin onto another address, thus creating a new output through an input onto the receiving address, but what is, or does, an input do ?
...

It can be convenient to think of an address as a place where bitcoins are stored, but the concept becomes a little clumsy at the UTXO level of detail. An output's script typically contains an address.

An input is simply a reference to a previously created UTXO, plus the script necessary to unlock it. An input's script typically contains a signature.

Useful things to keep in mind:
  • While you CAN reuse an address to receive multiple times, it's generally a bad idea. It's recommended to use a brand new address for every transaction you receive in most situations.
  • Use of the word "deposit" implies an "account" that is being managed by a centralized entity.  There are no "accounts" in the bitcoin protocol, and addresses are not "account numbers" (They are more similar to invoice numbers than account numbers, but even that can stretch the analogy a bit to far for some conversations)
  • We are still generalizing if we state that an output script "contains an address". This may be fine depending on what we are trying to communicate, but technically, there generally is not an address in the output.

Embedded in an "address" are 3 key pieces of information that the bitcoin wallet software needs from the human:
  • The type of transaction that the human wants the wallet to create (P2PK, P2PKH, P2SH, P2WPKH)
  • The data needed for locking (public key, public key hash, script hash)
  • A checksum so the wallet software can notify the human if they made a typo

Typically wallet software uses that third part to make sure the human didn't make a typo, and then ignores it after that. It then uses the first part to know what type of locking script to create, and finally it uses that second part to build the actual locking script.

The output in the transaction just contains that resulting locking script, not the "address". Blockchain explorers and wallet software can recognize the script type and then rebuild the "address" from the available script data when displaying the transaction to humans, but that address isn't actually stored in it's address form anywhere in the blockchain.

Pages: [1] 2 »  All
  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!