Skip to content
Snippets Groups Projects
Commit d1c4cd4b authored by nanocryk's avatar nanocryk
Browse files

transaction document structure

parent db320a54
No related branches found
No related tags found
1 merge request!6WIP: RFC 5 : New Scalable Blockchain Protocol
This commit is part of merge request !6. Comments created here will be created in the context of that merge request.
...@@ -22,10 +22,10 @@ extensibility. ...@@ -22,10 +22,10 @@ extensibility.
1. [Introduction](#1-introduction) 1. [Introduction](#1-introduction)
1. [Conventions](#2-conventions) 1. [Conventions](#2-conventions)
1. [General document format](#3-general-document-format) 1. [General document format](#3-general-document-format)
1. Identity document 1. [Identity document](#4-identity-document)
1. Membership document 1. [Membership document](#5-membership-document)
1. Certification document 1. [Certification document](#6-certification-document)
1. Revocation document 1. [Revocation document](#7-revocation-document)
1. [Transaction document](#8-transaction-document) 1. [Transaction document](#8-transaction-document)
1. Block document 1. Block document
...@@ -274,7 +274,7 @@ structure if the first field is different from 0 : ...@@ -274,7 +274,7 @@ structure if the first field is different from 0 :
| Size | Data | | Size | Data |
|:----:|:-----| |:----:|:-----|
| *4 bytes* | Length of text | *4 bytes* | Length of text (in characters)
| ... | V10 Revocation document text *(with alignement padding)* | ... | V10 Revocation document text *(with alignement padding)*
In this case, there must no issuers and signatures, since they are contained in In this case, there must no issuers and signatures, since they are contained in
...@@ -282,10 +282,10 @@ the text document. ...@@ -282,10 +282,10 @@ the text document.
## 8. Transaction document ## 8. Transaction document
### 8.1. Document structure ### 8.1. Structure
A **transaction document** describes the consumption of **sources** and the creation of A **transaction document** describes the consumption of **sources** and the creation of
**outputs**. Since we're dealing with *Universal Dividend*s, it's possible to provide a list **outputs**. Since we're dealing with *Universal Dividends*, it's possible to provide a list
of UDs to spend. Each source or UD can be spent only once, and the of UDs to spend. Each source or UD can be spent only once, and the
**sum of *inputs* values must equal the sum of *output* values**. **sum of *inputs* values must equal the sum of *output* values**.
...@@ -293,6 +293,24 @@ Each *output* describes spending conditions using a **script**. This *script* is ...@@ -293,6 +293,24 @@ Each *output* describes spending conditions using a **script**. This *script* is
an **Abstract Syntaxic Tree** of operations which returns a boolean : can this output be used an **Abstract Syntaxic Tree** of operations which returns a boolean : can this output be used
as an input of a new transaction. This format will be describe further in this document. as an input of a new transaction. This format will be describe further in this document.
| Size | Data |
|:----:|:-----|
| *1 byte* | Number of UD inputs |
| *1 byte* | Number of unspent inputs |
| *1 byte* | Number of outputs |
| *1 byte* | *(padding)* |
| | **For each UD** : |
| *32 bytes* | UD creator identity hash |
| *36 bytes* | Blockstamp of UD creation |
| | **For each unspent input** : |
| *32 bytes* | Source transaction document hash |
| *1 byte* | Source output index |
| ... | *Unlock conditions* |
| | **For each output** : |
| *4 bytes* | Unsigned currency value |
| *1 byte* | Unsigned value power base |
| ... | *Lock script* |
### 8.X Script system ### 8.X Script system
TODO TODO
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment