Maximum number of inputs per transaction Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Can we interpret a rolling average transaction count per block as the 'adoption curve' for Bitcoin?Recommended Transaction SizeOptimising the inputs for a transactionWhat is the maximum number of output addresses I can send to with one bitcoin transaction?Get transaction fees per transaction via gettransactionWhat would be the implications of limiting Bitcoin transactions to fifty inputs?Determine inputs/outputs of a transaction before sendingIs there a maximum fee per byte in satoshis?Why does Bitcoin need transaction fees prior to hitting its maximum coin limit?What happens if “transaction size” is larger than “maximum block size”?

NERDTreeMenu Remapping

White walkers, cemeteries and wights

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

One-one communication

Is there hard evidence that the grant peer review system performs significantly better than random?

Printing attributes of selection in ArcPy?

What does 丫 mean? 丫是什么意思?

Tannaka duality for semisimple groups

Moving a wrapfig vertically to encroach partially on a subsection title

What does Turing mean by this statement?

Is multiple magic items in one inherently imbalanced?

Does silver oxide react with hydrogen sulfide?

Is openssl rand command cryptographically secure?

What are the main differences between Stargate SG-1 cuts?

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

Is there public access to the Meteor Crater in Arizona?

GDP with Intermediate Production

Delete free apps from library

How to change the tick of the color bar legend to black

What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?

Asymptotics question

Resize vertical bars (absolute-value symbols)

A term for a woman complaining about things/begging in a cute/childish way

How to write capital alpha?



Maximum number of inputs per transaction



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Can we interpret a rolling average transaction count per block as the 'adoption curve' for Bitcoin?Recommended Transaction SizeOptimising the inputs for a transactionWhat is the maximum number of output addresses I can send to with one bitcoin transaction?Get transaction fees per transaction via gettransactionWhat would be the implications of limiting Bitcoin transactions to fifty inputs?Determine inputs/outputs of a transaction before sendingIs there a maximum fee per byte in satoshis?Why does Bitcoin need transaction fees prior to hitting its maximum coin limit?What happens if “transaction size” is larger than “maximum block size”?










3















In theory, what is the maximum number of inputs per transaction? Is it defined primarily by the maximum number we can store on the 9 byte varint?



How big of a number can be stored on 9 bytes?



Would such a transaction even fit in a block if it had just 1 output?










