From 791501185f840200dc14775544fa58d987ab8d90 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 29 Oct 2018 13:39:17 -0400 Subject: [PATCH] Content - Update raw tx per DIP2 Split version into version and type Add extra_payload fields --- _includes/devdoc/ref_transactions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_includes/devdoc/ref_transactions.md b/_includes/devdoc/ref_transactions.md index aa7b30b1..c15362bb 100644 --- a/_includes/devdoc/ref_transactions.md +++ b/_includes/devdoc/ref_transactions.md @@ -224,12 +224,15 @@ A raw transaction has the following top-level format: | Bytes | Name | Data Type | Description |----------|--------------|---------------------|------------- -| 4 | version | uint32_t | Transaction version number; currently version 2. Programs creating transactions using newer consensus rules may use higher version numbers. +| 2 | version | uint16_t | Transaction version number; currently version 3. Programs creating transactions using newer consensus rules may use higher version numbers. +| 2 | type | uint16_t | Transaction type number; 0 for classical transactions; Non-zero for DIP2 special transactions. | *Varies* | tx_in count | compactSize uint | Number of inputs in this transaction. | *Varies* | tx_in | txIn | Transaction inputs. See description of txIn below. | *Varies* | tx_out count | compactSize uint | Number of outputs in this transaction. | *Varies* | tx_out | txOut | Transaction outputs. See description of txOut below. | 4 | lock_time | uint32_t | A time (Unix epoch time) or block number. See the [locktime parsing rules][]. +| *Varies* | extra_payload size | compactSize uint | *Added by DIP2*

Variable number of bytes of extra payload for DIP2-based special transactions +| *Varies* | extra_payload | blob | *Added by DIP2*

Special transaction payload. A transaction may have multiple inputs and outputs, so the txIn and txOut structures may recur within a transaction. CompactSize unsigned