Other database besides UTXO?State of transaction and UTXOWhere does Trezor get UTXOs from?How can one realistically model the distribution of the network's unspent transaction outputs?fetching unconfirmed utxos from blockchain.infoWhere is the Signature stored in a SegWit transaction?What exactly is collecting transactions?Does addressindex works in satoshi Bitcoin-Core?Editing the utxo database?How does an SPV client forms a transaction which is then Broadcasted?How do blockchains in each nodes maintain consistency?

Why are one-word titles so dominant in books, film, and games?

Mutate my DNA sequence

How does one "become like water"?

For the Single Entry Schengen visa, do the microstates (Monaco, San Marino and the Vatican City) count?

Who is Alice referring to when she was talking to Kate?

If you have multiple planeswalkers, how many of their loyalty abilities can you use in a single turn?

What is the purpose of polls published by the organization that they are asking about which have leading/confusing questions?

Is This Constraint Convex?

Algorithm that converts array-like data into MathJax: Python

Why are Buddhist concepts so difficult?

Why would shrinking TEMPDB log lead to slowness?

Articles at the beginning of sentences in scientific writing

A word/phrase means "a small amount" (of a color)

Is it safe to plug one travel adapter into another?

529 accounts for multiple kids

Can a company prevent a co-author of a paper to put his name on it?

ASCII TURNED SHAPE

Are homeless people protected by antidiscrimination laws?

Would there be a difference between boiling whole black peppercorns or fine ground black pepp in a stew?

If ten experts each of different fields where sent back 10 000y, can they recreate the 21 century in 100y?

Intuition for the derivative of the exponential function

Are commoners actually this squishy?

How can a signal be both periodic and random?

How can different packages have identical source code?



Other database besides UTXO?


State of transaction and UTXOWhere does Trezor get UTXOs from?How can one realistically model the distribution of the network's unspent transaction outputs?fetching unconfirmed utxos from blockchain.infoWhere is the Signature stored in a SegWit transaction?What exactly is collecting transactions?Does addressindex works in satoshi Bitcoin-Core?Editing the utxo database?How does an SPV client forms a transaction which is then Broadcasted?How do blockchains in each nodes maintain consistency?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















In this post it is explained that the UTXO are removed after they are spent. This makes sense because they are not "unspent" anymore.



But don't all UTXOs have a reference/connection to their previous transaction? Is there a second "list" in the blockchain where all transactions from the past are stored? Because if not, where does that reference point to if the previous transaction is not in the UTXO list anymore.



The whole UTXO Model confuses me a little bit, so thank you for the clarification.










share|improve this question







