Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Dev Docs: Detail Transaction Format #631
Conversation
saivann
commented on an outdated diff
Nov 4, 2014
| -A sample raw transaction is the first non-coinbase transaction, made in | ||
| -[block 170][block170]. To get the transaction, use the `getrawtransaction` RPC with | ||
| -that transaction's txid (provided below): | ||
| +As of Bitcoin Core 0.9.3 (October 2014), all transactions use the | ||
| +version 1 format described below. (Note: transactions in the block chain | ||
| +are allowed to list a higher version number to permit soft forks, but | ||
| +they are treated as version 1 transactions by current software.) | ||
| + | ||
| +A raw transaction has the following top-level format: | ||
| + | ||
| +| Bytes | Name | Data Type | Description | ||
| +|----------|--------------|---------------------|------------- | ||
| +| 4 | version | uint32_t | Transaction version number; currently version 1. Programs creating transactions using newer consensus rules may use higher version numbers. | ||
| +| *Varies* | tx_in count | compactSize uint | Number of inputs in this transaction. | ||
| +| *Varies* | tx_in | *See TxIn Below* | Transaction inputs. | ||
| +| *Varies* | tx_out count | compactSize uint | Number outputs in this transaction |
saivann
Contributor
|
saivann
and 1 other
commented on an outdated diff
Nov 4, 2014
| -A sample raw transaction is the first non-coinbase transaction, made in | ||
| -[block 170][block170]. To get the transaction, use the `getrawtransaction` RPC with | ||
| -that transaction's txid (provided below): | ||
| +As of Bitcoin Core 0.9.3 (October 2014), all transactions use the | ||
| +version 1 format described below. (Note: transactions in the block chain | ||
| +are allowed to list a higher version number to permit soft forks, but | ||
| +they are treated as version 1 transactions by current software.) | ||
| + | ||
| +A raw transaction has the following top-level format: | ||
| + | ||
| +| Bytes | Name | Data Type | Description | ||
| +|----------|--------------|---------------------|------------- | ||
| +| 4 | version | uint32_t | Transaction version number; currently version 1. Programs creating transactions using newer consensus rules may use higher version numbers. | ||
| +| *Varies* | tx_in count | compactSize uint | Number of inputs in this transaction. | ||
| +| *Varies* | tx_in | *See TxIn Below* | Transaction inputs. |
saivann
Contributor
|
|
@harding Very useful addition, thanks! |
|
@saivann thanks for the review! I meant to ask you: do you mind if I change the CSS to make all tables in the dev docs left-aligned instead of the default justified? Justified (especially in non-auto-hyphen HTML) doesn't seem to work that well in tight spaces like tables. If you agree, I'll make that change as part of this pull and also check the preexisting tables in the docs to make sure they still look good. |
|
@harding I was actually about to suggest we use text-align:left; on the whole devel-docs layout ( |
|
Made all discussed changes and updated the preview:
|
|
Thanks! I haven't researched enough to proofread the accuracy of the changes, but I couldn't find any part that raised doubts on my side, and transaction examples are very clear. So, LGTM, as always! I'll fix the inconsistent line-height in tables a bit later. |
|
@saivann thanks! In the absence of critical feedback, I'll merge this pull around Friday morning UTC. |
harding
merged commit 6ae3342
into
bitcoin-dot-org:master
Nov 7, 2014
harding
added a commit
that referenced
this pull request
Nov 7, 2014
harding
referenced this pull request
Nov 8, 2014
Merged
Dev Docs: Describe Serialized Block Header And Block Format #638
harding
deleted the
harding:tx-format branch
Feb 25, 2015
ysangkok
commented on _includes/ref_transactions.md in 0af6ef0
Jun 24, 2017
|
why is this signed? it is non-negative according to 'Transaction' in the wiki |
harding commentedNov 3, 2014
Preview: http://dg0.dtrt.org/en/developer-reference#raw-transaction-format
Provides a detailed description of the transaction format, replacing an
example hexdump taken from the wiki.
I'm putting this in the transaction section as the format is necessary
for the creation of txids, which are used as merkle leaves (so are
covered by consensus rules). However, this is also the format used by
several P2P network messages to transmit transactions, so I'll be
linking back to it from there as I document those messages.