Skip to content
Snippets Groups Projects

WIP: RFC 5 : New Scalable Blockchain Protocol

Closed nanocryk requested to merge rfc5-duniter-protocol-rework into master
1 file
+ 25
7
Compare changes
  • Side-by-side
  • Inline
@@ -22,10 +22,10 @@ extensibility.
1. [Introduction](#1-introduction)
1. [Conventions](#2-conventions)
1. [General document format](#3-general-document-format)
1. Identity document
1. Membership document
1. Certification document
1. Revocation document
1. [Identity document](#4-identity-document)
1. [Membership document](#5-membership-document)
1. [Certification document](#6-certification-document)
1. [Revocation document](#7-revocation-document)
1. [Transaction document](#8-transaction-document)
1. Block document
@@ -274,7 +274,7 @@ structure if the first field is different from 0 :
| Size | Data |
|:----:|:-----|
| *4 bytes* | Length of text
| *4 bytes* | Length of text (in characters)
| ... | V10 Revocation document text *(with alignement padding)*
In this case, there must no issuers and signatures, since they are contained in
@@ -282,10 +282,10 @@ the text document.
## 8. Transaction document
### 8.1. Document structure
### 8.1. Structure
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
**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
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.
| 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
TODO
\ No newline at end of file
Loading