New contributor



Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





























    2

















    In this post it is explained that the UTXO are removed after they are spent. This makes sense because they are not "unspent" anymore.



    But don't all UTXOs have a reference/connection to their previous transaction? Is there a second "list" in the blockchain where all transactions from the past are stored? Because if not, where does that reference point to if the previous transaction is not in the UTXO list anymore.



    The whole UTXO Model confuses me a little bit, so thank you for the clarification.










    share|improve this question







    New contributor



    Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      2












      2








      2








      In this post it is explained that the UTXO are removed after they are spent. This makes sense because they are not "unspent" anymore.



      But don't all UTXOs have a reference/connection to their previous transaction? Is there a second "list" in the blockchain where all transactions from the past are stored? Because if not, where does that reference point to if the previous transaction is not in the UTXO list anymore.



      The whole UTXO Model confuses me a little bit, so thank you for the clarification.










      share|improve this question







      New contributor



      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      In this post it is explained that the UTXO are removed after they are spent. This makes sense because they are not "unspent" anymore.



      But don't all UTXOs have a reference/connection to their previous transaction? Is there a second "list" in the blockchain where all transactions from the past are stored? Because if not, where does that reference point to if the previous transaction is not in the UTXO list anymore.



      The whole UTXO Model confuses me a little bit, so thank you for the clarification.







      bitcoin-core transactions utxo utxo-set






      share|improve this question







      New contributor



      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor



      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked Oct 12 at 17:15









      NuiNui

      132 bronze badges




      132 bronze badges




      New contributor



      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Nui is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          2 Answers
          2






          active

          oldest

          votes


















          3


















          Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with txindex=1 keep every transaction forever. Some wallets though optimize the database to recover disk space - but this is a wallet-specific optimization and not part of how Bitcoin works.



          For instance, Bitcoin Core has many caches and optimizations. One of them is the UTXO cache. The reason to have this cache is kind of obvious: if you had to search the entire blockchain for your own unspent coins before every transaction, that could potentially take hours. So Bitcoin Core keeps track of your UTXO's. Your UTXO's output amounts add up and become the balance you see on the wallet software.



          The UTXO cache never points to previous transactions - it's just an optimization cache that makes it easy for Bitcoin Core to find TX's. The algorithm which builds the UTXO cache knows which transaction the UTXO came from, but the cache never points anywhere except to the TX index where the unspent output is located.



          The pointer to a previous transaction only exists when you spend a UTXO and then a new input TX is created on that transaction. That input will point to the previously unspent transaction and that former UTXO will become spent. A new UTXO is then created after this transaction is mined. This UTXO becomes part of the Bitcoin balance of the recipient, just like the UTXO was part of your balance before you spent it.



          This image (courtesy of bitcoin.org) might help illustrate how it works:
          enter image description here



          See those UTXO's dangling without a new TX ahead of them? Until they're spent, they remain as UTXO.



          The arrows in that illustration show the money flow direction, but technically the arrows point the other way around : the inputs point back at some previous UTXO output. Once an input points at an output that output is no longer a UTXO, it is a committed TX. The input links the previous TX to a new UTXO and the previous one is marked spent. Bitcoin Core then removes this previous UTXO from the cache.






          share|improve this answer









          New contributor



          Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




























            1


















            I want add a clarification inside your good post by Jose Fonseca, the UTXO is a TransactionOutput, this structure has only 2 value, the amount and the scriptPubKey. The link to the previous transaction is inside the TransactionInput so, the TransactionInput and the transaction output is contained inside the Raw transaction.



            So inside the cache is present only the UTXO (TransactionOutput).



            I have created this schema for my document, I hope it can help you.



            enter image description here



            This image tries to simplify how bitcoin transactions are generated.
            The terms that are used are generalized, for example, you do not enter the public key in the output transaction but the address or hash160 of public key, this depend to the type of script is used.



            In the image is not represented but there is a data type called Outpoint that refers to the previous raw transaction.



            Still, for my project I rebuilt the data structures used in Bitcoin core (Except for the scriptWitness) if you haven't looked at the code, they can give you a general idea. you can find it here



            ps: I'm developing this documentation, it can contain some error, please verify it.






            share|improve this answer





























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "308"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              noCode: true, onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );







              Nui is a new contributor. Be nice, and check out our Code of Conduct.









              draft saved

              draft discarded
















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f90963%2fother-database-besides-utxo%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown


























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3


















              Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with txindex=1 keep every transaction forever. Some wallets though optimize the database to recover disk space - but this is a wallet-specific optimization and not part of how Bitcoin works.



              For instance, Bitcoin Core has many caches and optimizations. One of them is the UTXO cache. The reason to have this cache is kind of obvious: if you had to search the entire blockchain for your own unspent coins before every transaction, that could potentially take hours. So Bitcoin Core keeps track of your UTXO's. Your UTXO's output amounts add up and become the balance you see on the wallet software.



              The UTXO cache never points to previous transactions - it's just an optimization cache that makes it easy for Bitcoin Core to find TX's. The algorithm which builds the UTXO cache knows which transaction the UTXO came from, but the cache never points anywhere except to the TX index where the unspent output is located.



              The pointer to a previous transaction only exists when you spend a UTXO and then a new input TX is created on that transaction. That input will point to the previously unspent transaction and that former UTXO will become spent. A new UTXO is then created after this transaction is mined. This UTXO becomes part of the Bitcoin balance of the recipient, just like the UTXO was part of your balance before you spent it.



              This image (courtesy of bitcoin.org) might help illustrate how it works:
              enter image description here



              See those UTXO's dangling without a new TX ahead of them? Until they're spent, they remain as UTXO.



              The arrows in that illustration show the money flow direction, but technically the arrows point the other way around : the inputs point back at some previous UTXO output. Once an input points at an output that output is no longer a UTXO, it is a committed TX. The input links the previous TX to a new UTXO and the previous one is marked spent. Bitcoin Core then removes this previous UTXO from the cache.






              share|improve this answer









              New contributor



              Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                3


















                Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with txindex=1 keep every transaction forever. Some wallets though optimize the database to recover disk space - but this is a wallet-specific optimization and not part of how Bitcoin works.



                For instance, Bitcoin Core has many caches and optimizations. One of them is the UTXO cache. The reason to have this cache is kind of obvious: if you had to search the entire blockchain for your own unspent coins before every transaction, that could potentially take hours. So Bitcoin Core keeps track of your UTXO's. Your UTXO's output amounts add up and become the balance you see on the wallet software.



                The UTXO cache never points to previous transactions - it's just an optimization cache that makes it easy for Bitcoin Core to find TX's. The algorithm which builds the UTXO cache knows which transaction the UTXO came from, but the cache never points anywhere except to the TX index where the unspent output is located.



                The pointer to a previous transaction only exists when you spend a UTXO and then a new input TX is created on that transaction. That input will point to the previously unspent transaction and that former UTXO will become spent. A new UTXO is then created after this transaction is mined. This UTXO becomes part of the Bitcoin balance of the recipient, just like the UTXO was part of your balance before you spent it.



                This image (courtesy of bitcoin.org) might help illustrate how it works:
                enter image description here



                See those UTXO's dangling without a new TX ahead of them? Until they're spent, they remain as UTXO.



                The arrows in that illustration show the money flow direction, but technically the arrows point the other way around : the inputs point back at some previous UTXO output. Once an input points at an output that output is no longer a UTXO, it is a committed TX. The input links the previous TX to a new UTXO and the previous one is marked spent. Bitcoin Core then removes this previous UTXO from the cache.






                share|improve this answer









                New contributor



                Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  3














                  3










                  3









                  Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with txindex=1 keep every transaction forever. Some wallets though optimize the database to recover disk space - but this is a wallet-specific optimization and not part of how Bitcoin works.



                  For instance, Bitcoin Core has many caches and optimizations. One of them is the UTXO cache. The reason to have this cache is kind of obvious: if you had to search the entire blockchain for your own unspent coins before every transaction, that could potentially take hours. So Bitcoin Core keeps track of your UTXO's. Your UTXO's output amounts add up and become the balance you see on the wallet software.



                  The UTXO cache never points to previous transactions - it's just an optimization cache that makes it easy for Bitcoin Core to find TX's. The algorithm which builds the UTXO cache knows which transaction the UTXO came from, but the cache never points anywhere except to the TX index where the unspent output is located.



                  The pointer to a previous transaction only exists when you spend a UTXO and then a new input TX is created on that transaction. That input will point to the previously unspent transaction and that former UTXO will become spent. A new UTXO is then created after this transaction is mined. This UTXO becomes part of the Bitcoin balance of the recipient, just like the UTXO was part of your balance before you spent it.



                  This image (courtesy of bitcoin.org) might help illustrate how it works:
                  enter image description here



                  See those UTXO's dangling without a new TX ahead of them? Until they're spent, they remain as UTXO.



                  The arrows in that illustration show the money flow direction, but technically the arrows point the other way around : the inputs point back at some previous UTXO output. Once an input points at an output that output is no longer a UTXO, it is a committed TX. The input links the previous TX to a new UTXO and the previous one is marked spent. Bitcoin Core then removes this previous UTXO from the cache.






                  share|improve this answer









                  New contributor



                  Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  Once spent, the wallet removes the UTXO from its cache of unspent transactions. The transaction is not removed from the general database (the blockchain or block index). Full nodes running with txindex=1 keep every transaction forever. Some wallets though optimize the database to recover disk space - but this is a wallet-specific optimization and not part of how Bitcoin works.



                  For instance, Bitcoin Core has many caches and optimizations. One of them is the UTXO cache. The reason to have this cache is kind of obvious: if you had to search the entire blockchain for your own unspent coins before every transaction, that could potentially take hours. So Bitcoin Core keeps track of your UTXO's. Your UTXO's output amounts add up and become the balance you see on the wallet software.



                  The UTXO cache never points to previous transactions - it's just an optimization cache that makes it easy for Bitcoin Core to find TX's. The algorithm which builds the UTXO cache knows which transaction the UTXO came from, but the cache never points anywhere except to the TX index where the unspent output is located.



                  The pointer to a previous transaction only exists when you spend a UTXO and then a new input TX is created on that transaction. That input will point to the previously unspent transaction and that former UTXO will become spent. A new UTXO is then created after this transaction is mined. This UTXO becomes part of the Bitcoin balance of the recipient, just like the UTXO was part of your balance before you spent it.



                  This image (courtesy of bitcoin.org) might help illustrate how it works:
                  enter image description here



                  See those UTXO's dangling without a new TX ahead of them? Until they're spent, they remain as UTXO.



                  The arrows in that illustration show the money flow direction, but technically the arrows point the other way around : the inputs point back at some previous UTXO output. Once an input points at an output that output is no longer a UTXO, it is a committed TX. The input links the previous TX to a new UTXO and the previous one is marked spent. Bitcoin Core then removes this previous UTXO from the cache.







                  share|improve this answer









                  New contributor



                  Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share|improve this answer




                  share|improve this answer






                  New contributor



                  Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  answered Oct 12 at 19:12









                  Jose FonsecaJose Fonseca

                  1266 bronze badges




                  1266 bronze badges




                  New contributor



                  Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




                  New contributor




                  Jose Fonseca is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.




























                      1


















                      I want add a clarification inside your good post by Jose Fonseca, the UTXO is a TransactionOutput, this structure has only 2 value, the amount and the scriptPubKey. The link to the previous transaction is inside the TransactionInput so, the TransactionInput and the transaction output is contained inside the Raw transaction.



                      So inside the cache is present only the UTXO (TransactionOutput).



                      I have created this schema for my document, I hope it can help you.



                      enter image description here



                      This image tries to simplify how bitcoin transactions are generated.
                      The terms that are used are generalized, for example, you do not enter the public key in the output transaction but the address or hash160 of public key, this depend to the type of script is used.



                      In the image is not represented but there is a data type called Outpoint that refers to the previous raw transaction.



                      Still, for my project I rebuilt the data structures used in Bitcoin core (Except for the scriptWitness) if you haven't looked at the code, they can give you a general idea. you can find it here



                      ps: I'm developing this documentation, it can contain some error, please verify it.






                      share|improve this answer
































                        1


















                        I want add a clarification inside your good post by Jose Fonseca, the UTXO is a TransactionOutput, this structure has only 2 value, the amount and the scriptPubKey. The link to the previous transaction is inside the TransactionInput so, the TransactionInput and the transaction output is contained inside the Raw transaction.



                        So inside the cache is present only the UTXO (TransactionOutput).



                        I have created this schema for my document, I hope it can help you.



                        enter image description here



                        This image tries to simplify how bitcoin transactions are generated.
                        The terms that are used are generalized, for example, you do not enter the public key in the output transaction but the address or hash160 of public key, this depend to the type of script is used.



                        In the image is not represented but there is a data type called Outpoint that refers to the previous raw transaction.



                        Still, for my project I rebuilt the data structures used in Bitcoin core (Except for the scriptWitness) if you haven't looked at the code, they can give you a general idea. you can find it here



                        ps: I'm developing this documentation, it can contain some error, please verify it.






                        share|improve this answer






























                          1














                          1










                          1









                          I want add a clarification inside your good post by Jose Fonseca, the UTXO is a TransactionOutput, this structure has only 2 value, the amount and the scriptPubKey. The link to the previous transaction is inside the TransactionInput so, the TransactionInput and the transaction output is contained inside the Raw transaction.



                          So inside the cache is present only the UTXO (TransactionOutput).



                          I have created this schema for my document, I hope it can help you.



                          enter image description here



                          This image tries to simplify how bitcoin transactions are generated.
                          The terms that are used are generalized, for example, you do not enter the public key in the output transaction but the address or hash160 of public key, this depend to the type of script is used.



                          In the image is not represented but there is a data type called Outpoint that refers to the previous raw transaction.



                          Still, for my project I rebuilt the data structures used in Bitcoin core (Except for the scriptWitness) if you haven't looked at the code, they can give you a general idea. you can find it here



                          ps: I'm developing this documentation, it can contain some error, please verify it.






                          share|improve this answer
















                          I want add a clarification inside your good post by Jose Fonseca, the UTXO is a TransactionOutput, this structure has only 2 value, the amount and the scriptPubKey. The link to the previous transaction is inside the TransactionInput so, the TransactionInput and the transaction output is contained inside the Raw transaction.



                          So inside the cache is present only the UTXO (TransactionOutput).



                          I have created this schema for my document, I hope it can help you.



                          enter image description here



                          This image tries to simplify how bitcoin transactions are generated.
                          The terms that are used are generalized, for example, you do not enter the public key in the output transaction but the address or hash160 of public key, this depend to the type of script is used.



                          In the image is not represented but there is a data type called Outpoint that refers to the previous raw transaction.



                          Still, for my project I rebuilt the data structures used in Bitcoin core (Except for the scriptWitness) if you haven't looked at the code, they can give you a general idea. you can find it here



                          ps: I'm developing this documentation, it can contain some error, please verify it.







                          share|improve this answer















                          share|improve this answer




                          share|improve this answer








                          edited Oct 12 at 23:16

























                          answered Oct 12 at 21:11









                          vincenzopalazzovincenzopalazzo

                          4151 silver badge16 bronze badges




                          4151 silver badge16 bronze badges
























                              Nui is a new contributor. Be nice, and check out our Code of Conduct.









                              draft saved

                              draft discarded

















                              Nui is a new contributor. Be nice, and check out our Code of Conduct.












                              Nui is a new contributor. Be nice, and check out our Code of Conduct.











                              Nui is a new contributor. Be nice, and check out our Code of Conduct.














                              Thanks for contributing an answer to Bitcoin Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f90963%2fother-database-besides-utxo%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown









                              Popular posts from this blog

                              Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                              Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                              199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單