share|improve this question


























    3















    In theory, what is the maximum number of inputs per transaction? Is it defined primarily by the maximum number we can store on the 9 byte varint?



    How big of a number can be stored on 9 bytes?



    Would such a transaction even fit in a block if it had just 1 output?










    share|improve this question
























      3












      3








      3








      In theory, what is the maximum number of inputs per transaction? Is it defined primarily by the maximum number we can store on the 9 byte varint?



      How big of a number can be stored on 9 bytes?



      Would such a transaction even fit in a block if it had just 1 output?










      share|improve this question














      In theory, what is the maximum number of inputs per transaction? Is it defined primarily by the maximum number we can store on the 9 byte varint?



      How big of a number can be stored on 9 bytes?



      Would such a transaction even fit in a block if it had just 1 output?







      transactions transaction-input input






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 2 at 4:19









      Pedro GonçalvesPedro Gonçalves

      646




      646




















          1 Answer
          1






          active

          oldest

          votes


















          3














          No, the number that can be represented by the varint has no effect on the maximum number of inputs. That number is far too large. Rather the maximum number of inputs is constrained by the block size.



          If it really matters to you what the maximum number that a varint can represent is, it's just the maximum value for a 64-bit integer. That's 0xffffffffffffffff. There's really no constraints on what a varint can represent. A transaction with such a number of inputs would not fit in a block, nor would it fit on any existing single storage medium as that transaction would be at least 664.1 Exabytes in size.



          The maximum number of inputs that can fit in a valid transaction is 27022.



          Such a transaction would not use segwit, so we use the maximum block size without segwit of 1000000 bytes. Subtract the 146 for the header and coinbase transaction to get 999854 bytes for the transaction. Subtract 4 bytes for the version, 4 bytes for the locktime, 1 byte for output count, 8 bytes for output value, 1 byte for output script, and 2 bytes for input count. This leaves us with 999833 bytes. With 37 bytes per input (32 previous txid, 4 output index, and 1 for script length), there can by 27022 inputs.






          share|improve this answer




















          • 2





            To note, that includes zero security or signatures.

            – Anonymous
            Apr 2 at 6:11











          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/3.0/"u003ecc by-sa 3.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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f85752%2fmaximum-number-of-inputs-per-transaction%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          No, the number that can be represented by the varint has no effect on the maximum number of inputs. That number is far too large. Rather the maximum number of inputs is constrained by the block size.



          If it really matters to you what the maximum number that a varint can represent is, it's just the maximum value for a 64-bit integer. That's 0xffffffffffffffff. There's really no constraints on what a varint can represent. A transaction with such a number of inputs would not fit in a block, nor would it fit on any existing single storage medium as that transaction would be at least 664.1 Exabytes in size.



          The maximum number of inputs that can fit in a valid transaction is 27022.



          Such a transaction would not use segwit, so we use the maximum block size without segwit of 1000000 bytes. Subtract the 146 for the header and coinbase transaction to get 999854 bytes for the transaction. Subtract 4 bytes for the version, 4 bytes for the locktime, 1 byte for output count, 8 bytes for output value, 1 byte for output script, and 2 bytes for input count. This leaves us with 999833 bytes. With 37 bytes per input (32 previous txid, 4 output index, and 1 for script length), there can by 27022 inputs.






          share|improve this answer




















          • 2





            To note, that includes zero security or signatures.

            – Anonymous
            Apr 2 at 6:11















          3














          No, the number that can be represented by the varint has no effect on the maximum number of inputs. That number is far too large. Rather the maximum number of inputs is constrained by the block size.



          If it really matters to you what the maximum number that a varint can represent is, it's just the maximum value for a 64-bit integer. That's 0xffffffffffffffff. There's really no constraints on what a varint can represent. A transaction with such a number of inputs would not fit in a block, nor would it fit on any existing single storage medium as that transaction would be at least 664.1 Exabytes in size.



          The maximum number of inputs that can fit in a valid transaction is 27022.



          Such a transaction would not use segwit, so we use the maximum block size without segwit of 1000000 bytes. Subtract the 146 for the header and coinbase transaction to get 999854 bytes for the transaction. Subtract 4 bytes for the version, 4 bytes for the locktime, 1 byte for output count, 8 bytes for output value, 1 byte for output script, and 2 bytes for input count. This leaves us with 999833 bytes. With 37 bytes per input (32 previous txid, 4 output index, and 1 for script length), there can by 27022 inputs.






          share|improve this answer




















          • 2





            To note, that includes zero security or signatures.

            – Anonymous
            Apr 2 at 6:11













          3












          3








          3







          No, the number that can be represented by the varint has no effect on the maximum number of inputs. That number is far too large. Rather the maximum number of inputs is constrained by the block size.



          If it really matters to you what the maximum number that a varint can represent is, it's just the maximum value for a 64-bit integer. That's 0xffffffffffffffff. There's really no constraints on what a varint can represent. A transaction with such a number of inputs would not fit in a block, nor would it fit on any existing single storage medium as that transaction would be at least 664.1 Exabytes in size.



          The maximum number of inputs that can fit in a valid transaction is 27022.



          Such a transaction would not use segwit, so we use the maximum block size without segwit of 1000000 bytes. Subtract the 146 for the header and coinbase transaction to get 999854 bytes for the transaction. Subtract 4 bytes for the version, 4 bytes for the locktime, 1 byte for output count, 8 bytes for output value, 1 byte for output script, and 2 bytes for input count. This leaves us with 999833 bytes. With 37 bytes per input (32 previous txid, 4 output index, and 1 for script length), there can by 27022 inputs.






          share|improve this answer















          No, the number that can be represented by the varint has no effect on the maximum number of inputs. That number is far too large. Rather the maximum number of inputs is constrained by the block size.



          If it really matters to you what the maximum number that a varint can represent is, it's just the maximum value for a 64-bit integer. That's 0xffffffffffffffff. There's really no constraints on what a varint can represent. A transaction with such a number of inputs would not fit in a block, nor would it fit on any existing single storage medium as that transaction would be at least 664.1 Exabytes in size.



          The maximum number of inputs that can fit in a valid transaction is 27022.



          Such a transaction would not use segwit, so we use the maximum block size without segwit of 1000000 bytes. Subtract the 146 for the header and coinbase transaction to get 999854 bytes for the transaction. Subtract 4 bytes for the version, 4 bytes for the locktime, 1 byte for output count, 8 bytes for output value, 1 byte for output script, and 2 bytes for input count. This leaves us with 999833 bytes. With 37 bytes per input (32 previous txid, 4 output index, and 1 for script length), there can by 27022 inputs.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 2 at 5:24

























          answered Apr 2 at 5:19









          Andrew ChowAndrew Chow

          33.7k42462




          33.7k42462







          • 2





            To note, that includes zero security or signatures.

            – Anonymous
            Apr 2 at 6:11












          • 2





            To note, that includes zero security or signatures.

            – Anonymous
            Apr 2 at 6:11







          2




          2





          To note, that includes zero security or signatures.

          – Anonymous
          Apr 2 at 6:11





          To note, that includes zero security or signatures.

          – Anonymous
          Apr 2 at 6:11

















          draft saved

          draft discarded
















































          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%2f85752%2fmaximum-number-of-inputs-per-transaction%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

          Triangular numbers and gcdProving sum of a set is $0 pmod n$ if $n$ is odd, or $fracn2 pmod n$ if $n$ is even?Is greatest common divisor of two numbers really their smallest linear combination?GCD, LCM RelationshipProve a set of nonnegative integers with greatest common divisor 1 and closed under addition has all but finite many nonnegative integers.all pairs of a and b in an equation containing gcdTriangular Numbers Modulo $k$ - Hit All Values?Understanding the Existence and Uniqueness of the GCDGCD and LCM with logical symbolsThe greatest common divisor of two positive integers less than 100 is equal to 3. Their least common multiple is twelve times one of the integers.Suppose that for all integers $x$, $x|a$ and $x|b$ if and only if $x|c$. Then $c = gcd(a,b)$Which is the gcd of 2 numbers which are multiplied and the result is 600000?

          Ingelân Ynhâld Etymology | Geografy | Skiednis | Polityk en bestjoer | Ekonomy | Demografy | Kultuer | Klimaat | Sjoch ek | Keppelings om utens | Boarnen, noaten en referinsjes Navigaasjemenuwww.gov.ukOffisjele webside fan it regear fan it Feriene KeninkrykOffisjele webside fan it Britske FerkearsburoNederlânsktalige ynformaasje fan it Britske FerkearsburoOffisjele webside fan English Heritage, de organisaasje dy't him ynset foar it behâld fan it Ingelske kultuergoedYnwennertallen fan alle Britske stêden út 'e folkstelling fan 2011Notes en References, op dizze sideEngland

          Հադիս Բովանդակություն Անվանում և նշանակություն | Դասակարգում | Աղբյուրներ | Նավարկման ցանկ