GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wonder about the terms of "input", "output". · Issue #94 · ProgrammingBlockchain/ProgrammingBlockchain

Wonder about the terms of "input", "output". #94

New issue
Copy link
New issue
Copy link
Open
Open
Wonder about the terms of "input", "output".#94
Copy link

Description

@youngminpark2559
youngminpark2559
opened on Nov 23, 2017
Issue body actions

At this page:
https://github.com/youngmtool/ProgrammingBlockchain/blob/master/bitcoin_transfer/spend_your_coin.md

At this sentence:
/Generate a TxOut for hallOfTheMakers.
TxOut hallOfTheMakersTxOut = new TxOut()

This code is making 2 TxOuts.
But under my understanding, since "in" and "out" in the transaction is TxIn and TxOut, one transaction can have one TxIn and one TxOut.
But each TxIn and TxOut can have multiple inputs and outputs.
See the illustration, TransactionSendReceiveCoins.png, I draw:
https://youngmtool.gitbooks.io/csharpdotnetconceptsandillustrations/blockchain.html

Can I say that the above code is making 2 outputs rather than 2 TxOut?

Activity

  1. nopara73 commented on Nov 23, 2017

    @nopara73
    nopara73
    on Nov 23, 2017
    Contributor
    More actions

    But under my understanding, since "in" and "out" in the transaction is TxIn and TxOut, one transaction can have one TxIn and one TxOut.

    That's not correct. I think your confusion comes from how you read json and how Bitcoin Core traditionally named its rpc output. in and out are actually arrays. It would be more correct to call the arrays ins and outs.

    Can I say that the above code is making 2 outputs rather than 2 TxOut?

    TxOut, out, output are synonyms. I'd keep it TxOut, since that's what NBitcoin uses.

  2. youngminpark2559 commented on Nov 24, 2017

    @youngminpark2559
    youngminpark2559
    on Nov 24, 2017
    ContributorAuthor
    More actions

    Of the sentence "Bitcoin Core traditionally named its rpc output", traditionally?, it means the representation of the transaction in the JSON is now different? Or the representation of the transaction in the JSON, under this sentence: scriptPubKeys of the "normal" TxOuts and the scriptPubKey of the TxOut with the message, at this page : https://github.com/youngmtool/ProgrammingBlockchain/blob/master/bitcoin_transfer/spend_your_coin.md, is still identical with the up to date format?

    And again, of above JSON representation of the transaction, so that you mean I can call the key "in" as "array ins"?
    But why is "in" pluralized? Under my understanding, one transaction can have only one "in". Is it wrong?

    I've never seen the term indicating "in" or "out" in this book, all the terms such as TxOut, output, out indicate each object holding value and ScriptPubKey in the array, so I think "in" and "out" are needed to be mentioned as a term.

  3. NicolasDorier commented on Nov 24, 2017

    @NicolasDorier
    NicolasDorier
    on Nov 24, 2017
    Collaborator
    More actions

    I personally prefer TxOut than output when describing code.

  4. NicolasDorier commented on Nov 24, 2017

    @NicolasDorier
    NicolasDorier
    on Nov 24, 2017
    Collaborator
    More actions

    the ins pluralized come from core as well.

  5. youngminpark2559 commented on Nov 24, 2017

    @youngminpark2559
    youngminpark2559
    on Nov 24, 2017
    ContributorAuthor
    More actions

    @NicolasDorier
    But what do you call for "out" as a term for key in a transaction because "out" is the term which is already used for indicating TxOut and output?

    Bitcoin core, does it mean the upgraded new version of Bitcoin?
    Anyway, do you mean that in Bitcoin core multiple "in" in a transaction, like above my wondering not meaning each object in the array which is keyed as "in", can be come?

  6. NicolasDorier commented on Nov 30, 2017

    @NicolasDorier
    NicolasDorier
    on Nov 30, 2017
    Collaborator
    More actions

    out == output == TxOut. in == input == TxIn. Bitcoin Core is software implementing Bitcoin protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.